From 818857dea2a6b5a157f3ab3da67d35509d280e89 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 20 Apr 2023 10:44:20 +0300 Subject: [PATCH 1/4] [#2325] trigger the related record realtime events on custom record model change --- apis/realtime.go | 48 ++++++++++++++++++---- apis/realtime_test.go | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 8 deletions(-) diff --git a/apis/realtime.go b/apis/realtime.go index 74c9ae8c..556b14a8 100644 --- a/apis/realtime.go +++ b/apis/realtime.go @@ -7,6 +7,7 @@ import ( "fmt" "log" "net/http" + "strings" "time" "github.com/labstack/echo/v5" @@ -215,7 +216,9 @@ func (api *realtimeApi) setSubscriptions(c echo.Context) error { func (api *realtimeApi) updateClientsAuthModel(contextKey string, newModel models.Model) error { for _, client := range api.app.SubscriptionsBroker().Clients() { clientModel, _ := client.Get(contextKey).(models.Model) - if clientModel != nil && clientModel.GetId() == newModel.GetId() { + if clientModel != nil && + clientModel.TableName() == newModel.TableName() && + clientModel.GetId() == newModel.GetId() { client.Set(contextKey, newModel) } } @@ -227,7 +230,9 @@ func (api *realtimeApi) updateClientsAuthModel(contextKey string, newModel model func (api *realtimeApi) unregisterClientsByAuthModel(contextKey string, model models.Model) error { for _, client := range api.app.SubscriptionsBroker().Clients() { clientModel, _ := client.Get(contextKey).(models.Model) - if clientModel != nil && clientModel.GetId() == model.GetId() { + if clientModel != nil && + clientModel.TableName() == model.TableName() && + clientModel.GetId() == model.GetId() { api.app.SubscriptionsBroker().Unregister(client.Id()) } } @@ -238,7 +243,7 @@ func (api *realtimeApi) unregisterClientsByAuthModel(contextKey string, model mo func (api *realtimeApi) bindEvents() { // update the clients that has admin or auth record association api.app.OnModelAfterUpdate().PreAdd(func(e *core.ModelEvent) error { - if record, ok := e.Model.(*models.Record); ok && record != nil && record.Collection().IsAuth() { + if record := api.resolveRecord(e.Model); record != nil && record.Collection().IsAuth() { return api.updateClientsAuthModel(ContextAuthRecordKey, record) } @@ -251,8 +256,8 @@ func (api *realtimeApi) bindEvents() { // remove the client(s) associated to the deleted admin or auth record api.app.OnModelAfterDelete().PreAdd(func(e *core.ModelEvent) error { - if record, ok := e.Model.(*models.Record); ok && record != nil && record.Collection().IsAuth() { - return api.unregisterClientsByAuthModel(ContextAuthRecordKey, record) + if collection := api.resolveRecordCollection(e.Model); collection != nil && collection.IsAuth() { + return api.unregisterClientsByAuthModel(ContextAuthRecordKey, e.Model) } if admin, ok := e.Model.(*models.Admin); ok && admin != nil { @@ -263,7 +268,7 @@ func (api *realtimeApi) bindEvents() { }) api.app.OnModelAfterCreate().PreAdd(func(e *core.ModelEvent) error { - if record, ok := e.Model.(*models.Record); ok { + if record := api.resolveRecord(e.Model); record != nil { if err := api.broadcastRecord("create", record); err != nil && api.app.IsDebug() { log.Println(err) } @@ -272,7 +277,7 @@ func (api *realtimeApi) bindEvents() { }) api.app.OnModelAfterUpdate().PreAdd(func(e *core.ModelEvent) error { - if record, ok := e.Model.(*models.Record); ok { + if record := api.resolveRecord(e.Model); record != nil { if err := api.broadcastRecord("update", record); err != nil && api.app.IsDebug() { log.Println(err) } @@ -281,7 +286,7 @@ func (api *realtimeApi) bindEvents() { }) api.app.OnModelBeforeDelete().Add(func(e *core.ModelEvent) error { - if record, ok := e.Model.(*models.Record); ok { + if record := api.resolveRecord(e.Model); record != nil { if err := api.broadcastRecord("delete", record); err != nil && api.app.IsDebug() { log.Println(err) } @@ -290,6 +295,33 @@ func (api *realtimeApi) bindEvents() { }) } +// resolveRecord converts *if possible* the provided model interface to a Record. +// This is usually helpful if the provided model is a custom Record model struct. +func (api *realtimeApi) resolveRecord(model models.Model) (record *models.Record) { + record, _ = model.(*models.Record) + + // check if it is custom Record model struct (ignore "private" tables) + if record == nil && !strings.HasPrefix(model.TableName(), "_") { + record, _ = api.app.Dao().FindRecordById(model.TableName(), model.GetId()) + } + + return record +} + +// resolveRecordCollection extracts *if possible* the Collection model from the provided model interface. +// This is usually helpful if the provided model is a custom Record model struct. +func (api *realtimeApi) resolveRecordCollection(model models.Model) (collection *models.Collection) { + if record, ok := model.(*models.Record); ok { + collection = record.Collection() + } else if !strings.HasPrefix(model.TableName(), "_") { + // check if it is custom Record model struct (ignore "private" tables) + collection, _ = api.app.Dao().FindCollectionByNameOrId(model.TableName()) + } + + return collection +} + +// canAccessRecord checks if the subscription client has access to the specified record model. func (api *realtimeApi) canAccessRecord(client subscriptions.Client, record *models.Record, accessRule *string) bool { admin, _ := client.Get(ContextAdminKey).(*models.Admin) if admin != nil { diff --git a/apis/realtime_test.go b/apis/realtime_test.go index 9c65bfb9..b715dcb5 100644 --- a/apis/realtime_test.go +++ b/apis/realtime_test.go @@ -7,8 +7,10 @@ import ( "testing" "github.com/labstack/echo/v5" + "github.com/pocketbase/dbx" "github.com/pocketbase/pocketbase/apis" "github.com/pocketbase/pocketbase/core" + "github.com/pocketbase/pocketbase/daos" "github.com/pocketbase/pocketbase/models" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/hook" @@ -353,3 +355,96 @@ func TestRealtimeAdminUpdateEvent(t *testing.T) { t.Fatalf("Expected authRecord with email %q, got %q", admin2.Email, clientAdmin.Email) } } + +// Custom auth record model struct +// ------------------------------------------------------------------- +var _ models.Model = (*CustomUser)(nil) + +type CustomUser struct { + models.BaseModel + + Email string `db:"email" json:"email"` +} + +func (m *CustomUser) TableName() string { + return "users" // the name of your collection +} + +func findCustomUserByEmail(dao *daos.Dao, email string) (*CustomUser, error) { + model := &CustomUser{} + + err := dao.ModelQuery(model). + AndWhere(dbx.HashExp{"email": email}). + Limit(1). + One(model) + + if err != nil { + return nil, err + } + + return model, nil +} + +func TestRealtimeCustomAuthModelDeleteEvent(t *testing.T) { + testApp, _ := tests.NewTestApp() + defer testApp.Cleanup() + + apis.InitApi(testApp) + + authRecord, err := testApp.Dao().FindFirstRecordByData("users", "email", "test@example.com") + if err != nil { + t.Fatal(err) + } + + client := subscriptions.NewDefaultClient() + client.Set(apis.ContextAuthRecordKey, authRecord) + testApp.SubscriptionsBroker().Register(client) + + // refetch the authRecord as CustomUser + customUser, err := findCustomUserByEmail(testApp.Dao(), "test@example.com") + if err != nil { + t.Fatal(err) + } + + // delete the custom user (should unset the client auth record) + if err := testApp.Dao().Delete(customUser); err != nil { + t.Fatal(err) + } + + if len(testApp.SubscriptionsBroker().Clients()) != 0 { + t.Fatalf("Expected no subscription clients, found %d", len(testApp.SubscriptionsBroker().Clients())) + } +} + +func TestRealtimeCustomAuthModelUpdateEvent(t *testing.T) { + testApp, _ := tests.NewTestApp() + defer testApp.Cleanup() + + apis.InitApi(testApp) + + authRecord, err := testApp.Dao().FindFirstRecordByData("users", "email", "test@example.com") + if err != nil { + t.Fatal(err) + } + + client := subscriptions.NewDefaultClient() + client.Set(apis.ContextAuthRecordKey, authRecord) + testApp.SubscriptionsBroker().Register(client) + + // refetch the authRecord as CustomUser + customUser, err := findCustomUserByEmail(testApp.Dao(), "test@example.com") + if err != nil { + t.Fatal(err) + } + + // change its email + customUser.Email = "new@example.com" + if err := testApp.Dao().Save(customUser); err != nil { + t.Fatal(err) + } + + clientAuthRecord, _ := client.Get(apis.ContextAuthRecordKey).(*models.Record) + if clientAuthRecord.Email() != customUser.Email { + t.Fatalf("Expected authRecord with email %q, got %q", customUser.Email, clientAuthRecord.Email()) + } +} From 01f4765c09427820500d0133a259925b7da051ea Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 20 Apr 2023 14:30:29 +0300 Subject: [PATCH 2/4] added Command+S quick save alias and fixed relations draft restore --- ui/src/components/base/Toasts.svelte | 5 +++-- .../records/RecordUpsertPanel.svelte | 8 +++++-- .../components/records/RecordsPicker.svelte | 2 +- .../records/fields/RelationField.svelte | 21 ++++++++++++++++--- ui/src/utils/CommonHelper.js | 2 +- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ui/src/components/base/Toasts.svelte b/ui/src/components/base/Toasts.svelte index ecb01530..413ac968 100644 --- a/ui/src/components/base/Toasts.svelte +++ b/ui/src/components/base/Toasts.svelte @@ -1,5 +1,5 @@ @@ -12,7 +12,8 @@ class:alert-success={toast.type == "success"} class:alert-danger={toast.type == "error"} class:alert-warning={toast.type == "warning"} - transition:fade={{ duration: 150 }} + in:slide={{ duration: 150 }} + out:fade={{ duration: 150 }} animate:flip={{ duration: 150 }} >
diff --git a/ui/src/components/records/RecordUpsertPanel.svelte b/ui/src/components/records/RecordUpsertPanel.svelte index 2497f3e4..9acd099e 100644 --- a/ui/src/components/records/RecordUpsertPanel.svelte +++ b/ui/src/components/records/RecordUpsertPanel.svelte @@ -101,7 +101,8 @@ isLoaded = true; } - function replaceOriginal(newOriginal) { + async function replaceOriginal(newOriginal) { + setErrors({}); // reset errors original = newOriginal || new Record(); uploadedFilesMap = {}; deletedFileIndexesMap = {}; @@ -115,6 +116,9 @@ record[k] = newOriginal[k]; } + // wait to populate the fields to get the normalized values + await tick(); + originalSerializedData = JSON.stringify(record); deleteDraft(); @@ -353,7 +357,7 @@ } function handleFormKeydown(e) { - if (e.ctrlKey && e.code == "KeyS") { + if ((e.ctrlKey || e.metaKey) && e.code == "KeyS") { e.preventDefault(); e.stopPropagation(); save(false); diff --git a/ui/src/components/records/RecordsPicker.svelte b/ui/src/components/records/RecordsPicker.svelte index b6d70631..1456491c 100644 --- a/ui/src/components/records/RecordsPicker.svelte +++ b/ui/src/components/records/RecordsPicker.svelte @@ -310,7 +310,7 @@ Cancel diff --git a/ui/src/components/records/fields/RelationField.svelte b/ui/src/components/records/fields/RelationField.svelte index 0c01eafc..609472f7 100644 --- a/ui/src/components/records/fields/RelationField.svelte +++ b/ui/src/components/records/fields/RelationField.svelte @@ -23,13 +23,28 @@ fieldRef?.changed(); } - load(); + $: if (needLoad(list, value)) { + load(); + } + + function needLoad() { + if (isLoading) { + return false; + } + + const ids = CommonHelper.toArray(value); + + list = list.filter((item) => ids.includes(item.id)); + + return ids.length != list.length; + } async function load() { const ids = CommonHelper.toArray(value); + list = []; // reset + if (!field?.options?.collectionId || !ids.length) { - list = []; isLoading = false; return; } @@ -100,7 +115,7 @@
- {#each list as record} + {#each list as record (record.id)}
diff --git a/ui/src/utils/CommonHelper.js b/ui/src/utils/CommonHelper.js index 170b2768..b57ae3fb 100644 --- a/ui/src/utils/CommonHelper.js +++ b/ui/src/utils/CommonHelper.js @@ -1327,7 +1327,7 @@ export default class CommonHelper { setup: (editor) => { editor.on('keydown', (e) => { // propagate save shortcut to the parent - if (e.ctrlKey && e.code == "KeyS" && editor.formElement) { + if ((e.ctrlKey || e.metaKey) && e.code == "KeyS" && editor.formElement) { e.preventDefault(); e.stopPropagation(); editor.formElement.dispatchEvent(new KeyboardEvent("keydown", e)); From e1cfe7fc4ac52d36394d845bdd5dfa586d01075b Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 20 Apr 2023 15:32:09 +0300 Subject: [PATCH 3/4] [#2327] enabled rtl for the editor field --- CHANGELOG.md | 6 + ...288cc38.js => AuthMethodsDocs-45c570e8.js} | 2 +- ...b82a233.js => AuthRefreshDocs-4103ee7c.js} | 2 +- ...b46f.js => AuthWithOAuth2Docs-ea3b1fde.js} | 2 +- ...e1.js => AuthWithPasswordDocs-6b6ca833.js} | 2 +- ...tor-65cf3b79.js => CodeEditor-ed3b6d0c.js} | 2 +- ....js => ConfirmEmailChangeDocs-727175b6.js} | 2 +- ...s => ConfirmPasswordResetDocs-0123ea90.js} | 2 +- ...js => ConfirmVerificationDocs-d1d2a4dc.js} | 2 +- ...-fee96749.js => CreateApiDocs-6fd167db.js} | 2 +- ...-de585481.js => DeleteApiDocs-c0d2fce4.js} | 2 +- ...js => FilterAutocompleteInput-5ad2deed.js} | 2 +- ...cs-8a057460.js => ListApiDocs-7984933b.js} | 2 +- ...3.js => ListExternalAuthsDocs-368be48d.js} | 2 +- ...PageAdminConfirmPasswordReset-638f988c.js} | 2 +- ...PageAdminRequestPasswordReset-f2d951d5.js} | 2 +- ...a31c.js => PageOAuth2Redirect-5f45cdfd.js} | 2 +- ... PageRecordConfirmEmailChange-5246a39b.js} | 2 +- ...ageRecordConfirmPasswordReset-2d9b57c3.js} | 2 +- ...PageRecordConfirmVerification-19275fb7.js} | 2 +- ...19df2b7.js => RealtimeApiDocs-eaba7ffc.js} | 2 +- ....js => RequestEmailChangeDocs-2a33c31c.js} | 2 +- ...s => RequestPasswordResetDocs-16e43168.js} | 2 +- ...js => RequestVerificationDocs-d948a007.js} | 2 +- ...dkTabs-ae399d8e.js => SdkTabs-579eff6e.js} | 2 +- ....js => UnlinkExternalAuthDocs-86559302.js} | 2 +- ...-bf9cd75a.js => UpdateApiDocs-992b265a.js} | 2 +- ...cs-9dc7a74b.js => ViewApiDocs-e1f1acb4.js} | 2 +- .../{index-0aae7a97.js => index-81d06e37.js} | 174 +++++++++--------- ui/dist/index.html | 3 +- ui/index.html | 1 + ui/src/utils/CommonHelper.js | 45 ++++- 32 files changed, 165 insertions(+), 118 deletions(-) rename ui/dist/assets/{AuthMethodsDocs-6288cc38.js => AuthMethodsDocs-45c570e8.js} (98%) rename ui/dist/assets/{AuthRefreshDocs-db82a233.js => AuthRefreshDocs-4103ee7c.js} (98%) rename ui/dist/assets/{AuthWithOAuth2Docs-a8d1b46f.js => AuthWithOAuth2Docs-ea3b1fde.js} (98%) rename ui/dist/assets/{AuthWithPasswordDocs-9c29a2e1.js => AuthWithPasswordDocs-6b6ca833.js} (98%) rename ui/dist/assets/{CodeEditor-65cf3b79.js => CodeEditor-ed3b6d0c.js} (99%) rename ui/dist/assets/{ConfirmEmailChangeDocs-2bb81251.js => ConfirmEmailChangeDocs-727175b6.js} (97%) rename ui/dist/assets/{ConfirmPasswordResetDocs-d78ea0ab.js => ConfirmPasswordResetDocs-0123ea90.js} (98%) rename ui/dist/assets/{ConfirmVerificationDocs-bab2ffd7.js => ConfirmVerificationDocs-d1d2a4dc.js} (97%) rename ui/dist/assets/{CreateApiDocs-fee96749.js => CreateApiDocs-6fd167db.js} (99%) rename ui/dist/assets/{DeleteApiDocs-de585481.js => DeleteApiDocs-c0d2fce4.js} (97%) rename ui/dist/assets/{FilterAutocompleteInput-7075cc59.js => FilterAutocompleteInput-5ad2deed.js} (99%) rename ui/dist/assets/{ListApiDocs-8a057460.js => ListApiDocs-7984933b.js} (99%) rename ui/dist/assets/{ListExternalAuthsDocs-9ac3ef33.js => ListExternalAuthsDocs-368be48d.js} (98%) rename ui/dist/assets/{PageAdminConfirmPasswordReset-4c97638f.js => PageAdminConfirmPasswordReset-638f988c.js} (98%) rename ui/dist/assets/{PageAdminRequestPasswordReset-49abd701.js => PageAdminRequestPasswordReset-f2d951d5.js} (98%) rename ui/dist/assets/{PageOAuth2Redirect-19f0a31c.js => PageOAuth2Redirect-5f45cdfd.js} (83%) rename ui/dist/assets/{PageRecordConfirmEmailChange-8b633175.js => PageRecordConfirmEmailChange-5246a39b.js} (98%) rename ui/dist/assets/{PageRecordConfirmPasswordReset-08b4a443.js => PageRecordConfirmPasswordReset-2d9b57c3.js} (98%) rename ui/dist/assets/{PageRecordConfirmVerification-9a8dcf69.js => PageRecordConfirmVerification-19275fb7.js} (97%) rename ui/dist/assets/{RealtimeApiDocs-f19df2b7.js => RealtimeApiDocs-eaba7ffc.js} (98%) rename ui/dist/assets/{RequestEmailChangeDocs-25b63fa1.js => RequestEmailChangeDocs-2a33c31c.js} (98%) rename ui/dist/assets/{RequestPasswordResetDocs-1b6864da.js => RequestPasswordResetDocs-16e43168.js} (97%) rename ui/dist/assets/{RequestVerificationDocs-74701cdf.js => RequestVerificationDocs-d948a007.js} (97%) rename ui/dist/assets/{SdkTabs-ae399d8e.js => SdkTabs-579eff6e.js} (96%) rename ui/dist/assets/{UnlinkExternalAuthDocs-72a9b84b.js => UnlinkExternalAuthDocs-86559302.js} (98%) rename ui/dist/assets/{UpdateApiDocs-bf9cd75a.js => UpdateApiDocs-992b265a.js} (99%) rename ui/dist/assets/{ViewApiDocs-9dc7a74b.js => ViewApiDocs-e1f1acb4.js} (98%) rename ui/dist/assets/{index-0aae7a97.js => index-81d06e37.js} (74%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a79972e..9f74cd41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ - Fixed `Ctrl + S` in the `editor` field not propagating the quick save shortcut to the parent form. +- Added `⌘ + S` alias for the record quick save shortcut (_I have no Mac device to test it but it should work based on [`e.metaKey` docs](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey)_). + +- Enabled RTL for the TinyMCE editor ([#2327](https://github.com/pocketbase/pocketbase/issues/2327)). + +- Trigger the related `Record` model realtime subscription events on [custom model struct](https://pocketbase.io/docs/custom-models/) save ([#2325](https://github.com/pocketbase/pocketbase/discussions/2325)). + ## v0.15.0 diff --git a/ui/dist/assets/AuthMethodsDocs-6288cc38.js b/ui/dist/assets/AuthMethodsDocs-45c570e8.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs-6288cc38.js rename to ui/dist/assets/AuthMethodsDocs-45c570e8.js index 12e27e6e..5b0b4b2d 100644 --- a/ui/dist/assets/AuthMethodsDocs-6288cc38.js +++ b/ui/dist/assets/AuthMethodsDocs-45c570e8.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n,m as me,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-0aae7a97.js";import{S as Be}from"./SdkTabs-ae399d8e.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=g(s),f=w(),k(o,"class","tab-item"),Q(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+"")&&H(m,s),C&6&&Q(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=w(),k(o,"class","tab-item"),Q(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)&&Q(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,X,q,P,D,j,W,M,K,R,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],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 g,b as w,c as _e,f as k,g as h,h as n,m as me,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-81d06e37.js";import{S as Be}from"./SdkTabs-579eff6e.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=g(s),f=w(),k(o,"class","tab-item"),Q(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+"")&&H(m,s),C&6&&Q(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=w(),k(o,"class","tab-item"),Q(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)&&Q(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,X,q,P,D,j,W,M,K,R,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],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-db82a233.js b/ui/dist/assets/AuthRefreshDocs-4103ee7c.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs-db82a233.js rename to ui/dist/assets/AuthRefreshDocs-4103ee7c.js index 55e87503..9bf87140 100644 --- a/ui/dist/assets/AuthRefreshDocs-db82a233.js +++ b/ui/dist/assets/AuthRefreshDocs-4103ee7c.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,T as Qe,C as He,p as We,r as x,u as Ge}from"./index-0aae7a97.js";import{S as Xe}from"./SdkTabs-ae399d8e.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){d(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&&u(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){d(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&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,P,q,S=[],Te=new Map,Ce,H,y=[],Pe=new Map,M;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,T as Qe,C as He,p as We,r as x,u as Ge}from"./index-81d06e37.js";import{S as Xe}from"./SdkTabs-579eff6e.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){d(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&&u(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){d(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&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,P,q,S=[],Te=new Map,Ce,H,y=[],Pe=new Map,M;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-a8d1b46f.js b/ui/dist/assets/AuthWithOAuth2Docs-ea3b1fde.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-a8d1b46f.js rename to ui/dist/assets/AuthWithOAuth2Docs-ea3b1fde.js index 718a2f2c..b74e3865 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-a8d1b46f.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-ea3b1fde.js @@ -1,4 +1,4 @@ -import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,T as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-0aae7a97.js";import{S as Qe}from"./SdkTabs-ae399d8e.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:` +import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,T as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-81d06e37.js";import{S as Qe}from"./SdkTabs-579eff6e.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-9c29a2e1.js b/ui/dist/assets/AuthWithPasswordDocs-6b6ca833.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-9c29a2e1.js rename to ui/dist/assets/AuthWithPasswordDocs-6b6ca833.js index febfb358..b94f8bee 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-9c29a2e1.js +++ b/ui/dist/assets/AuthWithPasswordDocs-6b6ca833.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,M 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 Tt,x as At,N as ce,O as ye,k as ge,P as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Oe}from"./index-0aae7a97.js";import{S as Te}from"./SdkTabs-ae399d8e.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 Ae(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(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(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&At(S,i),C&24&<(l,"active",e[3]===e[8].code)},d(R){R&&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),Tt(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),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,O,B,Ut,ot,A,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,K,T=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Ae}let q=le(n),$=q&&q(n);A=new Te({props:{js:` +import{S as Se,i as ve,s as we,M 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 Tt,x as At,N as ce,O as ye,k as ge,P as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Oe}from"./index-81d06e37.js";import{S as Te}from"./SdkTabs-579eff6e.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 Ae(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(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(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&At(S,i),C&24&<(l,"active",e[3]===e[8].code)},d(R){R&&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),Tt(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),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,O,B,Ut,ot,A,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,K,T=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Ae}let q=le(n),$=q&&q(n);A=new Te({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor-65cf3b79.js b/ui/dist/assets/CodeEditor-ed3b6d0c.js similarity index 99% rename from ui/dist/assets/CodeEditor-65cf3b79.js rename to ui/dist/assets/CodeEditor-ed3b6d0c.js index 20aacdb4..04f78c69 100644 --- a/ui/dist/assets/CodeEditor-65cf3b79.js +++ b/ui/dist/assets/CodeEditor-ed3b6d0c.js @@ -1,4 +1,4 @@ -import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,U as N,g as bt,y as RO,o as kt,I as xt,J as yt,K as wt,H as Yt,C as vt,L as Tt}from"./index-0aae7a97.js";import{P as Ut,N as Wt,u as _t,D as Ct,v as wO,T as D,I as YO,w as rO,x as l,y as Vt,L as sO,z as nO,A as j,B as lO,F as ye,G as oO,H as C,J as we,K as Ye,M as ve,E as v,O as G,Q as qt,R as Rt,U as Te,V as X,W as zt,X as jt,a as V,h as Gt,b as At,c as It,d as Nt,e as Et,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ht,k as Ft,j as Kt,l as Oa,m as ea,n as ta,o as aa,p as ia,q as zO,C as E}from"./index-c4d2d831.js";class H{constructor(O,a,t,i,r,s,n,o,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let i=O.parser.context;return new H(O,[],a,t,t,0,[],0,i?new jO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,i=O&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(O,a,t,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(O,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)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]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(O,a,t){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(a,i),this.buffer.push(t,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,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),i=O.bufferBase+a;for(;O&&i==O.bufferBase;)O=O.parent;return new H(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-t*3;if(r<0||a.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 a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var GO;(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",e[e.MinBigReduction=2e3]="MinBigReduction"})(GO||(GO={}));class ra{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class F{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new F(O,a,a-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 F(this.stack,this.pos,this.index)}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new O(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new J;class sa{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,i=this.rangeIndex,r=this.pos+O;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=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,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,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&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,a)))}return t}}class W{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ue(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class XO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?z(O):O}token(O,a){let t=O.pos,i;for(;i=O.pos,Ue(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i-t))}}XO.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class b{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ue(e,O,a,t,i,r){let s=0,n=1<0){let p=e[h];if(o.allows(p)&&(O.token.value==-1||O.token.value==p||na(p,O.token.value,i,r))){O.acceptToken(p);break}}let u=O.next,c=0,f=e[s+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535&&e[Q+f*3-3]==65535){s=e[Q+f*3-1];continue O}for(;c>1,p=Q+h+(h<<1),$=e[p],g=e[p+1]||65536;if(u<$)f=h;else if(u>=g)c=h+1;else{s=e[p+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,i;(i=e[t])!=65535;t++)if(i==a)return t-O;return-1}function na(e,O,a,t){let i=IO(a,t,O);return i<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class la{constructor(O,a){this.fragments=O,this.nodeSet=a,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?EO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?EO(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 D){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[a]++,this.nextStart=s+r.length}}}class oa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new J)}getActions(O){let a=0,t=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new J,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=O;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(O,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,O),t),O.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,a,t,i){for(let r=0;rO.bufferLength*4?new la(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ha(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);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,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?r.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(wO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(c.type.id)})`),!0;if(!(c instanceof D)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof D&&c.positions[0]==0)c=h;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),Z&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!i||i.scoree;class We{constructor(O){this.start=O.start,this.shift=O.shift||uO,this.reduce=O.reduce||uO,this.reuse=O.reuse||uO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ut{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,o,n[Q++]);else{let c=n[Q+-u];for(let f=-u;f>0;f--)r(n[Q++],o,c);Q++}}}this.nodeSet=new Wt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ct;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new W(s,n):n),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,a,t){let i=new Qa(this,O,a,t);for(let r of this.wrappers)i=r(i,O,a,t);return i}getGoto(O,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let Q=r+(s>>1);r0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else return!1;if(a==k(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(r=>r.from==t);return i?i.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=O.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=JO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}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 a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let r of O.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const ua=54,fa=1,da=55,pa=2,Sa=56,$a=3,LO=4,ga=5,K=6,_e=7,Ce=8,Ve=9,qe=10,Pa=11,ma=12,Xa=13,fO=57,Za=14,MO=58,Re=20,ba=22,ze=23,ka=24,ZO=26,je=27,xa=28,ya=31,wa=34,Ya=36,va=37,Ta=0,Ua=1,Wa={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},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={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 Ca(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function bO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let i="";for(;Ca(t);)i+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=i?i.toLowerCase():t==Va||t==qa?void 0:null}const Ae=60,OO=62,vO=47,Va=63,qa=33,Ra=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(bO(t,1)||"",e):e},reduce(e,O){return O==Re&&e?e.parent:e},reuse(e,O,a,t){let i=O.type.id;return i==K||i==Ya?new ee(bO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ga=new b((e,O)=>{if(e.next!=Ae){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==vO;a&&e.advance();let t=bO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Za:K);let i=O.context?O.context.name:null;if(a){if(t==i)return e.acceptToken(Pa);if(i&&_a[i])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ta))return e.acceptToken(ma);for(let r=O.context;r;r=r.parent)if(r.name==t)return;e.acceptToken(Xa)}else{if(t=="script")return e.acceptToken(_e);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ve);if(Wa.hasOwnProperty(t))return e.acceptToken(qe);i&&HO[i]&&HO[i][t]?e.acceptToken(fO,-1):e.acceptToken(K)}},{contextual:!0}),Aa=new b(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ra)O++;else if(e.next==OO&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ia(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Na=new b((e,O)=>{if(e.next==vO&&e.peek(1)==OO){let a=O.dialectEnabled(Ua)||Ia(O.context);e.acceptToken(a?ga:LO,2)}else e.next==OO&&e.acceptToken(LO,1)});function TO(e,O,a){let t=2+e.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==Ae||r==1&&i.next==vO||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Ea=TO("script",ua,fa),Ba=TO("style",da,pa),Da=TO("textarea",Sa,$a),Ja=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!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:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!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+UYkWOX+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!_-ljhS`PkW!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[/echSkWOX+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+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!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!V3bchS`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&}!_5rjhSkWc!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!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[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!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ea,Ba,Da,Na,Ga,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Ie(e,O){let a=Object.create(null);for(let t of e.getChildren(ze)){let i=t.getChild(ka),r=t.getChild(ZO)||t.getChild(je);i&&(a[O.read(i.from,i.to)]=r?r.type.id==ZO?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return a}function te(e,O){let a=e.getChild(ba);return a?O.read(a.from,a.to):" "}function dO(e,O,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=Ie(e.node.parent.firstChild,O))))return{parser:i.parser};return null}function Ne(e=[],O=[]){let a=[],t=[],i=[],r=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let Q=n.type.id;if(Q==xa)return dO(n,o,a);if(Q==ya)return dO(n,o,t);if(Q==wa)return dO(n,o,i);if(Q==Re&&r.length){let u=n.node,c=u.firstChild,f=c&&te(c,o),h;if(f){for(let p of r)if(p.tag==f&&(!p.attrs||p.attrs(h||(h=Ie(u,o))))){let $=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:$.type.id==va?$.from:u.to}]}}}}if(s&&Q==ze){let u=n.node,c;if(c=u.firstChild){let f=s[o.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=te(u.parent,o))continue;let p=u.lastChild;if(p.type.id==ZO){let $=p.from+1,g=p.lastChild,w=p.to-(g&&g.isError?0:1);if(w>$)return{parser:h.parser,overlay:[{from:$,to:w}]}}else if(p.type.id==je)return{parser:h.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ma=94,ae=1,Ha=95,Fa=96,ie=2,Ee=[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],Ka=58,Oi=40,Be=95,ei=91,L=45,ti=46,ai=35,ii=37;function eO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ri(e){return e>=48&&e<=57}const si=new b((e,O)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=e;if(eO(r)||r==L||r==Be||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,e.advance();else{a&&e.acceptToken(r==Oi?Ha:t==2&&O.canShift(ie)?ie:Fa);break}}}),ni=new b(e=>{if(Ee.includes(e.peek(-1))){let{next:O}=e;(eO(O)||O==Be||O==ai||O==ti||O==ei||O==Ka||O==L)&&e.acceptToken(Ma)}}),li=new b(e=>{if(!Ee.includes(e.peek(-1))){let{next:O}=e;if(O==ii&&(e.advance(),e.acceptToken(ae)),eO(O)){do e.advance();while(eO(e.next));e.acceptToken(ae)}}}),oi=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__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},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hi={__proto__:null,not:128,only:128,from:158,to:160},ui=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<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#XPOy%^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:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>Qi[e]||-1},{term:56,get:e=>ci[e]||-1},{term:96,get:e=>hi[e]||-1}],tokenPrec:1123});let pO=null;function SO(){if(!pO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));pO=O.sort().map(t=>({type:"property",label:t}))}return pO||[]}const re=["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})),se=["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}))),fi=["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})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,di=/^-(-[\w-]*)?$/;function pi(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const ne=new we,Si=["Declaration"];function $i(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function De(e,O){if(O.to-O.from>4096){let a=ne.get(O);if(a)return a;let t=[],i=new Set,r=O.cursor(YO.IncludeAnonymous);if(r.firstChild())do for(let s of De(e,r.node))i.has(s.label)||(i.add(s.label),t.push(s));while(r.nextSibling());return ne.set(O,t),t}else{let a=[],t=new Set;return O.cursor().iterate(i=>{var r;if(i.name=="VariableName"&&i.matchContext(Si)&&((r=i.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let s=e.sliceString(i.from,i.to);t.has(s)||(t.add(s),a.push({label:s,type:"variable"}))}}),a}}const gi=e=>{let{state:O,pos:a}=e,t=C(O).resolveInner(a,-1),i=t.type.isError&&t.from==t.to-1&&O.doc.sliceString(t.from,t.to)=="-";if(t.name=="PropertyName"||(i||t.name=="TagName")&&/^(Block|Styles)$/.test(t.resolve(t.to).name))return{from:t.from,options:SO(),validFor:y};if(t.name=="ValueName")return{from:t.from,options:se,validFor:y};if(t.name=="PseudoClassName")return{from:t.from,options:re,validFor:y};if(t.name=="VariableName"||(e.explicit||i)&&pi(t,O.doc))return{from:t.name=="VariableName"?t.from:a,options:De(O.doc,$i(t)),validFor:di};if(t.name=="TagName"){for(let{parent:n}=t;n;n=n.parent)if(n.name=="Block")return{from:t.from,options:SO(),validFor:y};return{from:t.from,options:fi,validFor:y}}if(!e.explicit)return null;let r=t.resolve(a),s=r.childBefore(a);return s&&s.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:re,validFor:y}:s&&s.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:y}:r.name=="Block"||r.name=="Styles"?{from:a,options:SO(),validFor:y}:null},tO=sO.define({name:"css",parser:ui.configure({props:[nO.add({Declaration:j()}),lO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pi(){return new oO(tO,tO.data.of({autocomplete:gi}))}const le=302,oe=1,mi=2,Qe=303,Xi=305,Zi=306,bi=3,ki=4,xi=[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],Je=125,yi=59,ce=47,wi=42,Yi=43,vi=45,Ti=new We({start:!1,shift(e,O){return O==bi||O==ki||O==Xi?e:O==Zi},strict:!1}),Ui=new b((e,O)=>{let{next:a}=e;(a==Je||a==-1||O.context)&&O.canShift(Qe)&&e.acceptToken(Qe)},{contextual:!0,fallback:!0}),Wi=new b((e,O)=>{let{next:a}=e,t;xi.indexOf(a)>-1||a==ce&&((t=e.peek(1))==ce||t==wi)||a!=Je&&a!=yi&&a!=-1&&!O.context&&O.canShift(le)&&e.acceptToken(le)},{contextual:!0}),_i=new b((e,O)=>{let{next:a}=e;if((a==Yi||a==vi)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(oe);e.acceptToken(t?oe:mi)}},{contextual:!0}),Ci=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Vi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},qi={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Ri={__proto__:null,"<":137},zi=T.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#J}'#J}O8yQSO'#IPO9OQ(C[O'#IQOOQQ'#JP'#JPOOQQ'#IU'#IUQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HoO>VQ(C]O'#HuO%QQUO'#HwO>bQ(C]O'#HyO>mQ(C]O'#H{O9OQ(C[O'#H}O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOBUQWO'#E`OOQ(CW'#E_'#E_OB`Q(C`O'#E`OBzQWO'#ESOOQO'#Jj'#JjOC`QWO'#ESOCmQWO'#E`ODTQWO'#EfODWQWO'#E`ODqQWO'#E`OAQQWO'#E`OBzQWO'#E`PEbO?MpO'#C`POOO)CDn)CDnOOOO'#IV'#IVOEmOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOE{O!bO,59RO%QQUO'#D]OOOO'#IY'#IYOFZO07`O,59uOOQ(CY,59u,59uOFiQUO'#IZOF|QSO'#JeOIOQbO'#JeO+sQUO'#JeOIVQSO,59{OImQSO'#EiOIzQSO'#JrOJVQSO'#JqOJVQSO'#JqOJ_QSO,5;VOJdQSO'#JpOOQ(CY,5:W,5:WOJkQUO,5:WOLlQ(CjO,5:bOM]QSO,5:jOMbQSO'#JnON[Q(C[O'#JoO:vQSO'#JnONcQSO'#JnONkQSO,5;UONpQSO'#JnOOQ(CY'#Cf'#CfO%QQUO'#EOO! dQ`O,5:oOOQO'#Jk'#JkOOQO-E<^-E<^O9_QSO,5=VO! zQSO,5=VO!!PQUO,5;SO!$SQ,UO'#EdO!%gQSO,5;SO!'PQ,UO'#DpO!'WQUO'#DuO!'bQWO,5;]O!'jQWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!'xQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!){QSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!*TQ(C[O,5kOOQQ'#JX'#JXOOQQ,5>l,5>lOOQQ-EQQWO,5;yO!>VQSO,5=rO!>[QSO,5=rO!>aQSO,5=rO9OQ(C[O,5=rO!>oQSO'#EkO!?iQWO'#ElOOQ(CW'#Jp'#JpO!?pQ(C[O'#KOO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!?{QWO,5=^O!@TQ,UO,5=_O!@`QSO,5=aO!@eQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!@mQSO'#HPO9dQ,UO'#HSO!@rQSO'#HSOOQQ,5=g,5=gO!@wQSO'#HTO!APQSO'#ClO!AUQSO,58|O!A`QSO,58|O!ChQUO,58|OOQQ,58|,58|O!CuQ(C[O,58|O%QQUO,58|O!DQQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!DbQSO,5=tO`QUO,5=zO`QUO,5=|O!DgQSO,5>OO`QUO,5>QO!DlQSO,5>TO!DqQUO,5>ZOOQQ,5>a,5>aO%QQUO,5>aO9OQ(C[O,5>cOOQQ,5>e,5>eO!HxQSO,5>eOOQQ,5>g,5>gO!HxQSO,5>gOOQQ,5>i,5>iO!H}QWO'#DXO%QQUO'#JgO!IlQWO'#JgO!JZQWO'#DgO!JlQWO'#DgO!L}QUO'#DgO!MUQSO'#JfO!M^QSO,5:QO!McQSO'#EmO!MqQSO'#JsO!MyQSO,5;WO!NOQWO'#DgO!N]QWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!NdQSO,5:kO>QQSO,5;RO!uO+sQUO,5>uOOQO,5>{,5>{O#&oQUO'#IZOOQO-EUQ(CjO1G0xO#AUQ$IUO'#CfO#CSQ$IUO1G1ZO#EQQ$IUO'#JdO!*OQSO1G1aO#EeQ(CjO,5?QOOQ(CW-EQQSO'#HsOOQQ1G3u1G3uO$0}QUO1G3uO9OQ(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9OQ(C[O1G4PO9OQ(C[O1G4RO$5RQSO,5@RO!'xQUO,5;XO:vQSO,5;XO>QQSO,5:RO!'xQUO,5:RO!QQSO1G0mO!uO$:qQSO1G5kO$:yQSO1G5wO$;RQbO1G5xO:vQSO,5>{O$;]QSO1G5tO$;]QSO1G5tO:vQSO1G5tO$;eQ(CjO1G5uO%QQUO1G5uO$;uQ(C[O1G5uO$}O:vQSO,5>}OOQO,5>},5>}O$}OOQO-EQQWO,59pO%QQUO,59pO% mQSO1G2SO!%lQ,UO1G2ZO% rQ(CjO7+'gOOQ(CY7+'g7+'gO!!PQUO7+'gOOQ(CY7+%`7+%`O%!fQ`O'#J|O!NgQSO7+(]O%!pQbO7+(]O$<}QSO7+(]O%!wQ(ChO'#CfO%#[Q(ChO,5<{O%#|QSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!VOOQQ,5>V,5>VO%QQUO'#HlO%)^QSO'#HnOOQQ,5>],5>]O:vQSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%)cQWO1G5mO%)wQ$IUO1G0sO%*RQSO1G0sOOQO1G/m1G/mO%*^Q$IUO1G/mO>QQSO1G/mO!'xQUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!QQSO7+&XO!wOOQO-ExO%QQUO,5>xOOQO-E<[-E<[O%5iQSO1G5oOOQ(CY<}Q$IUO1G0xO%?UQ$IUO1G0xO%AYQ$IUO1G0xO%AaQ$IUO1G0xO%CXQ$IUO1G0xO%ClQ(CjO<WOOQQ,5>Y,5>YO&&aQSO1G3wO:vQSO7+&_O!'xQUO7+&_OOQO7+%X7+%XO&&fQ$IUO1G5xO>QQSO7+%XOOQ(CY<QQSO<[QWO,5=mO&>mQWO,5:zOOQQ<QQSO7+)cO&@ZQSO<zAN>zO%QQUOAN?WO!zO&@pQ(C[OAN?WO!zO&@{Q(C[OAN?WOBzQWOAN>zO&AZQ(C[OAN?WO&AoQ(C`OAN?WO&AyQWOAN>zOBzQWOAN?WOOQO<ROy)uO|)vO(h)xO(i)zO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#*rO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(a(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!1}O!V.bOd([X~P!.aOd.dO~O!V.eO!g(]X~P!4aO!g.hO~O!S.jO~OP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#.nO#g#|O~P#.nOP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#1`Ok$OO~P#1`OP$ZOk$OOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#4QOX$bO!e$QO#l$QO#m$QO#n$aO#o$QO~P#4QOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(a#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(h#fi~P#7RO(h#zO~P#7ROP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO(RVO(h#zO^#fi!V#fi#u#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#9sO(i#{O~P#9sOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO#u$VO(RVO(h#zO(i#{O~O^#fi!V#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#SOy)uO|)vO(h)xO(i)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(a#fi!V#fi!W#fi~P%D`O!f#uOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(a(QX(h(QX(i(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#A]O#y!ni!W!ni~P$$jO!W6|O~O!V'Ya!W'Ya~P#A]O!a#sO(a'fO!V'Za!g'Za~O!V/YO!g(ni~O!V/YO!a#sO!g(ni~Od$uq!V$uq#X$uq#y$uq~P!.aO!S']a!V']a~P#*rO!a7TO~O!V/bO!S(oi~P#*rO!V/bO!S(oi~O!S7XO~O!a#sO#o7^O~Ok7_O!a#sO(a'fO~O!S7aO~Od$wq!V$wq#X$wq#y$wq~P!.aO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!4aO!V4aO!X(pa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!4aOX7fO~O!V0bO!W(vi~O]7lO~O!a6PO~O(U(sO!V'bX!W'bX~O!V4xO!W(sa~O!h%[O'}%PO^(ZX!a(ZX!l(ZX#X(ZX'k(ZX(a(ZX~O't7uO~P._O!xg#>v#>|#?`#?f#?l#?z#@a#Aq#BP#BV#B]#Bc#Bi#Bs#By#CP#CZ#Cm#CsPPPPPPPPPP#CyPPPPPPP#Dm#I^P#J}#KU#K^PPPP$ h$$^$+P$+S$+V$-g$-j$-m$-tPP$-z$.O$.w$/w$/{$0aPP$0e$0k$0oP$0r$0v$0y$1o$2V$2[$2_$2b$2h$2k$2o$2sR!zRmpOXr!X#b%^&e&g&h&j,`,e1j1mU!pQ'R-QQ%dtQ%lwQ%szQ&]!TS&y!c,xQ'X!f^'^!m!r!s!t!u!v!wS*^$z*cQ+W%mQ+e%uQ,P&VQ-O'QQ-Y'YY-b'_'`'a'b'cQ/s*eQ1X,QW2e-d-f-g-hS5R0}5UU6a2h2j2kU8R5Y5Z5]S8x6d6fS9u8S8TQ:c8{Q:z9xRO>R>SQ%vzQ&w!cS&}%x,{Q+]%oS/Q)v/SQ0O*rQ0g+^Q0l+dQ1`,VQ1a,WQ4i0bQ4r0nQ5l1[Q5m1_Q7h4jQ7k4oQ8b5oQ9j7lR:R8_pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR,T&^&z`OPXYrstux!X!^!g!l#Q#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v'T'h'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!d%iw!f!o%k%l%m&x'W'X'Y']'k*]+V+W,u-X-Y-a-c/k0`2T2[2c2g4U6_6c8v8z:a;YQ+P%gQ+p&OQ+s&PQ+}&VQ.Y(fQ1R+zU1V,O,P,QQ2z.ZQ5c1SS5g1W1XS7t4|5QQ8^5hU9s7z8P8QU:x9t9v9wQ;e:yQ;u;f!z=y#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg=zO>R>ST)q$s)rV*o%TPR>O>Q'QkOPWXYZrstu!X!^!l#Q#U#X#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v&z'T'h'x'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>SQ*s%XQ/P)ug3eOQ*V$xS*`$z*cQ*t%YQ/o*a!z=h#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sf=iO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg3eO>R>SQ+q&PQ0v+sQ4v0uR7o4wT*b$z*cS*b$z*cT5T0}5US/m*_4}T4W/u8OQ+R%hQ/n*`Q0]+SQ1T+|Q5e1UQ8[5fQ9n7sQ:O8]Q:t9oQ;P:PQ;c:wQ;s;dQP>Q]=P3d6x9U:i:j;|p){$t(n*u/U/`/w/x3O3w4^6}7`:k=g=s=t!Y=Q(j)Z*P*X._.{/W/e0U0s0u2{2}3x3|4u4w6q6r7U7Y7b7d9`9d;_>P>Q_=R3d6x9U9V:i:j;|pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ&X!SR,[&bpmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR&X!SQ+u&QR0r+nqmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ1O+zS5`1R1SU8U5^5_5cS9z8W8XS:{9y9|Q;g:|R;v;hQ&`!TR,U&[R5l1[S%pz%uR0h+_Q&e!UR,`&fR,f&kT1k,e1mR,j&lQ,i&lR1t,jQ'o!yR-l'oQrOQ#bXT%ar#bQ!|TR'q!|Q#PUR's#PQ)r$sR.|)rQ#SVR'u#SQ#VWU'{#V'|-sQ'|#WR-s'}Q,y&{R2Q,yQ.c(nR3P.cQ.f(pS3S.f3TR3T.gQ-Q'RR2U-Qr_OXr!T!X#b%^&[&^&e&g&h&j,`,e1j1mU!mQ'R-QS#eZ%[Y#o_!m#e-}5OQ-}(_T5O0}5US#]W%wU(S#](T-tQ(T#^R-t(OQ,|'OR2S,|Q(`#hQ-w(XW.R(`-w2l6gQ2l-xR6g2mQ)d$iR.u)dQ$mhR)j$mQ$`cU)Y$`-oP>QQ/c*XU3{/c3}7VQ3}/eR7V3|Q*c$zR/q*cQ*l%OR/z*lQ4b0UR7c4bQ+l%zR0q+lQ4y0xS7q4y9lR9l7rQ+w&RR0{+wQ5U0}R7|5UQ1Z,RS5j1Z8`R8`5lQ0c+ZW4k0c4m7i9hQ4m0fQ7i4lR9h7jQ+`%pR0i+`Q1m,eR5z1mWqOXr#bQ&i!XQ*x%^Q,_&eQ,a&gQ,b&hQ,d&jQ1h,`S1k,e1mR5y1jQ%`oQ&m!]Q&p!_Q&r!`Q&t!aU'g!o5P5QQ+T%jQ+g%vQ+m%{Q,T&`Q,l&oY-]']'i'j'm8QQ-j'eQ/p*bQ0^+US1^,U,XQ1u,kQ1v,nQ1w,oQ2]-[[2_-_-`-c-i-k9wQ4d0_Q4p0lQ4t0sQ5d1TQ5n1`Q5x1iY6X2^2a2d2f2gQ6[2bQ7e4eQ7m4rQ7n4uQ7{5TQ8Z5eQ8a5mY8p6Y6^6`6b6cQ8r6]Q9i7kQ9m7sQ9}8[Q:S8bY:Z8q8u8w8y8zQ:]8tQ:q9jS:s9n9oQ;O:OW;S:[:`:b:dQ;U:_S;a:t:wQ;i;PU;j;T;X;ZQ;l;WS;r;c;dS;w;k;oQ;y;nS;};s;tQOQ>P>RR>Q>SloOXr!X#b%^&e&g&h&j,`,e1j1mQ!dPS#dZ#lQ&o!^U'Z!l4}8OQ't#QQ(w#yQ)h$kS,X&^&aQ,]&bQ,k&nQ,p&vQ-S'TQ.i(uQ.y)iQ0X+OQ0o+jQ1e,[Q2X-UQ2v.XQ3k.tQ4[/}Q5_1QQ5p1bQ5q1cQ5s1dQ5u1fQ5|1oQ6l2yQ6{3hQ8X5bQ8f5tQ8h5vQ8i5wQ9R6pQ9|8YR:U8g#UcOPXZr!X!^!l#b#l#y%^&^&a&b&e&g&h&j&n&v'T(u+O+j,[,`,e-U.X/}1Q1b1c1d1f1j1m1o2y4}5b5t5v5w6p8O8Y8gQ#WWQ#cYQ%bsQ%ctQ%euS'w#U'zQ'}#XQ(i#rQ(p#vQ(x#|Q(y#}Q(z$OQ({$PQ(|$QQ(}$RQ)O$SQ)P$TQ)Q$UQ)R$VQ)S$WQ)U$YQ)X$_Q)]$cW)g$k)i.t3hQ*{%dQ+a%qS,v&z2OQ-k'hS-p'x-rQ-u(QQ-z([Q.a(mQ.g(qQ.k TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare 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 SingleClassItem",maxTerm:363,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Ci],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(i%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Wi,_i,2,3,4,5,6,7,8,9,10,11,12,13,Ui,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new XO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Vi[e]||-1},{term:328,get:e=>qi[e]||-1},{term:67,get:e=>Ri[e]||-1}],tokenPrec:13551}),ji=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { +import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,U as N,g as bt,y as RO,o as kt,I as xt,J as yt,K as wt,H as Yt,C as vt,L as Tt}from"./index-81d06e37.js";import{P as Ut,N as Wt,u as _t,D as Ct,v as wO,T as D,I as YO,w as rO,x as l,y as Vt,L as sO,z as nO,A as j,B as lO,F as ye,G as oO,H as C,J as we,K as Ye,M as ve,E as v,O as G,Q as qt,R as Rt,U as Te,V as X,W as zt,X as jt,a as V,h as Gt,b as At,c as It,d as Nt,e as Et,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ht,k as Ft,j as Kt,l as Oa,m as ea,n as ta,o as aa,p as ia,q as zO,C as E}from"./index-c4d2d831.js";class H{constructor(O,a,t,i,r,s,n,o,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let i=O.parser.context;return new H(O,[],a,t,t,0,[],0,i?new jO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,i=O&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(O,a,t,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(O,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)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]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(O,a,t){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(a,i),this.buffer.push(t,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,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),i=O.bufferBase+a;for(;O&&i==O.bufferBase;)O=O.parent;return new H(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-t*3;if(r<0||a.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 a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var GO;(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",e[e.MinBigReduction=2e3]="MinBigReduction"})(GO||(GO={}));class ra{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class F{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new F(O,a,a-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 F(this.stack,this.pos,this.index)}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new O(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new J;class sa{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,i=this.rangeIndex,r=this.pos+O;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=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,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,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&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,a)))}return t}}class W{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ue(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class XO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?z(O):O}token(O,a){let t=O.pos,i;for(;i=O.pos,Ue(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i-t))}}XO.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class b{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ue(e,O,a,t,i,r){let s=0,n=1<0){let p=e[h];if(o.allows(p)&&(O.token.value==-1||O.token.value==p||na(p,O.token.value,i,r))){O.acceptToken(p);break}}let u=O.next,c=0,f=e[s+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535&&e[Q+f*3-3]==65535){s=e[Q+f*3-1];continue O}for(;c>1,p=Q+h+(h<<1),$=e[p],g=e[p+1]||65536;if(u<$)f=h;else if(u>=g)c=h+1;else{s=e[p+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,i;(i=e[t])!=65535;t++)if(i==a)return t-O;return-1}function na(e,O,a,t){let i=IO(a,t,O);return i<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class la{constructor(O,a){this.fragments=O,this.nodeSet=a,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?EO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?EO(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 D){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[a]++,this.nextStart=s+r.length}}}class oa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new J)}getActions(O){let a=0,t=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new J,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=O;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(O,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,O),t),O.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,a,t,i){for(let r=0;rO.bufferLength*4?new la(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ha(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);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,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?r.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(wO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(c.type.id)})`),!0;if(!(c instanceof D)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof D&&c.positions[0]==0)c=h;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),Z&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!i||i.scoree;class We{constructor(O){this.start=O.start,this.shift=O.shift||uO,this.reduce=O.reduce||uO,this.reuse=O.reuse||uO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ut{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,o,n[Q++]);else{let c=n[Q+-u];for(let f=-u;f>0;f--)r(n[Q++],o,c);Q++}}}this.nodeSet=new Wt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ct;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new W(s,n):n),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,a,t){let i=new Qa(this,O,a,t);for(let r of this.wrappers)i=r(i,O,a,t);return i}getGoto(O,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let Q=r+(s>>1);r0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else return!1;if(a==k(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(r=>r.from==t);return i?i.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=O.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=JO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}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 a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let r of O.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const ua=54,fa=1,da=55,pa=2,Sa=56,$a=3,LO=4,ga=5,K=6,_e=7,Ce=8,Ve=9,qe=10,Pa=11,ma=12,Xa=13,fO=57,Za=14,MO=58,Re=20,ba=22,ze=23,ka=24,ZO=26,je=27,xa=28,ya=31,wa=34,Ya=36,va=37,Ta=0,Ua=1,Wa={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},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={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 Ca(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function bO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let i="";for(;Ca(t);)i+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=i?i.toLowerCase():t==Va||t==qa?void 0:null}const Ae=60,OO=62,vO=47,Va=63,qa=33,Ra=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(bO(t,1)||"",e):e},reduce(e,O){return O==Re&&e?e.parent:e},reuse(e,O,a,t){let i=O.type.id;return i==K||i==Ya?new ee(bO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ga=new b((e,O)=>{if(e.next!=Ae){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==vO;a&&e.advance();let t=bO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Za:K);let i=O.context?O.context.name:null;if(a){if(t==i)return e.acceptToken(Pa);if(i&&_a[i])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ta))return e.acceptToken(ma);for(let r=O.context;r;r=r.parent)if(r.name==t)return;e.acceptToken(Xa)}else{if(t=="script")return e.acceptToken(_e);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ve);if(Wa.hasOwnProperty(t))return e.acceptToken(qe);i&&HO[i]&&HO[i][t]?e.acceptToken(fO,-1):e.acceptToken(K)}},{contextual:!0}),Aa=new b(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ra)O++;else if(e.next==OO&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ia(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Na=new b((e,O)=>{if(e.next==vO&&e.peek(1)==OO){let a=O.dialectEnabled(Ua)||Ia(O.context);e.acceptToken(a?ga:LO,2)}else e.next==OO&&e.acceptToken(LO,1)});function TO(e,O,a){let t=2+e.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==Ae||r==1&&i.next==vO||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Ea=TO("script",ua,fa),Ba=TO("style",da,pa),Da=TO("textarea",Sa,$a),Ja=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!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:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!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+UYkWOX+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!_-ljhS`PkW!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[/echSkWOX+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+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!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!V3bchS`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&}!_5rjhSkWc!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!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[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!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ea,Ba,Da,Na,Ga,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Ie(e,O){let a=Object.create(null);for(let t of e.getChildren(ze)){let i=t.getChild(ka),r=t.getChild(ZO)||t.getChild(je);i&&(a[O.read(i.from,i.to)]=r?r.type.id==ZO?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return a}function te(e,O){let a=e.getChild(ba);return a?O.read(a.from,a.to):" "}function dO(e,O,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=Ie(e.node.parent.firstChild,O))))return{parser:i.parser};return null}function Ne(e=[],O=[]){let a=[],t=[],i=[],r=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let Q=n.type.id;if(Q==xa)return dO(n,o,a);if(Q==ya)return dO(n,o,t);if(Q==wa)return dO(n,o,i);if(Q==Re&&r.length){let u=n.node,c=u.firstChild,f=c&&te(c,o),h;if(f){for(let p of r)if(p.tag==f&&(!p.attrs||p.attrs(h||(h=Ie(u,o))))){let $=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:$.type.id==va?$.from:u.to}]}}}}if(s&&Q==ze){let u=n.node,c;if(c=u.firstChild){let f=s[o.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=te(u.parent,o))continue;let p=u.lastChild;if(p.type.id==ZO){let $=p.from+1,g=p.lastChild,w=p.to-(g&&g.isError?0:1);if(w>$)return{parser:h.parser,overlay:[{from:$,to:w}]}}else if(p.type.id==je)return{parser:h.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ma=94,ae=1,Ha=95,Fa=96,ie=2,Ee=[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],Ka=58,Oi=40,Be=95,ei=91,L=45,ti=46,ai=35,ii=37;function eO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ri(e){return e>=48&&e<=57}const si=new b((e,O)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=e;if(eO(r)||r==L||r==Be||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,e.advance();else{a&&e.acceptToken(r==Oi?Ha:t==2&&O.canShift(ie)?ie:Fa);break}}}),ni=new b(e=>{if(Ee.includes(e.peek(-1))){let{next:O}=e;(eO(O)||O==Be||O==ai||O==ti||O==ei||O==Ka||O==L)&&e.acceptToken(Ma)}}),li=new b(e=>{if(!Ee.includes(e.peek(-1))){let{next:O}=e;if(O==ii&&(e.advance(),e.acceptToken(ae)),eO(O)){do e.advance();while(eO(e.next));e.acceptToken(ae)}}}),oi=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__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},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hi={__proto__:null,not:128,only:128,from:158,to:160},ui=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<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#XPOy%^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:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>Qi[e]||-1},{term:56,get:e=>ci[e]||-1},{term:96,get:e=>hi[e]||-1}],tokenPrec:1123});let pO=null;function SO(){if(!pO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));pO=O.sort().map(t=>({type:"property",label:t}))}return pO||[]}const re=["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})),se=["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}))),fi=["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})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,di=/^-(-[\w-]*)?$/;function pi(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const ne=new we,Si=["Declaration"];function $i(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function De(e,O){if(O.to-O.from>4096){let a=ne.get(O);if(a)return a;let t=[],i=new Set,r=O.cursor(YO.IncludeAnonymous);if(r.firstChild())do for(let s of De(e,r.node))i.has(s.label)||(i.add(s.label),t.push(s));while(r.nextSibling());return ne.set(O,t),t}else{let a=[],t=new Set;return O.cursor().iterate(i=>{var r;if(i.name=="VariableName"&&i.matchContext(Si)&&((r=i.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let s=e.sliceString(i.from,i.to);t.has(s)||(t.add(s),a.push({label:s,type:"variable"}))}}),a}}const gi=e=>{let{state:O,pos:a}=e,t=C(O).resolveInner(a,-1),i=t.type.isError&&t.from==t.to-1&&O.doc.sliceString(t.from,t.to)=="-";if(t.name=="PropertyName"||(i||t.name=="TagName")&&/^(Block|Styles)$/.test(t.resolve(t.to).name))return{from:t.from,options:SO(),validFor:y};if(t.name=="ValueName")return{from:t.from,options:se,validFor:y};if(t.name=="PseudoClassName")return{from:t.from,options:re,validFor:y};if(t.name=="VariableName"||(e.explicit||i)&&pi(t,O.doc))return{from:t.name=="VariableName"?t.from:a,options:De(O.doc,$i(t)),validFor:di};if(t.name=="TagName"){for(let{parent:n}=t;n;n=n.parent)if(n.name=="Block")return{from:t.from,options:SO(),validFor:y};return{from:t.from,options:fi,validFor:y}}if(!e.explicit)return null;let r=t.resolve(a),s=r.childBefore(a);return s&&s.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:re,validFor:y}:s&&s.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:y}:r.name=="Block"||r.name=="Styles"?{from:a,options:SO(),validFor:y}:null},tO=sO.define({name:"css",parser:ui.configure({props:[nO.add({Declaration:j()}),lO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pi(){return new oO(tO,tO.data.of({autocomplete:gi}))}const le=302,oe=1,mi=2,Qe=303,Xi=305,Zi=306,bi=3,ki=4,xi=[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],Je=125,yi=59,ce=47,wi=42,Yi=43,vi=45,Ti=new We({start:!1,shift(e,O){return O==bi||O==ki||O==Xi?e:O==Zi},strict:!1}),Ui=new b((e,O)=>{let{next:a}=e;(a==Je||a==-1||O.context)&&O.canShift(Qe)&&e.acceptToken(Qe)},{contextual:!0,fallback:!0}),Wi=new b((e,O)=>{let{next:a}=e,t;xi.indexOf(a)>-1||a==ce&&((t=e.peek(1))==ce||t==wi)||a!=Je&&a!=yi&&a!=-1&&!O.context&&O.canShift(le)&&e.acceptToken(le)},{contextual:!0}),_i=new b((e,O)=>{let{next:a}=e;if((a==Yi||a==vi)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(oe);e.acceptToken(t?oe:mi)}},{contextual:!0}),Ci=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Vi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},qi={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Ri={__proto__:null,"<":137},zi=T.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#J}'#J}O8yQSO'#IPO9OQ(C[O'#IQOOQQ'#JP'#JPOOQQ'#IU'#IUQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HoO>VQ(C]O'#HuO%QQUO'#HwO>bQ(C]O'#HyO>mQ(C]O'#H{O9OQ(C[O'#H}O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOBUQWO'#E`OOQ(CW'#E_'#E_OB`Q(C`O'#E`OBzQWO'#ESOOQO'#Jj'#JjOC`QWO'#ESOCmQWO'#E`ODTQWO'#EfODWQWO'#E`ODqQWO'#E`OAQQWO'#E`OBzQWO'#E`PEbO?MpO'#C`POOO)CDn)CDnOOOO'#IV'#IVOEmOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOE{O!bO,59RO%QQUO'#D]OOOO'#IY'#IYOFZO07`O,59uOOQ(CY,59u,59uOFiQUO'#IZOF|QSO'#JeOIOQbO'#JeO+sQUO'#JeOIVQSO,59{OImQSO'#EiOIzQSO'#JrOJVQSO'#JqOJVQSO'#JqOJ_QSO,5;VOJdQSO'#JpOOQ(CY,5:W,5:WOJkQUO,5:WOLlQ(CjO,5:bOM]QSO,5:jOMbQSO'#JnON[Q(C[O'#JoO:vQSO'#JnONcQSO'#JnONkQSO,5;UONpQSO'#JnOOQ(CY'#Cf'#CfO%QQUO'#EOO! dQ`O,5:oOOQO'#Jk'#JkOOQO-E<^-E<^O9_QSO,5=VO! zQSO,5=VO!!PQUO,5;SO!$SQ,UO'#EdO!%gQSO,5;SO!'PQ,UO'#DpO!'WQUO'#DuO!'bQWO,5;]O!'jQWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!'xQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!){QSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!*TQ(C[O,5kOOQQ'#JX'#JXOOQQ,5>l,5>lOOQQ-EQQWO,5;yO!>VQSO,5=rO!>[QSO,5=rO!>aQSO,5=rO9OQ(C[O,5=rO!>oQSO'#EkO!?iQWO'#ElOOQ(CW'#Jp'#JpO!?pQ(C[O'#KOO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!?{QWO,5=^O!@TQ,UO,5=_O!@`QSO,5=aO!@eQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!@mQSO'#HPO9dQ,UO'#HSO!@rQSO'#HSOOQQ,5=g,5=gO!@wQSO'#HTO!APQSO'#ClO!AUQSO,58|O!A`QSO,58|O!ChQUO,58|OOQQ,58|,58|O!CuQ(C[O,58|O%QQUO,58|O!DQQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!DbQSO,5=tO`QUO,5=zO`QUO,5=|O!DgQSO,5>OO`QUO,5>QO!DlQSO,5>TO!DqQUO,5>ZOOQQ,5>a,5>aO%QQUO,5>aO9OQ(C[O,5>cOOQQ,5>e,5>eO!HxQSO,5>eOOQQ,5>g,5>gO!HxQSO,5>gOOQQ,5>i,5>iO!H}QWO'#DXO%QQUO'#JgO!IlQWO'#JgO!JZQWO'#DgO!JlQWO'#DgO!L}QUO'#DgO!MUQSO'#JfO!M^QSO,5:QO!McQSO'#EmO!MqQSO'#JsO!MyQSO,5;WO!NOQWO'#DgO!N]QWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!NdQSO,5:kO>QQSO,5;RO!uO+sQUO,5>uOOQO,5>{,5>{O#&oQUO'#IZOOQO-EUQ(CjO1G0xO#AUQ$IUO'#CfO#CSQ$IUO1G1ZO#EQQ$IUO'#JdO!*OQSO1G1aO#EeQ(CjO,5?QOOQ(CW-EQQSO'#HsOOQQ1G3u1G3uO$0}QUO1G3uO9OQ(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9OQ(C[O1G4PO9OQ(C[O1G4RO$5RQSO,5@RO!'xQUO,5;XO:vQSO,5;XO>QQSO,5:RO!'xQUO,5:RO!QQSO1G0mO!uO$:qQSO1G5kO$:yQSO1G5wO$;RQbO1G5xO:vQSO,5>{O$;]QSO1G5tO$;]QSO1G5tO:vQSO1G5tO$;eQ(CjO1G5uO%QQUO1G5uO$;uQ(C[O1G5uO$}O:vQSO,5>}OOQO,5>},5>}O$}OOQO-EQQWO,59pO%QQUO,59pO% mQSO1G2SO!%lQ,UO1G2ZO% rQ(CjO7+'gOOQ(CY7+'g7+'gO!!PQUO7+'gOOQ(CY7+%`7+%`O%!fQ`O'#J|O!NgQSO7+(]O%!pQbO7+(]O$<}QSO7+(]O%!wQ(ChO'#CfO%#[Q(ChO,5<{O%#|QSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!VOOQQ,5>V,5>VO%QQUO'#HlO%)^QSO'#HnOOQQ,5>],5>]O:vQSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%)cQWO1G5mO%)wQ$IUO1G0sO%*RQSO1G0sOOQO1G/m1G/mO%*^Q$IUO1G/mO>QQSO1G/mO!'xQUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!QQSO7+&XO!wOOQO-ExO%QQUO,5>xOOQO-E<[-E<[O%5iQSO1G5oOOQ(CY<}Q$IUO1G0xO%?UQ$IUO1G0xO%AYQ$IUO1G0xO%AaQ$IUO1G0xO%CXQ$IUO1G0xO%ClQ(CjO<WOOQQ,5>Y,5>YO&&aQSO1G3wO:vQSO7+&_O!'xQUO7+&_OOQO7+%X7+%XO&&fQ$IUO1G5xO>QQSO7+%XOOQ(CY<QQSO<[QWO,5=mO&>mQWO,5:zOOQQ<QQSO7+)cO&@ZQSO<zAN>zO%QQUOAN?WO!zO&@pQ(C[OAN?WO!zO&@{Q(C[OAN?WOBzQWOAN>zO&AZQ(C[OAN?WO&AoQ(C`OAN?WO&AyQWOAN>zOBzQWOAN?WOOQO<ROy)uO|)vO(h)xO(i)zO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#*rO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(a(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!1}O!V.bOd([X~P!.aOd.dO~O!V.eO!g(]X~P!4aO!g.hO~O!S.jO~OP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#.nO#g#|O~P#.nOP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#1`Ok$OO~P#1`OP$ZOk$OOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#4QOX$bO!e$QO#l$QO#m$QO#n$aO#o$QO~P#4QOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(a#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(h#fi~P#7RO(h#zO~P#7ROP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO(RVO(h#zO^#fi!V#fi#u#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#9sO(i#{O~P#9sOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO#u$VO(RVO(h#zO(i#{O~O^#fi!V#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#SOy)uO|)vO(h)xO(i)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(a#fi!V#fi!W#fi~P%D`O!f#uOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(a(QX(h(QX(i(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#A]O#y!ni!W!ni~P$$jO!W6|O~O!V'Ya!W'Ya~P#A]O!a#sO(a'fO!V'Za!g'Za~O!V/YO!g(ni~O!V/YO!a#sO!g(ni~Od$uq!V$uq#X$uq#y$uq~P!.aO!S']a!V']a~P#*rO!a7TO~O!V/bO!S(oi~P#*rO!V/bO!S(oi~O!S7XO~O!a#sO#o7^O~Ok7_O!a#sO(a'fO~O!S7aO~Od$wq!V$wq#X$wq#y$wq~P!.aO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!4aO!V4aO!X(pa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!4aOX7fO~O!V0bO!W(vi~O]7lO~O!a6PO~O(U(sO!V'bX!W'bX~O!V4xO!W(sa~O!h%[O'}%PO^(ZX!a(ZX!l(ZX#X(ZX'k(ZX(a(ZX~O't7uO~P._O!xg#>v#>|#?`#?f#?l#?z#@a#Aq#BP#BV#B]#Bc#Bi#Bs#By#CP#CZ#Cm#CsPPPPPPPPPP#CyPPPPPPP#Dm#I^P#J}#KU#K^PPPP$ h$$^$+P$+S$+V$-g$-j$-m$-tPP$-z$.O$.w$/w$/{$0aPP$0e$0k$0oP$0r$0v$0y$1o$2V$2[$2_$2b$2h$2k$2o$2sR!zRmpOXr!X#b%^&e&g&h&j,`,e1j1mU!pQ'R-QQ%dtQ%lwQ%szQ&]!TS&y!c,xQ'X!f^'^!m!r!s!t!u!v!wS*^$z*cQ+W%mQ+e%uQ,P&VQ-O'QQ-Y'YY-b'_'`'a'b'cQ/s*eQ1X,QW2e-d-f-g-hS5R0}5UU6a2h2j2kU8R5Y5Z5]S8x6d6fS9u8S8TQ:c8{Q:z9xRO>R>SQ%vzQ&w!cS&}%x,{Q+]%oS/Q)v/SQ0O*rQ0g+^Q0l+dQ1`,VQ1a,WQ4i0bQ4r0nQ5l1[Q5m1_Q7h4jQ7k4oQ8b5oQ9j7lR:R8_pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR,T&^&z`OPXYrstux!X!^!g!l#Q#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v'T'h'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!d%iw!f!o%k%l%m&x'W'X'Y']'k*]+V+W,u-X-Y-a-c/k0`2T2[2c2g4U6_6c8v8z:a;YQ+P%gQ+p&OQ+s&PQ+}&VQ.Y(fQ1R+zU1V,O,P,QQ2z.ZQ5c1SS5g1W1XS7t4|5QQ8^5hU9s7z8P8QU:x9t9v9wQ;e:yQ;u;f!z=y#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg=zO>R>ST)q$s)rV*o%TPR>O>Q'QkOPWXYZrstu!X!^!l#Q#U#X#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v&z'T'h'x'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>SQ*s%XQ/P)ug3eOQ*V$xS*`$z*cQ*t%YQ/o*a!z=h#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sf=iO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg3eO>R>SQ+q&PQ0v+sQ4v0uR7o4wT*b$z*cS*b$z*cT5T0}5US/m*_4}T4W/u8OQ+R%hQ/n*`Q0]+SQ1T+|Q5e1UQ8[5fQ9n7sQ:O8]Q:t9oQ;P:PQ;c:wQ;s;dQP>Q]=P3d6x9U:i:j;|p){$t(n*u/U/`/w/x3O3w4^6}7`:k=g=s=t!Y=Q(j)Z*P*X._.{/W/e0U0s0u2{2}3x3|4u4w6q6r7U7Y7b7d9`9d;_>P>Q_=R3d6x9U9V:i:j;|pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ&X!SR,[&bpmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR&X!SQ+u&QR0r+nqmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ1O+zS5`1R1SU8U5^5_5cS9z8W8XS:{9y9|Q;g:|R;v;hQ&`!TR,U&[R5l1[S%pz%uR0h+_Q&e!UR,`&fR,f&kT1k,e1mR,j&lQ,i&lR1t,jQ'o!yR-l'oQrOQ#bXT%ar#bQ!|TR'q!|Q#PUR's#PQ)r$sR.|)rQ#SVR'u#SQ#VWU'{#V'|-sQ'|#WR-s'}Q,y&{R2Q,yQ.c(nR3P.cQ.f(pS3S.f3TR3T.gQ-Q'RR2U-Qr_OXr!T!X#b%^&[&^&e&g&h&j,`,e1j1mU!mQ'R-QS#eZ%[Y#o_!m#e-}5OQ-}(_T5O0}5US#]W%wU(S#](T-tQ(T#^R-t(OQ,|'OR2S,|Q(`#hQ-w(XW.R(`-w2l6gQ2l-xR6g2mQ)d$iR.u)dQ$mhR)j$mQ$`cU)Y$`-oP>QQ/c*XU3{/c3}7VQ3}/eR7V3|Q*c$zR/q*cQ*l%OR/z*lQ4b0UR7c4bQ+l%zR0q+lQ4y0xS7q4y9lR9l7rQ+w&RR0{+wQ5U0}R7|5UQ1Z,RS5j1Z8`R8`5lQ0c+ZW4k0c4m7i9hQ4m0fQ7i4lR9h7jQ+`%pR0i+`Q1m,eR5z1mWqOXr#bQ&i!XQ*x%^Q,_&eQ,a&gQ,b&hQ,d&jQ1h,`S1k,e1mR5y1jQ%`oQ&m!]Q&p!_Q&r!`Q&t!aU'g!o5P5QQ+T%jQ+g%vQ+m%{Q,T&`Q,l&oY-]']'i'j'm8QQ-j'eQ/p*bQ0^+US1^,U,XQ1u,kQ1v,nQ1w,oQ2]-[[2_-_-`-c-i-k9wQ4d0_Q4p0lQ4t0sQ5d1TQ5n1`Q5x1iY6X2^2a2d2f2gQ6[2bQ7e4eQ7m4rQ7n4uQ7{5TQ8Z5eQ8a5mY8p6Y6^6`6b6cQ8r6]Q9i7kQ9m7sQ9}8[Q:S8bY:Z8q8u8w8y8zQ:]8tQ:q9jS:s9n9oQ;O:OW;S:[:`:b:dQ;U:_S;a:t:wQ;i;PU;j;T;X;ZQ;l;WS;r;c;dS;w;k;oQ;y;nS;};s;tQOQ>P>RR>Q>SloOXr!X#b%^&e&g&h&j,`,e1j1mQ!dPS#dZ#lQ&o!^U'Z!l4}8OQ't#QQ(w#yQ)h$kS,X&^&aQ,]&bQ,k&nQ,p&vQ-S'TQ.i(uQ.y)iQ0X+OQ0o+jQ1e,[Q2X-UQ2v.XQ3k.tQ4[/}Q5_1QQ5p1bQ5q1cQ5s1dQ5u1fQ5|1oQ6l2yQ6{3hQ8X5bQ8f5tQ8h5vQ8i5wQ9R6pQ9|8YR:U8g#UcOPXZr!X!^!l#b#l#y%^&^&a&b&e&g&h&j&n&v'T(u+O+j,[,`,e-U.X/}1Q1b1c1d1f1j1m1o2y4}5b5t5v5w6p8O8Y8gQ#WWQ#cYQ%bsQ%ctQ%euS'w#U'zQ'}#XQ(i#rQ(p#vQ(x#|Q(y#}Q(z$OQ({$PQ(|$QQ(}$RQ)O$SQ)P$TQ)Q$UQ)R$VQ)S$WQ)U$YQ)X$_Q)]$cW)g$k)i.t3hQ*{%dQ+a%qS,v&z2OQ-k'hS-p'x-rQ-u(QQ-z([Q.a(mQ.g(qQ.k TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare 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 SingleClassItem",maxTerm:363,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Ci],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(i%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Wi,_i,2,3,4,5,6,7,8,9,10,11,12,13,Ui,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new XO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Vi[e]||-1},{term:328,get:e=>qi[e]||-1},{term:67,get:e=>Ri[e]||-1}],tokenPrec:13551}),ji=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-2bb81251.js b/ui/dist/assets/ConfirmEmailChangeDocs-727175b6.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-2bb81251.js rename to ui/dist/assets/ConfirmEmailChangeDocs-727175b6.js index ad346e07..aeba168d 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-2bb81251.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-727175b6.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-0aae7a97.js";import{S as Ae}from"./SdkTabs-ae399d8e.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(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&&m(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=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(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,F,w,I,T,L,P,M,te,N,R,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],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 r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-81d06e37.js";import{S as Ae}from"./SdkTabs-579eff6e.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(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&&m(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=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(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,F,w,I,T,L,P,M,te,N,R,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],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-d78ea0ab.js b/ui/dist/assets/ConfirmPasswordResetDocs-0123ea90.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-d78ea0ab.js rename to ui/dist/assets/ConfirmPasswordResetDocs-0123ea90.js index 984fa6a1..2d10f4a0 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-d78ea0ab.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-0123ea90.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-0aae7a97.js";import{S as De}from"./SdkTabs-ae399d8e.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(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&&f(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=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],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 r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-81d06e37.js";import{S as De}from"./SdkTabs-579eff6e.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(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&&f(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=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],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-bab2ffd7.js b/ui/dist/assets/ConfirmVerificationDocs-d1d2a4dc.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-bab2ffd7.js rename to ui/dist/assets/ConfirmVerificationDocs-d1d2a4dc.js index 58c06945..e9094410 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-bab2ffd7.js +++ b/ui/dist/assets/ConfirmVerificationDocs-d1d2a4dc.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Oe,p as Se,r as R,u as Ee,M as Me}from"./index-0aae7a97.js";import{S as Ne}from"./SdkTabs-ae399d8e.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=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(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+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(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)&&R(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&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,U,q,le,G,j=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` +import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Oe,p as Se,r as R,u as Ee,M as Me}from"./index-81d06e37.js";import{S as Ne}from"./SdkTabs-579eff6e.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=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(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+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(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)&&R(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&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,U,q,le,G,j=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-fee96749.js b/ui/dist/assets/CreateApiDocs-6fd167db.js similarity index 99% rename from ui/dist/assets/CreateApiDocs-fee96749.js rename to ui/dist/assets/CreateApiDocs-6fd167db.js index 05933408..9171752a 100644 --- a/ui/dist/assets/CreateApiDocs-fee96749.js +++ b/ui/dist/assets/CreateApiDocs-6fd167db.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as z,M 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 Be,x,N as Le,O as ht,k as Bt,P as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-0aae7a97.js";import{S as Nt}from"./SdkTabs-ae399d8e.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,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(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 z,M 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 Be,x,N as Le,O as ht,k as Bt,P as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-81d06e37.js";import{S as Nt}from"./SdkTabs-579eff6e.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,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(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-de585481.js b/ui/dist/assets/DeleteApiDocs-c0d2fce4.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-de585481.js rename to ui/dist/assets/DeleteApiDocs-c0d2fce4.js index 41eab5dc..9d0131dd 100644 --- a/ui/dist/assets/DeleteApiDocs-de585481.js +++ b/ui/dist/assets/DeleteApiDocs-c0d2fce4.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Te,P as Oe,n as Be,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-0aae7a97.js";import{S as He}from"./SdkTabs-ae399d8e.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){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&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&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,O,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Te,P as Oe,n as Be,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-81d06e37.js";import{S as He}from"./SdkTabs-579eff6e.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){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&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&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,O,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],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-7075cc59.js b/ui/dist/assets/FilterAutocompleteInput-5ad2deed.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-7075cc59.js rename to ui/dist/assets/FilterAutocompleteInput-5ad2deed.js index 4d1e7781..b37ff4a3 100644 --- a/ui/dist/assets/FilterAutocompleteInput-7075cc59.js +++ b/ui/dist/assets/FilterAutocompleteInput-5ad2deed.js @@ -1 +1 @@ -import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-0aae7a97.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-c4d2d831.js";function Me(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],s=0;s2&&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:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":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.headers."),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 r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.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 r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.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&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.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:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),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,s=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,R=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,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),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,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{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}; +import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-81d06e37.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-c4d2d831.js";function Me(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],s=0;s2&&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:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":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.headers."),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 r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.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 r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.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&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.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:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),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,s=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,R=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,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),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,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{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/ListApiDocs-8a057460.js b/ui/dist/assets/ListApiDocs-7984933b.js similarity index 99% rename from ui/dist/assets/ListApiDocs-8a057460.js rename to ui/dist/assets/ListApiDocs-7984933b.js index 67df8c71..a8be18dd 100644 --- a/ui/dist/assets/ListApiDocs-8a057460.js +++ b/ui/dist/assets/ListApiDocs-7984933b.js @@ -1,4 +1,4 @@ -import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,T as nl,C as ge,p as ol,r as ke}from"./index-0aae7a97.js";import{S as il}from"./SdkTabs-ae399d8e.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,T as nl,C as ge,p as ol,r as ke}from"./index-81d06e37.js";import{S as il}from"./SdkTabs-579eff6e.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs-9ac3ef33.js b/ui/dist/assets/ListExternalAuthsDocs-368be48d.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs-9ac3ef33.js rename to ui/dist/assets/ListExternalAuthsDocs-368be48d.js index c7ce6ad1..fc528e18 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-9ac3ef33.js +++ b/ui/dist/assets/ListExternalAuthsDocs-368be48d.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-0aae7a97.js";import{S as Ne}from"./SdkTabs-ae399d8e.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 Te(a,l){let o,n=l[5].code+"",f,h,c,p;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){d(g,o,P),s(o,f),s(o,h),c||(p=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&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&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&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,W,ae,z,A,ne,Q,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-81d06e37.js";import{S as Ne}from"./SdkTabs-579eff6e.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 Te(a,l){let o,n=l[5].code+"",f,h,c,p;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){d(g,o,P),s(o,f),s(o,h),c||(p=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&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&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&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,W,ae,z,A,ne,Q,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-4c97638f.js b/ui/dist/assets/PageAdminConfirmPasswordReset-638f988c.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-4c97638f.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-638f988c.js index 58d7fb98..9e5ddfa3 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-4c97638f.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-638f988c.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-0aae7a97.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-81d06e37.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-49abd701.js b/ui/dist/assets/PageAdminRequestPasswordReset-f2d951d5.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-49abd701.js rename to ui/dist/assets/PageAdminRequestPasswordReset-f2d951d5.js index 8a14ba3f..7eae1d78 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-49abd701.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-f2d951d5.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-0aae7a97.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-81d06e37.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’ll 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/PageOAuth2Redirect-19f0a31c.js b/ui/dist/assets/PageOAuth2Redirect-5f45cdfd.js similarity index 83% rename from ui/dist/assets/PageOAuth2Redirect-19f0a31c.js rename to ui/dist/assets/PageOAuth2Redirect-5f45cdfd.js index 07254b0a..9576e0dd 100644 --- a/ui/dist/assets/PageOAuth2Redirect-19f0a31c.js +++ b/ui/dist/assets/PageOAuth2Redirect-5f45cdfd.js @@ -1 +1 @@ -import{S as o,i,s as r,e as c,f as l,g as u,y as n,o as d,H as f}from"./index-0aae7a97.js";function m(s){let t;return{c(){t=c("div"),t.textContent="Loading...",l(t,"class","block txt-hint txt-center")},m(e,a){u(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function p(s){return f(()=>{window.close()}),[]}class g extends o{constructor(t){super(),i(this,t,p,m,r,{})}}export{g as default}; +import{S as o,i,s as r,e as c,f as l,g as u,y as n,o as d,H as f}from"./index-81d06e37.js";function m(s){let t;return{c(){t=c("div"),t.textContent="Loading...",l(t,"class","block txt-hint txt-center")},m(e,a){u(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function p(s){return f(()=>{window.close()}),[]}class g extends o{constructor(t){super(),i(this,t,p,m,r,{})}}export{g as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-8b633175.js b/ui/dist/assets/PageRecordConfirmEmailChange-5246a39b.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange-8b633175.js rename to ui/dist/assets/PageRecordConfirmEmailChange-5246a39b.js index f48cb252..9a21962c 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange-8b633175.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange-5246a39b.js @@ -1,4 +1,4 @@ -import{S as z,i as G,s as I,F as J,c as R,m as S,t as v,a as y,d as L,C as M,E as N,g as _,k as W,n as Y,o as b,R as j,G as A,p as B,q as D,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-0aae7a97.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(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"),l=m("h5"),s=C(`Type your password to confirm changing your email address +import{S as z,i as G,s as I,F as J,c as R,m as S,t as v,a as y,d as L,C as M,E as N,g as _,k as W,n as Y,o as b,R as j,G as A,p as B,q as D,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-81d06e37.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(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"),l=m("h5"),s=C(`Type your password to confirm changing your email address `),p&&p.c(),n=h(),R(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],T(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),S(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=H(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&T(a,"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(),L(o),g=!1,$()}}}function U(r){let e,t,l,s,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(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function H(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,t),_(i,s,u),_(i,n,u),F(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&F(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){R(e.$$.fragment)},m(l,s){S(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){L(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-08b4a443.js b/ui/dist/assets/PageRecordConfirmPasswordReset-2d9b57c3.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmPasswordReset-08b4a443.js rename to ui/dist/assets/PageRecordConfirmPasswordReset-2d9b57c3.js index 826cc9bf..3bce49ab 100644 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-08b4a443.js +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-2d9b57c3.js @@ -1,4 +1,4 @@ -import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,R as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-0aae7a97.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({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=R(`Reset your user password +import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,R as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-81d06e37.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({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=R(`Reset your user password `),d&&d.c(),t=P(),H(o.$$.fragment),c=P(),H(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"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(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=S(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),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=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=S(s,"click",r[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(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,a;return{c(){e=b("label"),l=R("New password"),n=P(),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,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=S(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=S(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){H(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||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!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,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>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=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-9a8dcf69.js b/ui/dist/assets/PageRecordConfirmVerification-19275fb7.js similarity index 97% rename from ui/dist/assets/PageRecordConfirmVerification-9a8dcf69.js rename to ui/dist/assets/PageRecordConfirmVerification-19275fb7.js index d7cf7ae4..f3377e8d 100644 --- a/ui/dist/assets/PageRecordConfirmVerification-9a8dcf69.js +++ b/ui/dist/assets/PageRecordConfirmVerification-19275fb7.js @@ -1,3 +1,3 @@ -import{S as v,i as y,s as w,F as g,c as x,m as C,t as $,a as L,d as P,R as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-0aae7a97.js";function S(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 g,c as x,m as C,t as $,a as L,d as P,R as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-81d06e37.js";function S(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-transparent 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-transparent 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 R(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},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 V(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[R]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(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){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function q(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const m=H(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,q,V,w,{params:2})}}export{G as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-f19df2b7.js b/ui/dist/assets/RealtimeApiDocs-eaba7ffc.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-f19df2b7.js rename to ui/dist/assets/RealtimeApiDocs-eaba7ffc.js index 56029f78..4cf4e3f1 100644 --- a/ui/dist/assets/RealtimeApiDocs-f19df2b7.js +++ b/ui/dist/assets/RealtimeApiDocs-eaba7ffc.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,M 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,T as me,p as de}from"./index-0aae7a97.js";import{S as fe}from"./SdkTabs-ae399d8e.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;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,M 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,T as me,p as de}from"./index-81d06e37.js";import{S as fe}from"./SdkTabs-579eff6e.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;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-25b63fa1.js b/ui/dist/assets/RequestEmailChangeDocs-2a33c31c.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-25b63fa1.js rename to ui/dist/assets/RequestEmailChangeDocs-2a33c31c.js index d799217b..d8b55530 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-25b63fa1.js +++ b/ui/dist/assets/RequestEmailChangeDocs-2a33c31c.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-0aae7a97.js";import{S as je}from"./SdkTabs-ae399d8e.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,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+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(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=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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)&&N(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&&d(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+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-81d06e37.js";import{S as je}from"./SdkTabs-579eff6e.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,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+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(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=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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)&&N(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&&d(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+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],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-1b6864da.js b/ui/dist/assets/RequestPasswordResetDocs-16e43168.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-1b6864da.js rename to ui/dist/assets/RequestPasswordResetDocs-16e43168.js index 400be511..a7fdf272 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-1b6864da.js +++ b/ui/dist/assets/RequestPasswordResetDocs-16e43168.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as ue,O as ge,k as ye,P as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-0aae7a97.js";import{S as Ue}from"./SdkTabs-ae399d8e.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=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(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+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(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=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(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,z,q,G,B,J,g,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as ue,O as ge,k as ye,P as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-81d06e37.js";import{S as Ue}from"./SdkTabs-579eff6e.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=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(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+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(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=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(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,z,q,G,B,J,g,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-74701cdf.js b/ui/dist/assets/RequestVerificationDocs-d948a007.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-74701cdf.js rename to ui/dist/assets/RequestVerificationDocs-d948a007.js index 18e2440a..560751b7 100644 --- a/ui/dist/assets/RequestVerificationDocs-74701cdf.js +++ b/ui/dist/assets/RequestVerificationDocs-d948a007.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as me,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as I,u as Ve,M as Re}from"./index-0aae7a97.js";import{S as Ae}from"./SdkTabs-ae399d8e.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=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(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+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(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)&&I(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&&u(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,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,V,Y,y,R,h=[],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 r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as me,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as I,u as Ve,M as Re}from"./index-81d06e37.js";import{S as Ae}from"./SdkTabs-579eff6e.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=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(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+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(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)&&I(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&&u(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,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,V,Y,y,R,h=[],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-ae399d8e.js b/ui/dist/assets/SdkTabs-579eff6e.js similarity index 96% rename from ui/dist/assets/SdkTabs-ae399d8e.js rename to ui/dist/assets/SdkTabs-579eff6e.js index ea912735..bc7b16e3 100644 --- a/ui/dist/assets/SdkTabs-ae399d8e.js +++ b/ui/dist/assets/SdkTabs-579eff6e.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,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-0aae7a97.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 M(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(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=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),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!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),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[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(I,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,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-81d06e37.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 M(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(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=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),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!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),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[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(I,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-72a9b84b.js b/ui/dist/assets/UnlinkExternalAuthDocs-86559302.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-72a9b84b.js rename to ui/dist/assets/UnlinkExternalAuthDocs-86559302.js index b02af381..d7fd86e9 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-72a9b84b.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-86559302.js @@ -1,4 +1,4 @@ -import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-0aae7a97.js";import{S as Ke}from"./SdkTabs-ae399d8e.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,D=n[0].name+"",R,se,ae,K,F,y,G,E,J,w,W,ne,z,T,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` +import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-81d06e37.js";import{S as Ke}from"./SdkTabs-579eff6e.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,D=n[0].name+"",R,se,ae,K,F,y,G,E,J,w,W,ne,z,T,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-bf9cd75a.js b/ui/dist/assets/UpdateApiDocs-992b265a.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs-bf9cd75a.js rename to ui/dist/assets/UpdateApiDocs-992b265a.js index 20d6a08b..82baf42f 100644 --- a/ui/dist/assets/UpdateApiDocs-bf9cd75a.js +++ b/ui/dist/assets/UpdateApiDocs-992b265a.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as U,M 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 I,N as Pe,O as ut,k as Mt,P as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-0aae7a97.js";import{S as Lt}from"./SdkTabs-ae399d8e.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){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(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,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 U,M 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 I,N as Pe,O as ut,k as Mt,P as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-81d06e37.js";import{S as Lt}from"./SdkTabs-579eff6e.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){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(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,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-9dc7a74b.js b/ui/dist/assets/ViewApiDocs-e1f1acb4.js similarity index 98% rename from ui/dist/assets/ViewApiDocs-9dc7a74b.js rename to ui/dist/assets/ViewApiDocs-e1f1acb4.js index aa3c8eca..af29d974 100644 --- a/ui/dist/assets/ViewApiDocs-9dc7a74b.js +++ b/ui/dist/assets/ViewApiDocs-e1f1acb4.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,T as it,C as Ge,p as at,r as K,u as rt}from"./index-0aae7a97.js";import{S as dt}from"./SdkTabs-ae399d8e.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(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+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,T as it,C as Ge,p as at,r as K,u as rt}from"./index-81d06e37.js";import{S as dt}from"./SdkTabs-579eff6e.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(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+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index-0aae7a97.js b/ui/dist/assets/index-81d06e37.js similarity index 74% rename from ui/dist/assets/index-0aae7a97.js rename to ui/dist/assets/index-81d06e37.js index a8bad3c1..ee39c987 100644 --- a/ui/dist/assets/index-0aae7a97.js +++ b/ui/dist/assets/index-81d06e37.js @@ -1,70 +1,70 @@ -(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 Q(){}const $l=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function Tb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function V_(n){return n()}function du(){return Object.create(null)}function Ee(n){n.forEach(V_)}function Vt(n){return typeof n=="function"}function _e(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function dn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function Mb(n){return Object.keys(n).length===0}function _a(n,...e){if(n==null)return Q;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Ob(n){let e;return _a(n,t=>e=t)(),e}function Je(n,e,t){n.$$.on_destroy.push(_a(e,t))}function yt(n,e,t,i){if(n){const s=H_(n,e,t,i);return n[0](s)}}function H_(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function kt(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(),ga=z_?n=>requestAnimationFrame(n):Q;const ws=new Set;function B_(n){ws.forEach(e=>{e.c(n)||(ws.delete(e),e.f())}),ws.size!==0&&ga(B_)}function qo(n){let e;return ws.size===0&&ga(B_),{promise:new Promise(t=>{ws.add(e={c:n,f:t})}),abort(){ws.delete(e)}}}function v(n,e){n.appendChild(e)}function U_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Db(n){const e=y("style");return Eb(U_(n),e),e.sheet}function Eb(n,e){return v(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 dt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function at(n){return function(e){return e.preventDefault(),n.call(this,e)}}function An(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ai(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]:h(n,i,e[i])}function Ab(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function gt(n){return n===""?null:+n}function Ib(n){return Array.from(n.childNodes)}function oe(n,e){e=""+e,n.data!==e&&(n.data=e)}function fe(n,e){n.value=e??""}function qr(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function W_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Lt(n,e){return new n(e)}const ho=new Map;let _o=0;function Pb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Lb(n,e){const t={stylesheet:Db(e),rules:{}};return ho.set(n,t),t}function dl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +(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 Q(){}const $l=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function Mb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function H_(n){return n()}function pu(){return Object.create(null)}function Ee(n){n.forEach(H_)}function Vt(n){return typeof n=="function"}function _e(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function mn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function Ob(n){return Object.keys(n).length===0}function _a(n,...e){if(n==null)return Q;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Db(n){let e;return _a(n,t=>e=t)(),e}function Je(n,e,t){n.$$.on_destroy.push(_a(e,t))}function wt(n,e,t,i){if(n){const s=z_(n,e,t,i);return n[0](s)}}function z_(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function St(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(),ga=B_?n=>requestAnimationFrame(n):Q;const ws=new Set;function U_(n){ws.forEach(e=>{e.c(n)||(ws.delete(e),e.f())}),ws.size!==0&&ga(U_)}function Ro(n){let e;return ws.size===0&&ga(U_),{promise:new Promise(t=>{ws.add(e={c:n,f:t})}),abort(){ws.delete(e)}}}function v(n,e){n.appendChild(e)}function W_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Eb(n){const e=y("style");return Ab(W_(n),e),e.sheet}function Ab(n,e){return v(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 pt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function at(n){return function(e){return e.preventDefault(),n.call(this,e)}}function An(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ai(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]:h(n,i,e[i])}function Ib(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function gt(n){return n===""?null:+n}function Pb(n){return Array.from(n.childNodes)}function oe(n,e){e=""+e,n.data!==e&&(n.data=e)}function fe(n,e){n.value=e??""}function Rr(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function Y_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Lt(n,e){return new n(e)}const ho=new Map;let _o=0;function Lb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Nb(n,e){const t={stylesheet:Eb(e),rules:{}};return ho.set(n,t),t}function dl(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 k=e+(t-e)*l(b);u+=b*100+`%{${o(k,1-k)}} `}const f=u+`100% {${o(t,1-t)}} -}`,d=`__svelte_${Pb(f)}_${r}`,p=U_(n),{stylesheet:m,rules:_}=ho.get(p)||Lb(p,n);_[d]||(_[d]=!0,m.insertRule(`@keyframes ${d} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${d} ${i}ms linear ${s}ms 1 both`,_o+=1,d}function pl(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(", "),_o-=s,_o||Nb())}function Nb(){ga(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function Fb(n,e,t,i){if(!e)return Q;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return Q;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Ro()+l,end:u=a+o,tick:f=Q,css:d}=t(n,{from:e,to:s},i);let p=!0,m=!1,_;function g(){d&&(_=dl(n,0,1,o,l,r,d)),l||(m=!0)}function b(){d&&pl(n,_),p=!1}return qo(k=>{if(!m&&k>=a&&(m=!0),m&&k>=u&&(f(1,0),b()),!p)return!1;if(m){const $=k-a,T=0+1*r($/o);f(T,1-T)}return!0}),g(),f(0,1),b}function Rb(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,Y_(n,s)}}function Y_(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 ml;function bi(n){ml=n}function Cl(){if(!ml)throw new Error("Function called outside component initialization");return ml}function xt(n){Cl().$$.on_mount.push(n)}function qb(n){Cl().$$.after_update.push(n)}function K_(n){Cl().$$.on_destroy.push(n)}function Tt(){const n=Cl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=W_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function me(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],se=[];let Ss=[];const jr=[],J_=Promise.resolve();let Vr=!1;function Z_(){Vr||(Vr=!0,J_.then(ba))}function pn(){return Z_(),J_}function nt(n){Ss.push(n)}function ke(n){jr.push(n)}const ir=new Set;let hs=0;function ba(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let zs;function va(){return zs||(zs=Promise.resolve(),zs.then(()=>{zs=null})),zs}function is(n,e,t){n.dispatchEvent(W_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let li;function ae(){li={r:0,c:[],p:li}}function ue(){li.r||Ee(li.c),li=li.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),li.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ya={duration:0};function Hb(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:p=0,duration:m=300,easing:_=$l,tick:g=Q,css:b}=s||ya;b&&(o=dl(n,0,1,m,p,_,b,a++)),g(0,1);const k=Ro()+p,$=k+m;r&&r.abort(),l=!0,nt(()=>is(n,!0,"start")),r=qo(T=>{if(l){if(T>=$)return g(1,0),is(n,!0,"end"),u(),l=!1;if(T>=k){const C=_((T-k)/m);g(C,1-C)}}return l})}let d=!1;return{start(){d||(d=!0,pl(n),Vt(s)?(s=s(i),va().then(f)):f())},invalidate(){d=!1},end(){l&&(u(),l=!1)}}}function G_(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=li;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:d=$l,tick:p=Q,css:m}=s||ya;m&&(o=dl(n,1,0,f,u,d,m));const _=Ro()+u,g=_+f;nt(()=>is(n,!1,"start")),qo(b=>{if(l){if(b>=g)return p(0,1),is(n,!1,"end"),--r.r||Ee(r.c),!1;if(b>=_){const k=d((b-_)/f);p(1-k,k)}}return l})}return Vt(s)?va().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function He(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function d(m,_){const g=m.b-o;return _*=Math.abs(g),{a:o,b:m.b,d:g,duration:_,start:m.start,end:m.start+_,group:m.group}}function p(m){const{delay:_=0,duration:g=300,easing:b=$l,tick:k=Q,css:$}=l||ya,T={start:Ro()+_,b:m};m||(T.group=li,li.r+=1),r||a?a=T:($&&(f(),u=dl(n,o,m,g,_,b,$)),m&&k(0,1),r=d(T,g),nt(()=>is(n,m,"start")),qo(C=>{if(a&&C>a.start&&(r=d(a,g),a=null,is(n,r.b,"start"),$&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)k(o=r.b,1-o),is(n,r.b,"end"),a||(r.b?f():--r.group.r||Ee(r.group.c)),r=null;else if(C>=r.start){const O=C-r.start;o=r.a+r.d*b(O/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(m){Vt(l)?va().then(()=>{l=l(s),p(m)}):p(m)},end(){f(),r=a=null}}}function mu(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((d,p)=>{p!==l&&d&&(ae(),P(d,1,1,()=>{e.blocks[p]===d&&(e.blocks[p]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ba()}if(Tb(n)){const s=Cl();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(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 zb(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 us(n,e){n.d(1),e.delete(n.key)}function Qt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Bb(n,e){n.f(),Qt(n,e)}function $t(n,e,t,i,s,l,o,r,a,u,f,d){let p=n.length,m=l.length,_=p;const g={};for(;_--;)g[n[_].key]=_;const b=[],k=new Map,$=new Map,T=[];for(_=m;_--;){const D=d(s,l,_),I=t(D);let L=o.get(I);L?i&&T.push(()=>L.p(D,e)):(L=u(I,D),L.c()),k.set(I,b[_]=L),I in g&&$.set(I,Math.abs(_-g[I]))}const C=new Set,O=new Set;function M(D){A(D,1),D.m(r,f),o.set(D.key,D),f=D.first,m--}for(;p&&m;){const D=b[m-1],I=n[p-1],L=D.key,F=I.key;D===I?(f=D.first,p--,m--):k.has(F)?!o.has(L)||C.has(L)?M(D):O.has(F)?p--:$.get(L)>$.get(F)?(O.add(L),M(D)):(C.add(F),p--):(a(I,o),p--)}for(;p--;){const D=n[p];k.has(D.key)||a(D,o)}for(;m;)M(b[m-1]);return Ee(T),b}function Mt(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 Jt(n){return typeof n=="object"&&n!==null?n:{}}function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function U(n){n&&n.c()}function z(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||nt(()=>{const o=n.$$.on_mount.map(V_).filter(Vt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ee(o),n.$$.on_mount=[]}),l.forEach(nt)}function B(n,e){const t=n.$$;t.fragment!==null&&(Vb(t.after_update),Ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ub(n,e){n.$$.dirty[0]===-1&&(ks.push(n),Z_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:p;return u.ctx&&s(u.ctx[d],u.ctx[d]=_)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](_),f&&Ub(n,d)),p}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const d=Ib(e.target);u.fragment&&u.fragment.l(d),d.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),z(n,e.target,e.anchor,e.customElement),ba()}bi(a)}class be{$destroy(){B(this,1),this.$destroy=Q}$on(e,t){if(!Vt(t))return Q;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&&!Mb(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function qt(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(),t=null)}}return{set:s,update:l,subscribe:o}}function Q_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return X_(t,o=>{let r=!1;const a=[];let u=0,f=Q;const d=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Vt(m)?m:Q},p=s.map((m,_)=>_a(m,g=>{a[_]=g,u&=~(1<<_),r&&d()},()=>{u|=1<<_}));return r=!0,d(),function(){Ee(p),f(),r=!1}})}function x_(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function Wb(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[7]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Yb(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{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Kb(n){let e,t,i,s;const l=[Yb,Wb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function hu(){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 jo=X_(null,function(e){e(hu());const t=()=>{e(hu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Q_(jo,n=>n.location);const ka=Q_(jo,n=>n.querystring),_u=In(void 0);async function Vi(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await pn();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 fn(n,e){if(e=bu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return gu(n,e),{update(t){t=bu(t),gu(n,t)}}}function Jb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function gu(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||Zb(i.currentTarget.getAttribute("href"))})}function bu(n){return n&&typeof n=="string"?{href:n}:n||{}}function Zb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function Gb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(O,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!O||typeof O=="string"&&(O.length<1||O.charAt(0)!="/"&&O.charAt(0)!="*")||typeof O=="object"&&!(O instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:D,keys:I}=x_(O);this.path=O,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=D,this._keys=I}match(O){if(s){if(typeof s=="string")if(O.startsWith(s))O=O.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=O.match(s);if(L&&L[0])O=O.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(O);if(M===null)return null;if(this._keys===!1)return M;const D={};let I=0;for(;I{r.push(new o(O,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const d=Tt();async function p(C,O){await pn(),d(C,O)}let m=null,_=null;l&&(_=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",_),qb(()=>{Jb(m)}));let g=null,b=null;const k=jo.subscribe(async C=>{g=C;let O=0;for(;O{_u.set(u)});return}t(0,a=null),b=null,_u.set(void 0)});K_(()=>{k(),_&&window.removeEventListener("popstate",_)});function $(C){me.call(this,n,C)}function T(C){me.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,$,T]}class Xb extends be{constructor(e){super(),ge(this,e,Gb,Kb,_e,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let eg;function tg(n){const e=n.pattern.test(eg);vu(n,n.className,e),vu(n,n.inactiveClassName,!e)}function vu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}jo.subscribe(n=>{eg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(tg)});function Gn(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"?x_(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),tg(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const Qb="modulepreload",xb=function(n,e){return new URL(n,e).href},yu={},rt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=xb(l,i),l in yu)return;yu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===l&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":Qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Hr=function(n,e){return Hr=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])},Hr(n,e)};function nn(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}Hr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var zr=function(){return zr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||d[0]!==6&&d[0]!==2)){o=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}ng=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Tl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(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 ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=ku(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?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},wa=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},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 nn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return Zt(l,void 0,void 0,function(){return Gt(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var d=f,p=d.items,m=d.totalItems;return o=o.concat(p),p.length&&m>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;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new vi(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,d){return Zt(a,void 0,void 0,function(){var p,m,_,g,b=this;return Gt(this,function(k){switch(k.label){case 0:return k.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function($){return Zt(b,void 0,void 0,function(){var T,C,O;return Gt(this,function(M){switch(M.label){case 0:T=this.client.realtime.clientId,M.label=1;case 1:if(M.trys.push([1,3,,4]),p(),!$.state||T!==$.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,$.code,o.codeVerifier,r,s.createData)];case 2:return C=M.sent(),f(C),[3,4];case 3:return O=M.sent(),d(new vi(O)),[3,4];case 4:return[2]}})})})];case 1:return p=k.sent(),(m=new URL(o.authUrl+r)).searchParams.set("state",this.client.realtime.clientId),!((g=s.scopes)===null||g===void 0)&&g.length&&m.searchParams.set("scope",s.scopes.join(" ")),[4,s.urlCallback?s.urlCallback(m.toString()):this._defaultUrlCallback(m.toString())];case 2:return k.sent(),[3,4];case 3:return _=k.sent(),d(new vi(_)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o"u"||!(window!=null&&window.open))throw new vi(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(wa),wn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},kn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=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 Zt(this,void 0,void 0,function(){return Gt(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 Zt(t,void 0,void 0,function(){var l;return Gt(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 vi({url:M.url,status:M.status,data:D});return[2,D]}})})}).catch(function(M){throw new vi(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},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 ss(n){return typeof n=="number"}function Ho(n){return typeof n=="number"&&n%1===0}function g0(n){return typeof n=="string"}function b0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Mg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function v0(n){return Array.isArray(n)?n:[n]}function Su(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 y0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ds(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yi(n,e,t){return Ho(n)&&n>=e&&n<=t}function k0(n,e){return n-e*Math.floor(n/e)}function Bt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ei(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Yi(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function Sa(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function $a(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Ml(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Ml(n)?366:365}function go(n,e){const t=k0(e-1,12)+1,i=n+(e-t)/12;return t===2?Ml(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ca(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 bo(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 Wr(n){return n>99?n:n>60?1900+n:2e3+n}function Og(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 zo(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 Dg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new zn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Ds(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Dg(s)}return t}function ll(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}${Bt(t,2)}:${Bt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Bt(t,2)}${Bt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Bo(n){return y0(n,["hour","minute","second","millisecond"])}const Eg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,w0=["January","February","March","April","May","June","July","August","September","October","November","December"],Ag=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],S0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ig(n){switch(n){case"narrow":return[...S0];case"short":return[...Ag];case"long":return[...w0];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 Pg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$0=["M","T","W","T","F","S","S"];function Ng(n){switch(n){case"narrow":return[...$0];case"short":return[...Lg];case"long":return[...Pg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Fg=["AM","PM"],C0=["Before Christ","Anno Domini"],T0=["BC","AD"],M0=["B","A"];function Rg(n){switch(n){case"narrow":return[...M0];case"short":return[...T0];case"long":return[...C0];default:return null}}function O0(n){return Fg[n.hour<12?0:1]}function D0(n,e){return Ng(e)[n.weekday-1]}function E0(n,e){return Ig(e)[n.month-1]}function A0(n,e){return Rg(e)[n.year<0?0:1]}function I0(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 d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${s[n][0]}`;case-1:return d?"yesterday":`last ${s[n][0]}`;case 0:return d?"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 $u(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const P0={D:Ur,DD:ag,DDD:ug,DDDD:fg,t:cg,tt:dg,ttt:pg,tttt:mg,T:hg,TT:_g,TTT:gg,TTTT:bg,f:vg,ff:kg,fff:Sg,ffff:Cg,F:yg,FF:wg,FFF:$g,FFFF:Tg};class yn{static create(e,t={}){return new yn(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 P0[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 Bt(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=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?O0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?E0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),u=(m,_)=>i?D0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const _=yn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},d=m=>i?A0(e,m):l({era:m},"era"),p=m=>{switch(m){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 d("short");case"GG":return d("long");case"GGGGG":return d("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(m)}};return $u(yn.parseFormat(t),p)}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=yn.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 $u(l,s(r))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ol{get type(){throw new Oi}get name(){throw new Oi}get ianaName(){return this.name}get isUniversal(){throw new Oi}offsetName(e,t){throw new Oi}formatOffset(e,t){throw new Oi}offset(e){throw new Oi}equals(e){throw new Oi}get isValid(){throw new Oi}}let sr=null;class Ta extends Ol{static get instance(){return sr===null&&(sr=new Ta),sr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Og(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function L0(n){return ao[n]||(ao[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"})),ao[n]}const N0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function F0(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 R0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let lr=null;class cn extends Ol{static get utcInstance(){return lr===null&&(lr=new cn(0)),lr}static instance(e){return e===0?cn.utcInstance:new cn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new cn(zo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(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 q0 extends Ol{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 Ai(n,e){if(it(n)||n===null)return e;if(n instanceof Ol)return n;if(g0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?cn.utcInstance:cn.parseSpecifier(t)||Si.create(n)}else return ss(n)?cn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new q0(n)}let Cu=()=>Date.now(),Tu="system",Mu=null,Ou=null,Du=null,Eu;class Yt{static get now(){return Cu}static set now(e){Cu=e}static set defaultZone(e){Tu=e}static get defaultZone(){return Ai(Tu,Ta.instance)}static get defaultLocale(){return Mu}static set defaultLocale(e){Mu=e}static get defaultNumberingSystem(){return Ou}static set defaultNumberingSystem(e){Ou=e}static get defaultOutputCalendar(){return Du}static set defaultOutputCalendar(e){Du=e}static get throwOnInvalid(){return Eu}static set throwOnInvalid(e){Eu=e}static resetCaches(){Dt.resetCache(),Si.resetCache()}}let Au={};function j0(n,e={}){const t=JSON.stringify([n,e]);let i=Au[t];return i||(i=new Intl.ListFormat(n,e),Au[t]=i),i}let Yr={};function Kr(n,e={}){const t=JSON.stringify([n,e]);let i=Yr[t];return i||(i=new Intl.DateTimeFormat(n,e),Yr[t]=i),i}let Jr={};function V0(n,e={}){const t=JSON.stringify([n,e]);let i=Jr[t];return i||(i=new Intl.NumberFormat(n,e),Jr[t]=i),i}let Zr={};function H0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Zr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Zr[s]=l),l}let tl=null;function z0(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function B0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Kr(n).resolvedOptions()}catch{t=Kr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function U0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function W0(n){const e=[];for(let t=1;t<=12;t++){const i=Be.utc(2016,t,1);e.push(n(i))}return e}function Y0(n){const e=[];for(let t=1;t<=7;t++){const i=Be.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 K0(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 J0{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=V0(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):$a(e,3);return Bt(t,this.padTo)}}}class Z0{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:Be.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=Kr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class G0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Mg()&&(this.rtf=H0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):I0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Dt{static fromOpts(e){return Dt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Yt.defaultLocale,o=l||(s?"en-US":z0()),r=t||Yt.defaultNumberingSystem,a=i||Yt.defaultOutputCalendar;return new Dt(o,r,a,l)}static resetCache(){tl=null,Yr={},Jr={},Zr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Dt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=B0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=U0(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=K0(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:Dt.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,Ig,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=W0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Vl(this,e,i,Ng,()=>{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]=Y0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Vl(this,void 0,e,()=>Fg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Be.utc(2016,11,13,9),Be.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Vl(this,e,t,Rg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Be.utc(-40,1,1),Be.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 J0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Z0(e,this.intl,t)}relFormatter(e={}){return new G0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return j0(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 Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...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 qs(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 qg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&f)?-m:m;return[{years:p(Yi(t)),months:p(Yi(i)),weeks:p(Yi(s)),days:p(Yi(l)),hours:p(Yi(o)),minutes:p(Yi(r)),seconds:p(Yi(a),a==="-0"),milliseconds:p(Sa(u),d)}]}const uv={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 Da(n,e,t,i,s,l,o){const r={year:e.length===2?Wr(Ei(e)):Ei(e),month:Ag.indexOf(t)+1,day:Ei(i),hour:Ei(s),minute:Ei(l)};return o&&(r.second=Ei(o)),n&&(r.weekday=n.length>3?Pg.indexOf(n)+1:Lg.indexOf(n)+1),r}const fv=/^(?:(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 cv(n){const[,e,t,i,s,l,o,r,a,u,f,d]=n,p=Da(e,s,i,t,l,o,r);let m;return a?m=uv[a]:u?m=0:m=zo(f,d),[p,new cn(m)]}function dv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(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$/,mv=/^(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$/,hv=/^(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 Iu(n){const[,e,t,i,s,l,o,r]=n;return[Da(e,s,i,t,l,o,r),cn.utcInstance]}function _v(n){const[,e,t,i,s,l,o,r]=n;return[Da(e,r,t,i,s,l,o),cn.utcInstance]}const gv=Fs(Q0,Oa),bv=Fs(x0,Oa),vv=Fs(ev,Oa),yv=Fs(Vg),zg=Rs(lv,js,Dl,El),kv=Rs(tv,js,Dl,El),wv=Rs(nv,js,Dl,El),Sv=Rs(js,Dl,El);function $v(n){return qs(n,[gv,zg],[bv,kv],[vv,wv],[yv,Sv])}function Cv(n){return qs(dv(n),[fv,cv])}function Tv(n){return qs(n,[pv,Iu],[mv,Iu],[hv,_v])}function Mv(n){return qs(n,[rv,av])}const Ov=Rs(js);function Dv(n){return qs(n,[ov,Ov])}const Ev=Fs(iv,sv),Av=Fs(Hg),Iv=Rs(js,Dl,El);function Pv(n){return qs(n,[Ev,zg],[Av,Iv])}const Lv="Invalid Duration",Bg={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}},Nv={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},...Bg},Rn=146097/400,gs=146097/4800,Fv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...Bg},Qi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Rv=Qi.slice(0).reverse();function Ki(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 ot(i)}function qv(n){return n<0?Math.floor(n):Math.ceil(n)}function Ug(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?qv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function jv(n,e){Rv.reduce((t,i)=>it(e[i])?t:(t&&Ug(n,e,t,e,i),i),null)}class ot{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Dt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Fv:Nv,this.isLuxonDuration=!0}static fromMillis(e,t){return ot.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new zn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ot({values:vo(e,ot.normalizeUnit),loc:Dt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ss(e))return ot.fromMillis(e);if(ot.isDuration(e))return e;if(typeof e=="object")return ot.fromObject(e);throw new zn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Mv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Dv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new m0(i);return new ot({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 rg(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?yn.create(this.loc,i).formatDurationFromString(this,e):Lv}toHuman(e={}){const t=Qi.map(i=>{const s=this.values[i];return it(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+=$a(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=ot.fromDurationLike(e),i={};for(const s of Qi)(Ds(t.values,s)||Ds(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ki(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ot.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]=Dg(e(this.values[i],i));return Ki(this,{values:t},!0)}get(e){return this[ot.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,ot.normalizeUnit)};return Ki(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),Ki(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jv(this.matrix,e),Ki(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ot.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Qi)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;ss(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)Qi.indexOf(u)>Qi.indexOf(o)&&Ug(this.matrix,s,u,t,o)}else ss(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 Ki(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 Ki(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 Qi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function Vv(n,e){return!n||!n.isValid?At.invalid("missing or invalid start"):!e||!e.isValid?At.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?At.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(At.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ot.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(At.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:At.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return At.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(At.fromDateTimes(t,a.time)),t=null);return At.merge(s)}difference(...e){return At.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)}mapEndpoints(e){return At.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Yt.defaultZone){const t=Be.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 Ai(e,Yt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Dt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Dt.create(t,null,"gregory").eras(e)}static features(){return{relative:Mg()}}}function Pu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ot.fromMillis(i).as("days"))}function Hv(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=Pu(r,a);return(u-u%7)/7}],["days",Pu]],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 zv(n,e,t,i){let[s,l,o,r]=Hv(n,e,t);const a=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?ot.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ea={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Lu={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]},Bv=Ea.hanidec.replace(/[\[|\]]/g,"").split("");function Uv(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 Jn({numberingSystem:n},e=""){return new RegExp(`${Ea[n||"latn"]}${e}`)}const Wv="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(Uv(t))}}const Yv=String.fromCharCode(160),Wg=`[ ${Yv}]`,Yg=new RegExp(Wg,"g");function Kv(n){return n.replace(/\./g,"\\.?").replace(Yg,Wg)}function Nu(n){return n.replace(/\./g,"").replace(Yg," ").toLowerCase()}function Zn(n,e){return n===null?null:{regex:RegExp(n.map(Kv).join("|")),deser:([t])=>n.findIndex(i=>Nu(t)===Nu(i))+e}}function Fu(n,e){return{regex:n,deser:([,t,i])=>zo(t,i),groups:e}}function or(n){return{regex:n,deser:([e])=>e}}function Jv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zv(n,e){const t=Jn(e),i=Jn(e,"{2}"),s=Jn(e,"{3}"),l=Jn(e,"{4}"),o=Jn(e,"{6}"),r=Jn(e,"{1,2}"),a=Jn(e,"{1,3}"),u=Jn(e,"{1,6}"),f=Jn(e,"{1,9}"),d=Jn(e,"{2,4}"),p=Jn(e,"{4,6}"),m=b=>({regex:RegExp(Jv(b.val)),deser:([k])=>k,literal:!0}),g=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Zn(e.eras("short",!1),0);case"GG":return Zn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(d,Wr);case"yyyy":return ut(l);case"yyyyy":return ut(p);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Zn(e.months("short",!0,!1),1);case"MMMM":return Zn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Zn(e.months("short",!1,!1),1);case"LLLL":return Zn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return or(f);case"uu":return or(r);case"uuu":return ut(t);case"a":return Zn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(d,Wr);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Zn(e.weekdays("short",!1,!1),1);case"EEEE":return Zn(e.weekdays("long",!1,!1),1);case"ccc":return Zn(e.weekdays("short",!0,!1),1);case"cccc":return Zn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Fu(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Fu(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return or(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:Wv};return g.token=n,g}const Gv={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 Xv(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Gv[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Qv(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function xv(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ds(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 ey(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 it(n.z)||(t=Si.create(n.z)),it(n.Z)||(t||(t=new cn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(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),it(n.u)||(n.S=Sa(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let rr=null;function ty(){return rr||(rr=Be.fromMillis(1555555555555)),rr}function ny(n,e){if(n.literal)return n;const t=yn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=yn.create(e,t).formatDateTimeParts(ty()).map(o=>Xv(o,e,t));return l.includes(void 0)?n:l}function iy(n,e){return Array.prototype.concat(...n.map(t=>ny(t,e)))}function Kg(n,e,t){const i=iy(yn.parseFormat(t),n),s=i.map(o=>Zv(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Qv(s),a=RegExp(o,"i"),[u,f]=xv(e,a,r),[d,p,m]=f?ey(f):[null,null,void 0];if(Ds(f,"a")&&Ds(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:d,zone:p,specificOffset:m}}}function sy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Kg(n,e,t);return[i,s,l,o]}const Jg=[0,31,59,90,120,151,181,212,243,273,304,334],Zg=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Gg(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 Xg(n,e,t){return t+(Ml(n)?Zg:Jg)[e-1]}function Qg(n,e){const t=Ml(n)?Zg:Jg,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Bo(n)}}function Ru(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Gg(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=Qg(r,o);return{year:r,month:a,day:u,...Bo(n)}}function ar(n){const{year:e,month:t,day:i}=n,s=Xg(e,t,i);return{year:e,ordinal:s,...Bo(n)}}function qu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Qg(e,t);return{year:e,month:i,day:s,...Bo(n)}}function ly(n){const e=Ho(n.weekYear),t=yi(n.weekNumber,1,bo(n.weekYear)),i=yi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function oy(n){const e=Ho(n.year),t=yi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function xg(n){const e=Ho(n.year),t=yi(n.month,1,12),i=yi(n.day,1,go(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function e1(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=yi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=yi(t,0,59),r=yi(i,0,59),a=yi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const ur="Invalid DateTime",ju=864e13;function zl(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function fr(n){return n.weekData===null&&(n.weekData=Gr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Be({...t,...e,old:t})}function t1(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 Vu(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 uo(n,e,t){return t1(Ca(n),e,t)}function Hu(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=ot.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=Ca(l);let[a,u]=t1(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Be.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Be.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?yn.create(Dt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function cr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Bt(n.c.year,t?6:4),e?(i+="-",i+=Bt(n.c.month),i+="-",i+=Bt(n.c.day)):(i+=Bt(n.c.month),i+=Bt(n.c.day)),i}function zu(n,e,t,i,s,l){let o=Bt(n.c.hour);return e?(o+=":",o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=Bt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Bt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Bt(Math.trunc(-n.o/60)),o+=":",o+=Bt(Math.trunc(-n.o%60))):(o+="+",o+=Bt(Math.trunc(n.o/60)),o+=":",o+=Bt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const n1={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ry={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ay={ordinal:1,hour:0,minute:0,second:0,millisecond:0},i1=["year","month","day","hour","minute","second","millisecond"],uy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fy=["year","ordinal","hour","minute","second","millisecond"];function Bu(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 rg(n);return e}function Uu(n,e){const t=Ai(e.zone,Yt.defaultZone),i=Dt.fromObject(e),s=Yt.now();let l,o;if(it(n.year))l=s;else{for(const u of i1)it(n[u])&&(n[u]=n1[u]);const r=xg(n)||e1(n);if(r)return Be.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new Be({ts:l,zone:t,loc:i,o})}function Wu(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=$a(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 Yu(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 Be{constructor(e){const t=e.zone||Yt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=it(e.ts)?Yt.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=Vu(this.ts,r),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Dt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Be({})}static local(){const[e,t]=Yu(arguments),[i,s,l,o,r,a,u]=t;return Uu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Yu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=cn.utcInstance,Uu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=b0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Be.invalid("invalid input");const s=Ai(t.zone,Yt.defaultZone);return s.isValid?new Be({ts:i,zone:s,loc:Dt.fromObject(t)}):Be.invalid(zl(s))}static fromMillis(e,t={}){if(ss(e))return e<-ju||e>ju?Be.invalid("Timestamp out of range"):new Be({ts:e,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ss(e))return new Be({ts:e*1e3,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ai(t.zone,Yt.defaultZone);if(!i.isValid)return Be.invalid(zl(i));const s=Yt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Bu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,d=o.weekYear||o.weekNumber,p=Dt.fromObject(t);if((f||r)&&d)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=d||o.weekday&&!f;let _,g,b=Vu(s,l);m?(_=uy,g=ry,b=Gr(b)):r?(_=fy,g=ay,b=ar(b)):(_=i1,g=n1);let k=!1;for(const I of _){const L=o[I];it(L)?k?o[I]=g[I]:o[I]=b[I]:k=!0}const $=m?ly(o):r?oy(o):xg(o),T=$||e1(o);if(T)return Be.invalid(T);const C=m?Ru(o):r?qu(o):o,[O,M]=uo(C,l,i),D=new Be({ts:O,zone:i,o:M,loc:p});return o.weekday&&f&&e.weekday!==D.weekday?Be.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]=$v(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Cv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Tv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new zn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=sy(o,e,t);return f?Be.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Be.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Pv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new d0(i);return new Be({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?fr(this).weekYear:NaN}get weekNumber(){return this.isValid?fr(this).weekNumber:NaN}get weekday(){return this.isValid?fr(this).weekday:NaN}get ordinal(){return this.isValid?ar(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.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 Ml(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=yn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(cn.instance(e),t)}toLocal(){return this.setZone(Yt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ai(e,Yt.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]=uo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Be.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Bu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=Ru({...Gr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=qu({...ar(this.c),...t});const[f,d]=uo(u,this.o,this.zone);return Us(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return Us(this,Hu(this,t))}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e).negate();return Us(this,Hu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ot.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?yn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ur}toLocaleString(e=Ur,t={}){return this.isValid?yn.create(this.loc.clone(t),e).formatDateTime(this):ur}toLocaleParts(e={}){return this.isValid?yn.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=cr(this,o);return r+="T",r+=zu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?cr(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":"")+zu(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?cr(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():ur}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 ot.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=v0(t).map(ot.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=zv(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Be.now(),e,t)}until(e){return this.isValid?At.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||Be.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Be.isDateTime))throw new zn("max requires all arguments be DateTimes");return Su(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Kg(o,e,t)}static fromStringExplain(e,t,i={}){return Be.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Ur}static get DATE_MED(){return ag}static get DATE_MED_WITH_WEEKDAY(){return h0}static get DATE_FULL(){return ug}static get DATE_HUGE(){return fg}static get TIME_SIMPLE(){return cg}static get TIME_WITH_SECONDS(){return dg}static get TIME_WITH_SHORT_OFFSET(){return pg}static get TIME_WITH_LONG_OFFSET(){return mg}static get TIME_24_SIMPLE(){return hg}static get TIME_24_WITH_SECONDS(){return _g}static get TIME_24_WITH_SHORT_OFFSET(){return gg}static get TIME_24_WITH_LONG_OFFSET(){return bg}static get DATETIME_SHORT(){return vg}static get DATETIME_SHORT_WITH_SECONDS(){return yg}static get DATETIME_MED(){return kg}static get DATETIME_MED_WITH_SECONDS(){return wg}static get DATETIME_MED_WITH_WEEKDAY(){return _0}static get DATETIME_FULL(){return Sg}static get DATETIME_FULL_WITH_SECONDS(){return $g}static get DATETIME_HUGE(){return Cg}static get DATETIME_HUGE_WITH_SECONDS(){return Tg}}function Ys(n){if(Be.isDateTime(n))return n;if(n&&n.valueOf&&ss(n.valueOf()))return Be.fromJSDate(n);if(n&&typeof n=="object")return Be.fromObject(n);throw new zn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],dy=[".mp4",".avi",".mov",".3gp",".wmv"],py=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],my=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class H{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}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||H.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 H.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!H.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!H.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){H.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]=H.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(!H.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)(!H.isObject(l)&&!Array.isArray(l)||!H.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)(!H.isObject(s)&&!Array.isArray(s)||!H.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):H.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||H.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||H.isObject(e)&&Object.keys(e).length>0)&&H.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ssZ",24:"yyyy-MM-dd HH:mm:ss.SSSZ"},i=t[e.length]||t[19];return Be.fromFormat(e,i,{zone:"UTC"})}return Be.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{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!!cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!dy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!py.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!my.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return H.hasImageExtension(e)?"image":H.hasDocumentExtension(e)?"document":H.hasVideoExtension(e)?"video":H.hasAudioExtension(e)?"audio":"file"}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,d=r.height;return a.width=t,a.height=i,u.drawImage(r,f>d?(f-d)/2:0,0,f>d?d:f,f>d?d: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(H.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)H.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):H.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,d,p;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};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((d=m.options)==null?void 0:d.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((p=m.options)==null?void 0:p.maxSelect)!==1&&(_=[_])):_="test",i[m.name]=_}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"view":return"ri-table-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"editor":return"ri-edit-2-line";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":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["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)&&!H.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!H.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=H.isObject(u)&&H.findByKey(s,"id",u.id);if(!f)return!1;for(let d in f)if(JSON.stringify(u[d])!=JSON.stringify(f[d]))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==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample"],toolbar:"undo redo | styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],d=u.create(a,o,f);u.add(d),e(d.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",t=>{t.ctrlKey&&t.code=="KeyS"&&e.formElement&&(t.preventDefault(),t.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",t)))})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(H.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?H.plainText(r):r,s.push(H.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!H.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of H.extractColumnsFromQuery(e.options.query))H.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)H.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,d,p;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s+\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!H.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const g=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((g==null?void 0:g.length)!=4)continue;const b=(d=(f=g[1])==null?void 0:f.trim())==null?void 0:d.replace(l,"");b&&t.columns.push({name:b,collate:g[2]||"",sort:((p=g[3])==null?void 0:p.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+H.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` +}`,d=`__svelte_${Lb(f)}_${r}`,p=W_(n),{stylesheet:m,rules:_}=ho.get(p)||Nb(p,n);_[d]||(_[d]=!0,m.insertRule(`@keyframes ${d} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${d} ${i}ms linear ${s}ms 1 both`,_o+=1,d}function pl(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(", "),_o-=s,_o||Fb())}function Fb(){ga(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function Rb(n,e,t,i){if(!e)return Q;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return Q;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Fo()+l,end:u=a+o,tick:f=Q,css:d}=t(n,{from:e,to:s},i);let p=!0,m=!1,_;function g(){d&&(_=dl(n,0,1,o,l,r,d)),l||(m=!0)}function b(){d&&pl(n,_),p=!1}return Ro(k=>{if(!m&&k>=a&&(m=!0),m&&k>=u&&(f(1,0),b()),!p)return!1;if(m){const $=k-a,T=0+1*r($/o);f(T,1-T)}return!0}),g(),f(0,1),b}function qb(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,K_(n,s)}}function K_(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 ml;function bi(n){ml=n}function Cl(){if(!ml)throw new Error("Function called outside component initialization");return ml}function xt(n){Cl().$$.on_mount.push(n)}function jb(n){Cl().$$.after_update.push(n)}function J_(n){Cl().$$.on_destroy.push(n)}function Tt(){const n=Cl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Y_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function me(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],se=[];let Ss=[];const qr=[],Z_=Promise.resolve();let jr=!1;function G_(){jr||(jr=!0,Z_.then(ba))}function an(){return G_(),Z_}function nt(n){Ss.push(n)}function ke(n){qr.push(n)}const nr=new Set;let hs=0;function ba(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let zs;function va(){return zs||(zs=Promise.resolve(),zs.then(()=>{zs=null})),zs}function is(n,e,t){n.dispatchEvent(Y_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let li;function ae(){li={r:0,c:[],p:li}}function ue(){li.r||Ee(li.c),li=li.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),li.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ya={duration:0};function X_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:p=0,duration:m=300,easing:_=$l,tick:g=Q,css:b}=s||ya;b&&(o=dl(n,0,1,m,p,_,b,a++)),g(0,1);const k=Fo()+p,$=k+m;r&&r.abort(),l=!0,nt(()=>is(n,!0,"start")),r=Ro(T=>{if(l){if(T>=$)return g(1,0),is(n,!0,"end"),u(),l=!1;if(T>=k){const C=_((T-k)/m);g(C,1-C)}}return l})}let d=!1;return{start(){d||(d=!0,pl(n),Vt(s)?(s=s(i),va().then(f)):f())},invalidate(){d=!1},end(){l&&(u(),l=!1)}}}function ka(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=li;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:d=$l,tick:p=Q,css:m}=s||ya;m&&(o=dl(n,1,0,f,u,d,m));const _=Fo()+u,g=_+f;nt(()=>is(n,!1,"start")),Ro(b=>{if(l){if(b>=g)return p(0,1),is(n,!1,"end"),--r.r||Ee(r.c),!1;if(b>=_){const k=d((b-_)/f);p(1-k,k)}}return l})}return Vt(s)?va().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function He(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function d(m,_){const g=m.b-o;return _*=Math.abs(g),{a:o,b:m.b,d:g,duration:_,start:m.start,end:m.start+_,group:m.group}}function p(m){const{delay:_=0,duration:g=300,easing:b=$l,tick:k=Q,css:$}=l||ya,T={start:Fo()+_,b:m};m||(T.group=li,li.r+=1),r||a?a=T:($&&(f(),u=dl(n,o,m,g,_,b,$)),m&&k(0,1),r=d(T,g),nt(()=>is(n,m,"start")),Ro(C=>{if(a&&C>a.start&&(r=d(a,g),a=null,is(n,r.b,"start"),$&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)k(o=r.b,1-o),is(n,r.b,"end"),a||(r.b?f():--r.group.r||Ee(r.group.c)),r=null;else if(C>=r.start){const D=C-r.start;o=r.a+r.d*b(D/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(m){Vt(l)?va().then(()=>{l=l(s),p(m)}):p(m)},end(){f(),r=a=null}}}function hu(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((d,p)=>{p!==l&&d&&(ae(),P(d,1,1,()=>{e.blocks[p]===d&&(e.blocks[p]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ba()}if(Mb(n)){const s=Cl();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(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 zb(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 us(n,e){n.d(1),e.delete(n.key)}function Kt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Bb(n,e){n.f(),Kt(n,e)}function vt(n,e,t,i,s,l,o,r,a,u,f,d){let p=n.length,m=l.length,_=p;const g={};for(;_--;)g[n[_].key]=_;const b=[],k=new Map,$=new Map,T=[];for(_=m;_--;){const O=d(s,l,_),I=t(O);let L=o.get(I);L?i&&T.push(()=>L.p(O,e)):(L=u(I,O),L.c()),k.set(I,b[_]=L),I in g&&$.set(I,Math.abs(_-g[I]))}const C=new Set,D=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,m--}for(;p&&m;){const O=b[m-1],I=n[p-1],L=O.key,F=I.key;O===I?(f=O.first,p--,m--):k.has(F)?!o.has(L)||C.has(L)?M(O):D.has(F)?p--:$.get(L)>$.get(F)?(D.add(L),M(O)):(C.add(F),p--):(a(I,o),p--)}for(;p--;){const O=n[p];k.has(O.key)||a(O,o)}for(;m;)M(b[m-1]);return Ee(T),b}function Mt(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 Zt(n){return typeof n=="object"&&n!==null?n:{}}function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function U(n){n&&n.c()}function z(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||nt(()=>{const o=n.$$.on_mount.map(H_).filter(Vt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ee(o),n.$$.on_mount=[]}),l.forEach(nt)}function B(n,e){const t=n.$$;t.fragment!==null&&(Hb(t.after_update),Ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ub(n,e){n.$$.dirty[0]===-1&&(ks.push(n),G_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:p;return u.ctx&&s(u.ctx[d],u.ctx[d]=_)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](_),f&&Ub(n,d)),p}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const d=Pb(e.target);u.fragment&&u.fragment.l(d),d.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),z(n,e.target,e.anchor,e.customElement),ba()}bi(a)}class ve{$destroy(){B(this,1),this.$destroy=Q}$on(e,t){if(!Vt(t))return Q;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&&!Ob(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function qt(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(),t=null)}}return{set:s,update:l,subscribe:o}}function x_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Q_(t,o=>{let r=!1;const a=[];let u=0,f=Q;const d=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Vt(m)?m:Q},p=s.map((m,_)=>_a(m,g=>{a[_]=g,u&=~(1<<_),r&&d()},()=>{u|=1<<_}));return r=!0,d(),function(){Ee(p),f(),r=!1}})}function eg(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function Wb(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[7]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Yb(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{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Kb(n){let e,t,i,s;const l=[Yb,Wb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function _u(){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 qo=Q_(null,function(e){e(_u());const t=()=>{e(_u())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});x_(qo,n=>n.location);const wa=x_(qo,n=>n.querystring),gu=In(void 0);async function Vi(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await an();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 dn(n,e){if(e=vu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return bu(n,e),{update(t){t=vu(t),bu(n,t)}}}function Jb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function bu(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||Zb(i.currentTarget.getAttribute("href"))})}function vu(n){return n&&typeof n=="string"?{href:n}:n||{}}function Zb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function Gb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(D,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!D||typeof D=="string"&&(D.length<1||D.charAt(0)!="/"&&D.charAt(0)!="*")||typeof D=="object"&&!(D instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:I}=eg(D);this.path=D,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=I}match(D){if(s){if(typeof s=="string")if(D.startsWith(s))D=D.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=D.match(s);if(L&&L[0])D=D.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(D);if(M===null)return null;if(this._keys===!1)return M;const O={};let I=0;for(;I{r.push(new o(D,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const d=Tt();async function p(C,D){await an(),d(C,D)}let m=null,_=null;l&&(_=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",_),jb(()=>{Jb(m)}));let g=null,b=null;const k=qo.subscribe(async C=>{g=C;let D=0;for(;D{gu.set(u)});return}t(0,a=null),b=null,gu.set(void 0)});J_(()=>{k(),_&&window.removeEventListener("popstate",_)});function $(C){me.call(this,n,C)}function T(C){me.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,$,T]}class Xb extends ve{constructor(e){super(),be(this,e,Gb,Kb,_e,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let tg;function ng(n){const e=n.pattern.test(tg);yu(n,n.className,e),yu(n,n.inactiveClassName,!e)}function yu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}qo.subscribe(n=>{tg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(ng)});function Gn(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"?eg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),ng(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const Qb="modulepreload",xb=function(n,e){return new URL(n,e).href},ku={},rt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=xb(l,i),l in ku)return;ku[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===l&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":Qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Vr=function(n,e){return Vr=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])},Vr(n,e)};function nn(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}Vr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Hr=function(){return Hr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||d[0]!==6&&d[0]!==2)){o=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}ig=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Tl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(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 ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=wu(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?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},Sa=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},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 nn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return Gt(l,void 0,void 0,function(){return Xt(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var d=f,p=d.items,m=d.totalItems;return o=o.concat(p),p.length&&m>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;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new vi(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,d){return Gt(a,void 0,void 0,function(){var p,m,_,g,b=this;return Xt(this,function(k){switch(k.label){case 0:return k.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function($){return Gt(b,void 0,void 0,function(){var T,C,D;return Xt(this,function(M){switch(M.label){case 0:T=this.client.realtime.clientId,M.label=1;case 1:if(M.trys.push([1,3,,4]),p(),!$.state||T!==$.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,$.code,o.codeVerifier,r,s.createData)];case 2:return C=M.sent(),f(C),[3,4];case 3:return D=M.sent(),d(new vi(D)),[3,4];case 4:return[2]}})})})];case 1:return p=k.sent(),(m=new URL(o.authUrl+r)).searchParams.set("state",this.client.realtime.clientId),!((g=s.scopes)===null||g===void 0)&&g.length&&m.searchParams.set("scope",s.scopes.join(" ")),[4,s.urlCallback?s.urlCallback(m.toString()):this._defaultUrlCallback(m.toString())];case 2:return k.sent(),[3,4];case 3:return _=k.sent(),d(new vi(_)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o"u"||!(window!=null&&window.open))throw new vi(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(Sa),wn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},kn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=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 Gt(this,void 0,void 0,function(){return Xt(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 Gt(t,void 0,void 0,function(){var l;return Xt(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 vi({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new vi(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},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 ss(n){return typeof n=="number"}function Vo(n){return typeof n=="number"&&n%1===0}function g0(n){return typeof n=="string"}function b0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Og(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function v0(n){return Array.isArray(n)?n:[n]}function $u(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 y0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ds(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yi(n,e,t){return Vo(n)&&n>=e&&n<=t}function k0(n,e){return n-e*Math.floor(n/e)}function Bt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ei(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Yi(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function $a(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Ca(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Ml(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Ml(n)?366:365}function go(n,e){const t=k0(e-1,12)+1,i=n+(e-t)/12;return t===2?Ml(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ta(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 bo(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 Ur(n){return n>99?n:n>60?1900+n:2e3+n}function Dg(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 Eg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new zn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Ds(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Eg(s)}return t}function ll(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}${Bt(t,2)}:${Bt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Bt(t,2)}${Bt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function zo(n){return y0(n,["hour","minute","second","millisecond"])}const Ag=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,w0=["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"],S0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Pg(n){switch(n){case"narrow":return[...S0];case"short":return[...Ig];case"long":return[...w0];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"],Ng=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$0=["M","T","W","T","F","S","S"];function Fg(n){switch(n){case"narrow":return[...$0];case"short":return[...Ng];case"long":return[...Lg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Rg=["AM","PM"],C0=["Before Christ","Anno Domini"],T0=["BC","AD"],M0=["B","A"];function qg(n){switch(n){case"narrow":return[...M0];case"short":return[...T0];case"long":return[...C0];default:return null}}function O0(n){return Rg[n.hour<12?0:1]}function D0(n,e){return Fg(e)[n.weekday-1]}function E0(n,e){return Pg(e)[n.month-1]}function A0(n,e){return qg(e)[n.year<0?0:1]}function I0(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 d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${s[n][0]}`;case-1:return d?"yesterday":`last ${s[n][0]}`;case 0:return d?"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 Cu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const P0={D:Br,DD:ug,DDD:fg,DDDD:cg,t:dg,tt:pg,ttt:mg,tttt:hg,T:_g,TT:gg,TTT:bg,TTTT:vg,f:yg,ff:wg,fff:$g,ffff:Tg,F:kg,FF:Sg,FFF:Cg,FFFF:Mg};class yn{static create(e,t={}){return new yn(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 P0[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 Bt(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=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?O0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?E0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),u=(m,_)=>i?D0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const _=yn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},d=m=>i?A0(e,m):l({era:m},"era"),p=m=>{switch(m){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 d("short");case"GG":return d("long");case"GGGGG":return d("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(m)}};return Cu(yn.parseFormat(t),p)}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=yn.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 Cu(l,s(r))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ol{get type(){throw new Oi}get name(){throw new Oi}get ianaName(){return this.name}get isUniversal(){throw new Oi}offsetName(e,t){throw new Oi}formatOffset(e,t){throw new Oi}offset(e){throw new Oi}equals(e){throw new Oi}get isValid(){throw new Oi}}let ir=null;class Ma extends Ol{static get instance(){return ir===null&&(ir=new Ma),ir}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Dg(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function L0(n){return ao[n]||(ao[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"})),ao[n]}const N0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function F0(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 R0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let sr=null;class pn extends Ol{static get utcInstance(){return sr===null&&(sr=new pn(0)),sr}static instance(e){return e===0?pn.utcInstance:new pn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new pn(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${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(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 q0 extends Ol{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 Ai(n,e){if(it(n)||n===null)return e;if(n instanceof Ol)return n;if(g0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?pn.utcInstance:pn.parseSpecifier(t)||Si.create(n)}else return ss(n)?pn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new q0(n)}let Tu=()=>Date.now(),Mu="system",Ou=null,Du=null,Eu=null,Au;class Yt{static get now(){return Tu}static set now(e){Tu=e}static set defaultZone(e){Mu=e}static get defaultZone(){return Ai(Mu,Ma.instance)}static get defaultLocale(){return Ou}static set defaultLocale(e){Ou=e}static get defaultNumberingSystem(){return Du}static set defaultNumberingSystem(e){Du=e}static get defaultOutputCalendar(){return Eu}static set defaultOutputCalendar(e){Eu=e}static get throwOnInvalid(){return Au}static set throwOnInvalid(e){Au=e}static resetCaches(){Dt.resetCache(),Si.resetCache()}}let Iu={};function j0(n,e={}){const t=JSON.stringify([n,e]);let i=Iu[t];return i||(i=new Intl.ListFormat(n,e),Iu[t]=i),i}let Wr={};function Yr(n,e={}){const t=JSON.stringify([n,e]);let i=Wr[t];return i||(i=new Intl.DateTimeFormat(n,e),Wr[t]=i),i}let Kr={};function V0(n,e={}){const t=JSON.stringify([n,e]);let i=Kr[t];return i||(i=new Intl.NumberFormat(n,e),Kr[t]=i),i}let Jr={};function H0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Jr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Jr[s]=l),l}let tl=null;function z0(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function B0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Yr(n).resolvedOptions()}catch{t=Yr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function U0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function W0(n){const e=[];for(let t=1;t<=12;t++){const i=Be.utc(2016,t,1);e.push(n(i))}return e}function Y0(n){const e=[];for(let t=1;t<=7;t++){const i=Be.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 K0(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 J0{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=V0(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):Ca(e,3);return Bt(t,this.padTo)}}}class Z0{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:Be.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=Yr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class G0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Og()&&(this.rtf=H0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):I0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Dt{static fromOpts(e){return Dt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Yt.defaultLocale,o=l||(s?"en-US":z0()),r=t||Yt.defaultNumberingSystem,a=i||Yt.defaultOutputCalendar;return new Dt(o,r,a,l)}static resetCache(){tl=null,Wr={},Kr={},Jr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Dt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=B0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=U0(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=K0(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:Dt.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,Pg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=W0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Vl(this,e,i,Fg,()=>{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]=Y0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Vl(this,void 0,e,()=>Rg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Be.utc(2016,11,13,9),Be.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Vl(this,e,t,qg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Be.utc(-40,1,1),Be.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 J0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Z0(e,this.intl,t)}relFormatter(e={}){return new G0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return j0(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 Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...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 qs(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 jg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&f)?-m:m;return[{years:p(Yi(t)),months:p(Yi(i)),weeks:p(Yi(s)),days:p(Yi(l)),hours:p(Yi(o)),minutes:p(Yi(r)),seconds:p(Yi(a),a==="-0"),milliseconds:p($a(u),d)}]}const uv={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 Ea(n,e,t,i,s,l,o){const r={year:e.length===2?Ur(Ei(e)):Ei(e),month:Ig.indexOf(t)+1,day:Ei(i),hour:Ei(s),minute:Ei(l)};return o&&(r.second=Ei(o)),n&&(r.weekday=n.length>3?Lg.indexOf(n)+1:Ng.indexOf(n)+1),r}const fv=/^(?:(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 cv(n){const[,e,t,i,s,l,o,r,a,u,f,d]=n,p=Ea(e,s,i,t,l,o,r);let m;return a?m=uv[a]:u?m=0:m=Ho(f,d),[p,new pn(m)]}function dv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(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$/,mv=/^(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$/,hv=/^(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 Pu(n){const[,e,t,i,s,l,o,r]=n;return[Ea(e,s,i,t,l,o,r),pn.utcInstance]}function _v(n){const[,e,t,i,s,l,o,r]=n;return[Ea(e,r,t,i,s,l,o),pn.utcInstance]}const gv=Fs(Q0,Da),bv=Fs(x0,Da),vv=Fs(ev,Da),yv=Fs(Hg),Bg=Rs(lv,js,Dl,El),kv=Rs(tv,js,Dl,El),wv=Rs(nv,js,Dl,El),Sv=Rs(js,Dl,El);function $v(n){return qs(n,[gv,Bg],[bv,kv],[vv,wv],[yv,Sv])}function Cv(n){return qs(dv(n),[fv,cv])}function Tv(n){return qs(n,[pv,Pu],[mv,Pu],[hv,_v])}function Mv(n){return qs(n,[rv,av])}const Ov=Rs(js);function Dv(n){return qs(n,[ov,Ov])}const Ev=Fs(iv,sv),Av=Fs(zg),Iv=Rs(js,Dl,El);function Pv(n){return qs(n,[Ev,Bg],[Av,Iv])}const Lv="Invalid Duration",Ug={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}},Nv={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},...Ug},Rn=146097/400,gs=146097/4800,Fv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...Ug},Qi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Rv=Qi.slice(0).reverse();function Ki(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 ot(i)}function qv(n){return n<0?Math.floor(n):Math.ceil(n)}function Wg(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?qv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function jv(n,e){Rv.reduce((t,i)=>it(e[i])?t:(t&&Wg(n,e,t,e,i),i),null)}class ot{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Dt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Fv:Nv,this.isLuxonDuration=!0}static fromMillis(e,t){return ot.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new zn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ot({values:vo(e,ot.normalizeUnit),loc:Dt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ss(e))return ot.fromMillis(e);if(ot.isDuration(e))return e;if(typeof e=="object")return ot.fromObject(e);throw new zn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Mv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Dv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new m0(i);return new ot({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 ag(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?yn.create(this.loc,i).formatDurationFromString(this,e):Lv}toHuman(e={}){const t=Qi.map(i=>{const s=this.values[i];return it(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+=Ca(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=ot.fromDurationLike(e),i={};for(const s of Qi)(Ds(t.values,s)||Ds(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ki(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ot.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]=Eg(e(this.values[i],i));return Ki(this,{values:t},!0)}get(e){return this[ot.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,ot.normalizeUnit)};return Ki(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),Ki(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jv(this.matrix,e),Ki(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ot.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Qi)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;ss(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)Qi.indexOf(u)>Qi.indexOf(o)&&Wg(this.matrix,s,u,t,o)}else ss(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 Ki(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 Ki(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 Qi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function Vv(n,e){return!n||!n.isValid?At.invalid("missing or invalid start"):!e||!e.isValid?At.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?At.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(At.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ot.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(At.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:At.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return At.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(At.fromDateTimes(t,a.time)),t=null);return At.merge(s)}difference(...e){return At.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)}mapEndpoints(e){return At.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Yt.defaultZone){const t=Be.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 Ai(e,Yt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Dt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Dt.create(t,null,"gregory").eras(e)}static features(){return{relative:Og()}}}function Lu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ot.fromMillis(i).as("days"))}function Hv(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=Lu(r,a);return(u-u%7)/7}],["days",Lu]],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 zv(n,e,t,i){let[s,l,o,r]=Hv(n,e,t);const a=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?ot.fromMillis(a,i).shiftTo(...u).plus(f):f}const Aa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Nu={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]},Bv=Aa.hanidec.replace(/[\[|\]]/g,"").split("");function Uv(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 Jn({numberingSystem:n},e=""){return new RegExp(`${Aa[n||"latn"]}${e}`)}const Wv="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(Uv(t))}}const Yv=String.fromCharCode(160),Yg=`[ ${Yv}]`,Kg=new RegExp(Yg,"g");function Kv(n){return n.replace(/\./g,"\\.?").replace(Kg,Yg)}function Fu(n){return n.replace(/\./g,"").replace(Kg," ").toLowerCase()}function Zn(n,e){return n===null?null:{regex:RegExp(n.map(Kv).join("|")),deser:([t])=>n.findIndex(i=>Fu(t)===Fu(i))+e}}function Ru(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function lr(n){return{regex:n,deser:([e])=>e}}function Jv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zv(n,e){const t=Jn(e),i=Jn(e,"{2}"),s=Jn(e,"{3}"),l=Jn(e,"{4}"),o=Jn(e,"{6}"),r=Jn(e,"{1,2}"),a=Jn(e,"{1,3}"),u=Jn(e,"{1,6}"),f=Jn(e,"{1,9}"),d=Jn(e,"{2,4}"),p=Jn(e,"{4,6}"),m=b=>({regex:RegExp(Jv(b.val)),deser:([k])=>k,literal:!0}),g=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Zn(e.eras("short",!1),0);case"GG":return Zn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(d,Ur);case"yyyy":return ut(l);case"yyyyy":return ut(p);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Zn(e.months("short",!0,!1),1);case"MMMM":return Zn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Zn(e.months("short",!1,!1),1);case"LLLL":return Zn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return lr(f);case"uu":return lr(r);case"uuu":return ut(t);case"a":return Zn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(d,Ur);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Zn(e.weekdays("short",!1,!1),1);case"EEEE":return Zn(e.weekdays("long",!1,!1),1);case"ccc":return Zn(e.weekdays("short",!0,!1),1);case"cccc":return Zn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Ru(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Ru(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return lr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:Wv};return g.token=n,g}const Gv={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 Xv(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Gv[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Qv(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function xv(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ds(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 ey(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 it(n.z)||(t=Si.create(n.z)),it(n.Z)||(t||(t=new pn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(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),it(n.u)||(n.S=$a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let or=null;function ty(){return or||(or=Be.fromMillis(1555555555555)),or}function ny(n,e){if(n.literal)return n;const t=yn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=yn.create(e,t).formatDateTimeParts(ty()).map(o=>Xv(o,e,t));return l.includes(void 0)?n:l}function iy(n,e){return Array.prototype.concat(...n.map(t=>ny(t,e)))}function Jg(n,e,t){const i=iy(yn.parseFormat(t),n),s=i.map(o=>Zv(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Qv(s),a=RegExp(o,"i"),[u,f]=xv(e,a,r),[d,p,m]=f?ey(f):[null,null,void 0];if(Ds(f,"a")&&Ds(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:d,zone:p,specificOffset:m}}}function sy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Jg(n,e,t);return[i,s,l,o]}const Zg=[0,31,59,90,120,151,181,212,243,273,304,334],Gg=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Xg(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 Qg(n,e,t){return t+(Ml(n)?Gg:Zg)[e-1]}function xg(n,e){const t=Ml(n)?Gg:Zg,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...zo(n)}}function qu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Xg(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=xg(r,o);return{year:r,month:a,day:u,...zo(n)}}function rr(n){const{year:e,month:t,day:i}=n,s=Qg(e,t,i);return{year:e,ordinal:s,...zo(n)}}function ju(n){const{year:e,ordinal:t}=n,{month:i,day:s}=xg(e,t);return{year:e,month:i,day:s,...zo(n)}}function ly(n){const e=Vo(n.weekYear),t=yi(n.weekNumber,1,bo(n.weekYear)),i=yi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function oy(n){const e=Vo(n.year),t=yi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function e1(n){const e=Vo(n.year),t=yi(n.month,1,12),i=yi(n.day,1,go(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function t1(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=yi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=yi(t,0,59),r=yi(i,0,59),a=yi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const ar="Invalid DateTime",Vu=864e13;function zl(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function ur(n){return n.weekData===null&&(n.weekData=Zr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Be({...t,...e,old:t})}function n1(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 Hu(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 uo(n,e,t){return n1(Ta(n),e,t)}function zu(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=ot.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=Ta(l);let[a,u]=n1(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Be.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Be.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?yn.create(Dt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function fr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Bt(n.c.year,t?6:4),e?(i+="-",i+=Bt(n.c.month),i+="-",i+=Bt(n.c.day)):(i+=Bt(n.c.month),i+=Bt(n.c.day)),i}function Bu(n,e,t,i,s,l){let o=Bt(n.c.hour);return e?(o+=":",o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=Bt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Bt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Bt(Math.trunc(-n.o/60)),o+=":",o+=Bt(Math.trunc(-n.o%60))):(o+="+",o+=Bt(Math.trunc(n.o/60)),o+=":",o+=Bt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const i1={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ry={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ay={ordinal:1,hour:0,minute:0,second:0,millisecond:0},s1=["year","month","day","hour","minute","second","millisecond"],uy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fy=["year","ordinal","hour","minute","second","millisecond"];function Uu(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 ag(n);return e}function Wu(n,e){const t=Ai(e.zone,Yt.defaultZone),i=Dt.fromObject(e),s=Yt.now();let l,o;if(it(n.year))l=s;else{for(const u of s1)it(n[u])&&(n[u]=i1[u]);const r=e1(n)||t1(n);if(r)return Be.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new Be({ts:l,zone:t,loc:i,o})}function Yu(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=Ca(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 Ku(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 Be{constructor(e){const t=e.zone||Yt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=it(e.ts)?Yt.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=Hu(this.ts,r),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Dt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Be({})}static local(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return e.zone=pn.utcInstance,Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=b0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Be.invalid("invalid input");const s=Ai(t.zone,Yt.defaultZone);return s.isValid?new Be({ts:i,zone:s,loc:Dt.fromObject(t)}):Be.invalid(zl(s))}static fromMillis(e,t={}){if(ss(e))return e<-Vu||e>Vu?Be.invalid("Timestamp out of range"):new Be({ts:e,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ss(e))return new Be({ts:e*1e3,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ai(t.zone,Yt.defaultZone);if(!i.isValid)return Be.invalid(zl(i));const s=Yt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Uu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,d=o.weekYear||o.weekNumber,p=Dt.fromObject(t);if((f||r)&&d)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=d||o.weekday&&!f;let _,g,b=Hu(s,l);m?(_=uy,g=ry,b=Zr(b)):r?(_=fy,g=ay,b=rr(b)):(_=s1,g=i1);let k=!1;for(const I of _){const L=o[I];it(L)?k?o[I]=g[I]:o[I]=b[I]:k=!0}const $=m?ly(o):r?oy(o):e1(o),T=$||t1(o);if(T)return Be.invalid(T);const C=m?qu(o):r?ju(o):o,[D,M]=uo(C,l,i),O=new Be({ts:D,zone:i,o:M,loc:p});return o.weekday&&f&&e.weekday!==O.weekday?Be.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=$v(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Cv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Tv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new zn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=sy(o,e,t);return f?Be.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Be.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Pv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new d0(i);return new Be({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?ur(this).weekYear:NaN}get weekNumber(){return this.isValid?ur(this).weekNumber:NaN}get weekday(){return this.isValid?ur(this).weekday:NaN}get ordinal(){return this.isValid?rr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.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 Ml(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=yn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(pn.instance(e),t)}toLocal(){return this.setZone(Yt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ai(e,Yt.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]=uo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Be.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Uu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=qu({...Zr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=ju({...rr(this.c),...t});const[f,d]=uo(u,this.o,this.zone);return Us(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return Us(this,zu(this,t))}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e).negate();return Us(this,zu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ot.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?yn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ar}toLocaleString(e=Br,t={}){return this.isValid?yn.create(this.loc.clone(t),e).formatDateTime(this):ar}toLocaleParts(e={}){return this.isValid?yn.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=fr(this,o);return r+="T",r+=Bu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?fr(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":"")+Bu(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?fr(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():ar}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 ot.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=v0(t).map(ot.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=zv(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Be.now(),e,t)}until(e){return this.isValid?At.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||Be.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Be.isDateTime))throw new zn("max requires all arguments be DateTimes");return $u(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Jg(o,e,t)}static fromStringExplain(e,t,i={}){return Be.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Br}static get DATE_MED(){return ug}static get DATE_MED_WITH_WEEKDAY(){return h0}static get DATE_FULL(){return fg}static get DATE_HUGE(){return cg}static get TIME_SIMPLE(){return dg}static get TIME_WITH_SECONDS(){return pg}static get TIME_WITH_SHORT_OFFSET(){return mg}static get TIME_WITH_LONG_OFFSET(){return hg}static get TIME_24_SIMPLE(){return _g}static get TIME_24_WITH_SECONDS(){return gg}static get TIME_24_WITH_SHORT_OFFSET(){return bg}static get TIME_24_WITH_LONG_OFFSET(){return vg}static get DATETIME_SHORT(){return yg}static get DATETIME_SHORT_WITH_SECONDS(){return kg}static get DATETIME_MED(){return wg}static get DATETIME_MED_WITH_SECONDS(){return Sg}static get DATETIME_MED_WITH_WEEKDAY(){return _0}static get DATETIME_FULL(){return $g}static get DATETIME_FULL_WITH_SECONDS(){return Cg}static get DATETIME_HUGE(){return Tg}static get DATETIME_HUGE_WITH_SECONDS(){return Mg}}function Ys(n){if(Be.isDateTime(n))return n;if(n&&n.valueOf&&ss(n.valueOf()))return Be.fromJSDate(n);if(n&&typeof n=="object")return Be.fromObject(n);throw new zn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],dy=[".mp4",".avi",".mov",".3gp",".wmv"],py=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],my=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class H{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}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||H.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 H.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!H.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!H.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){H.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]=H.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(!H.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)(!H.isObject(l)&&!Array.isArray(l)||!H.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)(!H.isObject(s)&&!Array.isArray(s)||!H.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):H.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||H.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||H.isObject(e)&&Object.keys(e).length>0)&&H.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ssZ",24:"yyyy-MM-dd HH:mm:ss.SSSZ"},i=t[e.length]||t[19];return Be.fromFormat(e,i,{zone:"UTC"})}return Be.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{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!!cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!dy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!py.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!my.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return H.hasImageExtension(e)?"image":H.hasDocumentExtension(e)?"document":H.hasVideoExtension(e)?"video":H.hasAudioExtension(e)?"audio":"file"}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,d=r.height;return a.width=t,a.height=i,u.drawImage(r,f>d?(f-d)/2:0,0,f>d?d:f,f>d?d: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(H.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)H.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):H.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,d,p;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};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((d=m.options)==null?void 0:d.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((p=m.options)==null?void 0:p.maxSelect)!==1&&(_=[_])):_="test",i[m.name]=_}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"view":return"ri-table-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"editor":return"ri-edit-2-line";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":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["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)&&!H.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!H.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=H.isObject(u)&&H.findByKey(s,"id",u.id);if(!f)return!1;for(let d in f)if(JSON.stringify(u[d])!=JSON.stringify(f[d]))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==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],d=u.create(a,o,f);u.add(d),e(d.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTR content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(H.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?H.plainText(r):r,s.push(H.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!H.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of H.extractColumnsFromQuery(e.options.query))H.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)H.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,d,p;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s+\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!H.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const g=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((g==null?void 0:g.length)!=4)continue;const b=(d=(f=g[1])==null?void 0:f.trim())==null?void 0:d.replace(l,"");b&&t.columns.push({name:b,collate:g[2]||"",sort:((p=g[3])==null?void 0:p.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+H.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` `),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+c.sort.toUpperCase()),l}).join(`, `),i.length>1&&(t+=` -`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=H.parseIndex(e);return i.tableName=t,H.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=H.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?H.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Uo=In([]);function s1(n,e=4e3){return Wo(n,"info",e)}function Xt(n,e=3e3){return Wo(n,"success",e)}function hl(n,e=4500){return Wo(n,"error",e)}function hy(n,e=4500){return Wo(n,"warning",e)}function Wo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{l1(i)},t)};Uo.update(s=>(Ia(s,i.message),H.pushOrReplaceByKey(s,i,"message"),s))}function l1(n){Uo.update(e=>(Ia(e,n),e))}function Aa(){Uo.update(n=>{for(let e of n)Ia(n,e);return[]})}function Ia(n,e){let t;typeof e=="string"?t=H.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),H.removeByKey(n,"message",t.message))}const Ci=In({});function mn(n){Ci.set(n||{})}function Ri(n){Ci.update(e=>(H.deleteByPath(e,n),e))}const Pa=In({});function Xr(n){Pa.set(n||{})}const ci=In([]),ui=In({}),yo=In(!1),o1=In({});function _y(n){ci.update(e=>{const t=H.findByKey(e,"id",n);return t?ui.set(t):e.length&&ui.set(e[0]),e})}function gy(n){ui.update(e=>H.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ci.update(e=>(H.pushOrReplaceByKey(e,n,"id"),La(),H.sortCollections(e)))}function by(n){ci.update(e=>(H.removeByKey(e,"id",n.id),ui.update(t=>t.id===n.id?e[0]:t),La(),e))}async function vy(n=null){yo.set(!0);try{let e=await pe.collections.getFullList(200,{sort:"+name"});e=H.sortCollections(e),ci.set(e);const t=n&&H.findByKey(e,"id",n);t?ui.set(t):e.length&&ui.set(e[0]),La()}catch(e){pe.errorResponseHandler(e)}yo.set(!1)}function La(){o1.update(n=>(ci.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const dr="pb_admin_file_token";Vo.prototype.logout=function(n=!0){this.authStore.clear(),n&&Vi("/login")};Vo.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&&hl(l)}if(H.isEmpty(s.data)||mn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Vi("/")};Vo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=Ob(o1);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(dr)||"";return(!t||sg(t,15))&&(t&&localStorage.removeItem(dr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(dr,t),this._adminFileTokenRequest=null),t};class yy extends lg{save(e,t){super.save(e,t),t instanceof rs&&Xr(t)}clear(){super.clear(),Xr(null)}}const pe=new Vo("../",new yy("pb_admin_auth"));pe.authStore.model instanceof rs&&Xr(pe.authStore.model);function ky(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=n[3].default,_=yt(m,n,n[2],null);return{c(){e=y("div"),t=y("main"),_&&_.c(),i=E(),s=y("footer"),l=y("a"),l.innerHTML=` - Docs`,o=E(),r=y("span"),r.textContent="|",a=E(),u=y("a"),f=y("span"),f.textContent="PocketBase v0.15.1",h(t,"class","page-content"),h(l,"href","https://pocketbase.io/docs/"),h(l,"target","_blank"),h(l,"rel","noopener noreferrer"),h(r,"class","delimiter"),h(f,"class","txt"),h(u,"href","https://github.com/pocketbase/pocketbase/releases"),h(u,"target","_blank"),h(u,"rel","noopener noreferrer"),h(u,"title","Releases"),h(s,"class","page-footer"),h(e,"class",d="page-wrapper "+n[1]),x(e,"center-content",n[0])},m(g,b){S(g,e,b),v(e,t),_&&_.m(t,null),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(u,f),p=!0},p(g,[b]){_&&_.p&&(!p||b&4)&&wt(_,m,g,g[2],p?kt(m,g[2],b,null):St(g[2]),null),(!p||b&2&&d!==(d="page-wrapper "+g[1]))&&h(e,"class",d),(!p||b&3)&&x(e,"center-content",g[0])},i(g){p||(A(_,g),p=!0)},o(g){P(_,g),p=!1},d(g){g&&w(e),_&&_.d(g)}}}function wy(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 be{constructor(e){super(),ge(this,e,wy,ky,_e,{center:0,class:1})}}function Ku(n){let e,t,i;return{c(){e=y("div"),e.innerHTML=``,t=E(),i=y("div"),h(e,"class","block txt-center m-b-lg"),h(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 Sy(n){let e,t,i,s=!n[0]&&Ku();const l=n[1].default,o=yt(l,n,n[2],null);return{c(){e=y("div"),s&&s.c(),t=E(),o&&o.c(),h(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),v(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ku(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&wt(o,l,r,r[2],i?kt(l,r[2],a,null):St(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function $y(n){let e,t;return e=new Pn({props:{class:"full-page",center:!0,$$slots:{default:[Sy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Cy(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 r1 extends be{constructor(e){super(),ge(this,e,Cy,$y,_e,{nobranding:0})}}function Yo(n){const e=n-1;return e*e*e+1}function ko(n,{delay:e=0,duration:t=400,easing:i=$l}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function fi(n,{delay:e=0,duration:t=400,easing:i=Yo,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),[d,p]=pu(s),[m,_]=pu(l);return{delay:e,duration:t,easing:i,css:(g,b)=>` +`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=H.parseIndex(e);return i.tableName=t,H.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=H.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?H.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Bo=In([]);function l1(n,e=4e3){return Uo(n,"info",e)}function Qt(n,e=3e3){return Uo(n,"success",e)}function hl(n,e=4500){return Uo(n,"error",e)}function hy(n,e=4500){return Uo(n,"warning",e)}function Uo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{o1(i)},t)};Bo.update(s=>(Pa(s,i.message),H.pushOrReplaceByKey(s,i,"message"),s))}function o1(n){Bo.update(e=>(Pa(e,n),e))}function Ia(){Bo.update(n=>{for(let e of n)Pa(n,e);return[]})}function Pa(n,e){let t;typeof e=="string"?t=H.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),H.removeByKey(n,"message",t.message))}const Ci=In({});function un(n){Ci.set(n||{})}function Ri(n){Ci.update(e=>(H.deleteByPath(e,n),e))}const La=In({});function Gr(n){La.set(n||{})}const ci=In([]),ui=In({}),yo=In(!1),r1=In({});function _y(n){ci.update(e=>{const t=H.findByKey(e,"id",n);return t?ui.set(t):e.length&&ui.set(e[0]),e})}function gy(n){ui.update(e=>H.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ci.update(e=>(H.pushOrReplaceByKey(e,n,"id"),Na(),H.sortCollections(e)))}function by(n){ci.update(e=>(H.removeByKey(e,"id",n.id),ui.update(t=>t.id===n.id?e[0]:t),Na(),e))}async function vy(n=null){yo.set(!0);try{let e=await pe.collections.getFullList(200,{sort:"+name"});e=H.sortCollections(e),ci.set(e);const t=n&&H.findByKey(e,"id",n);t?ui.set(t):e.length&&ui.set(e[0]),Na()}catch(e){pe.errorResponseHandler(e)}yo.set(!1)}function Na(){r1.update(n=>(ci.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const cr="pb_admin_file_token";jo.prototype.logout=function(n=!0){this.authStore.clear(),n&&Vi("/login")};jo.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&&hl(l)}if(H.isEmpty(s.data)||un(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Vi("/")};jo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=Db(r1);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(cr)||"";return(!t||lg(t,15))&&(t&&localStorage.removeItem(cr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(cr,t),this._adminFileTokenRequest=null),t};class yy extends og{save(e,t){super.save(e,t),t instanceof rs&&Gr(t)}clear(){super.clear(),Gr(null)}}const pe=new jo("../",new yy("pb_admin_auth"));pe.authStore.model instanceof rs&&Gr(pe.authStore.model);function ky(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=n[3].default,_=wt(m,n,n[2],null);return{c(){e=y("div"),t=y("main"),_&&_.c(),i=E(),s=y("footer"),l=y("a"),l.innerHTML=` + Docs`,o=E(),r=y("span"),r.textContent="|",a=E(),u=y("a"),f=y("span"),f.textContent="PocketBase v0.15.1",h(t,"class","page-content"),h(l,"href","https://pocketbase.io/docs/"),h(l,"target","_blank"),h(l,"rel","noopener noreferrer"),h(r,"class","delimiter"),h(f,"class","txt"),h(u,"href","https://github.com/pocketbase/pocketbase/releases"),h(u,"target","_blank"),h(u,"rel","noopener noreferrer"),h(u,"title","Releases"),h(s,"class","page-footer"),h(e,"class",d="page-wrapper "+n[1]),x(e,"center-content",n[0])},m(g,b){S(g,e,b),v(e,t),_&&_.m(t,null),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(u,f),p=!0},p(g,[b]){_&&_.p&&(!p||b&4)&&$t(_,m,g,g[2],p?St(m,g[2],b,null):Ct(g[2]),null),(!p||b&2&&d!==(d="page-wrapper "+g[1]))&&h(e,"class",d),(!p||b&3)&&x(e,"center-content",g[0])},i(g){p||(A(_,g),p=!0)},o(g){P(_,g),p=!1},d(g){g&&w(e),_&&_.d(g)}}}function wy(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 ve{constructor(e){super(),be(this,e,wy,ky,_e,{center:0,class:1})}}function Ju(n){let e,t,i;return{c(){e=y("div"),e.innerHTML=``,t=E(),i=y("div"),h(e,"class","block txt-center m-b-lg"),h(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 Sy(n){let e,t,i,s=!n[0]&&Ju();const l=n[1].default,o=wt(l,n,n[2],null);return{c(){e=y("div"),s&&s.c(),t=E(),o&&o.c(),h(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),v(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Ju(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&$t(o,l,r,r[2],i?St(l,r[2],a,null):Ct(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function $y(n){let e,t;return e=new Pn({props:{class:"full-page",center:!0,$$slots:{default:[Sy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Cy(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 a1 extends ve{constructor(e){super(),be(this,e,Cy,$y,_e,{nobranding:0})}}function Wo(n){const e=n-1;return e*e*e+1}function Xr(n,{delay:e=0,duration:t=400,easing:i=$l}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function fi(n,{delay:e=0,duration:t=400,easing:i=Wo,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),[d,p]=mu(s),[m,_]=mu(l);return{delay:e,duration:t,easing:i,css:(g,b)=>` transform: ${u} translate(${(1-g)*d}${p}, ${(1-g)*m}${_}); - opacity: ${a-f*b}`}}function Ct(n,{delay:e=0,duration:t=400,easing:i=Yo,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),d=parseFloat(l[`padding${f[0]}`]),p=parseFloat(l[`padding${f[1]}`]),m=parseFloat(l[`margin${f[0]}`]),_=parseFloat(l[`margin${f[1]}`]),g=parseFloat(l[`border${f[0]}Width`]),b=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${r}: ${k*a}px;padding-${u[0]}: ${k*d}px;padding-${u[1]}: ${k*p}px;margin-${u[0]}: ${k*m}px;margin-${u[1]}: ${k*_}px;border-${u[0]}-width: ${k*g}px;border-${u[1]}-width: ${k*b}px;`}}function Wt(n,{delay:e=0,duration:t=400,easing:i=Yo,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:(d,p)=>` + opacity: ${a-f*b}`}}function yt(n,{delay:e=0,duration:t=400,easing:i=Wo,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),d=parseFloat(l[`padding${f[0]}`]),p=parseFloat(l[`padding${f[1]}`]),m=parseFloat(l[`margin${f[0]}`]),_=parseFloat(l[`margin${f[1]}`]),g=parseFloat(l[`border${f[0]}Width`]),b=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*o};${r}: ${k*a}px;padding-${u[0]}: ${k*d}px;padding-${u[1]}: ${k*p}px;margin-${u[0]}: ${k*m}px;margin-${u[1]}: ${k*_}px;border-${u[0]}-width: ${k*g}px;border-${u[1]}-width: ${k*b}px;`}}function Wt(n,{delay:e=0,duration:t=400,easing:i=Wo,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:(d,p)=>` transform: ${a} scale(${1-u*p}); opacity: ${r-f*p} - `}}let Qr,Ji;const xr="app-tooltip";function Ju(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Ji=Ji||document.querySelector("."+xr),Ji||(Ji=document.createElement("div"),Ji.classList.add(xr),document.body.appendChild(Ji)),Ji}function a1(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){ea();return}t.textContent=e.text,t.className=xr+" 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 ea(){clearTimeout(Qr),Ni().classList.remove("active"),Ni().activeNode=void 0}function Ty(n,e){Ni().activeNode=n,clearTimeout(Qr),Qr=setTimeout(()=>{Ni().classList.add("active"),a1(n,e)},isNaN(e.delay)?0:e.delay)}function We(n,e){let t=Ju(e);function i(){Ty(n,t)}function s(){ea()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&H.isFocusable(n))&&n.addEventListener("click",s),Ni(),{update(l){var o,r;t=Ju(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&a1(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ea(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Zu(n,e,t){const i=n.slice();return i[12]=e[t],i}const My=n=>({}),Gu=n=>({uniqueId:n[4]});function Oy(n){let e,t,i=n[3],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=He(t,Wt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=He(t,Wt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&w(e),a&&s&&s.end(),o=!1,r()}}}function Xu(n){let e,t,i=wo(n[12])+"",s,l,o,r;return{c(){e=y("div"),t=y("pre"),s=W(i),l=E(),h(e,"class","help-block help-block-error")},m(a,u){S(a,e,u),v(e,t),v(t,s),v(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=wo(a[12])+"")&&oe(s,i)},i(a){r||(a&&nt(()=>{r&&(o||(o=He(e,Ct,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=He(e,Ct,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&w(e),a&&o&&o.end()}}}function Ey(n){let e,t,i,s,l,o,r;const a=n[9].default,u=yt(a,n,n[8],Gu),f=[Dy,Oy],d=[];function p(m,_){return m[0]&&m[3].length?0:1}return i=p(n),s=d[i]=f[i](n),{c(){e=y("div"),u&&u.c(),t=E(),s.c(),h(e,"class",n[1]),x(e,"error",n[3].length)},m(m,_){S(m,e,_),u&&u.m(e,null),v(e,t),d[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(m,[_]){u&&u.p&&(!l||_&256)&&wt(u,a,m,m[8],l?kt(a,m[8],_,My):St(m[8]),Gu);let g=i;i=p(m),i===g?d[i].p(m,_):(ae(),P(d[g],1,1,()=>{d[g]=null}),ue(),s=d[i],s?s.p(m,_):(s=d[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&h(e,"class",m[1]),(!l||_&10)&&x(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){P(u,m),P(s),l=!1},d(m){m&&w(e),u&&u.d(m),d[i].d(),n[11](null),o=!1,r()}}}const Qu="Invalid value";function wo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||Qu:n||Qu}function Ay(n,e,t){let i;Je(n,Ci,g=>t(7,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+H.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,d=[];function p(){Ri(r)}xt(()=>(f.addEventListener("input",p),f.addEventListener("change",p),()=>{f.removeEventListener("input",p),f.removeEventListener("change",p)}));function m(g){me.call(this,n,g)}function _(g){se[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,d=H.toArray(H.getNestedVal(i,r)))},[a,u,f,d,o,r,p,i,l,s,m,_]}class de extends be{constructor(e){super(),ge(this,e,Ay,Ey,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Iy(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Email"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","email"),h(l,"autocomplete","off"),h(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Py(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Password"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Minimum 10 characters.",h(e,"for",i=n[9]),h(l,"type","password"),h(l,"autocomplete","new-password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0,h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[1]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[6]),u=!0)},p(d,p){p&512&&i!==(i=d[9])&&h(e,"for",i),p&512&&o!==(o=d[9])&&h(l,"id",o),p&2&&l.value!==d[1]&&fe(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Ly(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Password confirm"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Ny(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;return s=new de({props:{class:"form-field required",name:"email",$$slots:{default:[Iy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[Py,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Ly,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("button"),f.innerHTML=`Create and login - `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(_,g){S(_,e,g),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),z(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",at(n[4])),p=!0)},p(_,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:_}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:_}),o.$set(k);const $={};g&1540&&($.$$scope={dirty:g,ctx:_}),a.$set($),(!d||g&8)&&x(f,"btn-disabled",_[3]),(!d||g&8)&&x(f,"btn-loading",_[3])},i(_){d||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),d=!0)},o(_){P(s.$$.fragment,_),P(o.$$.fragment,_),P(a.$$.fragment,_),d=!1},d(_){_&&w(e),B(s),B(o),B(a),p=!1,m()}}}function Fy(n,e,t){const i=Tt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await pe.admins.create({email:s,password:l,passwordConfirm:o}),await pe.admins.authWithPassword(s,l),i("submit")}catch(p){pe.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class Ry extends be{constructor(e){super(),ge(this,e,Fy,Ny,_e,{})}}function xu(n){let e,t;return e=new r1({props:{$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qy(n){let e,t;return e=new Ry({}),e.$on("submit",n[1]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p:Q,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function jy(n){let e,t,i=n[0]&&xu(n);return{c(){i&&i.c(),e=$e()},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&&A(i,1)):(i=xu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),P(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Vy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){pe.logout(!1),t(0,i=!0);return}pe.authStore.isValid?Vi("/collections"):pe.logout()}return[i,async()=>{t(0,i=!1),await pn(),window.location.search=""}]}class Hy extends be{constructor(e){super(),ge(this,e,Vy,jy,_e,{})}}const Nt=In(""),So=In(""),Es=In(!1);function zy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),fe(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&fe(e,l[7])},i:Q,o:Q,d(l){l&&w(e),n[13](null),i=!1,s()}}}function By(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=Lt(o,r(n)),se.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(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],ke(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),e.$on("submit",a[10]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function ef(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function tf(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Uy(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[By,zy],m=[];function _(k,$){return k[4]&&!k[5]?0:1}l=_(n),o=m[l]=p[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&ef(),b=(n[0].length||n[7].length)&&tf(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",An(n[11])),J(e,"submit",at(n[10]))],f=!0)},p(k,[$]){let T=l;l=_(k),l===T?m[l].p(k,$):(ae(),P(m[T],1,1,()=>{m[T]=null}),ue(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?g?$&129&&A(g,1):(g=ef(),g.c(),A(g,1),g.m(e,a)):g&&(ae(),P(g,1,1,()=>{g=null}),ue()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=tf(k),b.c(),A(b,1),b.m(e,null)):b&&(ae(),P(b,1,1,()=>{b=null}),ue())},i(k){u||(A(o),A(g),A(b),u=!0)},o(k){P(o),P(g),P(b),u=!1},d(k){k&&w(e),m[l].d(),g&&g.d(),b&&b.d(),f=!1,Ee(d)}}}function Wy(n,e,t){const i=Tt(),s="search_"+H.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new kn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(O=!0){t(7,p=""),O&&(d==null||d.focus()),i("clear")}function _(){t(0,l=p),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await rt(()=>import("./FilterAutocompleteInput-7075cc59.js"),["./FilterAutocompleteInput-7075cc59.js","./index-c4d2d831.js"],import.meta.url)).default),t(5,f=!1))}xt(()=>{g()});function b(O){me.call(this,n,O)}function k(O){p=O,t(7,p),t(0,l)}function $(O){se[O?"unshift":"push"](()=>{d=O,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),_()};return n.$$set=O=>{"value"in O&&t(0,l=O.value),"placeholder"in O&&t(1,o=O.placeholder),"autocompleteCollection"in O&&t(2,r=O.autocompleteCollection),"extraAutocompleteKeys"in O&&t(3,a=O.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,_,b,k,$,T,C]}class Ko extends be{constructor(e){super(),ge(this,e,Wy,Uy,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Yy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[De(t=We.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&Vt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:Q,o:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function Ky(n,e,t){const i=Tt();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 xt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Na extends be{constructor(e){super(),ge(this,e,Ky,Yy,_e,{tooltip:0})}}function Jy(n){let e,t,i,s,l;const o=n[6].default,r=yt(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&wt(r,o,a,a[5],i?kt(o,a[5],u,null):St(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Ee(l)}}}function Zy(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(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class ln extends be{constructor(e){super(),ge(this,e,Zy,Jy,_e,{class:1,name:2,sort:0,disable:3})}}function Gy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Xy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=W(n[2]),s=E(),l=y("div"),o=W(n[1]),r=W(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&oe(i,a[2]),u&2&&oe(o,a[1])},d(a){a&&w(e)}}}function Qy(n){let e;function t(l,o){return l[0]?Xy:Gy}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function xy(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 $i extends be{constructor(e){super(),ge(this,e,xy,Qy,_e,{date:0})}}const e2=n=>({}),nf=n=>({}),t2=n=>({}),sf=n=>({});function n2(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=yt(u,n,n[4],sf),d=n[5].default,p=yt(d,n,n[4],null),m=n[5].after,_=yt(m,n,n[4],nf);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),_&&_.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&wt(f,u,g,g[4],o?kt(u,g[4],b,t2):St(g[4]),sf),p&&p.p&&(!o||b&16)&&wt(p,d,g,g[4],o?kt(d,g[4],b,null):St(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&h(i,"class",s),_&&_.p&&(!o||b&16)&&wt(_,m,g,g[4],o?kt(m,g[4],b,e2):St(g[4]),nf)},i(g){o||(A(f,g),A(p,g),A(_,g),o=!0)},o(g){P(f,g),P(p,g),P(_,g),o=!1},d(g){g&&w(e),f&&f.d(g),p&&p.d(g),n[6](null),_&&_.d(g),r=!1,Ee(a)}}}function i2(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 p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){se[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class Fa extends be{constructor(e){super(),ge(this,e,i2,n2,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function lf(n,e,t){const i=n.slice();return i[23]=e[t],i}function s2(n){let e;return{c(){e=y("div"),e.innerHTML=` - Method`,h(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function l2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="URL",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function o2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Referer",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function r2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="User IP",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function a2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Status",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function u2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function of(n){let e;function t(l,o){return l[6]?c2:f2}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 f2(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&rf(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=rf(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function c2(n){let e;return{c(){e=y("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function rf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function af(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function uf(n,e){var Me,Ze,mt;let t,i,s,l=((Me=e[23].method)==null?void 0:Me.toUpperCase())+"",o,r,a,u,f,d=e[23].url+"",p,m,_,g,b,k,$=(e[23].referer||"N/A")+"",T,C,O,M,D,I=(e[23].userIp||"N/A")+"",L,F,q,N,R,j=e[23].status+"",V,K,ee,te,G,ce,X,le,ve,Se,Ve=(((Ze=e[23].meta)==null?void 0:Ze.errorMessage)||((mt=e[23].meta)==null?void 0:mt.errorData))&&af();te=new $i({props:{date:e[23].created}});function ze(){return e[17](e[23])}function we(...Ge){return e[18](e[23],...Ge)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("span"),o=W(l),a=E(),u=y("td"),f=y("span"),p=W(d),_=E(),Ve&&Ve.c(),g=E(),b=y("td"),k=y("span"),T=W($),O=E(),M=y("td"),D=y("span"),L=W(I),q=E(),N=y("td"),R=y("span"),V=W(j),K=E(),ee=y("td"),U(te.$$.fragment),G=E(),ce=y("td"),ce.innerHTML='',X=E(),h(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",m=e[23].url),h(u,"class","col-type-text col-field-url"),h(k,"class","txt txt-ellipsis"),h(k,"title",C=e[23].referer),x(k,"txt-hint",!e[23].referer),h(b,"class","col-type-text col-field-referer"),h(D,"class","txt txt-ellipsis"),h(D,"title",F=e[23].userIp),x(D,"txt-hint",!e[23].userIp),h(M,"class","col-type-number col-field-userIp"),h(R,"class","label"),x(R,"label-danger",e[23].status>=400),h(N,"class","col-type-number col-field-status"),h(ee,"class","col-type-date col-field-created"),h(ce,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Ge,Ye){S(Ge,t,Ye),v(t,i),v(i,s),v(s,o),v(t,a),v(t,u),v(u,f),v(f,p),v(u,_),Ve&&Ve.m(u,null),v(t,g),v(t,b),v(b,k),v(k,T),v(t,O),v(t,M),v(M,D),v(D,L),v(t,q),v(t,N),v(N,R),v(R,V),v(t,K),v(t,ee),z(te,ee,null),v(t,G),v(t,ce),v(t,X),le=!0,ve||(Se=[J(t,"click",ze),J(t,"keydown",we)],ve=!0)},p(Ge,Ye){var qe,xe,en;e=Ge,(!le||Ye&8)&&l!==(l=((qe=e[23].method)==null?void 0:qe.toUpperCase())+"")&&oe(o,l),(!le||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&h(s,"class",r),(!le||Ye&8)&&d!==(d=e[23].url+"")&&oe(p,d),(!le||Ye&8&&m!==(m=e[23].url))&&h(f,"title",m),(xe=e[23].meta)!=null&&xe.errorMessage||(en=e[23].meta)!=null&&en.errorData?Ve||(Ve=af(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!le||Ye&8)&&$!==($=(e[23].referer||"N/A")+"")&&oe(T,$),(!le||Ye&8&&C!==(C=e[23].referer))&&h(k,"title",C),(!le||Ye&8)&&x(k,"txt-hint",!e[23].referer),(!le||Ye&8)&&I!==(I=(e[23].userIp||"N/A")+"")&&oe(L,I),(!le||Ye&8&&F!==(F=e[23].userIp))&&h(D,"title",F),(!le||Ye&8)&&x(D,"txt-hint",!e[23].userIp),(!le||Ye&8)&&j!==(j=e[23].status+"")&&oe(V,j),(!le||Ye&8)&&x(R,"label-danger",e[23].status>=400);const ne={};Ye&8&&(ne.date=e[23].created),te.$set(ne)},i(Ge){le||(A(te.$$.fragment,Ge),le=!0)},o(Ge){P(te.$$.fragment,Ge),le=!1},d(Ge){Ge&&w(t),Ve&&Ve.d(),B(te),ve=!1,Ee(Se)}}}function d2(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L=[],F=new Map,q;function N(we){n[11](we)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[s2]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new ln({props:R}),se.push(()=>he(s,"sort",N));function j(we){n[12](we)}let V={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[l2]},$$scope:{ctx:n}};n[1]!==void 0&&(V.sort=n[1]),r=new ln({props:V}),se.push(()=>he(r,"sort",j));function K(we){n[13](we)}let ee={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[o2]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),f=new ln({props:ee}),se.push(()=>he(f,"sort",K));function te(we){n[14](we)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[r2]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),m=new ln({props:G}),se.push(()=>he(m,"sort",te));function ce(we){n[15](we)}let X={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[a2]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),b=new ln({props:X}),se.push(()=>he(b,"sort",ce));function le(we){n[16](we)}let ve={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[u2]},$$scope:{ctx:n}};n[1]!==void 0&&(ve.sort=n[1]),T=new ln({props:ve}),se.push(()=>he(T,"sort",le));let Se=n[3];const Ve=we=>we[23].id;for(let we=0;wel=!1)),s.$set(Ze);const mt={};Me&67108864&&(mt.$$scope={dirty:Me,ctx:we}),!a&&Me&2&&(a=!0,mt.sort=we[1],ke(()=>a=!1)),r.$set(mt);const Ge={};Me&67108864&&(Ge.$$scope={dirty:Me,ctx:we}),!d&&Me&2&&(d=!0,Ge.sort=we[1],ke(()=>d=!1)),f.$set(Ge);const Ye={};Me&67108864&&(Ye.$$scope={dirty:Me,ctx:we}),!_&&Me&2&&(_=!0,Ye.sort=we[1],ke(()=>_=!1)),m.$set(Ye);const ne={};Me&67108864&&(ne.$$scope={dirty:Me,ctx:we}),!k&&Me&2&&(k=!0,ne.sort=we[1],ke(()=>k=!1)),b.$set(ne);const qe={};Me&67108864&&(qe.$$scope={dirty:Me,ctx:we}),!C&&Me&2&&(C=!0,qe.sort=we[1],ke(()=>C=!1)),T.$set(qe),Me&841&&(Se=we[3],ae(),L=$t(L,Me,Ve,1,we,Se,F,I,Qt,uf,null,lf),ue(),!Se.length&&ze?ze.p(we,Me):Se.length?ze&&(ze.d(1),ze=null):(ze=of(we),ze.c(),ze.m(I,null))),(!q||Me&64)&&x(e,"table-loading",we[6])},i(we){if(!q){A(s.$$.fragment,we),A(r.$$.fragment,we),A(f.$$.fragment,we),A(m.$$.fragment,we),A(b.$$.fragment,we),A(T.$$.fragment,we);for(let Me=0;Me{if(F<=1&&g(),t(6,p=!1),t(5,f=N.page),t(4,d=N.totalItems),s("load",u.concat(N.items)),q){const R=++m;for(;N.items.length&&m==R;)t(3,u=u.concat(N.items.splice(0,10))),await H.yieldToMain()}else t(3,u=u.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,p=!1),console.warn(N),g(),pe.errorResponseHandler(N,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,d=0)}function b(F){a=F,t(1,a)}function k(F){a=F,t(1,a)}function $(F){a=F,t(1,a)}function T(F){a=F,t(1,a)}function C(F){a=F,t(1,a)}function O(F){a=F,t(1,a)}const M=F=>s("select",F),D=(F,q)=>{q.code==="Enter"&&(q.preventDefault(),s("select",F))},I=()=>t(0,o=""),L=()=>_(f+1);return n.$$set=F=>{"filter"in F&&t(0,o=F.filter),"presets"in F&&t(10,r=F.presets),"sort"in F&&t(1,a=F.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),_(1)),n.$$.dirty&24&&t(7,i=d>u.length)},[o,a,_,u,d,f,p,i,s,l,r,b,k,$,T,C,O,M,D,I,L]}class h2 extends be{constructor(e){super(),ge(this,e,m2,p2,_e,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + `}}let Qr,Ji;const xr="app-tooltip";function Zu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Ji=Ji||document.querySelector("."+xr),Ji||(Ji=document.createElement("div"),Ji.classList.add(xr),document.body.appendChild(Ji)),Ji}function u1(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){ea();return}t.textContent=e.text,t.className=xr+" 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 ea(){clearTimeout(Qr),Ni().classList.remove("active"),Ni().activeNode=void 0}function Ty(n,e){Ni().activeNode=n,clearTimeout(Qr),Qr=setTimeout(()=>{Ni().classList.add("active"),u1(n,e)},isNaN(e.delay)?0:e.delay)}function We(n,e){let t=Zu(e);function i(){Ty(n,t)}function s(){ea()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&H.isFocusable(n))&&n.addEventListener("click",s),Ni(),{update(l){var o,r;t=Zu(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&u1(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ea(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Gu(n,e,t){const i=n.slice();return i[12]=e[t],i}const My=n=>({}),Xu=n=>({uniqueId:n[4]});function Oy(n){let e,t,i=n[3],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=He(t,Wt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=He(t,Wt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&w(e),a&&s&&s.end(),o=!1,r()}}}function Qu(n){let e,t,i=ko(n[12])+"",s,l,o,r;return{c(){e=y("div"),t=y("pre"),s=W(i),l=E(),h(e,"class","help-block help-block-error")},m(a,u){S(a,e,u),v(e,t),v(t,s),v(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=ko(a[12])+"")&&oe(s,i)},i(a){r||(a&&nt(()=>{r&&(o||(o=He(e,yt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=He(e,yt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&w(e),a&&o&&o.end()}}}function Ey(n){let e,t,i,s,l,o,r;const a=n[9].default,u=wt(a,n,n[8],Xu),f=[Dy,Oy],d=[];function p(m,_){return m[0]&&m[3].length?0:1}return i=p(n),s=d[i]=f[i](n),{c(){e=y("div"),u&&u.c(),t=E(),s.c(),h(e,"class",n[1]),x(e,"error",n[3].length)},m(m,_){S(m,e,_),u&&u.m(e,null),v(e,t),d[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(m,[_]){u&&u.p&&(!l||_&256)&&$t(u,a,m,m[8],l?St(a,m[8],_,My):Ct(m[8]),Xu);let g=i;i=p(m),i===g?d[i].p(m,_):(ae(),P(d[g],1,1,()=>{d[g]=null}),ue(),s=d[i],s?s.p(m,_):(s=d[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&h(e,"class",m[1]),(!l||_&10)&&x(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){P(u,m),P(s),l=!1},d(m){m&&w(e),u&&u.d(m),d[i].d(),n[11](null),o=!1,r()}}}const xu="Invalid value";function ko(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||xu:n||xu}function Ay(n,e,t){let i;Je(n,Ci,g=>t(7,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+H.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,d=[];function p(){Ri(r)}xt(()=>(f.addEventListener("input",p),f.addEventListener("change",p),()=>{f.removeEventListener("input",p),f.removeEventListener("change",p)}));function m(g){me.call(this,n,g)}function _(g){se[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,d=H.toArray(H.getNestedVal(i,r)))},[a,u,f,d,o,r,p,i,l,s,m,_]}class de extends ve{constructor(e){super(),be(this,e,Ay,Ey,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Iy(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Email"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","email"),h(l,"autocomplete","off"),h(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Py(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Password"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Minimum 10 characters.",h(e,"for",i=n[9]),h(l,"type","password"),h(l,"autocomplete","new-password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0,h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[1]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[6]),u=!0)},p(d,p){p&512&&i!==(i=d[9])&&h(e,"for",i),p&512&&o!==(o=d[9])&&h(l,"id",o),p&2&&l.value!==d[1]&&fe(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Ly(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Password confirm"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Ny(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;return s=new de({props:{class:"form-field required",name:"email",$$slots:{default:[Iy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[Py,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Ly,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("button"),f.innerHTML=`Create and login + `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(_,g){S(_,e,g),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),z(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",at(n[4])),p=!0)},p(_,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:_}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:_}),o.$set(k);const $={};g&1540&&($.$$scope={dirty:g,ctx:_}),a.$set($),(!d||g&8)&&x(f,"btn-disabled",_[3]),(!d||g&8)&&x(f,"btn-loading",_[3])},i(_){d||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),d=!0)},o(_){P(s.$$.fragment,_),P(o.$$.fragment,_),P(a.$$.fragment,_),d=!1},d(_){_&&w(e),B(s),B(o),B(a),p=!1,m()}}}function Fy(n,e,t){const i=Tt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await pe.admins.create({email:s,password:l,passwordConfirm:o}),await pe.admins.authWithPassword(s,l),i("submit")}catch(p){pe.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class Ry extends ve{constructor(e){super(),be(this,e,Fy,Ny,_e,{})}}function ef(n){let e,t;return e=new a1({props:{$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qy(n){let e,t;return e=new Ry({}),e.$on("submit",n[1]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p:Q,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function jy(n){let e,t,i=n[0]&&ef(n);return{c(){i&&i.c(),e=$e()},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&&A(i,1)):(i=ef(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),P(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Vy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){pe.logout(!1),t(0,i=!0);return}pe.authStore.isValid?Vi("/collections"):pe.logout()}return[i,async()=>{t(0,i=!1),await an(),window.location.search=""}]}class Hy extends ve{constructor(e){super(),be(this,e,Vy,jy,_e,{})}}const Nt=In(""),wo=In(""),Es=In(!1);function zy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),fe(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&fe(e,l[7])},i:Q,o:Q,d(l){l&&w(e),n[13](null),i=!1,s()}}}function By(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=Lt(o,r(n)),se.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(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],ke(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),e.$on("submit",a[10]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function tf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function nf(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Uy(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[By,zy],m=[];function _(k,$){return k[4]&&!k[5]?0:1}l=_(n),o=m[l]=p[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&tf(),b=(n[0].length||n[7].length)&&nf(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",An(n[11])),J(e,"submit",at(n[10]))],f=!0)},p(k,[$]){let T=l;l=_(k),l===T?m[l].p(k,$):(ae(),P(m[T],1,1,()=>{m[T]=null}),ue(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?g?$&129&&A(g,1):(g=tf(),g.c(),A(g,1),g.m(e,a)):g&&(ae(),P(g,1,1,()=>{g=null}),ue()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=nf(k),b.c(),A(b,1),b.m(e,null)):b&&(ae(),P(b,1,1,()=>{b=null}),ue())},i(k){u||(A(o),A(g),A(b),u=!0)},o(k){P(o),P(g),P(b),u=!1},d(k){k&&w(e),m[l].d(),g&&g.d(),b&&b.d(),f=!1,Ee(d)}}}function Wy(n,e,t){const i=Tt(),s="search_"+H.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new kn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(D=!0){t(7,p=""),D&&(d==null||d.focus()),i("clear")}function _(){t(0,l=p),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await rt(()=>import("./FilterAutocompleteInput-5ad2deed.js"),["./FilterAutocompleteInput-5ad2deed.js","./index-c4d2d831.js"],import.meta.url)).default),t(5,f=!1))}xt(()=>{g()});function b(D){me.call(this,n,D)}function k(D){p=D,t(7,p),t(0,l)}function $(D){se[D?"unshift":"push"](()=>{d=D,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),_()};return n.$$set=D=>{"value"in D&&t(0,l=D.value),"placeholder"in D&&t(1,o=D.placeholder),"autocompleteCollection"in D&&t(2,r=D.autocompleteCollection),"extraAutocompleteKeys"in D&&t(3,a=D.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,_,b,k,$,T,C]}class Yo extends ve{constructor(e){super(),be(this,e,Wy,Uy,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Yy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[De(t=We.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&Vt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:Q,o:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function Ky(n,e,t){const i=Tt();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 xt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Fa extends ve{constructor(e){super(),be(this,e,Ky,Yy,_e,{tooltip:0})}}function Jy(n){let e,t,i,s,l;const o=n[6].default,r=wt(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&$t(r,o,a,a[5],i?St(o,a[5],u,null):Ct(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Ee(l)}}}function Zy(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(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class ln extends ve{constructor(e){super(),be(this,e,Zy,Jy,_e,{class:1,name:2,sort:0,disable:3})}}function Gy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Xy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=W(n[2]),s=E(),l=y("div"),o=W(n[1]),r=W(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&oe(i,a[2]),u&2&&oe(o,a[1])},d(a){a&&w(e)}}}function Qy(n){let e;function t(l,o){return l[0]?Xy:Gy}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function xy(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 $i extends ve{constructor(e){super(),be(this,e,xy,Qy,_e,{date:0})}}const e2=n=>({}),sf=n=>({}),t2=n=>({}),lf=n=>({});function n2(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=wt(u,n,n[4],lf),d=n[5].default,p=wt(d,n,n[4],null),m=n[5].after,_=wt(m,n,n[4],sf);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),_&&_.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&$t(f,u,g,g[4],o?St(u,g[4],b,t2):Ct(g[4]),lf),p&&p.p&&(!o||b&16)&&$t(p,d,g,g[4],o?St(d,g[4],b,null):Ct(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&h(i,"class",s),_&&_.p&&(!o||b&16)&&$t(_,m,g,g[4],o?St(m,g[4],b,e2):Ct(g[4]),sf)},i(g){o||(A(f,g),A(p,g),A(_,g),o=!0)},o(g){P(f,g),P(p,g),P(_,g),o=!1},d(g){g&&w(e),f&&f.d(g),p&&p.d(g),n[6](null),_&&_.d(g),r=!1,Ee(a)}}}function i2(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 p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){se[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class Ra extends ve{constructor(e){super(),be(this,e,i2,n2,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function of(n,e,t){const i=n.slice();return i[23]=e[t],i}function s2(n){let e;return{c(){e=y("div"),e.innerHTML=` + Method`,h(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function l2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="URL",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function o2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Referer",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function r2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="User IP",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function a2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Status",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function u2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function rf(n){let e;function t(l,o){return l[6]?c2:f2}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 f2(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&af(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=af(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function c2(n){let e;return{c(){e=y("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function af(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function uf(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ff(n,e){var Me,Ze,mt;let t,i,s,l=((Me=e[23].method)==null?void 0:Me.toUpperCase())+"",o,r,a,u,f,d=e[23].url+"",p,m,_,g,b,k,$=(e[23].referer||"N/A")+"",T,C,D,M,O,I=(e[23].userIp||"N/A")+"",L,F,q,N,R,j=e[23].status+"",V,K,ee,te,G,ce,X,le,ye,Se,Ve=(((Ze=e[23].meta)==null?void 0:Ze.errorMessage)||((mt=e[23].meta)==null?void 0:mt.errorData))&&uf();te=new $i({props:{date:e[23].created}});function ze(){return e[17](e[23])}function we(...Ge){return e[18](e[23],...Ge)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("span"),o=W(l),a=E(),u=y("td"),f=y("span"),p=W(d),_=E(),Ve&&Ve.c(),g=E(),b=y("td"),k=y("span"),T=W($),D=E(),M=y("td"),O=y("span"),L=W(I),q=E(),N=y("td"),R=y("span"),V=W(j),K=E(),ee=y("td"),U(te.$$.fragment),G=E(),ce=y("td"),ce.innerHTML='',X=E(),h(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",m=e[23].url),h(u,"class","col-type-text col-field-url"),h(k,"class","txt txt-ellipsis"),h(k,"title",C=e[23].referer),x(k,"txt-hint",!e[23].referer),h(b,"class","col-type-text col-field-referer"),h(O,"class","txt txt-ellipsis"),h(O,"title",F=e[23].userIp),x(O,"txt-hint",!e[23].userIp),h(M,"class","col-type-number col-field-userIp"),h(R,"class","label"),x(R,"label-danger",e[23].status>=400),h(N,"class","col-type-number col-field-status"),h(ee,"class","col-type-date col-field-created"),h(ce,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Ge,Ye){S(Ge,t,Ye),v(t,i),v(i,s),v(s,o),v(t,a),v(t,u),v(u,f),v(f,p),v(u,_),Ve&&Ve.m(u,null),v(t,g),v(t,b),v(b,k),v(k,T),v(t,D),v(t,M),v(M,O),v(O,L),v(t,q),v(t,N),v(N,R),v(R,V),v(t,K),v(t,ee),z(te,ee,null),v(t,G),v(t,ce),v(t,X),le=!0,ye||(Se=[J(t,"click",ze),J(t,"keydown",we)],ye=!0)},p(Ge,Ye){var qe,xe,en;e=Ge,(!le||Ye&8)&&l!==(l=((qe=e[23].method)==null?void 0:qe.toUpperCase())+"")&&oe(o,l),(!le||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&h(s,"class",r),(!le||Ye&8)&&d!==(d=e[23].url+"")&&oe(p,d),(!le||Ye&8&&m!==(m=e[23].url))&&h(f,"title",m),(xe=e[23].meta)!=null&&xe.errorMessage||(en=e[23].meta)!=null&&en.errorData?Ve||(Ve=uf(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!le||Ye&8)&&$!==($=(e[23].referer||"N/A")+"")&&oe(T,$),(!le||Ye&8&&C!==(C=e[23].referer))&&h(k,"title",C),(!le||Ye&8)&&x(k,"txt-hint",!e[23].referer),(!le||Ye&8)&&I!==(I=(e[23].userIp||"N/A")+"")&&oe(L,I),(!le||Ye&8&&F!==(F=e[23].userIp))&&h(O,"title",F),(!le||Ye&8)&&x(O,"txt-hint",!e[23].userIp),(!le||Ye&8)&&j!==(j=e[23].status+"")&&oe(V,j),(!le||Ye&8)&&x(R,"label-danger",e[23].status>=400);const ne={};Ye&8&&(ne.date=e[23].created),te.$set(ne)},i(Ge){le||(A(te.$$.fragment,Ge),le=!0)},o(Ge){P(te.$$.fragment,Ge),le=!1},d(Ge){Ge&&w(t),Ve&&Ve.d(),B(te),ye=!1,Ee(Se)}}}function d2(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L=[],F=new Map,q;function N(we){n[11](we)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[s2]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new ln({props:R}),se.push(()=>he(s,"sort",N));function j(we){n[12](we)}let V={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[l2]},$$scope:{ctx:n}};n[1]!==void 0&&(V.sort=n[1]),r=new ln({props:V}),se.push(()=>he(r,"sort",j));function K(we){n[13](we)}let ee={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[o2]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),f=new ln({props:ee}),se.push(()=>he(f,"sort",K));function te(we){n[14](we)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[r2]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),m=new ln({props:G}),se.push(()=>he(m,"sort",te));function ce(we){n[15](we)}let X={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[a2]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),b=new ln({props:X}),se.push(()=>he(b,"sort",ce));function le(we){n[16](we)}let ye={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[u2]},$$scope:{ctx:n}};n[1]!==void 0&&(ye.sort=n[1]),T=new ln({props:ye}),se.push(()=>he(T,"sort",le));let Se=n[3];const Ve=we=>we[23].id;for(let we=0;wel=!1)),s.$set(Ze);const mt={};Me&67108864&&(mt.$$scope={dirty:Me,ctx:we}),!a&&Me&2&&(a=!0,mt.sort=we[1],ke(()=>a=!1)),r.$set(mt);const Ge={};Me&67108864&&(Ge.$$scope={dirty:Me,ctx:we}),!d&&Me&2&&(d=!0,Ge.sort=we[1],ke(()=>d=!1)),f.$set(Ge);const Ye={};Me&67108864&&(Ye.$$scope={dirty:Me,ctx:we}),!_&&Me&2&&(_=!0,Ye.sort=we[1],ke(()=>_=!1)),m.$set(Ye);const ne={};Me&67108864&&(ne.$$scope={dirty:Me,ctx:we}),!k&&Me&2&&(k=!0,ne.sort=we[1],ke(()=>k=!1)),b.$set(ne);const qe={};Me&67108864&&(qe.$$scope={dirty:Me,ctx:we}),!C&&Me&2&&(C=!0,qe.sort=we[1],ke(()=>C=!1)),T.$set(qe),Me&841&&(Se=we[3],ae(),L=vt(L,Me,Ve,1,we,Se,F,I,Kt,ff,null,of),ue(),!Se.length&&ze?ze.p(we,Me):Se.length?ze&&(ze.d(1),ze=null):(ze=rf(we),ze.c(),ze.m(I,null))),(!q||Me&64)&&x(e,"table-loading",we[6])},i(we){if(!q){A(s.$$.fragment,we),A(r.$$.fragment,we),A(f.$$.fragment,we),A(m.$$.fragment,we),A(b.$$.fragment,we),A(T.$$.fragment,we);for(let Me=0;Me{if(F<=1&&g(),t(6,p=!1),t(5,f=N.page),t(4,d=N.totalItems),s("load",u.concat(N.items)),q){const R=++m;for(;N.items.length&&m==R;)t(3,u=u.concat(N.items.splice(0,10))),await H.yieldToMain()}else t(3,u=u.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,p=!1),console.warn(N),g(),pe.errorResponseHandler(N,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,d=0)}function b(F){a=F,t(1,a)}function k(F){a=F,t(1,a)}function $(F){a=F,t(1,a)}function T(F){a=F,t(1,a)}function C(F){a=F,t(1,a)}function D(F){a=F,t(1,a)}const M=F=>s("select",F),O=(F,q)=>{q.code==="Enter"&&(q.preventDefault(),s("select",F))},I=()=>t(0,o=""),L=()=>_(f+1);return n.$$set=F=>{"filter"in F&&t(0,o=F.filter),"presets"in F&&t(10,r=F.presets),"sort"in F&&t(1,a=F.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),_(1)),n.$$.dirty&24&&t(7,i=d>u.length)},[o,a,_,u,d,f,p,i,s,l,r,b,k,$,T,C,D,M,O,I,L]}class h2 extends ve{constructor(e){super(),be(this,e,m2,p2,_e,{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 mi(){}const _2=function(){let n=0;return function(){return n++}}();function ct(n){return n===null||typeof n>"u"}function vt(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 et(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const jt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return jt(n)?n:e}function st(n,e){return typeof n>"u"?e:n}const g2=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,u1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function It(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function pt(n,e,t,i){let s,l,o;if(vt(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 qi(n,e){return(df[e]||(df[e]=y2(e)))(n)}function y2(n){const e=k2(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function k2(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 Ra(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Wn=n=>typeof n<"u",ji=n=>typeof n=="function",pf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function w2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ft=Math.PI,_t=2*Ft,S2=_t+Ft,To=Number.POSITIVE_INFINITY,$2=Ft/180,Pt=Ft/2,Ks=Ft/4,mf=Ft*2/3,Bn=Math.log10,ri=Math.sign;function hf(n){const e=Math.round(n);n=rl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Bn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function C2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function As(n){return!isNaN(parseFloat(n))&&isFinite(n)}function rl(n,e,t){return Math.abs(n-e)=n}function c1(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 ja(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 ns=(n,e,t,i)=>ja(n,t,i?s=>n[s][e]<=t:s=>n[s][e]ja(n,t,i=>n[i][e]>=t);function E2(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Ra(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 gf(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)&&(p1.forEach(l=>{delete n[l]}),delete n._chartjs)}function m1(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function _1(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,h1.call(window,()=>{s=!1,n.apply(e,l)}))}}function I2(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const P2=n=>n==="start"?"left":n==="end"?"right":"center",bf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function g1(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:d,maxDefined:p}=o.getUserBounds();d&&(s=on(Math.min(ns(r,o.axis,u).lo,t?i:ns(e,a,o.getPixelForValue(u)).lo),0,i-1)),p?l=on(Math.max(ns(r,o.axis,f,!0).hi+1,t?0:ns(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function b1(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,vf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*_t/t)),yf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*_t/t)+1,al={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*Pt)+1,easeOutSine:n=>Math.sin(n*Pt),easeInOutSine:n=>-.5*(Math.cos(Ft*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:vf(n,.075,.3),easeOutElastic:n=>Ul(n)?n:yf(n,.075,.3),easeInOutElastic(n){return Ul(n)?n:n<.5?.5*vf(n*2,.1125,.45):.5+.5*yf(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-al.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?al.easeInBounce(n*2)*.5:al.easeOutBounce(n*2-1)*.5+.5};/*! + */function mi(){}const _2=function(){let n=0;return function(){return n++}}();function ct(n){return n===null||typeof n>"u"}function kt(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 et(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const jt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return jt(n)?n:e}function st(n,e){return typeof n>"u"?e:n}const g2=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,f1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function It(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function dt(n,e,t,i){let s,l,o;if(kt(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 qi(n,e){return(pf[e]||(pf[e]=y2(e)))(n)}function y2(n){const e=k2(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function k2(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 qa(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Wn=n=>typeof n<"u",ji=n=>typeof n=="function",mf=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function w2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ft=Math.PI,_t=2*Ft,S2=_t+Ft,Co=Number.POSITIVE_INFINITY,$2=Ft/180,Pt=Ft/2,Ks=Ft/4,hf=Ft*2/3,Bn=Math.log10,ri=Math.sign;function _f(n){const e=Math.round(n);n=rl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Bn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function C2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function As(n){return!isNaN(parseFloat(n))&&isFinite(n)}function rl(n,e,t){return Math.abs(n-e)=n}function d1(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 Va(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 ns=(n,e,t,i)=>Va(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Va(n,t,i=>n[i][e]>=t);function E2(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+qa(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 bf(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)&&(m1.forEach(l=>{delete n[l]}),delete n._chartjs)}function h1(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function g1(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,_1.call(window,()=>{s=!1,n.apply(e,l)}))}}function I2(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const P2=n=>n==="start"?"left":n==="end"?"right":"center",vf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function b1(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:d,maxDefined:p}=o.getUserBounds();d&&(s=on(Math.min(ns(r,o.axis,u).lo,t?i:ns(e,a,o.getPixelForValue(u)).lo),0,i-1)),p?l=on(Math.max(ns(r,o.axis,f,!0).hi+1,t?0:ns(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function v1(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,yf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*_t/t)),kf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*_t/t)+1,al={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*Pt)+1,easeOutSine:n=>Math.sin(n*Pt),easeInOutSine:n=>-.5*(Math.cos(Ft*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:yf(n,.075,.3),easeOutElastic:n=>Ul(n)?n:kf(n,.075,.3),easeInOutElastic(n){return Ul(n)?n:n<.5?.5*yf(n*2,.1125,.45):.5+.5*kf(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-al.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?al.easeInBounce(n*2)*.5:al.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 Al(n){return n+.5|0}const Ii=(n,e,t)=>Math.max(Math.min(n,t),e);function nl(n){return Ii(Al(n*2.55),0,255)}function Fi(n){return Ii(Al(n*255),0,255)}function gi(n){return Ii(Al(n/2.55)/100,0,1)}function kf(n){return Ii(Al(n*100),0,100)}const qn={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},na=[..."0123456789ABCDEF"],L2=n=>na[n&15],N2=n=>na[(n&240)>>4]+na[n&15],Wl=n=>(n&240)>>4===(n&15),F2=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function R2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&qn[n[1]]*17,g:255&qn[n[2]]*17,b:255&qn[n[3]]*17,a:e===5?qn[n[4]]*17:255}:(e===7||e===9)&&(t={r:qn[n[1]]<<4|qn[n[2]],g:qn[n[3]]<<4|qn[n[4]],b:qn[n[5]]<<4|qn[n[6]],a:e===9?qn[n[7]]<<4|qn[n[8]]:255})),t}const q2=(n,e)=>n<255?e(n):"";function j2(n){var e=F2(n)?L2:N2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+q2(n.a,e):void 0}const V2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v1(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 H2(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 z2(n,e,t){const i=v1(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 B2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=B2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Ha(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Fi)}function za(n,e,t){return Ha(v1,n,e,t)}function U2(n,e,t){return Ha(z2,n,e,t)}function W2(n,e,t){return Ha(H2,n,e,t)}function y1(n){return(n%360+360)%360}function Y2(n){const e=V2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?nl(+e[5]):Fi(+e[5]));const s=y1(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=U2(s,l,o):e[1]==="hsv"?i=W2(s,l,o):i=za(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function K2(n,e){var t=Va(n);t[0]=y1(t[0]+e),t=za(t),n.r=t[0],n.g=t[1],n.b=t[2]}function J2(n){if(!n)return;const e=Va(n),t=e[0],i=kf(e[1]),s=kf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${gi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const wf={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"},Sf={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 Z2(){const n={},e=Object.keys(Sf),t=Object.keys(wf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Yl;function G2(n){Yl||(Yl=Z2(),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 X2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Q2(n){const e=X2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?nl(o):Ii(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?nl(i):Ii(i,0,255)),s=255&(e[4]?nl(s):Ii(s,0,255)),l=255&(e[6]?nl(l):Ii(l,0,255)),{r:i,g:s,b:l,a:t}}}function x2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${gi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const pr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,bs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function ek(n,e,t){const i=bs(gi(n.r)),s=bs(gi(n.g)),l=bs(gi(n.b));return{r:Fi(pr(i+t*(bs(gi(e.r))-i))),g:Fi(pr(s+t*(bs(gi(e.g))-s))),b:Fi(pr(l+t*(bs(gi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Kl(n,e,t){if(n){let i=Va(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=za(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function k1(n,e){return n&&Object.assign(e||{},n)}function $f(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=Fi(n[3]))):(e=k1(n,{r:0,g:0,b:0,a:1}),e.a=Fi(e.a)),e}function tk(n){return n.charAt(0)==="r"?Q2(n):Y2(n)}class Mo{constructor(e){if(e instanceof Mo)return e;const t=typeof e;let i;t==="object"?i=$f(e):t==="string"&&(i=R2(e)||G2(e)||tk(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=k1(this._rgb);return e&&(e.a=gi(e.a)),e}set rgb(e){this._rgb=$f(e)}rgbString(){return this._valid?x2(this._rgb):void 0}hexString(){return this._valid?j2(this._rgb):void 0}hslString(){return this._valid?J2(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=ek(this._rgb,e._rgb,t)),this}clone(){return new Mo(this.rgb)}alpha(e){return this._rgb.a=Fi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Al(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 K2(this._rgb,e),this}}function w1(n){return new Mo(n)}function S1(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Cf(n){return S1(n)?n:w1(n)}function mr(n){return S1(n)?n:w1(n).saturate(.5).darken(.1).hexString()}const as=Object.create(null),ia=Object.create(null);function ul(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)=>mr(i.backgroundColor),this.hoverBorderColor=(t,i)=>mr(i.borderColor),this.hoverColor=(t,i)=>mr(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 hr(this,e,t)}get(e){return ul(this,e)}describe(e,t){return hr(ia,e,t)}override(e,t){return hr(as,e,t)}route(e,t,i,s){const l=ul(this,e),o=ul(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 et(a)?Object.assign({},u,a):st(a,u)},set(a){this[r]=a}}})}}var lt=new nk({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ik(n){return!n||ct(n.size)||ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Oo(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 sk(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,d,p;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function vl(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,ak(n,l),a=0;a+n||0;function Wa(n,e){const t={},i=et(e),s=i?Object.keys(e):e,l=et(n)?i?o=>st(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=pk(l(o));return t}function $1(n){return Wa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Cs(n){return Wa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Yn(n){const e=$1(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Dn(n,e){n=n||{},e=e||lt.font;let t=st(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=st(n.style,e.style);i&&!(""+i).match(ck)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:st(n.family,e.family),lineHeight:dk(st(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:st(n.weight,e.weight),string:""};return s.string=ik(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 Hi(n,e){return Object.assign(Object.create(n),e)}function Ya(n,e=[""],t=n,i,s=()=>n[0]){Wn(i)||(i=O1("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Ya([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 T1(o,r,()=>wk(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Of(o).includes(r)},ownKeys(o){return Of(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Is(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:C1(n,i),setContext:l=>Is(n,l,t,i),override:l=>Is(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 T1(l,o,()=>_k(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 C1(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:ji(t)?t:()=>t,isIndexable:ji(i)?i:()=>i}}const hk=(n,e)=>n?n+Ra(e):e,Ka=(n,e)=>et(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function T1(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function _k(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return ji(r)&&o.isScriptable(e)&&(r=gk(e,r,n,t)),vt(r)&&r.length&&(r=bk(e,r,n,o.isIndexable)),Ka(e,r)&&(r=Is(r,s,l&&l[e],o)),r}function gk(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),Ka(n,e)&&(e=Ja(s._scopes,s,n,e)),e}function bk(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Wn(l.index)&&i(n))e=e[l.index%e.length];else if(et(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const d=Ja(u,s,n,f);e.push(Is(d,l,o&&o[n],r))}}return e}function M1(n,e,t){return ji(n)?n(e,t):n}const vk=(n,e)=>n===!0?e:typeof n=="string"?qi(e,n):void 0;function yk(n,e,t,i,s){for(const l of e){const o=vk(t,l);if(o){n.add(o);const r=M1(o._fallback,t,s);if(Wn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Wn(i)&&t!==i)return null}return!1}function Ja(n,e,t,i){const s=e._rootScopes,l=M1(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=Mf(r,o,t,l||t,i);return a===null||Wn(l)&&l!==t&&(a=Mf(r,o,l,a,i),a===null)?!1:Ya(Array.from(r),[""],s,l,()=>kk(e,t,i))}function Mf(n,e,t,i,s){for(;t;)t=yk(n,e,t,i,s);return t}function kk(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return vt(s)&&et(t)?t:s}function wk(n,e,t,i){let s;for(const l of e)if(s=O1(hk(l,n),t),Wn(s))return Ka(n,s)?Ja(t,i,n,s):s}function O1(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Wn(i))return i}}function Of(n){let e=n._keys;return e||(e=n._keys=Sk(n._scopes)),e}function Sk(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 D1(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 Ck(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=ta(l,s),a=ta(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const d=i*u,p=i*f;return{previous:{x:l.x-d*(o.x-s.x),y:l.y-d*(o.y-s.y)},next:{x:l.x+p*(o.x-s.x),y:l.y+p*(o.y-s.y)}}}function Tk(n,e,t){const i=n.length;let s,l,o,r,a,u=Ps(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")Ok(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Ak(n,e){return Jo(n).getPropertyValue(e)}const Ik=["top","right","bottom","left"];function ls(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Ik[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Pk=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Lk(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Pk(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 xi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Jo(t),l=s.boxSizing==="border-box",o=ls(s,"padding"),r=ls(s,"border","width"),{x:a,y:u,box:f}=Lk(n,t),d=o.left+(f&&r.left),p=o.top+(f&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((a-d)/m*t.width/i),y:Math.round((u-p)/_*t.height/i)}}function Nk(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Za(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Jo(l),a=ls(r,"border","width"),u=ls(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Ao(r.maxWidth,l,"clientWidth"),s=Ao(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||To,maxHeight:s||To}}const _r=n=>Math.round(n*10)/10;function Fk(n,e,t,i){const s=Jo(n),l=ls(s,"margin"),o=Ao(s.maxWidth,n,"clientWidth")||To,r=Ao(s.maxHeight,n,"clientHeight")||To,a=Nk(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const d=ls(s,"border","width"),p=ls(s,"padding");u-=p.width+d.width,f-=p.height+d.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=_r(Math.min(u,o,a.maxWidth)),f=_r(Math.min(f,r,a.maxHeight)),u&&!f&&(f=_r(u/2)),{width:u,height:f}}function Df(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 Rk=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 Ef(n,e){const t=Ak(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function es(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function qk(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 jk(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=es(n,s,t),r=es(s,l,t),a=es(l,e,t),u=es(o,r,t),f=es(r,a,t);return es(u,f,t)}const Af=new Map;function Vk(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Af.get(t);return i||(i=new Intl.NumberFormat(n,e),Af.set(t,i)),i}function Il(n,e,t){return Vk(e,t).format(n)}const Hk=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}}},zk=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function gr(n,e,t){return n?Hk(e,t):zk()}function Bk(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 Uk(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function I1(n){return n==="angle"?{between:gl,compare:M2,normalize:On}:{between:bl,compare:(e,t)=>e-t,normalize:e=>e}}function If({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 Wk(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=I1(i),a=e.length;let{start:u,end:f,loop:d}=n,p,m;if(d){for(u+=a,f+=a,p=0,m=a;pa(s,T,k)&&r(s,T)!==0,O=()=>r(l,k)===0||a(l,T,k),M=()=>g||C(),D=()=>!g||O();for(let I=f,L=f;I<=d;++I)$=e[I%o],!$.skip&&(k=u($[i]),k!==T&&(g=a(k,s,l),b===null&&M()&&(b=r(k,s)===0?I:L),b!==null&&D()&&(_.push(If({start:b,end:I,loop:p,count:o,style:m})),b=null),L=I,T=k));return b!==null&&_.push(If({start:b,end:d,loop:p,count:o,style:m})),_}function L1(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 Kk(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 Jk(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=Yk(t,s,l,i);if(i===!0)return Pf(n,[{start:o,end:r,loop:l}],t,e);const a=rMath.max(Math.min(n,t),e);function nl(n){return Ii(Al(n*2.55),0,255)}function Fi(n){return Ii(Al(n*255),0,255)}function gi(n){return Ii(Al(n/2.55)/100,0,1)}function wf(n){return Ii(Al(n*100),0,100)}const qn={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},na=[..."0123456789ABCDEF"],L2=n=>na[n&15],N2=n=>na[(n&240)>>4]+na[n&15],Wl=n=>(n&240)>>4===(n&15),F2=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function R2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&qn[n[1]]*17,g:255&qn[n[2]]*17,b:255&qn[n[3]]*17,a:e===5?qn[n[4]]*17:255}:(e===7||e===9)&&(t={r:qn[n[1]]<<4|qn[n[2]],g:qn[n[3]]<<4|qn[n[4]],b:qn[n[5]]<<4|qn[n[6]],a:e===9?qn[n[7]]<<4|qn[n[8]]:255})),t}const q2=(n,e)=>n<255?e(n):"";function j2(n){var e=F2(n)?L2:N2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+q2(n.a,e):void 0}const V2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y1(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 H2(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 z2(n,e,t){const i=y1(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 B2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=B2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function za(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Fi)}function Ba(n,e,t){return za(y1,n,e,t)}function U2(n,e,t){return za(z2,n,e,t)}function W2(n,e,t){return za(H2,n,e,t)}function k1(n){return(n%360+360)%360}function Y2(n){const e=V2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?nl(+e[5]):Fi(+e[5]));const s=k1(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=U2(s,l,o):e[1]==="hsv"?i=W2(s,l,o):i=Ba(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function K2(n,e){var t=Ha(n);t[0]=k1(t[0]+e),t=Ba(t),n.r=t[0],n.g=t[1],n.b=t[2]}function J2(n){if(!n)return;const e=Ha(n),t=e[0],i=wf(e[1]),s=wf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${gi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Sf={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"},$f={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 Z2(){const n={},e=Object.keys($f),t=Object.keys(Sf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Yl;function G2(n){Yl||(Yl=Z2(),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 X2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Q2(n){const e=X2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?nl(o):Ii(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?nl(i):Ii(i,0,255)),s=255&(e[4]?nl(s):Ii(s,0,255)),l=255&(e[6]?nl(l):Ii(l,0,255)),{r:i,g:s,b:l,a:t}}}function x2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${gi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const dr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,bs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function ek(n,e,t){const i=bs(gi(n.r)),s=bs(gi(n.g)),l=bs(gi(n.b));return{r:Fi(dr(i+t*(bs(gi(e.r))-i))),g:Fi(dr(s+t*(bs(gi(e.g))-s))),b:Fi(dr(l+t*(bs(gi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Kl(n,e,t){if(n){let i=Ha(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Ba(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function w1(n,e){return n&&Object.assign(e||{},n)}function Cf(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=Fi(n[3]))):(e=w1(n,{r:0,g:0,b:0,a:1}),e.a=Fi(e.a)),e}function tk(n){return n.charAt(0)==="r"?Q2(n):Y2(n)}class To{constructor(e){if(e instanceof To)return e;const t=typeof e;let i;t==="object"?i=Cf(e):t==="string"&&(i=R2(e)||G2(e)||tk(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=w1(this._rgb);return e&&(e.a=gi(e.a)),e}set rgb(e){this._rgb=Cf(e)}rgbString(){return this._valid?x2(this._rgb):void 0}hexString(){return this._valid?j2(this._rgb):void 0}hslString(){return this._valid?J2(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=ek(this._rgb,e._rgb,t)),this}clone(){return new To(this.rgb)}alpha(e){return this._rgb.a=Fi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Al(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 K2(this._rgb,e),this}}function S1(n){return new To(n)}function $1(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Tf(n){return $1(n)?n:S1(n)}function pr(n){return $1(n)?n:S1(n).saturate(.5).darken(.1).hexString()}const as=Object.create(null),ia=Object.create(null);function ul(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)=>pr(i.backgroundColor),this.hoverBorderColor=(t,i)=>pr(i.borderColor),this.hoverColor=(t,i)=>pr(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 mr(this,e,t)}get(e){return ul(this,e)}describe(e,t){return mr(ia,e,t)}override(e,t){return mr(as,e,t)}route(e,t,i,s){const l=ul(this,e),o=ul(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 et(a)?Object.assign({},u,a):st(a,u)},set(a){this[r]=a}}})}}var lt=new nk({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ik(n){return!n||ct(n.size)||ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Mo(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 sk(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,d,p;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function vl(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,ak(n,l),a=0;a+n||0;function Ya(n,e){const t={},i=et(e),s=i?Object.keys(e):e,l=et(n)?i?o=>st(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=pk(l(o));return t}function C1(n){return Ya(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Cs(n){return Ya(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Yn(n){const e=C1(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Dn(n,e){n=n||{},e=e||lt.font;let t=st(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=st(n.style,e.style);i&&!(""+i).match(ck)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:st(n.family,e.family),lineHeight:dk(st(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:st(n.weight,e.weight),string:""};return s.string=ik(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 Hi(n,e){return Object.assign(Object.create(n),e)}function Ka(n,e=[""],t=n,i,s=()=>n[0]){Wn(i)||(i=D1("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Ka([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 M1(o,r,()=>wk(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 Is(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:T1(n,i),setContext:l=>Is(n,l,t,i),override:l=>Is(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 M1(l,o,()=>_k(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 T1(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:ji(t)?t:()=>t,isIndexable:ji(i)?i:()=>i}}const hk=(n,e)=>n?n+qa(e):e,Ja=(n,e)=>et(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function M1(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function _k(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return ji(r)&&o.isScriptable(e)&&(r=gk(e,r,n,t)),kt(r)&&r.length&&(r=bk(e,r,n,o.isIndexable)),Ja(e,r)&&(r=Is(r,s,l&&l[e],o)),r}function gk(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),Ja(n,e)&&(e=Za(s._scopes,s,n,e)),e}function bk(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Wn(l.index)&&i(n))e=e[l.index%e.length];else if(et(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const d=Za(u,s,n,f);e.push(Is(d,l,o&&o[n],r))}}return e}function O1(n,e,t){return ji(n)?n(e,t):n}const vk=(n,e)=>n===!0?e:typeof n=="string"?qi(e,n):void 0;function yk(n,e,t,i,s){for(const l of e){const o=vk(t,l);if(o){n.add(o);const r=O1(o._fallback,t,s);if(Wn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Wn(i)&&t!==i)return null}return!1}function Za(n,e,t,i){const s=e._rootScopes,l=O1(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=Of(r,o,t,l||t,i);return a===null||Wn(l)&&l!==t&&(a=Of(r,o,l,a,i),a===null)?!1:Ka(Array.from(r),[""],s,l,()=>kk(e,t,i))}function Of(n,e,t,i,s){for(;t;)t=yk(n,e,t,i,s);return t}function kk(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return kt(s)&&et(t)?t:s}function wk(n,e,t,i){let s;for(const l of e)if(s=D1(hk(l,n),t),Wn(s))return Ja(n,s)?Za(t,i,n,s):s}function D1(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Wn(i))return i}}function Df(n){let e=n._keys;return e||(e=n._keys=Sk(n._scopes)),e}function Sk(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 E1(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 Ck(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=ta(l,s),a=ta(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const d=i*u,p=i*f;return{previous:{x:l.x-d*(o.x-s.x),y:l.y-d*(o.y-s.y)},next:{x:l.x+p*(o.x-s.x),y:l.y+p*(o.y-s.y)}}}function Tk(n,e,t){const i=n.length;let s,l,o,r,a,u=Ps(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")Ok(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Ak(n,e){return Ko(n).getPropertyValue(e)}const Ik=["top","right","bottom","left"];function ls(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Ik[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Pk=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Lk(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Pk(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 xi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Ko(t),l=s.boxSizing==="border-box",o=ls(s,"padding"),r=ls(s,"border","width"),{x:a,y:u,box:f}=Lk(n,t),d=o.left+(f&&r.left),p=o.top+(f&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((a-d)/m*t.width/i),y:Math.round((u-p)/_*t.height/i)}}function Nk(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Ga(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Ko(l),a=ls(r,"border","width"),u=ls(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Eo(r.maxWidth,l,"clientWidth"),s=Eo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||Co,maxHeight:s||Co}}const hr=n=>Math.round(n*10)/10;function Fk(n,e,t,i){const s=Ko(n),l=ls(s,"margin"),o=Eo(s.maxWidth,n,"clientWidth")||Co,r=Eo(s.maxHeight,n,"clientHeight")||Co,a=Nk(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const d=ls(s,"border","width"),p=ls(s,"padding");u-=p.width+d.width,f-=p.height+d.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=hr(Math.min(u,o,a.maxWidth)),f=hr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=hr(u/2)),{width:u,height:f}}function Ef(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 Rk=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 Af(n,e){const t=Ak(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function es(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function qk(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 jk(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=es(n,s,t),r=es(s,l,t),a=es(l,e,t),u=es(o,r,t),f=es(r,a,t);return es(u,f,t)}const If=new Map;function Vk(n,e){e=e||{};const t=n+JSON.stringify(e);let i=If.get(t);return i||(i=new Intl.NumberFormat(n,e),If.set(t,i)),i}function Il(n,e,t){return Vk(e,t).format(n)}const Hk=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}}},zk=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function _r(n,e,t){return n?Hk(e,t):zk()}function Bk(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 Uk(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function P1(n){return n==="angle"?{between:gl,compare:M2,normalize:On}:{between:bl,compare:(e,t)=>e-t,normalize:e=>e}}function Pf({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 Wk(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=P1(i),a=e.length;let{start:u,end:f,loop:d}=n,p,m;if(d){for(u+=a,f+=a,p=0,m=a;pa(s,T,k)&&r(s,T)!==0,D=()=>r(l,k)===0||a(l,T,k),M=()=>g||C(),O=()=>!g||D();for(let I=f,L=f;I<=d;++I)$=e[I%o],!$.skip&&(k=u($[i]),k!==T&&(g=a(k,s,l),b===null&&M()&&(b=r(k,s)===0?I:L),b!==null&&O()&&(_.push(Pf({start:b,end:I,loop:p,count:o,style:m})),b=null),L=I,T=k));return b!==null&&_.push(Pf({start:b,end:d,loop:p,count:o,style:m})),_}function N1(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 Kk(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 Jk(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=Yk(t,s,l,i);if(i===!0)return Lf(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=h1.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 hi=new Xk;const Nf="transparent",Qk={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Cf(n||Nf),s=i.valid&&Cf(e||Nf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class xk{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||Qk[e.type||typeof o],this._easing=al[e.easing]||al.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"});lt.set("animations",{colors:{type:"color",properties:tw},numbers:{type:"number",properties:ew}});lt.describe("animations",{_fallback:"animation"});lt.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 N1{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!et(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!et(s))return;const l={};for(const o of nw)l[o]=s[o];(vt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=sw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&iw(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 d=l[u];const p=i.get(u);if(d)if(p&&d.active()){d.update(p,f,r);continue}else d.cancel();if(!p||!p.duration){e[u]=f;continue}l[u]=d=new xk(p,e,u,f),s.push(d)}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 hi.add(this._chart,i),!0}}function iw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Vf(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=aw(l,o,i),d=e.length;let p;for(let m=0;mt[i].axis===e).shift()}function cw(n,e){return Hi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function dw(n,e,t){return Hi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Js(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 vr=n=>n==="reset"||n==="none",Hf=(n,e)=>e?n:Object.assign({},n),pw=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:F1(t,!0),values:null};class ei{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=qf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Js(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(d,p,m,_)=>d==="x"?p:d==="r"?_:m,l=t.xAxisID=st(i.xAxisID,br(e,"x")),o=t.yAxisID=st(i.yAxisID,br(e,"y")),r=t.rAxisID=st(i.rAxisID,br(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&&gf(this._data,this),e._stacked&&Js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(et(t))this._data=rw(t);else if(i!==t){if(i){gf(i,this);const s=this._cachedMeta;Js(s),s._parsed=[]}t&&Object.isExtensible(t)&&A2(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=qf(t.vScale,t),t.stack!==i.stack&&(s=!0,Js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Vf(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,d,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{vt(s[e])?p=this.parseArrayData(i,s,e,t):et(s[e])?p=this.parseObjectData(i,s,e,t):p=this.parsePrimitiveData(i,s,e,t);const m=()=>d[r]===null||u&&d[r]g||d=0;--p)if(!_()){this.updateRangeFromParsed(u,e,m,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(p,m,_,d);return g.$shared&&(g.$shared=a,l[o]=Object.freeze(Hf(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,d=f.datasetAnimationScopeKeys(this._type,t),p=f.getOptionScopes(this.getDataset(),d);a=f.createResolver(p,this.getContext(e,i,t))}const u=new N1(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||vr(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){vr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!vr(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 hw(n){const e=n.iScale,t=mw(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Wn(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 R1(n,e,t,i){return vt(n)?bw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function zf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,d,p;for(u=t,f=t+i;u=t?1:-1)}function yw(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(ct(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,d=r.axis;for(let p=t;pgl(T,r,a,!0)?1:Math.max(C,C*t,O,O*t),_=(T,C,O)=>gl(T,r,a,!0)?-1:Math.min(C,C*t,O,O*t),g=m(0,u,d),b=m(Pt,f,p),k=_(Ft,u,d),$=_(Ft+Pt,f,p);i=(g-k)/2,s=(b-$)/2,l=-(g+k)/2,o=-(b+$)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Pl extends ei{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(et(i[e])){const{key:a="value"}=this._parsing;l=u=>+qi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?_t*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Il(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"};Pl.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 vt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Zo extends ei{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}=g1(t,s,o);this._drawStart=r,this._drawCount=a,b1(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:d}=this._getSharedOptions(t,s),p=o.axis,m=r.axis,{spanGaps:_,segment:g}=this.options,b=As(_)?_:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||s==="none";let $=t>0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(O[p]-$[p])>b,g&&(M.parsed=O,M.raw=u.data[T]),d&&(M.options=f||this.resolveDataElementOptions(T,C.active?"active":s)),k||this.updateElement(C,T,M,s),$=O}}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()}}Zo.id="line";Zo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Zo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Qa extends ei{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=Il(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return D1.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,d=u.yCenter,p=u.getIndexAngle(0)-.5*Ft;let m=p,_;const g=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Qn(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 q1 extends Pl{}q1.id="pie";q1.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class xa extends ei{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 D1.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}};Ti.defaults={};Ti.defaultRoutes=void 0;const j1={values(n){return vt(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=Cw(n,t)}const o=Bn(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),Il(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Bn(n)));return i===1||i===2||i===5?j1.numeric.call(this,n,e,t):""}};function Cw(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 Go={formatters:j1};lt.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:Go.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});lt.route("scale.ticks","color","","color");lt.route("scale.grid","color","","borderColor");lt.route("scale.grid","borderColor","","borderColor");lt.route("scale.title","color","","color");lt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});lt.describe("scales",{_fallback:"scale"});lt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function Tw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Mw(n),s=t.major.enabled?Dw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Ew(e,a,s,l/i),a;const u=Ow(s,e,i);if(l>0){let f,d;const p=l>1?Math.round((r-o)/(l-1)):null;for(Gl(e,a,u,ct(p)?0:o-p,o),f=0,d=l-1;fs)return a}return Math.max(s,1)}function Dw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Wf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Yf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Lw(n,e){pt(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:jn(t,jn(i,t)),max:jn(i,jn(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(){It(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=mk(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(),d=f.widest.width,p=f.highest.height,m=on(this.chart.width-d,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),d+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Zs(e.grid)-t.padding-Kf(e.title,this.chart.options.font),u=Math.sqrt(d*d+p*p),o=qa(Math.min(Math.asin(on((f.highest.height+6)/r,-1,1)),Math.asin(on(a/u,-1,1))-Math.asin(on(p/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){It(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){It(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=Kf(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:d,highest:p}=this._getLabelSizes(),m=i.padding*2,_=Qn(this.labelRotation),g=Math.cos(_),b=Math.sin(_);if(r){const k=i.mirror?0:b*d.width+g*p.height;e.height=Math.min(this.maxHeight,e.height+k+m)}else{const k=i.mirror?0:g*d.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+k+m)}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,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;a?u?(p=s*e.width,m=i*t.height):(p=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?p=e.width:l!=="inner"&&(p=e.width/2,m=t.width/2),this.paddingLeft=Math.max((p-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-d+o)*this.width/(this.width-d),0)}else{let f=t.height/2,d=e.height/2;l==="start"?(f=0,d=e.height):l==="end"&&(f=t.height,d=0),this.paddingTop=f+o,this.paddingBottom=d+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(){It(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:M(0),last:M(t-1),widest:M(C),highest:M(O),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 O2(this._alignToPixels?Zi(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),d=Zs(l),p=[],m=l.setContext(this.getContext()),_=m.drawBorder?m.borderWidth:0,g=_/2,b=function(V){return Zi(i,V,_)};let k,$,T,C,O,M,D,I,L,F,q,N;if(o==="top")k=b(this.bottom),M=this.bottom-d,I=k-g,F=b(e.top)+g,N=e.bottom;else if(o==="bottom")k=b(this.top),F=e.top,N=b(e.bottom)-g,M=k+g,I=this.top+d;else if(o==="left")k=b(this.right),O=this.right-d,D=k-g,L=b(e.left)+g,q=e.right;else if(o==="right")k=b(this.left),L=e.left,q=b(e.right)-g,O=k+g,D=this.left+d;else if(t==="x"){if(o==="center")k=b((e.top+e.bottom)/2+.5);else if(et(o)){const V=Object.keys(o)[0],K=o[V];k=b(this.chart.scales[V].getPixelForValue(K))}F=e.top,N=e.bottom,M=k+g,I=M+d}else if(t==="y"){if(o==="center")k=b((e.left+e.right)/2);else if(et(o)){const V=Object.keys(o)[0],K=o[V];k=b(this.chart.scales[V].getPixelForValue(K))}O=k-g,D=O-d,L=e.left,q=e.right}const R=st(s.ticks.maxTicksLimit,f),j=Math.max(1,Math.ceil(f/R));for($=0;$l.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(".");lt.route(l,s,a,r)})}function Hw(n){return"id"in n&&"defaults"in n}class zw{constructor(){this.controllers=new Xl(ei,"datasets",!0),this.elements=new Xl(Ti,"elements"),this.plugins=new Xl(Object,"plugins"),this.scales=new Xl(cs,"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):pt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Ra(e);It(i["before"+s],[],i),t[e](i),It(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(M[m]-T[m])>k,b&&(D.parsed=M,D.raw=u.data[C]),p&&(D.options=d||this.resolveDataElementOptions(C,O.active?"active":s)),$||this.updateElement(O,C,D,s),T=M}this.updateSharedOptions(d,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}}eu.id="scatter";eu.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};eu.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Gi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class la{constructor(e){this.options=e||{}}init(e){}formats(){return Gi()}parse(e,t){return Gi()}format(e,t){return Gi()}add(e,t,i){return Gi()}diff(e,t,i){return Gi()}startOf(e,t,i){return Gi()}endOf(e,t){return Gi()}}la.override=function(n){Object.assign(la.prototype,n)};var V1={_date:la};function Bw(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?D2:ns;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const d=a(l,e,t-f),p=a(l,e,t+f);return{lo:d.lo,hi:p.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Ll(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 Kw={evaluateInteractionItems:Ll,modes:{index(n,e,t,i){const s=xi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?kr(n,s,l,i,o):wr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,d=u.data[f];d&&!d.skip&&a.push({element:d,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=xi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?kr(n,s,l,i,o):wr(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 Zf(n,e){return n.filter(t=>H1.indexOf(t.pos)===-1&&t.box.axis===e)}function Xs(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 Jw(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Xs(Gs(e,"left"),!0),s=Xs(Gs(e,"right")),l=Xs(Gs(e,"top"),!0),o=Xs(Gs(e,"bottom")),r=Zf(e,"x"),a=Zf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Gs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Gf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function z1(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 Qw(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!et(s)){t.size&&(n[s]-=t.size);const d=i[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?l.height:l.width),t.size=d.size/d.count,n[s]+=t.size}l.getPadding&&z1(o,l.getPadding());const r=Math.max(0,e.outerWidth-Gf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Gf(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 xw(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 e3(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 il(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,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),p=Object.assign({},s);z1(p,Yn(i));const m=Object.assign({maxPadding:p,w:l,h:o,x:s.left,y:s.top},s),_=Gw(a.concat(u),d);il(r.fullSize,m,d,_),il(a,m,d,_),il(u,m,d,_)&&il(a,m,d,_),xw(m),Xf(r.leftAndTop,m,d,_),m.x+=m.w,m.y+=m.h,Xf(r.rightAndBottom,m,d,_),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},pt(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class B1{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 t3 extends B1{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const fo="$chartjs",n3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Qf=n=>n===null||n==="";function i3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[fo]={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",Qf(s)){const l=Ef(n,"width");l!==void 0&&(n.width=l)}if(Qf(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Ef(n,"height");l!==void 0&&(n.height=l)}return n}const U1=Rk?{passive:!0}:!1;function s3(n,e,t){n.addEventListener(e,t,U1)}function l3(n,e,t){n.canvas.removeEventListener(e,t,U1)}function o3(n,e){const t=n3[n.type]||n.type,{x:i,y:s}=xi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Io(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function r3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Io(r.addedNodes,i),o=o&&!Io(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function a3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Io(r.removedNodes,i),o=o&&!Io(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const yl=new Map;let xf=0;function W1(){const n=window.devicePixelRatio;n!==xf&&(xf=n,yl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function u3(n,e){yl.size||window.addEventListener("resize",W1),yl.set(n,e)}function f3(n){yl.delete(n),yl.size||window.removeEventListener("resize",W1)}function c3(n,e,t){const i=n.canvas,s=i&&Za(i);if(!s)return;const l=_1((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),u3(n,l),o}function Sr(n,e,t){t&&t.disconnect(),e==="resize"&&f3(n)}function d3(n,e,t){const i=n.canvas,s=_1(l=>{n.ctx!==null&&t(o3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return s3(i,e,s),s}class p3 extends B1{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(i3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[fo])return!1;const i=t[fo].initial;["height","width"].forEach(l=>{const o=i[l];ct(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[fo],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:r3,detach:a3,resize:c3}[t]||d3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:Sr,detach:Sr,resize:Sr}[t]||l3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Fk(e,t,i,s)}isAttached(e){const t=Za(e);return!!(t&&t.isConnected)}}function m3(n){return!A1()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?t3:p3}class h3{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(It(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ct(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=st(i.options&&i.options.plugins,{}),l=_3(i);return s===!1&&!t?[]:b3(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 _3(n){const e={},t=[],i=Object.keys(oi.plugins.items);for(let l=0;l{const a=i[r];if(!et(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=ra(r,a),f=k3(u,s),d=t.scales||{};l[u]=l[u]||r,o[r]=ol(Object.create(null),[{axis:u},a,d[u],d[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||oa(a,e),d=(as[a]||{}).scales||{};Object.keys(d).forEach(p=>{const m=y3(p,u),_=r[m+"AxisID"]||l[m]||m;o[_]=o[_]||Object.create(null),ol(o[_],[{axis:m},i[_],d[p]])})}),Object.keys(o).forEach(r=>{const a=o[r];ol(a,[lt.scales[a.type],lt.scale])}),o}function Y1(n){const e=n.options||(n.options={});e.plugins=st(e.plugins,{}),e.scales=S3(n,e)}function K1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function $3(n){return n=n||{},n.data=K1(n.data),Y1(n),n}const ec=new Map,J1=new Set;function eo(n,e){let t=ec.get(n);return t||(t=e(),ec.set(n,t),J1.add(t)),t}const Qs=(n,e,t)=>{const i=qi(e,t);i!==void 0&&n.add(i)};class C3{constructor(e){this._config=$3(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=K1(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(),Y1(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(d=>Qs(a,e,d))),f.forEach(d=>Qs(a,s,d)),f.forEach(d=>Qs(a,as[l]||{},d)),f.forEach(d=>Qs(a,lt,d)),f.forEach(d=>Qs(a,ia,d))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),J1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,as[t]||{},lt.datasets[t]||{},{type:t},lt,ia]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=tc(this._resolverCache,e,s);let a=o;if(M3(o,t)){l.$shared=!1,i=ji(i)?i():i;const u=this.createResolver(e,i,r);a=Is(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=tc(this._resolverCache,e,i);return et(t)?Is(l,t,void 0,s):l}}function tc(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:Ya(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const T3=n=>et(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||ji(n[t]),!1);function M3(n,e){const{isScriptable:t,isIndexable:i}=C1(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(ji(r)||T3(r))||o&&vt(r))return!0}return!1}var O3="3.9.1";const D3=["top","bottom","left","right","chartArea"];function nc(n,e){return n==="top"||n==="bottom"||D3.indexOf(n)===-1&&e==="x"}function ic(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function sc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),It(t&&t.onComplete,[n],e)}function E3(n){const e=n.chart,t=e.options.animation;It(t&&t.onProgress,[n],e)}function Z1(n){return A1()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Po={},G1=n=>{const e=Z1(n);return Object.values(Po).filter(t=>t.canvas===e).pop()};function A3(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 I3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Lo{constructor(e,t){const i=this.config=new C3(t),s=Z1(e),l=G1(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||m3(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=_2(),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 h3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=I2(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Po[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}hi.listen(this,"complete",sc),hi.listen(this,"progress",E3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return ct(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():Df(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Tf(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(e,t){hi.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,Df(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),It(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};pt(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=ra(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),pt(l,o=>{const r=o.options,a=r.id,u=ra(a,r),f=st(r.type,o.dtype);(r.position===void 0||nc(r.position,u)!==nc(o.dposition))&&(r.position=o.dposition),s[a]=!0;let d=null;if(a in i&&i[a].type===f)d=i[a];else{const p=oi.getScale(f);d=new p({id:a,type:f,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(r,e)}),pt(s,(o,r)=>{o||delete i[r]}),pt(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(ic("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){pt(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);(!pf(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;A3(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=[],pt(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&&Ba(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&&Ua(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return vl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=Kw.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=Hi(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);Wn(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(),hi.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)};pt(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(){pt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},pt(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}});!$o(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(d=>f.datasetIndex===d.datasetIndex&&f.index===d.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=w2(e),u=I3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,It(l.onHover,[e,r,this],this),a&&It(l.onClick,[e,r,this],this));const f=!$o(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 lc=()=>pt(Lo.instances,n=>n._plugins.invalidate()),Di=!0;Object.defineProperties(Lo,{defaults:{enumerable:Di,value:lt},instances:{enumerable:Di,value:Po},overrides:{enumerable:Di,value:as},registry:{enumerable:Di,value:oi},version:{enumerable:Di,value:O3},getChart:{enumerable:Di,value:G1},register:{enumerable:Di,value:(...n)=>{oi.add(...n),lc()}},unregister:{enumerable:Di,value:(...n)=>{oi.remove(...n),lc()}}});function X1(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+Pt,i-Pt),n.closePath(),n.clip()}function P3(n){return Wa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function L3(n,e,t,i){const s=P3(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 on(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:on(s.innerStart,0,o),innerEnd:on(s.innerEnd,0,o)}}function vs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function aa(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,d=Math.max(e.outerRadius+i+t-u,0),p=f>0?f+i+t+u:0;let m=0;const _=s-a;if(i){const V=f>0?f-i:0,K=d>0?d-i:0,ee=(V+K)/2,te=ee!==0?_*ee/(ee+i):_;m=(_-te)/2}const g=Math.max(.001,_*d-t/Ft)/d,b=(_-g)/2,k=a+b+m,$=s-b-m,{outerStart:T,outerEnd:C,innerStart:O,innerEnd:M}=L3(e,p,d,$-k),D=d-T,I=d-C,L=k+T/D,F=$-C/I,q=p+O,N=p+M,R=k+O/q,j=$-M/N;if(n.beginPath(),l){if(n.arc(o,r,d,L,F),C>0){const ee=vs(I,F,o,r);n.arc(ee.x,ee.y,C,F,$+Pt)}const V=vs(N,$,o,r);if(n.lineTo(V.x,V.y),M>0){const ee=vs(N,j,o,r);n.arc(ee.x,ee.y,M,$+Pt,j+Math.PI)}if(n.arc(o,r,p,$-M/p,k+O/p,!0),O>0){const ee=vs(q,R,o,r);n.arc(ee.x,ee.y,O,R+Math.PI,k-Pt)}const K=vs(D,k,o,r);if(n.lineTo(K.x,K.y),T>0){const ee=vs(D,L,o,r);n.arc(ee.x,ee.y,T,k-Pt,L)}}else{n.moveTo(o,r);const V=Math.cos(L)*d+o,K=Math.sin(L)*d+r;n.lineTo(V,K);const ee=Math.cos(F)*d+o,te=Math.sin(F)*d+r;n.lineTo(ee,te)}n.closePath()}function N3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){aa(n,e,t,i,o+_t,s);for(let u=0;u=_t||gl(l,r,a),g=bl(o,u+p,f+p);return _&&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,d=(o+r+u+a)/2;return{x:t+Math.cos(f)*d,y:i+Math.sin(f)*d}}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>_t?Math.floor(i/_t):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>=Ft&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=N3(e,this,r,l,o);R3(e,this,r,l,a,o),e.restore()}}tu.id="arc";tu.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};tu.defaultRoutes={backgroundColor:"backgroundColor"};function Q1(n,e,t=e){n.lineCap=st(t.borderCapStyle,e.borderCapStyle),n.setLineDash(st(t.borderDash,e.borderDash)),n.lineDashOffset=st(t.borderDashOffset,e.borderDashOffset),n.lineJoin=st(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=st(t.borderWidth,e.borderWidth),n.strokeStyle=st(t.borderColor,e.borderColor)}function q3(n,e,t){n.lineTo(t.x,t.y)}function j3(n){return n.stepped?ok:n.tension||n.cubicInterpolationMode==="monotone"?rk:q3}function x1(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,T=()=>{g!==b&&(n.lineTo(f,b),n.lineTo(f,g),n.lineTo(f,k))};for(a&&(m=s[$(0)],n.moveTo(m.x,m.y)),p=0;p<=r;++p){if(m=s[$(p)],m.skip)continue;const C=m.x,O=m.y,M=C|0;M===_?(Ob&&(b=O),f=(d*f+C)/++d):(T(),n.lineTo(C,O),_=M,d=0,g=b=O),k=O}T()}function ua(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?H3:V3}function z3(n){return n.stepped?qk:n.tension||n.cubicInterpolationMode==="monotone"?jk:es}function B3(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),Q1(n,e.options),n.stroke(s)}function U3(n,e,t,i){const{segments:s,options:l}=e,o=ua(e);for(const r of s)Q1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const W3=typeof Path2D=="function";function Y3(n,e,t,i){W3&&!e.options.segment?B3(n,e,t,i):U3(n,e,t,i)}class zi extends Ti{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;Ek(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=Jk(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=L1(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=z3(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function oc(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=iu(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 iu(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function rc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function tb(n,e){let t=[],i=!1;return vt(n)?(i=!0,t=n):t=x3(n,e),t.length?new zi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function ac(n){return n&&n.fill!==!1}function eS(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(!jt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function tS(n,e,t){const i=lS(n);if(et(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return jt(s)&&Math.floor(s)===s?nS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function nS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function iS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:et(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function sS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:et(n)?i=n.value:i=e.getBaseValue(),i}function lS(n){const e=n.options,t=e.fill;let i=st(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function oS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=rS(e,t);r.push(tb({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&&Tr(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;ac(l)&&Tr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!ac(i)||t.drawTime!=="beforeDatasetDraw"||Tr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const fl={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=_1.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 hi=new Xk;const Ff="transparent",Qk={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Tf(n||Ff),s=i.valid&&Tf(e||Ff);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class xk{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||Qk[e.type||typeof o],this._easing=al[e.easing]||al.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"});lt.set("animations",{colors:{type:"color",properties:tw},numbers:{type:"number",properties:ew}});lt.describe("animations",{_fallback:"animation"});lt.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 F1{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!et(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!et(s))return;const l={};for(const o of nw)l[o]=s[o];(kt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=sw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&iw(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 d=l[u];const p=i.get(u);if(d)if(p&&d.active()){d.update(p,f,r);continue}else d.cancel();if(!p||!p.duration){e[u]=f;continue}l[u]=d=new xk(p,e,u,f),s.push(d)}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 hi.add(this._chart,i),!0}}function iw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Hf(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=aw(l,o,i),d=e.length;let p;for(let m=0;mt[i].axis===e).shift()}function cw(n,e){return Hi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function dw(n,e,t){return Hi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Js(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 br=n=>n==="reset"||n==="none",zf=(n,e)=>e?n:Object.assign({},n),pw=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:R1(t,!0),values:null};class ei{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=jf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Js(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(d,p,m,_)=>d==="x"?p:d==="r"?_:m,l=t.xAxisID=st(i.xAxisID,gr(e,"x")),o=t.yAxisID=st(i.yAxisID,gr(e,"y")),r=t.rAxisID=st(i.rAxisID,gr(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&&bf(this._data,this),e._stacked&&Js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(et(t))this._data=rw(t);else if(i!==t){if(i){bf(i,this);const s=this._cachedMeta;Js(s),s._parsed=[]}t&&Object.isExtensible(t)&&A2(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=jf(t.vScale,t),t.stack!==i.stack&&(s=!0,Js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Hf(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,d,p;if(this._parsing===!1)i._parsed=s,i._sorted=!0,p=s;else{kt(s[e])?p=this.parseArrayData(i,s,e,t):et(s[e])?p=this.parseObjectData(i,s,e,t):p=this.parsePrimitiveData(i,s,e,t);const m=()=>d[r]===null||u&&d[r]g||d=0;--p)if(!_()){this.updateRangeFromParsed(u,e,m,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(p,m,_,d);return g.$shared&&(g.$shared=a,l[o]=Object.freeze(zf(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,d=f.datasetAnimationScopeKeys(this._type,t),p=f.getOptionScopes(this.getDataset(),d);a=f.createResolver(p,this.getContext(e,i,t))}const u=new F1(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||br(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){br(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!br(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 hw(n){const e=n.iScale,t=mw(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Wn(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 q1(n,e,t,i){return kt(n)?bw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Bf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,d,p;for(u=t,f=t+i;u=t?1:-1)}function yw(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(ct(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,d=r.axis;for(let p=t;pgl(T,r,a,!0)?1:Math.max(C,C*t,D,D*t),_=(T,C,D)=>gl(T,r,a,!0)?-1:Math.min(C,C*t,D,D*t),g=m(0,u,d),b=m(Pt,f,p),k=_(Ft,u,d),$=_(Ft+Pt,f,p);i=(g-k)/2,s=(b-$)/2,l=-(g+k)/2,o=-(b+$)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Pl extends ei{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(et(i[e])){const{key:a="value"}=this._parsing;l=u=>+qi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?_t*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Il(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"};Pl.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 kt(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Jo extends ei{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}=b1(t,s,o);this._drawStart=r,this._drawCount=a,v1(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:d}=this._getSharedOptions(t,s),p=o.axis,m=r.axis,{spanGaps:_,segment:g}=this.options,b=As(_)?_:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||s==="none";let $=t>0&&this.getParsed(t-1);for(let T=t;T0&&Math.abs(D[p]-$[p])>b,g&&(M.parsed=D,M.raw=u.data[T]),d&&(M.options=f||this.resolveDataElementOptions(T,C.active?"active":s)),k||this.updateElement(C,T,M,s),$=D}}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()}}Jo.id="line";Jo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Jo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class xa extends ei{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=Il(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return E1.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,d=u.yCenter,p=u.getIndexAngle(0)-.5*Ft;let m=p,_;const g=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Qn(this.resolveDataElementOptions(e,t).angle||i):0}}xa.id="polarArea";xa.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};xa.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 j1 extends Pl{}j1.id="pie";j1.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class eu extends ei{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 E1.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}};Ti.defaults={};Ti.defaultRoutes=void 0;const V1={values(n){return kt(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=Cw(n,t)}const o=Bn(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),Il(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Bn(n)));return i===1||i===2||i===5?V1.numeric.call(this,n,e,t):""}};function Cw(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 Zo={formatters:V1};lt.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:Zo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});lt.route("scale.ticks","color","","color");lt.route("scale.grid","color","","borderColor");lt.route("scale.grid","borderColor","","borderColor");lt.route("scale.title","color","","color");lt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});lt.describe("scales",{_fallback:"scale"});lt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function Tw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Mw(n),s=t.major.enabled?Dw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Ew(e,a,s,l/i),a;const u=Ow(s,e,i);if(l>0){let f,d;const p=l>1?Math.round((r-o)/(l-1)):null;for(Gl(e,a,u,ct(p)?0:o-p,o),f=0,d=l-1;fs)return a}return Math.max(s,1)}function Dw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Yf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Kf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Lw(n,e){dt(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:jn(t,jn(i,t)),max:jn(i,jn(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(){It(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=mk(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(),d=f.widest.width,p=f.highest.height,m=on(this.chart.width-d,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),d+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Zs(e.grid)-t.padding-Jf(e.title,this.chart.options.font),u=Math.sqrt(d*d+p*p),o=ja(Math.min(Math.asin(on((f.highest.height+6)/r,-1,1)),Math.asin(on(a/u,-1,1))-Math.asin(on(p/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){It(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){It(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=Jf(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:d,highest:p}=this._getLabelSizes(),m=i.padding*2,_=Qn(this.labelRotation),g=Math.cos(_),b=Math.sin(_);if(r){const k=i.mirror?0:b*d.width+g*p.height;e.height=Math.min(this.maxHeight,e.height+k+m)}else{const k=i.mirror?0:g*d.width+b*p.height;e.width=Math.min(this.maxWidth,e.width+k+m)}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,d=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;a?u?(p=s*e.width,m=i*t.height):(p=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?p=e.width:l!=="inner"&&(p=e.width/2,m=t.width/2),this.paddingLeft=Math.max((p-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-d+o)*this.width/(this.width-d),0)}else{let f=t.height/2,d=e.height/2;l==="start"?(f=0,d=e.height):l==="end"&&(f=t.height,d=0),this.paddingTop=f+o,this.paddingBottom=d+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(){It(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[O]||0,height:o[O]||0});return{first:M(0),last:M(t-1),widest:M(C),highest:M(D),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 O2(this._alignToPixels?Zi(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),d=Zs(l),p=[],m=l.setContext(this.getContext()),_=m.drawBorder?m.borderWidth:0,g=_/2,b=function(V){return Zi(i,V,_)};let k,$,T,C,D,M,O,I,L,F,q,N;if(o==="top")k=b(this.bottom),M=this.bottom-d,I=k-g,F=b(e.top)+g,N=e.bottom;else if(o==="bottom")k=b(this.top),F=e.top,N=b(e.bottom)-g,M=k+g,I=this.top+d;else if(o==="left")k=b(this.right),D=this.right-d,O=k-g,L=b(e.left)+g,q=e.right;else if(o==="right")k=b(this.left),L=e.left,q=b(e.right)-g,D=k+g,O=this.left+d;else if(t==="x"){if(o==="center")k=b((e.top+e.bottom)/2+.5);else if(et(o)){const V=Object.keys(o)[0],K=o[V];k=b(this.chart.scales[V].getPixelForValue(K))}F=e.top,N=e.bottom,M=k+g,I=M+d}else if(t==="y"){if(o==="center")k=b((e.left+e.right)/2);else if(et(o)){const V=Object.keys(o)[0],K=o[V];k=b(this.chart.scales[V].getPixelForValue(K))}D=k-g,O=D-d,L=e.left,q=e.right}const R=st(s.ticks.maxTicksLimit,f),j=Math.max(1,Math.ceil(f/R));for($=0;$l.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(".");lt.route(l,s,a,r)})}function Hw(n){return"id"in n&&"defaults"in n}class zw{constructor(){this.controllers=new Xl(ei,"datasets",!0),this.elements=new Xl(Ti,"elements"),this.plugins=new Xl(Object,"plugins"),this.scales=new Xl(cs,"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):dt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=qa(e);It(i["before"+s],[],i),t[e](i),It(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(M[m]-T[m])>k,b&&(O.parsed=M,O.raw=u.data[C]),p&&(O.options=d||this.resolveDataElementOptions(C,D.active?"active":s)),$||this.updateElement(D,C,O,s),T=M}this.updateSharedOptions(d,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}}tu.id="scatter";tu.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};tu.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Gi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class la{constructor(e){this.options=e||{}}init(e){}formats(){return Gi()}parse(e,t){return Gi()}format(e,t){return Gi()}add(e,t,i){return Gi()}diff(e,t,i){return Gi()}startOf(e,t,i){return Gi()}endOf(e,t){return Gi()}}la.override=function(n){Object.assign(la.prototype,n)};var H1={_date:la};function Bw(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?D2:ns;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const d=a(l,e,t-f),p=a(l,e,t+f);return{lo:d.lo,hi:p.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Ll(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 Kw={evaluateInteractionItems:Ll,modes:{index(n,e,t,i){const s=xi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?yr(n,s,l,i,o):kr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,d=u.data[f];d&&!d.skip&&a.push({element:d,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=xi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?yr(n,s,l,i,o):kr(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 Gf(n,e){return n.filter(t=>z1.indexOf(t.pos)===-1&&t.box.axis===e)}function Xs(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 Jw(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Xs(Gs(e,"left"),!0),s=Xs(Gs(e,"right")),l=Xs(Gs(e,"top"),!0),o=Xs(Gs(e,"bottom")),r=Gf(e,"x"),a=Gf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Gs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Xf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function B1(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 Qw(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!et(s)){t.size&&(n[s]-=t.size);const d=i[t.stack]||{size:0,count:1};d.size=Math.max(d.size,t.horizontal?l.height:l.width),t.size=d.size/d.count,n[s]+=t.size}l.getPadding&&B1(o,l.getPadding());const r=Math.max(0,e.outerWidth-Xf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Xf(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 xw(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 e3(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 il(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,d=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),p=Object.assign({},s);B1(p,Yn(i));const m=Object.assign({maxPadding:p,w:l,h:o,x:s.left,y:s.top},s),_=Gw(a.concat(u),d);il(r.fullSize,m,d,_),il(a,m,d,_),il(u,m,d,_)&&il(a,m,d,_),xw(m),Qf(r.leftAndTop,m,d,_),m.x+=m.w,m.y+=m.h,Qf(r.rightAndBottom,m,d,_),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},dt(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class U1{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 t3 extends U1{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const fo="$chartjs",n3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},xf=n=>n===null||n==="";function i3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[fo]={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",xf(s)){const l=Af(n,"width");l!==void 0&&(n.width=l)}if(xf(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Af(n,"height");l!==void 0&&(n.height=l)}return n}const W1=Rk?{passive:!0}:!1;function s3(n,e,t){n.addEventListener(e,t,W1)}function l3(n,e,t){n.canvas.removeEventListener(e,t,W1)}function o3(n,e){const t=n3[n.type]||n.type,{x:i,y:s}=xi(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 r3(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 a3(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 yl=new Map;let ec=0;function Y1(){const n=window.devicePixelRatio;n!==ec&&(ec=n,yl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function u3(n,e){yl.size||window.addEventListener("resize",Y1),yl.set(n,e)}function f3(n){yl.delete(n),yl.size||window.removeEventListener("resize",Y1)}function c3(n,e,t){const i=n.canvas,s=i&&Ga(i);if(!s)return;const l=g1((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),u3(n,l),o}function wr(n,e,t){t&&t.disconnect(),e==="resize"&&f3(n)}function d3(n,e,t){const i=n.canvas,s=g1(l=>{n.ctx!==null&&t(o3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return s3(i,e,s),s}class p3 extends U1{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(i3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[fo])return!1;const i=t[fo].initial;["height","width"].forEach(l=>{const o=i[l];ct(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[fo],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:r3,detach:a3,resize:c3}[t]||d3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:wr,detach:wr,resize:wr}[t]||l3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Fk(e,t,i,s)}isAttached(e){const t=Ga(e);return!!(t&&t.isConnected)}}function m3(n){return!I1()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?t3:p3}class h3{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(It(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ct(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=st(i.options&&i.options.plugins,{}),l=_3(i);return s===!1&&!t?[]:b3(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 _3(n){const e={},t=[],i=Object.keys(oi.plugins.items);for(let l=0;l{const a=i[r];if(!et(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=ra(r,a),f=k3(u,s),d=t.scales||{};l[u]=l[u]||r,o[r]=ol(Object.create(null),[{axis:u},a,d[u],d[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||oa(a,e),d=(as[a]||{}).scales||{};Object.keys(d).forEach(p=>{const m=y3(p,u),_=r[m+"AxisID"]||l[m]||m;o[_]=o[_]||Object.create(null),ol(o[_],[{axis:m},i[_],d[p]])})}),Object.keys(o).forEach(r=>{const a=o[r];ol(a,[lt.scales[a.type],lt.scale])}),o}function K1(n){const e=n.options||(n.options={});e.plugins=st(e.plugins,{}),e.scales=S3(n,e)}function J1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function $3(n){return n=n||{},n.data=J1(n.data),K1(n),n}const tc=new Map,Z1=new Set;function eo(n,e){let t=tc.get(n);return t||(t=e(),tc.set(n,t),Z1.add(t)),t}const Qs=(n,e,t)=>{const i=qi(e,t);i!==void 0&&n.add(i)};class C3{constructor(e){this._config=$3(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=J1(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(),K1(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(d=>Qs(a,e,d))),f.forEach(d=>Qs(a,s,d)),f.forEach(d=>Qs(a,as[l]||{},d)),f.forEach(d=>Qs(a,lt,d)),f.forEach(d=>Qs(a,ia,d))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),Z1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,as[t]||{},lt.datasets[t]||{},{type:t},lt,ia]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=nc(this._resolverCache,e,s);let a=o;if(M3(o,t)){l.$shared=!1,i=ji(i)?i():i;const u=this.createResolver(e,i,r);a=Is(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=nc(this._resolverCache,e,i);return et(t)?Is(l,t,void 0,s):l}}function nc(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:Ka(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const T3=n=>et(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||ji(n[t]),!1);function M3(n,e){const{isScriptable:t,isIndexable:i}=T1(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(ji(r)||T3(r))||o&&kt(r))return!0}return!1}var O3="3.9.1";const D3=["top","bottom","left","right","chartArea"];function ic(n,e){return n==="top"||n==="bottom"||D3.indexOf(n)===-1&&e==="x"}function sc(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function lc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),It(t&&t.onComplete,[n],e)}function E3(n){const e=n.chart,t=e.options.animation;It(t&&t.onProgress,[n],e)}function G1(n){return I1()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Io={},X1=n=>{const e=G1(n);return Object.values(Io).filter(t=>t.canvas===e).pop()};function A3(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 I3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Po{constructor(e,t){const i=this.config=new C3(t),s=G1(e),l=X1(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||m3(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=_2(),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 h3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=I2(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Io[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}hi.listen(this,"complete",lc),hi.listen(this,"progress",E3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return ct(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():Ef(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Mf(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(e,t){hi.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,Ef(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),It(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};dt(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=ra(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),dt(l,o=>{const r=o.options,a=r.id,u=ra(a,r),f=st(r.type,o.dtype);(r.position===void 0||ic(r.position,u)!==ic(o.dposition))&&(r.position=o.dposition),s[a]=!0;let d=null;if(a in i&&i[a].type===f)d=i[a];else{const p=oi.getScale(f);d=new p({id:a,type:f,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(r,e)}),dt(s,(o,r)=>{o||delete i[r]}),dt(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(sc("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){dt(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);(!mf(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;A3(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=[],dt(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&&Ua(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&&Wa(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return vl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=Kw.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=Hi(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);Wn(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(),hi.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)};dt(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(){dt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},dt(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}});!So(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(d=>f.datasetIndex===d.datasetIndex&&f.index===d.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=w2(e),u=I3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,It(l.onHover,[e,r,this],this),a&&It(l.onClick,[e,r,this],this));const f=!So(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 oc=()=>dt(Po.instances,n=>n._plugins.invalidate()),Di=!0;Object.defineProperties(Po,{defaults:{enumerable:Di,value:lt},instances:{enumerable:Di,value:Io},overrides:{enumerable:Di,value:as},registry:{enumerable:Di,value:oi},version:{enumerable:Di,value:O3},getChart:{enumerable:Di,value:X1},register:{enumerable:Di,value:(...n)=>{oi.add(...n),oc()}},unregister:{enumerable:Di,value:(...n)=>{oi.remove(...n),oc()}}});function Q1(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+Pt,i-Pt),n.closePath(),n.clip()}function P3(n){return Ya(n,["outerStart","outerEnd","innerStart","innerEnd"])}function L3(n,e,t,i){const s=P3(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 on(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:on(s.innerStart,0,o),innerEnd:on(s.innerEnd,0,o)}}function vs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function aa(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,d=Math.max(e.outerRadius+i+t-u,0),p=f>0?f+i+t+u:0;let m=0;const _=s-a;if(i){const V=f>0?f-i:0,K=d>0?d-i:0,ee=(V+K)/2,te=ee!==0?_*ee/(ee+i):_;m=(_-te)/2}const g=Math.max(.001,_*d-t/Ft)/d,b=(_-g)/2,k=a+b+m,$=s-b-m,{outerStart:T,outerEnd:C,innerStart:D,innerEnd:M}=L3(e,p,d,$-k),O=d-T,I=d-C,L=k+T/O,F=$-C/I,q=p+D,N=p+M,R=k+D/q,j=$-M/N;if(n.beginPath(),l){if(n.arc(o,r,d,L,F),C>0){const ee=vs(I,F,o,r);n.arc(ee.x,ee.y,C,F,$+Pt)}const V=vs(N,$,o,r);if(n.lineTo(V.x,V.y),M>0){const ee=vs(N,j,o,r);n.arc(ee.x,ee.y,M,$+Pt,j+Math.PI)}if(n.arc(o,r,p,$-M/p,k+D/p,!0),D>0){const ee=vs(q,R,o,r);n.arc(ee.x,ee.y,D,R+Math.PI,k-Pt)}const K=vs(O,k,o,r);if(n.lineTo(K.x,K.y),T>0){const ee=vs(O,L,o,r);n.arc(ee.x,ee.y,T,k-Pt,L)}}else{n.moveTo(o,r);const V=Math.cos(L)*d+o,K=Math.sin(L)*d+r;n.lineTo(V,K);const ee=Math.cos(F)*d+o,te=Math.sin(F)*d+r;n.lineTo(ee,te)}n.closePath()}function N3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){aa(n,e,t,i,o+_t,s);for(let u=0;u=_t||gl(l,r,a),g=bl(o,u+p,f+p);return _&&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,d=(o+r+u+a)/2;return{x:t+Math.cos(f)*d,y:i+Math.sin(f)*d}}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>_t?Math.floor(i/_t):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>=Ft&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=N3(e,this,r,l,o);R3(e,this,r,l,a,o),e.restore()}}nu.id="arc";nu.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};nu.defaultRoutes={backgroundColor:"backgroundColor"};function x1(n,e,t=e){n.lineCap=st(t.borderCapStyle,e.borderCapStyle),n.setLineDash(st(t.borderDash,e.borderDash)),n.lineDashOffset=st(t.borderDashOffset,e.borderDashOffset),n.lineJoin=st(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=st(t.borderWidth,e.borderWidth),n.strokeStyle=st(t.borderColor,e.borderColor)}function q3(n,e,t){n.lineTo(t.x,t.y)}function j3(n){return n.stepped?ok:n.tension||n.cubicInterpolationMode==="monotone"?rk:q3}function eb(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,T=()=>{g!==b&&(n.lineTo(f,b),n.lineTo(f,g),n.lineTo(f,k))};for(a&&(m=s[$(0)],n.moveTo(m.x,m.y)),p=0;p<=r;++p){if(m=s[$(p)],m.skip)continue;const C=m.x,D=m.y,M=C|0;M===_?(Db&&(b=D),f=(d*f+C)/++d):(T(),n.lineTo(C,D),_=M,d=0,g=b=D),k=D}T()}function ua(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?H3:V3}function z3(n){return n.stepped?qk:n.tension||n.cubicInterpolationMode==="monotone"?jk:es}function B3(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),x1(n,e.options),n.stroke(s)}function U3(n,e,t,i){const{segments:s,options:l}=e,o=ua(e);for(const r of s)x1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const W3=typeof Path2D=="function";function Y3(n,e,t,i){W3&&!e.options.segment?B3(n,e,t,i):U3(n,e,t,i)}class zi extends Ti{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;Ek(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=Jk(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=N1(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=z3(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function rc(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=su(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 su(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function ac(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function nb(n,e){let t=[],i=!1;return kt(n)?(i=!0,t=n):t=x3(n,e),t.length?new zi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function uc(n){return n&&n.fill!==!1}function eS(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(!jt(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function tS(n,e,t){const i=lS(n);if(et(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return jt(s)&&Math.floor(s)===s?nS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function nS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function iS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:et(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function sS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:et(n)?i=n.value:i=e.getBaseValue(),i}function lS(n){const e=n.options,t=e.fill;let i=st(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function oS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=rS(e,t);r.push(nb({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&&Cr(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;uc(l)&&Cr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!uc(i)||t.drawTime!=="beforeDatasetDraw"||Cr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const fl={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 bS(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 dc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=Dn(e.bodyFont),u=Dn(e.titleFont),f=Dn(e.footerFont),d=l.length,p=s.length,m=i.length,_=Yn(e.padding);let g=_.height,b=0,k=i.reduce((C,O)=>C+O.before.length+O.lines.length+O.after.length,0);if(k+=n.beforeBody.length+n.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),k){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=m*C+(k-m)*a.lineHeight+(k-1)*e.bodySpacing}p&&(g+=e.footerMarginTop+p*f.lineHeight+(p-1)*e.footerSpacing);let $=0;const T=function(C){b=Math.max(b,t.measureText(C).width+$)};return t.save(),t.font=u.string,pt(n.title,T),t.font=a.string,pt(n.beforeBody.concat(n.afterBody),T),$=e.displayColors?o+2+e.boxPadding:0,pt(i,C=>{pt(C.before,T),pt(C.lines,T),pt(C.after,T)}),$=0,t.font=f.string,pt(n.footer,T),t.restore(),b+=_.width,{width:b,height:g}}function vS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function yS(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 kS(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"),yS(u,n,e,t)&&(u="center"),u}function pc(n,e,t){const i=t.yAlign||e.yAlign||vS(n,t);return{xAlign:t.xAlign||e.xAlign||kS(n,e,t,i),yAlign:i}}function wS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function SS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function mc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:m}=Cs(o);let _=wS(e,r);const g=SS(e,a,u);return a==="center"?r==="left"?_+=u:r==="right"&&(_-=u):r==="left"?_-=Math.max(f,p)+s:r==="right"&&(_+=Math.max(d,m)+s),{x:on(_,0,i.width-e.width),y:on(g,0,i.height-e.height)}}function to(n,e,t){const i=Yn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function hc(n){return si([],_i(n))}function $S(n,e,t){return Hi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function _c(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ca extends Ti{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 N1(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=$S(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=si(r,_i(s)),r=si(r,_i(l)),r=si(r,_i(o)),r}getBeforeBody(e,t){return hc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return pt(e,l=>{const o={before:[],lines:[],after:[]},r=_c(i,l);si(o.before,_i(r.beforeLabel.call(this,l))),si(o.lines,r.label.call(this,l)),si(o.after,_i(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return hc(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=si(r,_i(s)),r=si(r,_i(l)),r=si(r,_i(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,d,p,i))),e.itemSort&&(r=r.sort((f,d)=>e.itemSort(f,d,i))),pt(r,f=>{const d=_c(e.callbacks,f);s.push(d.labelColor.call(this,f)),l.push(d.labelPointStyle.call(this,f)),o.push(d.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=fl[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=dc(this,i),u=Object.assign({},r,a),f=pc(this.chart,i,u),d=mc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:d.x,y:d.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:d}=Cs(r),{x:p,y:m}=e,{width:_,height:g}=t;let b,k,$,T,C,O;return l==="center"?(C=m+g/2,s==="left"?(b=p,k=b-o,T=C+o,O=C-o):(b=p+_,k=b+o,T=C-o,O=C+o),$=b):(s==="left"?k=p+Math.max(a,f)+o:s==="right"?k=p+_-Math.max(u,d)-o:k=this.caretX,l==="top"?(T=m,C=T-o,b=k-o,$=k+o):(T=m+g,C=T+o,b=k+o,$=k-o),O=T),{x1:b,x2:k,x3:$,y1:T,y2:C,y3:O}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=gr(i.rtl,this.x,this.width);for(e.x=to(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=Dn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aT!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Eo(e,{x:b,y:g,w:u,h:a,radius:$}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Eo(e,{x:k,y:g+1,w:u-2,h:a-2,radius:$}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,g,u,a),e.strokeRect(b,g,u,a),e.fillStyle=o.backgroundColor,e.fillRect(k,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,d=Dn(i.bodyFont);let p=d.lineHeight,m=0;const _=gr(i.rtl,this.x,this.width),g=function(I){t.fillText(I,_.x(e.x+m),e.y+p/2),e.y+=p+l},b=_.textAlign(o);let k,$,T,C,O,M,D;for(t.textAlign=o,t.textBaseline="middle",t.font=d.string,e.x=to(this,b,i),t.fillStyle=i.bodyColor,pt(this.beforeBody,g),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,M=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=fl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=dc(this,e),a=Object.assign({},o,this._size),u=pc(t,e,a),f=mc(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=Yn(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),Bk(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),Uk(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=!$o(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||!$o(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=fl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ca.positioners=fl;var CS={id:"tooltip",_element:ca,positioners:fl,afterInit(n,e,t){t&&(n.tooltip=new ca({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:mi,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 TS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function MS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return TS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const OS=(n,e)=>n===null?null:on(Math.round(n),0,e);class da extends cs{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(ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:MS(i,e,st(t,e),this._addedLabels),OS(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}}da.id="category";da.defaults={ticks:{callback:da.prototype.getLabelForValue}};function DS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:d,includeBounds:p}=n,m=l||1,_=f-1,{min:g,max:b}=e,k=!ct(o),$=!ct(r),T=!ct(u),C=(b-g)/(d+1);let O=hf((b-g)/_/m)*m,M,D,I,L;if(O<1e-14&&!k&&!$)return[{value:g},{value:b}];L=Math.ceil(b/O)-Math.floor(g/O),L>_&&(O=hf(L*O/_/m)*m),ct(a)||(M=Math.pow(10,a),O=Math.ceil(O*M)/M),s==="ticks"?(D=Math.floor(g/O)*O,I=Math.ceil(b/O)*O):(D=g,I=b),k&&$&&l&&T2((r-o)/l,O/1e3)?(L=Math.round(Math.min((r-o)/O,f)),O=(r-o)/L,D=o,I=r):T?(D=k?o:D,I=$?r:I,L=u-1,O=(I-D)/L):(L=(I-D)/O,rl(L,Math.round(L),O/1e3)?L=Math.round(L):L=Math.ceil(L));const F=Math.max(_f(O),_f(D));M=Math.pow(10,ct(a)?F:a),D=Math.round(D*M)/M,I=Math.round(I*M)/M;let q=0;for(k&&(p&&D!==o?(t.push({value:o}),Ds=t?s:a,r=a=>l=i?l:a;if(e){const a=ri(s),u=ri(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=DS(s,l);return e.bounds==="ticks"&&c1(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 Il(e,this.chart.options.locale,this.options.ticks.format)}}class su extends No{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=jt(e)?e:0,this.max=jt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Qn(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}}su.id="linear";su.defaults={ticks:{callback:Go.formatters.numeric}};function bc(n){return n/Math.pow(10,Math.floor(Bn(n)))===1}function ES(n,e){const t=Math.floor(Bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Bn(e.min)))),o=Math.floor(Bn(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:bc(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=jt(e)?Math.max(0,e):null,this.max=jt(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(Bn(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=ES(t,this);return e.bounds==="ticks"&&c1(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":Il(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bn(e),this._valueRange=Bn(this.max)-Bn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}ib.id="logarithmic";ib.defaults={ticks:{callback:Go.formatters.logarithmic,major:{enabled:!0}}};function pa(n){const e=n.ticks;if(e.display&&n.display){const t=Yn(e.backdropPadding);return st(e.font&&e.font.size,lt.font.size)+t.height}return 0}function AS(n,e,t){return t=vt(t)?t:[t],{w:sk(n,e.string,t),h:t.length*e.lineHeight}}function vc(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 IS(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?Ft/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 LS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=pa(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Ft/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function qS(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=Dn(l.font),{x:r,y:a,textAlign:u,left:f,top:d,right:p,bottom:m}=n._pointLabelItems[s],{backdropColor:_}=l;if(!ct(_)){const g=Cs(l.borderRadius),b=Yn(l.backdropPadding);t.fillStyle=_;const k=f-b.left,$=d-b.top,T=p-f+b.width,C=m-d+b.height;Object.values(g).some(O=>O!==0)?(t.beginPath(),Eo(t,{x:k,y:$,w:T,h:C,radius:g}),t.fill()):t.fillRect(k,$,T,C)}Do(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function sb(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,_t);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=It(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?IS(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=_t/(this._pointLabels.length||1),i=this.options.startAngle||0;return On(e*t+Qn(i))}getDistanceFromCenterForValue(e){if(ct(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(ct(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 d=s.setContext(this.getContext(f-1));jS(this,d,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:d}=u;!d||!f||(e.lineWidth=d,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=Dn(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 d=Yn(u.backdropPadding);e.fillRect(-o/2-d.left,-l-f.size/2-d.top,o+d.width,f.size+d.height)}Do(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Qo.id="radialLinear";Qo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Go.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Qo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Qo.descriptors={angleLines:{_fallback:"grid"}};const xo={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}},bn=Object.keys(xo);function HS(n,e){return n-e}function yc(n,e){if(ct(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)),jt(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(As(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function kc(n,e,t,i){const s=bn.length;for(let l=bn.indexOf(n);l=bn.indexOf(t);l--){const o=bn[l];if(xo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return bn[t?bn.indexOf(t):0]}function BS(n){for(let e=bn.indexOf(n)+1,t=bn.length;e=e?t[i]:t[s];n[l]=!0}}function US(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 Sc(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=on(t,0,o),i=on(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||kc(l.minUnit,t,i,this._getLabelCapacity(t)),r=st(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=As(a)||a===!0,f={};let d=t,p,m;if(u&&(d=+e.startOf(d,"isoWeek",a)),d=+e.startOf(d,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 _=s.ticks.source==="data"&&this.getDataTimestamps();for(p=d,m=0;pg-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],d=i[t],p=a&&f&&d&&d.major,m=this._adapter.format(e,s||(p?f:u)),_=l.ticks.callback;return _?It(_,[m,t,i],this):m}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}=ns(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}=ns(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 lb extends Nl{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+D.before.length+D.lines.length+D.after.length,0);if(k+=n.beforeBody.length+n.afterBody.length,d&&(g+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),k){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=m*C+(k-m)*a.lineHeight+(k-1)*e.bodySpacing}p&&(g+=e.footerMarginTop+p*f.lineHeight+(p-1)*e.footerSpacing);let $=0;const T=function(C){b=Math.max(b,t.measureText(C).width+$)};return t.save(),t.font=u.string,dt(n.title,T),t.font=a.string,dt(n.beforeBody.concat(n.afterBody),T),$=e.displayColors?o+2+e.boxPadding:0,dt(i,C=>{dt(C.before,T),dt(C.lines,T),dt(C.after,T)}),$=0,t.font=f.string,dt(n.footer,T),t.restore(),b+=_.width,{width:b,height:g}}function vS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function yS(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 kS(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"),yS(u,n,e,t)&&(u="center"),u}function mc(n,e,t){const i=t.yAlign||e.yAlign||vS(n,t);return{xAlign:t.xAlign||e.xAlign||kS(n,e,t,i),yAlign:i}}function wS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function SS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function hc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:d,bottomLeft:p,bottomRight:m}=Cs(o);let _=wS(e,r);const g=SS(e,a,u);return a==="center"?r==="left"?_+=u:r==="right"&&(_-=u):r==="left"?_-=Math.max(f,p)+s:r==="right"&&(_+=Math.max(d,m)+s),{x:on(_,0,i.width-e.width),y:on(g,0,i.height-e.height)}}function to(n,e,t){const i=Yn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function _c(n){return si([],_i(n))}function $S(n,e,t){return Hi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function gc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ca extends Ti{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 F1(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=$S(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=si(r,_i(s)),r=si(r,_i(l)),r=si(r,_i(o)),r}getBeforeBody(e,t){return _c(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return dt(e,l=>{const o={before:[],lines:[],after:[]},r=gc(i,l);si(o.before,_i(r.beforeLabel.call(this,l))),si(o.lines,r.label.call(this,l)),si(o.after,_i(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return _c(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=si(r,_i(s)),r=si(r,_i(l)),r=si(r,_i(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,d,p,i))),e.itemSort&&(r=r.sort((f,d)=>e.itemSort(f,d,i))),dt(r,f=>{const d=gc(e.callbacks,f);s.push(d.labelColor.call(this,f)),l.push(d.labelPointStyle.call(this,f)),o.push(d.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=fl[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=pc(this,i),u=Object.assign({},r,a),f=mc(this.chart,i,u),d=hc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:d.x,y:d.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:d}=Cs(r),{x:p,y:m}=e,{width:_,height:g}=t;let b,k,$,T,C,D;return l==="center"?(C=m+g/2,s==="left"?(b=p,k=b-o,T=C+o,D=C-o):(b=p+_,k=b+o,T=C-o,D=C+o),$=b):(s==="left"?k=p+Math.max(a,f)+o:s==="right"?k=p+_-Math.max(u,d)-o:k=this.caretX,l==="top"?(T=m,C=T-o,b=k-o,$=k+o):(T=m+g,C=T+o,b=k+o,$=k-o),D=T),{x1:b,x2:k,x3:$,y1:T,y2:C,y3:D}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=_r(i.rtl,this.x,this.width);for(e.x=to(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=Dn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aT!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Do(e,{x:b,y:g,w:u,h:a,radius:$}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Do(e,{x:k,y:g+1,w:u-2,h:a-2,radius:$}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,g,u,a),e.strokeRect(b,g,u,a),e.fillStyle=o.backgroundColor,e.fillRect(k,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,d=Dn(i.bodyFont);let p=d.lineHeight,m=0;const _=_r(i.rtl,this.x,this.width),g=function(I){t.fillText(I,_.x(e.x+m),e.y+p/2),e.y+=p+l},b=_.textAlign(o);let k,$,T,C,D,M,O;for(t.textAlign=o,t.textBaseline="middle",t.font=d.string,e.x=to(this,b,i),t.fillStyle=i.bodyColor,dt(this.beforeBody,g),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,M=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=fl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=pc(this,e),a=Object.assign({},o,this._size),u=mc(t,e,a),f=hc(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=Yn(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),Bk(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),Uk(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=!So(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||!So(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=fl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ca.positioners=fl;var CS={id:"tooltip",_element:ca,positioners:fl,afterInit(n,e,t){t&&(n.tooltip=new ca({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:mi,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 TS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function MS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return TS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const OS=(n,e)=>n===null?null:on(Math.round(n),0,e);class da extends cs{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(ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:MS(i,e,st(t,e),this._addedLabels),OS(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}}da.id="category";da.defaults={ticks:{callback:da.prototype.getLabelForValue}};function DS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:d,includeBounds:p}=n,m=l||1,_=f-1,{min:g,max:b}=e,k=!ct(o),$=!ct(r),T=!ct(u),C=(b-g)/(d+1);let D=_f((b-g)/_/m)*m,M,O,I,L;if(D<1e-14&&!k&&!$)return[{value:g},{value:b}];L=Math.ceil(b/D)-Math.floor(g/D),L>_&&(D=_f(L*D/_/m)*m),ct(a)||(M=Math.pow(10,a),D=Math.ceil(D*M)/M),s==="ticks"?(O=Math.floor(g/D)*D,I=Math.ceil(b/D)*D):(O=g,I=b),k&&$&&l&&T2((r-o)/l,D/1e3)?(L=Math.round(Math.min((r-o)/D,f)),D=(r-o)/L,O=o,I=r):T?(O=k?o:O,I=$?r:I,L=u-1,D=(I-O)/L):(L=(I-O)/D,rl(L,Math.round(L),D/1e3)?L=Math.round(L):L=Math.ceil(L));const F=Math.max(gf(D),gf(O));M=Math.pow(10,ct(a)?F:a),O=Math.round(O*M)/M,I=Math.round(I*M)/M;let q=0;for(k&&(p&&O!==o?(t.push({value:o}),Os=t?s:a,r=a=>l=i?l:a;if(e){const a=ri(s),u=ri(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=DS(s,l);return e.bounds==="ticks"&&d1(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 Il(e,this.chart.options.locale,this.options.ticks.format)}}class lu extends Lo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=jt(e)?e:0,this.max=jt(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Qn(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}}lu.id="linear";lu.defaults={ticks:{callback:Zo.formatters.numeric}};function vc(n){return n/Math.pow(10,Math.floor(Bn(n)))===1}function ES(n,e){const t=Math.floor(Bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=jn(n.min,Math.pow(10,Math.floor(Bn(e.min)))),o=Math.floor(Bn(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:vc(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=jt(e)?Math.max(0,e):null,this.max=jt(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(Bn(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=ES(t,this);return e.bounds==="ticks"&&d1(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":Il(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bn(e),this._valueRange=Bn(this.max)-Bn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}sb.id="logarithmic";sb.defaults={ticks:{callback:Zo.formatters.logarithmic,major:{enabled:!0}}};function pa(n){const e=n.ticks;if(e.display&&n.display){const t=Yn(e.backdropPadding);return st(e.font&&e.font.size,lt.font.size)+t.height}return 0}function AS(n,e,t){return t=kt(t)?t:[t],{w:sk(n,e.string,t),h:t.length*e.lineHeight}}function yc(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 IS(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?Ft/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 LS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=pa(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Ft/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function qS(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=Dn(l.font),{x:r,y:a,textAlign:u,left:f,top:d,right:p,bottom:m}=n._pointLabelItems[s],{backdropColor:_}=l;if(!ct(_)){const g=Cs(l.borderRadius),b=Yn(l.backdropPadding);t.fillStyle=_;const k=f-b.left,$=d-b.top,T=p-f+b.width,C=m-d+b.height;Object.values(g).some(D=>D!==0)?(t.beginPath(),Do(t,{x:k,y:$,w:T,h:C,radius:g}),t.fill()):t.fillRect(k,$,T,C)}Oo(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function lb(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,_t);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=It(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?IS(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=_t/(this._pointLabels.length||1),i=this.options.startAngle||0;return On(e*t+Qn(i))}getDistanceFromCenterForValue(e){if(ct(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(ct(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 d=s.setContext(this.getContext(f-1));jS(this,d,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:d}=u;!d||!f||(e.lineWidth=d,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=Dn(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 d=Yn(u.backdropPadding);e.fillRect(-o/2-d.left,-l-f.size/2-d.top,o+d.width,f.size+d.height)}Oo(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Xo.id="radialLinear";Xo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Zo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Xo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Xo.descriptors={angleLines:{_fallback:"grid"}};const Qo={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}},bn=Object.keys(Qo);function HS(n,e){return n-e}function kc(n,e){if(ct(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)),jt(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(As(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function wc(n,e,t,i){const s=bn.length;for(let l=bn.indexOf(n);l=bn.indexOf(t);l--){const o=bn[l];if(Qo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return bn[t?bn.indexOf(t):0]}function BS(n){for(let e=bn.indexOf(n)+1,t=bn.length;e=e?t[i]:t[s];n[l]=!0}}function US(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 $c(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=on(t,0,o),i=on(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||wc(l.minUnit,t,i,this._getLabelCapacity(t)),r=st(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=As(a)||a===!0,f={};let d=t,p,m;if(u&&(d=+e.startOf(d,"isoWeek",a)),d=+e.startOf(d,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 _=s.ticks.source==="data"&&this.getDataTimestamps();for(p=d,m=0;pg-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],d=i[t],p=a&&f&&d&&d.major,m=this._adapter.format(e,s||(p?f:u)),_=l.ticks.callback;return _?It(_,[m,t,i],this):m}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}=ns(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}=ns(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 ob extends Nl{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;o{i&&(t||(t=He(e,Wt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,Wt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function YS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=W(n[1]),t=E(),s=W(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&oe(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&oe(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function KS(n){let e;return{c(){e=W("Loading...")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function JS(n){let e,t,i,s,l,o=n[2]&&$c();function r(f,d){return f[2]?KS:YS}let a=r(n),u=a(n);return{c(){e=y("div"),o&&o.c(),t=E(),i=y("canvas"),s=E(),l=y("div"),u.c(),h(i,"class","chart-canvas svelte-vh4sl8"),qr(i,"height","250px"),qr(i,"width","100%"),h(e,"class","chart-wrapper svelte-vh4sl8"),x(e,"loading",n[2]),h(l,"class","txt-hint m-t-xs txt-right")},m(f,d){S(f,e,d),o&&o.m(e,null),v(e,t),v(e,i),n[8](i),S(f,s,d),S(f,l,d),u.m(l,null)},p(f,[d]){f[2]?o?d&4&&A(o,1):(o=$c(),o.c(),A(o,1),o.m(e,t)):o&&(ae(),P(o,1,1,()=>{o=null}),ue()),d&4&&x(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,d):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(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 ZS(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),pe.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{d();for(let _ of m)r.push({x:new Date(_.date),y:_.total}),t(1,a+=_.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(d(),console.warn(m),pe.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function d(){t(1,a=0),t(7,r=[])}xt(()=>(Lo.register(zi,Xo,Zo,su,Nl,gS,CS),t(6,o=new Lo(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:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function p(m){se[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.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,p]}class GS extends be{constructor(e){super(),ge(this,e,ZS,JS,_e,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ma={},XS={get exports(){return ma},set exports(n){ma=n}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + */const WS={datetime:Be.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Be.TIME_WITH_SECONDS,minute:Be.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};H1._date.override({_id:"luxon",_create:function(n){return Be.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return WS},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=Be.fromFormat(n,e,t):n=Be.fromISO(n,t):n instanceof Date?n=Be.fromJSDate(n,t):i==="object"&&!(n instanceof Be)&&(n=Be.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 Cc(n){let e,t,i;return{c(){e=y("div"),h(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,Wt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function YS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=W(n[1]),t=E(),s=W(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&oe(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&oe(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function KS(n){let e;return{c(){e=W("Loading...")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function JS(n){let e,t,i,s,l,o=n[2]&&Cc();function r(f,d){return f[2]?KS:YS}let a=r(n),u=a(n);return{c(){e=y("div"),o&&o.c(),t=E(),i=y("canvas"),s=E(),l=y("div"),u.c(),h(i,"class","chart-canvas svelte-vh4sl8"),Rr(i,"height","250px"),Rr(i,"width","100%"),h(e,"class","chart-wrapper svelte-vh4sl8"),x(e,"loading",n[2]),h(l,"class","txt-hint m-t-xs txt-right")},m(f,d){S(f,e,d),o&&o.m(e,null),v(e,t),v(e,i),n[8](i),S(f,s,d),S(f,l,d),u.m(l,null)},p(f,[d]){f[2]?o?d&4&&A(o,1):(o=Cc(),o.c(),A(o,1),o.m(e,t)):o&&(ae(),P(o,1,1,()=>{o=null}),ue()),d&4&&x(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,d):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(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 ZS(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),pe.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{d();for(let _ of m)r.push({x:new Date(_.date),y:_.total}),t(1,a+=_.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(d(),console.warn(m),pe.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function d(){t(1,a=0),t(7,r=[])}xt(()=>(Po.register(zi,Go,Jo,lu,Nl,gS,CS),t(6,o=new Po(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:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function p(m){se[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.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,p]}class GS extends ve{constructor(e){super(),be(this,e,ZS,JS,_e,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Tc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ma={},XS={get exports(){return ma},set exports(n){ma=n}};(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 $(T){return T instanceof a?new a(T.type,$(T.content),T.alias):Array.isArray(T)?T.map($):T.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(O){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(O.stack)||[])[1];if($){var T=document.getElementsByTagName("script");for(var C in T)if(T[C].src==$)return T[C]}return null}},isActive:function($,T,C){for(var O="no-"+T;$;){var M=$.classList;if(M.contains(T))return!0;if(M.contains(O))return!1;$=$.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,T){var C=r.util.clone(r.languages[$]);for(var O in T)C[O]=T[O];return C},insertBefore:function($,T,C,O){O=O||r.languages;var M=O[$],D={};for(var I in M)if(M.hasOwnProperty(I)){if(I==T)for(var L in C)C.hasOwnProperty(L)&&(D[L]=C[L]);C.hasOwnProperty(I)||(D[I]=M[I])}var F=O[$];return O[$]=D,r.languages.DFS(r.languages,function(q,N){N===F&&q!=$&&(this[q]=D)}),D},DFS:function $(T,C,O,M){M=M||{};var D=r.util.objId;for(var I in T)if(T.hasOwnProperty(I)){C.call(T,I,T[I],O||I);var L=T[I],F=r.util.type(L);F==="Object"&&!M[D(L)]?(M[D(L)]=!0,$(L,C,null,M)):F==="Array"&&!M[D(L)]&&(M[D(L)]=!0,$(L,C,I,M))}}},plugins:{},highlightAll:function($,T){r.highlightAllUnder(document,$,T)},highlightAllUnder:function($,T,C){var O={callback:C,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",O),O.elements=Array.prototype.slice.apply(O.container.querySelectorAll(O.selector)),r.hooks.run("before-all-elements-highlight",O);for(var M=0,D;D=O.elements[M++];)r.highlightElement(D,T===!0,O.callback)},highlightElement:function($,T,C){var O=r.util.getLanguage($),M=r.languages[O];r.util.setLanguage($,O);var D=$.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(D,O);var I=$.textContent,L={element:$,language:O,grammar:M,code:I};function F(N){L.highlightedCode=N,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),C&&C.call(L.element)}if(r.hooks.run("before-sanity-check",L),D=L.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),C&&C.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){F(r.util.encode(L.code));return}if(T&&i.Worker){var q=new Worker(r.filename);q.onmessage=function(N){F(N.data)},q.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else F(r.highlight(L.code,L.grammar,L.language))},highlight:function($,T,C){var O={code:$,grammar:T,language:C};if(r.hooks.run("before-tokenize",O),!O.grammar)throw new Error('The language "'+O.language+'" has no grammar.');return O.tokens=r.tokenize(O.code,O.grammar),r.hooks.run("after-tokenize",O),a.stringify(r.util.encode(O.tokens),O.language)},tokenize:function($,T){var C=T.rest;if(C){for(var O in C)T[O]=C[O];delete T.rest}var M=new d;return p(M,M.head,$),f($,M,T,M.head,0),_(M)},hooks:{all:{},add:function($,T){var C=r.hooks.all;C[$]=C[$]||[],C[$].push(T)},run:function($,T){var C=r.hooks.all[$];if(!(!C||!C.length))for(var O=0,M;M=C[O++];)M(T)}},Token:a};i.Prism=r;function a($,T,C,O){this.type=$,this.content=T,this.alias=C,this.length=(O||"").length|0}a.stringify=function $(T,C){if(typeof T=="string")return T;if(Array.isArray(T)){var O="";return T.forEach(function(F){O+=$(F,C)}),O}var M={type:T.type,content:$(T.content,C),tag:"span",classes:["token",T.type],attributes:{},language:C},D=T.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(M.classes,D):M.classes.push(D)),r.hooks.run("wrap",M);var I="";for(var L in M.attributes)I+=" "+L+'="'+(M.attributes[L]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+I+">"+M.content+""};function u($,T,C,O){$.lastIndex=T;var M=$.exec(C);if(M&&O&&M[1]){var D=M[1].length;M.index+=D,M[0]=M[0].slice(D)}return M}function f($,T,C,O,M,D){for(var I in C)if(!(!C.hasOwnProperty(I)||!C[I])){var L=C[I];L=Array.isArray(L)?L:[L];for(var F=0;F=D.reach);G+=te.value.length,te=te.next){var ce=te.value;if(T.length>$.length)return;if(!(ce instanceof a)){var X=1,le;if(j){if(le=u(ee,G,$,R),!le||le.index>=$.length)break;var ze=le.index,ve=le.index+le[0].length,Se=G;for(Se+=te.value.length;ze>=Se;)te=te.next,Se+=te.value.length;if(Se-=te.value.length,G=Se,te.value instanceof a)continue;for(var Ve=te;Ve!==T.tail&&(SeD.reach&&(D.reach=mt);var Ge=te.prev;Me&&(Ge=p(T,Ge,Me),G+=Me.length),m(T,Ge,X);var Ye=new a(I,N?r.tokenize(we,N):we,V,we);if(te=p(T,Ge,Ye),Ze&&p(T,te,Ze),X>1){var ne={cause:I+","+F,reach:mt};f($,T,C,te.prev,G,ne),D&&ne.reach>D.reach&&(D.reach=ne.reach)}}}}}}function d(){var $={value:null,prev:null,next:null},T={value:null,prev:$,next:null};$.next=T,this.head=$,this.tail=T,this.length=0}function p($,T,C){var O=T.next,M={value:C,prev:T,next:O};return T.next=M,O.prev=M,$.length++,M}function m($,T,C){for(var O=T.next,M=0;M/,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…",s=function(g,b){return"✖ Error "+g+" while fetching file: "+b},l="✖ 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",d="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function p(g,b,k){var $=new XMLHttpRequest;$.open("GET",g,!0),$.onreadystatechange=function(){$.readyState==4&&($.status<400&&$.responseText?b($.responseText):$.status>=400?k(s($.status,$.statusText)):k(l))},$.send(null)}function m(g){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(b){var k=Number(b[1]),$=b[2],T=b[3];return $?T?[k,Number(T)]:[k,void 0]:[k,k]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+d}),t.hooks.add("before-sanity-check",function(g){var b=g.element;if(b.matches(d)){g.code="",b.setAttribute(r,a);var k=b.appendChild(document.createElement("CODE"));k.textContent=i;var $=b.getAttribute("data-src"),T=g.language;if(T==="none"){var C=(/\.(\w+)$/.exec($)||[,"none"])[1];T=o[C]||C}t.util.setLanguage(k,T),t.util.setLanguage(b,T);var O=t.plugins.autoloader;O&&O.loadLanguages(T),p($,function(M){b.setAttribute(r,u);var D=m(b.getAttribute("data-range"));if(D){var I=M.split(/\r\n?|\n/g),L=D[0],F=D[1]==null?I.length:D[1];L<0&&(L+=I.length),L=Math.max(0,Math.min(L-1,I.length)),F<0&&(F+=I.length),F=Math.max(0,Math.min(F,I.length)),M=I.slice(L,F).join(` -`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}k.textContent=M,t.highlightElement(k)},function(M){b.setAttribute(r,f),k.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(d),$=0,T;T=k[$++];)t.highlightElement(T)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(XS);const xs=ma;var Tc={},QS={get exports(){return Tc},set exports(n){Tc=n}};(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(D){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(D.stack)||[])[1];if($){var T=document.getElementsByTagName("script");for(var C in T)if(T[C].src==$)return T[C]}return null}},isActive:function($,T,C){for(var D="no-"+T;$;){var M=$.classList;if(M.contains(T))return!0;if(M.contains(D))return!1;$=$.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,T){var C=r.util.clone(r.languages[$]);for(var D in T)C[D]=T[D];return C},insertBefore:function($,T,C,D){D=D||r.languages;var M=D[$],O={};for(var I in M)if(M.hasOwnProperty(I)){if(I==T)for(var L in C)C.hasOwnProperty(L)&&(O[L]=C[L]);C.hasOwnProperty(I)||(O[I]=M[I])}var F=D[$];return D[$]=O,r.languages.DFS(r.languages,function(q,N){N===F&&q!=$&&(this[q]=O)}),O},DFS:function $(T,C,D,M){M=M||{};var O=r.util.objId;for(var I in T)if(T.hasOwnProperty(I)){C.call(T,I,T[I],D||I);var L=T[I],F=r.util.type(L);F==="Object"&&!M[O(L)]?(M[O(L)]=!0,$(L,C,null,M)):F==="Array"&&!M[O(L)]&&(M[O(L)]=!0,$(L,C,I,M))}}},plugins:{},highlightAll:function($,T){r.highlightAllUnder(document,$,T)},highlightAllUnder:function($,T,C){var D={callback:C,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",D),D.elements=Array.prototype.slice.apply(D.container.querySelectorAll(D.selector)),r.hooks.run("before-all-elements-highlight",D);for(var M=0,O;O=D.elements[M++];)r.highlightElement(O,T===!0,D.callback)},highlightElement:function($,T,C){var D=r.util.getLanguage($),M=r.languages[D];r.util.setLanguage($,D);var O=$.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,D);var I=$.textContent,L={element:$,language:D,grammar:M,code:I};function F(N){L.highlightedCode=N,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),C&&C.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),C&&C.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){F(r.util.encode(L.code));return}if(T&&i.Worker){var q=new Worker(r.filename);q.onmessage=function(N){F(N.data)},q.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else F(r.highlight(L.code,L.grammar,L.language))},highlight:function($,T,C){var D={code:$,grammar:T,language:C};if(r.hooks.run("before-tokenize",D),!D.grammar)throw new Error('The language "'+D.language+'" has no grammar.');return D.tokens=r.tokenize(D.code,D.grammar),r.hooks.run("after-tokenize",D),a.stringify(r.util.encode(D.tokens),D.language)},tokenize:function($,T){var C=T.rest;if(C){for(var D in C)T[D]=C[D];delete T.rest}var M=new d;return p(M,M.head,$),f($,M,T,M.head,0),_(M)},hooks:{all:{},add:function($,T){var C=r.hooks.all;C[$]=C[$]||[],C[$].push(T)},run:function($,T){var C=r.hooks.all[$];if(!(!C||!C.length))for(var D=0,M;M=C[D++];)M(T)}},Token:a};i.Prism=r;function a($,T,C,D){this.type=$,this.content=T,this.alias=C,this.length=(D||"").length|0}a.stringify=function $(T,C){if(typeof T=="string")return T;if(Array.isArray(T)){var D="";return T.forEach(function(F){D+=$(F,C)}),D}var M={type:T.type,content:$(T.content,C),tag:"span",classes:["token",T.type],attributes:{},language:C},O=T.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var I="";for(var L in M.attributes)I+=" "+L+'="'+(M.attributes[L]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+I+">"+M.content+""};function u($,T,C,D){$.lastIndex=T;var M=$.exec(C);if(M&&D&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}function f($,T,C,D,M,O){for(var I in C)if(!(!C.hasOwnProperty(I)||!C[I])){var L=C[I];L=Array.isArray(L)?L:[L];for(var F=0;F=O.reach);G+=te.value.length,te=te.next){var ce=te.value;if(T.length>$.length)return;if(!(ce instanceof a)){var X=1,le;if(j){if(le=u(ee,G,$,R),!le||le.index>=$.length)break;var ze=le.index,ye=le.index+le[0].length,Se=G;for(Se+=te.value.length;ze>=Se;)te=te.next,Se+=te.value.length;if(Se-=te.value.length,G=Se,te.value instanceof a)continue;for(var Ve=te;Ve!==T.tail&&(SeO.reach&&(O.reach=mt);var Ge=te.prev;Me&&(Ge=p(T,Ge,Me),G+=Me.length),m(T,Ge,X);var Ye=new a(I,N?r.tokenize(we,N):we,V,we);if(te=p(T,Ge,Ye),Ze&&p(T,te,Ze),X>1){var ne={cause:I+","+F,reach:mt};f($,T,C,te.prev,G,ne),O&&ne.reach>O.reach&&(O.reach=ne.reach)}}}}}}function d(){var $={value:null,prev:null,next:null},T={value:null,prev:$,next:null};$.next=T,this.head=$,this.tail=T,this.length=0}function p($,T,C){var D=T.next,M={value:C,prev:T,next:D};return T.next=M,D.prev=M,$.length++,M}function m($,T,C){for(var D=T.next,M=0;M/,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…",s=function(g,b){return"✖ Error "+g+" while fetching file: "+b},l="✖ 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",d="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function p(g,b,k){var $=new XMLHttpRequest;$.open("GET",g,!0),$.onreadystatechange=function(){$.readyState==4&&($.status<400&&$.responseText?b($.responseText):$.status>=400?k(s($.status,$.statusText)):k(l))},$.send(null)}function m(g){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(b){var k=Number(b[1]),$=b[2],T=b[3];return $?T?[k,Number(T)]:[k,void 0]:[k,k]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+d}),t.hooks.add("before-sanity-check",function(g){var b=g.element;if(b.matches(d)){g.code="",b.setAttribute(r,a);var k=b.appendChild(document.createElement("CODE"));k.textContent=i;var $=b.getAttribute("data-src"),T=g.language;if(T==="none"){var C=(/\.(\w+)$/.exec($)||[,"none"])[1];T=o[C]||C}t.util.setLanguage(k,T),t.util.setLanguage(b,T);var D=t.plugins.autoloader;D&&D.loadLanguages(T),p($,function(M){b.setAttribute(r,u);var O=m(b.getAttribute("data-range"));if(O){var I=M.split(/\r\n?|\n/g),L=O[0],F=O[1]==null?I.length:O[1];L<0&&(L+=I.length),L=Math.max(0,Math.min(L-1,I.length)),F<0&&(F+=I.length),F=Math.max(0,Math.min(F,I.length)),M=I.slice(L,F).join(` +`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}k.textContent=M,t.highlightElement(k)},function(M){b.setAttribute(r,f),k.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(d),$=0,T;T=k[$++];)t.highlightElement(T)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(XS);const xs=ma;var Mc={},QS={get exports(){return Mc},set exports(n){Mc=n}};(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[p]=` `+f[p],d=m)}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 d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",_="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 xS(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(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")&&h(e,"class",i)},i:Q,o:Q,d(s){s&&w(e)}}}function e$(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=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.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 xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class ob extends be{constructor(e){super(),ge(this,e,e$,xS,_e,{class:0,content:2,language:3})}}const t$=n=>({}),Mc=n=>({}),n$=n=>({}),Oc=n=>({});function Dc(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T=n[4]&&!n[2]&&Ec(n);const C=n[19].header,O=yt(C,n,n[18],Oc);let M=n[4]&&n[2]&&Ac(n);const D=n[19].default,I=yt(D,n,n[18],null),L=n[19].footer,F=yt(L,n,n[18],Mc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),O&&O.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(q,N){S(q,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),O&&O.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",at(n[20])),J(f,"scroll",n[22])],k=!0)},p(q,N){n=q,n[4]&&!n[2]?T?T.p(n,N):(T=Ec(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),O&&O.p&&(!b||N[0]&262144)&&wt(O,C,n,n[18],b?kt(C,n[18],N,n$):St(n[18]),Oc),n[4]&&n[2]?M?M.p(n,N):(M=Ac(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&wt(I,D,n,n[18],b?kt(D,n[18],N,null):St(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&wt(F,L,n,n[18],b?kt(L,n[18],N,t$):St(n[18]),Mc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(q){b||(q&&nt(()=>{b&&(i||(i=He(t,ko,{duration:ys,opacity:0},!0)),i.run(1))}),A(O,q),A(I,q),A(F,q),nt(()=>{b&&(g&&g.end(1),_=Hb(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),_.start())}),b=!0)},o(q){q&&(i||(i=He(t,ko,{duration:ys,opacity:0},!1)),i.run(0)),P(O,q),P(I,q),P(F,q),_&&_.invalidate(),g=G_(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(q){q&&w(e),q&&i&&i.end(),T&&T.d(),O&&O.d(q),M&&M.d(),I&&I.d(q),n[21](null),F&&F.d(q),q&&g&&g.end(),k=!1,Ee($)}}}function Ec(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ac(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function i$(n){let e,t,i,s,l=n[0]&&Dc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Dc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Ee(s)}}}let Xi,Mr=[];function rb(){return Xi=Xi||document.querySelector(".overlays"),Xi||(Xi=document.createElement("div"),Xi.classList.add("overlays"),document.body.appendChild(Xi)),Xi}let ys=150;function Ic(){return 1e3+rb().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:d=void 0}=e,{beforeHide:p=void 0}=e;const m=Tt(),_="op_"+H.randomString(10);let g,b,k,$,T="",C=o;function O(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function D(){return o}async function I(G){t(17,C=G),G?(k=document.activeElement,m("show"),g==null||g.focus()):(clearTimeout($),m("hide"),k==null||k.focus()),await pn(),L()}function L(){g&&(o?t(6,g.style.zIndex=Ic(),g):t(6,g.style="",g))}function F(){H.pushUnique(Mr,_),document.body.classList.add("overlay-active")}function q(){H.removeByValue(Mr,_),Mr.length||document.body.classList.remove("overlay-active")}function N(G){o&&f&&G.code=="Escape"&&!H.isInput(G.target)&&g&&g.style.zIndex==Ic()&&(G.preventDefault(),M())}function R(G){o&&j(b)}function j(G,ce){ce&&t(8,T=""),G&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}G.scrollTop==0?t(8,T+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}xt(()=>(rb().appendChild(g),()=>{var G;clearTimeout($),q(),(G=g==null?void 0:g.classList)==null||G.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const V=()=>a?M():!0;function K(G){se[G?"unshift":"push"](()=>{b=G,t(7,b)})}const ee=G=>j(G.target);function te(G){se[G?"unshift":"push"](()=>{g=G,t(6,g)})}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,d=G.beforeOpen),"beforeHide"in G&&t(14,p=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&j(b,!0),n.$$.dirty[0]&64&&g&&L(),n.$$.dirty[0]&1&&(o?F():q())},[o,l,r,a,u,M,g,b,T,N,R,j,f,d,p,O,D,C,s,i,V,K,ee,te]}class hn extends be{constructor(e){super(),ge(this,e,s$,i$,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function l$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function o$(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=W(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&oe(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function r$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function a$(n){let e,t,i;return t=new ob({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function u$(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,_,g=n[2].status+"",b,k,$,T,C,O,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",D,I,L,F,q,N,R=n[2].auth+"",j,V,K,ee,te,G,ce=n[2].url+"",X,le,ve,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye=n[2].remoteIp+"",ne,qe,xe,en,Ne,Ce,tt=n[2].userIp+"",Et,Rt,Ht,Ln,ti,Sn,ht=n[2].userAgent+"",Nn,ds,ni,Mi,ps,pi,ye,Ae,Fe,Xe,Ot,$n,Fn,Wi,tn,an;function Fl(Le,Oe){return Le[2].referer?o$:l$}let Y=Fl(n),Z=Y(n);const ie=[a$,r$],re=[];function Te(Le,Oe){return Oe&4&&(ye=null),ye==null&&(ye=!H.isEmpty(Le[2].meta)),ye?0:1}return Ae=Te(n,-1),Fe=re[Ae]=ie[Ae](n),tn=new $i({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=W(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),_=y("span"),b=W(g),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),O=y("td"),D=W(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",q=E(),N=y("td"),j=W(R),V=E(),K=y("tr"),ee=y("td"),ee.textContent="URL",te=E(),G=y("td"),X=W(ce),le=E(),ve=y("tr"),Se=y("td"),Se.textContent="Referer",Ve=E(),ze=y("td"),Z.c(),we=E(),Me=y("tr"),Ze=y("td"),Ze.textContent="Remote IP",mt=E(),Ge=y("td"),ne=W(Ye),qe=E(),xe=y("tr"),en=y("td"),en.textContent="User IP",Ne=E(),Ce=y("td"),Et=W(tt),Rt=E(),Ht=y("tr"),Ln=y("td"),Ln.textContent="UserAgent",ti=E(),Sn=y("td"),Nn=W(ht),ds=E(),ni=y("tr"),Mi=y("td"),Mi.textContent="Meta",ps=E(),pi=y("td"),Fe.c(),Xe=E(),Ot=y("tr"),$n=y("td"),$n.textContent="Created",Fn=E(),Wi=y("td"),U(tn.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(_,"class","label"),x(_,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h(Se,"class","min-width txt-hint txt-bold"),h(Ze,"class","min-width txt-hint txt-bold"),h(en,"class","min-width txt-hint txt-bold"),h(Ln,"class","min-width txt-hint txt-bold"),h(Mi,"class","min-width txt-hint txt-bold"),h($n,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Le,Oe){S(Le,e,Oe),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,_),v(_,b),v(t,k),v(t,$),v($,T),v($,C),v($,O),v(O,D),v(t,I),v(t,L),v(L,F),v(L,q),v(L,N),v(N,j),v(t,V),v(t,K),v(K,ee),v(K,te),v(K,G),v(G,X),v(t,le),v(t,ve),v(ve,Se),v(ve,Ve),v(ve,ze),Z.m(ze,null),v(t,we),v(t,Me),v(Me,Ze),v(Me,mt),v(Me,Ge),v(Ge,ne),v(t,qe),v(t,xe),v(xe,en),v(xe,Ne),v(xe,Ce),v(Ce,Et),v(t,Rt),v(t,Ht),v(Ht,Ln),v(Ht,ti),v(Ht,Sn),v(Sn,Nn),v(t,ds),v(t,ni),v(ni,Mi),v(ni,ps),v(ni,pi),re[Ae].m(pi,null),v(t,Xe),v(t,Ot),v(Ot,$n),v(Ot,Fn),v(Ot,Wi),z(tn,Wi,null),an=!0},p(Le,Oe){var Ue;(!an||Oe&4)&&r!==(r=Le[2].id+"")&&oe(a,r),(!an||Oe&4)&&g!==(g=Le[2].status+"")&&oe(b,g),(!an||Oe&4)&&x(_,"label-danger",Le[2].status>=400),(!an||Oe&4)&&M!==(M=((Ue=Le[2].method)==null?void 0:Ue.toUpperCase())+"")&&oe(D,M),(!an||Oe&4)&&R!==(R=Le[2].auth+"")&&oe(j,R),(!an||Oe&4)&&ce!==(ce=Le[2].url+"")&&oe(X,ce),Y===(Y=Fl(Le))&&Z?Z.p(Le,Oe):(Z.d(1),Z=Y(Le),Z&&(Z.c(),Z.m(ze,null))),(!an||Oe&4)&&Ye!==(Ye=Le[2].remoteIp+"")&&oe(ne,Ye),(!an||Oe&4)&&tt!==(tt=Le[2].userIp+"")&&oe(Et,tt),(!an||Oe&4)&&ht!==(ht=Le[2].userAgent+"")&&oe(Nn,ht);let Ke=Ae;Ae=Te(Le,Oe),Ae===Ke?re[Ae].p(Le,Oe):(ae(),P(re[Ke],1,1,()=>{re[Ke]=null}),ue(),Fe=re[Ae],Fe?Fe.p(Le,Oe):(Fe=re[Ae]=ie[Ae](Le),Fe.c()),A(Fe,1),Fe.m(pi,null));const Re={};Oe&4&&(Re.date=Le[2].created),tn.$set(Re)},i(Le){an||(A(Fe),A(tn.$$.fragment,Le),an=!0)},o(Le){P(Fe),P(tn.$$.fragment,Le),an=!1},d(Le){Le&&w(e),Z.d(),re[Ae].d(),B(tn)}}}function f$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function c$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function d$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[c$],header:[f$],default:[u$]},$$scope:{ctx:n}};return e=new hn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),B(e,s)}}}function p$(n,e,t){let i,s=new Br;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){se[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){me.call(this,n,d)}function f(d){me.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class m$ extends be{constructor(e){super(),ge(this,e,p$,d$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function h$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[1],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Pc(n){let e,t;return e=new GS({props:{filter:n[4],presets:n[5]}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Lc(n){let e,t;return e=new h2({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function _$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$=n[3],T,C=n[3],O,M;r=new Na({}),r.$on("refresh",n[9]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[h$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Ko({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let D=Pc(n),I=Lc(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=W(n[6]),o=E(),U(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),U(p.$$.fragment),m=E(),U(_.$$.fragment),g=E(),b=y("div"),k=E(),D.c(),T=E(),I.c(),O=$e(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),z(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),z(p,d,null),v(e,m),z(_,e,null),v(e,g),v(e,b),v(e,k),D.m(e,null),S(L,T,F),I.m(L,F),S(L,O,F),M=!0},p(L,F){(!M||F&64)&&oe(l,L[6]);const q={};F&49154&&(q.$$scope={dirty:F,ctx:L}),p.$set(q);const N={};F&1&&(N.value=L[0]),_.$set(N),F&8&&_e($,$=L[3])?(ae(),P(D,1,1,Q),ue(),D=Pc(L),D.c(),A(D,1),D.m(e,null)):D.p(L,F),F&8&&_e(C,C=L[3])?(ae(),P(I,1,1,Q),ue(),I=Lc(L),I.c(),A(I,1),I.m(O.parentNode,O)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(_.$$.fragment,L),A(D),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(_.$$.fragment,L),P(D),P(I),M=!1},d(L){L&&w(e),B(r),B(p),B(_),D.d(L),L&&w(T),L&&w(O),I.d(L)}}}function g$(n){let e,t,i,s;e=new Pn({props:{$$slots:{default:[_$]},$$scope:{ctx:n}}});let l={};return i=new m$({props:l}),n[13](i),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(o,r){z(e,o,r),S(o,t,r),z(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){B(e,o),o&&w(t),n[13](null),B(i,o)}}}const Nc="includeAdminLogs";function b$(n,e,t){var k;let i,s,l;Je(n,Nt,$=>t(6,l=$));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];rn(Nt,l="Request logs",l);let r,a="",u=((k=window.localStorage)==null?void 0:k.getItem(Nc))<<0,f=1;function d(){t(3,f++,f)}const p=()=>d();function m(){u=this.checked,t(1,u)}const _=$=>t(0,a=$.detail),g=$=>r==null?void 0:r.show($==null?void 0:$.detail);function b($){se[$?"unshift":"push"](()=>{r=$,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Nc,u<<0),n.$$.dirty&1&&t(4,s=H.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,d,p,m,_,g,b]}class v$ extends be{constructor(e){super(),ge(this,e,b$,g$,_e,{})}}const lu=In({});function vn(n,e,t){lu.set({text:n,yesCallback:e,noCallback:t})}function ab(){lu.set({})}function Fc(n){let e,t,i;const s=n[17].default,l=yt(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&wt(l,s,o,o[16],i?kt(s,o[16],r,null):St(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function y$(n){let e,t,i,s,l=n[0]&&Fc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Fc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,Ee(s)}}}function k$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,_,g=!1;const b=Tt();function k(){t(0,o=!1),g=!1,clearTimeout(_)}function $(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(V){return!d||V.classList.contains(u)||(m==null?void 0:m.contains(V))&&!d.contains(V)||d.contains(V)&&V.closest&&V.closest("."+u)}function O(V){(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function M(V){(V.code==="Enter"||V.code==="Space")&&(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function D(V){o&&r&&V.code==="Escape"&&(V.preventDefault(),k())}function I(V){o&&!(d!=null&&d.contains(V.target))?g=!0:g&&(g=!1)}function L(V){var K;o&&g&&!(d!=null&&d.contains(V.target))&&!(m!=null&&m.contains(V.target))&&!((K=V.target)!=null&&K.closest(".flatpickr-calendar"))&&k()}function F(V){I(V),L(V)}function q(V){N(),d==null||d.addEventListener("click",O),t(15,m=V||(d==null?void 0:d.parentNode)),m==null||m.addEventListener("click",O),m==null||m.addEventListener("keydown",M)}function N(){clearTimeout(_),d==null||d.removeEventListener("click",O),m==null||m.removeEventListener("click",O),m==null||m.removeEventListener("keydown",M)}xt(()=>(q(),()=>N()));function R(V){se[V?"unshift":"push"](()=>{p=V,t(3,p)})}function j(V){se[V?"unshift":"push"](()=>{d=V,t(2,d)})}return n.$$set=V=>{"trigger"in V&&t(8,l=V.trigger),"active"in V&&t(0,o=V.active),"escClose"in V&&t(9,r=V.escClose),"autoScroll"in V&&t(10,a=V.autoScroll),"closableClass"in V&&t(11,u=V.closableClass),"class"in V&&t(1,f=V.class),"$$scope"in V&&t(16,s=V.$$scope)},n.$$.update=()=>{var V,K;n.$$.dirty&260&&d&&q(l),n.$$.dirty&32769&&(o?((V=m==null?void 0:m.classList)==null||V.add("active"),b("show")):((K=m==null?void 0:m.classList)==null||K.remove("active"),b("hide")))},[o,f,d,p,D,I,L,F,l,r,a,u,k,$,T,m,s,i,R,j]}class Kn extends be{constructor(e){super(),ge(this,e,k$,y$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function Rc(n,e,t){const i=n.slice();return i[27]=e[t],i}function w$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=W("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function S$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Lt(o,r(n)),se.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ke(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ae();const p=e;P(p.$$.fragment,1,0,()=>{B(p,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function $$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function C$(n){let e,t,i,s;const l=[$$,S$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function qc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[C$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&qc(n);return{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),r&&r.c(),l=$e()},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=qc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function M$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=W(t),s=W(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&oe(i,t)},d(l){l&&w(e)}}}function Vc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function O$(n){let e,t,i,s,l,o,r=n[5]!=""&&Vc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Vc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,Ee(o)}}}function D$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[O$],header:[M$],default:[T$]},$$scope:{ctx:n}};for(let l=0;lte.name==V);ee?H.removeByValue(K.columns,ee):H.pushUnique(K.columns,{name:V}),t(2,p=H.buildIndex(K))}xt(async()=>{t(8,g=!0);try{t(7,_=(await rt(()=>import("./CodeEditor-65cf3b79.js"),["./CodeEditor-65cf3b79.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(V){console.warn(V)}t(8,g=!1)});const M=()=>T(),D=()=>k(),I=()=>C(),L=V=>{t(3,s.unique=V.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=H.buildIndex(s))};function F(V){p=V,t(2,p)}const q=V=>O(V);function N(V){se[V?"unshift":"push"](()=>{f=V,t(4,f)})}function R(V){me.call(this,n,V)}function j(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Kt(V)),t(14,r=Qe(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,K,ee;n.$$.dirty[0]&1&&t(10,i=(((K=(V=u==null?void 0:u.schema)==null?void 0:V.filter(te=>!te.toDelete))==null?void 0:K.map(te=>te.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=H.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(te=>te.name))||[])},[u,k,p,s,f,d,m,_,g,l,i,T,C,O,r,b,M,D,I,L,F,q,N,R,j]}class A$ extends be{constructor(e){super(),ge(this,e,E$,D$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Hc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=H.parseIndex(i[10]);return i[11]=s,i}function zc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Bc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(Uc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&zc();function d(){return n[4](n[10],n[13])}return{c(){var m,_;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=W(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var g,b;S(m,e,_),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[De(r=We.call(null,e,((b=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,_){var g,b,k,$,T;n=m,n[11].unique?f||(f=zc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(Uc).join(", "))+"")&&oe(l,s),_&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&Vt(r.update)&&_&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,Ee(u)}}}function I$(n){var C,O,M;let e,t,i=(((O=(C=n[0])==null?void 0:C.indexes)==null?void 0:O.length)||0)+"",s,l,o,r,a,u,f,d,p,m,_,g,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let D=0;Dhe(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=W("Unique constraints and indexes ("),s=W(i),l=W(")"),o=E(),r=y("div");for(let D=0;D+ - New index`,f=E(),U(d.$$.fragment),h(e,"class","section-title"),h(u,"type","button"),h(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),h(r,"class","indexes-list svelte-167lbwu")},m(D,I){S(D,e,I),v(e,t),v(e,s),v(e,l),S(D,o,I),S(D,r,I);for(let L=0;Lp=!1)),d.$set(L)},i(D){m||(A(d.$$.fragment,D),m=!0)},o(D){P(d.$$.fragment,D),m=!1},d(D){D&&w(e),D&&w(o),D&&w(r),dt(k,D),D&&w(f),n[6](null),B(d,D),_=!1,g()}}}const Uc=n=>n.name;function P$(n,e,t){let i;Je(n,Ci,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let g=0;gl==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function u(m){se[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const d=m=>{for(let _=0;_{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,d,p]}class L$ extends be{constructor(e){super(),ge(this,e,P$,I$,_e,{collection:0})}}function Wc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Yc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function d(...p){return n[5](n[6],...p)}return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),o=W(l),r=E(),h(t,"class","icon "+n[6].icon+" svelte-1p626x7"),h(s,"class","txt"),h(e,"tabindex","0"),h(e,"class","dropdown-item closable svelte-1p626x7")},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),v(s,o),v(e,r),a||(u=[J(e,"click",An(f)),J(e,"keydown",An(d))],a=!0)},p(p,m){n=p},d(p){p&&w(e),a=!1,Ee(u)}}}function N$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class q$ extends be{constructor(e){super(),ge(this,e,R$,F$,_e,{class:0})}}const j$=n=>({interactive:n&128,hasErrors:n&64}),Kc=n=>({interactive:n[7],hasErrors:n[6]}),V$=n=>({interactive:n&128,hasErrors:n&64}),Jc=n=>({interactive:n[7],hasErrors:n[6]}),H$=n=>({interactive:n&128,hasErrors:n&64}),Zc=n=>({interactive:n[7],hasErrors:n[6]}),z$=n=>({interactive:n&128,hasErrors:n&64}),Gc=n=>({interactive:n[7],hasErrors:n[6]});function Xc(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","drag-handle-wrapper"),h(e,"draggable","true"),h(e,"aria-label","Sort")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Qc(n){let e,t,i,s;return{c(){e=y("span"),h(e,"class","marker marker-required")},m(l,o){S(l,e,o),i||(s=De(t=We.call(null,e,n[5])),i=!0)},p(l,o){t&&Vt(t.update)&&o&32&&t.update.call(null,l[5])},d(l){l&&w(e),i=!1,s()}}}function B$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_=n[0].required&&Qc(n);return{c(){e=y("div"),_&&_.c(),t=E(),i=y("div"),s=y("i"),o=E(),r=y("input"),h(e,"class","markers"),h(s,"class",l=H.getFieldTypeIcon(n[0].type)),h(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),x(i,"txt-disabled",!n[7]),h(r,"type","text"),r.required=!0,r.disabled=a=!n[7],r.readOnly=u=n[0].id&&n[0].system,h(r,"spellcheck","false"),r.autofocus=f=!n[0].id,h(r,"placeholder","Field name"),r.value=d=n[0].name},m(g,b){S(g,e,b),_&&_.m(e,null),S(g,t,b),S(g,i,b),v(i,s),S(g,o,b),S(g,r,b),n[15](r),n[0].id||r.focus(),p||(m=J(r,"input",n[16]),p=!0)},p(g,b){g[0].required?_?_.p(g,b):(_=Qc(g),_.c(),_.m(e,null)):_&&(_.d(1),_=null),b&1&&l!==(l=H.getFieldTypeIcon(g[0].type))&&h(s,"class",l),b&128&&x(i,"txt-disabled",!g[7]),b&128&&a!==(a=!g[7])&&(r.disabled=a),b&1&&u!==(u=g[0].id&&g[0].system)&&(r.readOnly=u),b&1&&f!==(f=!g[0].id)&&(r.autofocus=f),b&1&&d!==(d=g[0].name)&&r.value!==d&&(r.value=d)},d(g){g&&w(e),_&&_.d(),g&&w(t),g&&w(i),g&&w(o),g&&w(r),n[15](null),p=!1,m()}}}function U$(n){let e,t,i;return{c(){e=y("button"),t=y("i"),h(t,"class","ri-settings-3-line"),h(e,"type","button"),h(e,"aria-label","Field options"),h(e,"class",i="btn btn-sm btn-circle btn-transparent options-trigger "+(n[6]?"btn-danger":"btn-hint"))},m(s,l){S(s,e,l),v(e,t),n[17](e)},p(s,l){l&64&&i!==(i="btn btn-sm btn-circle btn-transparent options-trigger "+(s[6]?"btn-danger":"btn-hint"))&&h(e,"class",i)},d(s){s&&w(e),n[17](null)}}}function W$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),h(e,"aria-label","Restore")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,"Restore")),J(e,"click",n[10])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function xc(n){let e,t;return e=new Kn({props:{class:"dropdown dropdown-block schema-field-dropdown",trigger:n[3],$$slots:{default:[J$]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.trigger=i[3]),s&8388833&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Y$(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),o=W(n[5]),r=E(),a=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(a,"class","ri-information-line link-hint"),h(s,"for",f=n[25])},m(m,_){S(m,e,_),e.checked=n[0].required,S(m,i,_),S(m,s,_),v(s,l),v(l,o),v(s,r),v(s,a),d||(p=[J(e,"change",n[18]),De(u=We.call(null,a,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(n[0])}.`,position:"right"}))],d=!0)},p(m,_){_&33554432&&t!==(t=m[25])&&h(e,"id",t),_&1&&(e.checked=m[0].required),_&32&&oe(o,m[5]),u&&Vt(u.update)&&_&1&&u.update.call(null,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(m[0])}.`,position:"right"}),_&33554432&&f!==(f=m[25])&&h(s,"for",f)},d(m){m&&w(e),m&&w(i),m&&w(s),d=!1,Ee(p)}}}function ed(n){let e,t,i,s,l,o,r,a,u;return a=new Kn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[K$]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=E(),s=y("div"),l=y("button"),o=y("i"),r=E(),U(a.$$.fragment),h(t,"class","flex-fill"),h(o,"class","ri-more-line"),h(l,"type","button"),h(l,"aria-label","More"),h(l,"class","btn btn-circle btn-sm btn-transparent"),h(s,"class","inline-flex flex-gap-sm flex-nowrap"),h(e,"class","col-sm-4 m-l-auto txt-right")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(s,l),v(l,o),v(l,r),z(a,l,null),u=!0},p(f,d){const p={};d&8388608&&(p.$$scope={dirty:d,ctx:f}),a.$set(p)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){P(a.$$.fragment,f),u=!1},d(f){f&&w(e),B(a)}}}function K$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Remove',h(e,"type","button"),h(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[9]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function J$(n){let e,t,i,s,l,o,r,a,u;const f=n[13].options,d=yt(f,n,n[23],Zc),p=n[13].beforeNonempty,m=yt(p,n,n[23],Jc);o=new de({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[Y$,({uniqueId:k})=>({25:k}),({uniqueId:k})=>k?33554432:0]},$$scope:{ctx:n}}});const _=n[13].afterNonempty,g=yt(_,n,n[23],Kc);let b=!n[0].toDelete&&ed(n);return{c(){e=y("div"),t=y("div"),d&&d.c(),i=E(),m&&m.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),g&&g.c(),a=E(),b&&b.c(),h(t,"class","col-sm-12 hidden-empty"),h(l,"class","col-sm-4"),h(e,"class","grid grid-sm")},m(k,$){S(k,e,$),v(e,t),d&&d.m(t,null),v(e,i),m&&m.m(e,null),v(e,s),v(e,l),z(o,l,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0},p(k,$){d&&d.p&&(!u||$&8388800)&&wt(d,f,k,k[23],u?kt(f,k[23],$,H$):St(k[23]),Zc),m&&m.p&&(!u||$&8388800)&&wt(m,p,k,k[23],u?kt(p,k[23],$,V$):St(k[23]),Jc);const T={};$&41943073&&(T.$$scope={dirty:$,ctx:k}),o.$set(T),g&&g.p&&(!u||$&8388800)&&wt(g,_,k,k[23],u?kt(_,k[23],$,j$):St(k[23]),Kc),k[0].toDelete?b&&(ae(),P(b,1,1,()=>{b=null}),ue()):b?(b.p(k,$),$&1&&A(b,1)):(b=ed(k),b.c(),A(b,1),b.m(e,null))},i(k){u||(A(d,k),A(m,k),A(o.$$.fragment,k),A(g,k),A(b),u=!0)},o(k){P(d,k),P(m,k),P(o.$$.fragment,k),P(g,k),P(b),u=!1},d(k){k&&w(e),d&&d.d(k),m&&m.d(k),B(o),g&&g.d(k),b&&b.d()}}}function Z$(n){let e,t,i,s,l,o,r,a,u,f,d,p=n[7]&&Xc();s=new de({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[B$]},$$scope:{ctx:n}}});const m=n[13].default,_=yt(m,n,n[23],Gc);function g(T,C){if(T[0].toDelete)return W$;if(T[7])return U$}let b=g(n),k=b&&b(n),$=n[7]&&xc(n);return{c(){e=y("div"),t=y("div"),p&&p.c(),i=E(),U(s.$$.fragment),l=E(),_&&_.c(),o=E(),k&&k.c(),r=E(),$&&$.c(),h(t,"class","schema-field-header"),h(e,"draggable",!0),h(e,"class","schema-field"),x(e,"drag-over",n[4])},m(T,C){S(T,e,C),v(e,t),p&&p.m(t,null),v(t,i),z(s,t,null),v(t,l),_&&_.m(t,null),v(t,o),k&&k.m(t,null),v(e,r),$&&$.m(e,null),u=!0,f||(d=[J(e,"dragstart",n[19]),J(e,"dragenter",n[20]),J(e,"drop",at(n[21])),J(e,"dragleave",n[22]),J(e,"dragover",at(n[14]))],f=!0)},p(T,[C]){T[7]?p||(p=Xc(),p.c(),p.m(t,i)):p&&(p.d(1),p=null);const O={};C&128&&(O.class="form-field required m-0 "+(T[7]?"":"disabled")),C&2&&(O.name="schema."+T[1]+".name"),C&8388773&&(O.$$scope={dirty:C,ctx:T}),s.$set(O),_&&_.p&&(!u||C&8388800)&&wt(_,m,T,T[23],u?kt(m,T[23],C,z$):St(T[23]),Gc),b===(b=g(T))&&k?k.p(T,C):(k&&k.d(1),k=b&&b(T),k&&(k.c(),k.m(t,null))),T[7]?$?($.p(T,C),C&128&&A($,1)):($=xc(T),$.c(),A($,1),$.m(e,null)):$&&(ae(),P($,1,1,()=>{$=null}),ue()),(!u||C&16)&&x(e,"drag-over",T[4])},i(T){u||(A(s.$$.fragment,T),A(_,T),A($),T&&nt(()=>{u&&(a||(a=He(e,Ct,{duration:150},!0)),a.run(1))}),u=!0)},o(T){P(s.$$.fragment,T),P(_,T),P($),T&&(a||(a=He(e,Ct,{duration:150},!1)),a.run(0)),u=!1},d(T){T&&w(e),p&&p.d(),B(s),_&&_.d(T),k&&k.d(),$&&$.d(),T&&a&&a.end(),f=!1,Ee(d)}}}function G$(n,e,t){let i,s,l,o;Je(n,Ci,N=>t(12,o=N));let{$$slots:r={},$$scope:a}=e,{key:u=""}=e,{field:f=new wn}=e,d,p,m=!1;const _=Tt(),g={bool:"Nonfalsey",number:"Nonzero"};function b(){f.id?t(0,f.toDelete=!0,f):_("remove")}function k(){t(0,f.toDelete=!1,f),mn({})}function $(N){return H.slugify(N)}xt(()=>{f.onMountSelect&&(t(0,f.onMountSelect=!1,f),d==null||d.select())});function T(N){me.call(this,n,N)}function C(N){se[N?"unshift":"push"](()=>{d=N,t(2,d)})}const O=N=>{const R=f.name;t(0,f.name=$(N.target.value),f),N.target.value=f.name,_("rename",{oldName:R,newName:f.name})};function M(N){se[N?"unshift":"push"](()=>{p=N,t(3,p)})}function D(){f.required=this.checked,t(0,f)}const I=N=>{if(!N.target.classList.contains("drag-handle-wrapper")){N.preventDefault();return}const R=document.createElement("div");N.dataTransfer.setDragImage(R,0,0),i&&_("dragstart",N)},L=N=>{i&&(t(4,m=!0),_("dragenter",N))},F=N=>{i&&(t(4,m=!1),_("drop",N))},q=N=>{i&&(t(4,m=!1),_("dragleave",N))};return n.$$set=N=>{"key"in N&&t(1,u=N.key),"field"in N&&t(0,f=N.field),"$$scope"in N&&t(23,a=N.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&f.toDelete&&f.originalName&&f.name!==f.originalName&&t(0,f.name=f.originalName,f),n.$$.dirty&1&&!f.originalName&&f.name&&t(0,f.originalName=f.name,f),n.$$.dirty&1&&typeof f.toDelete>"u"&&t(0,f.toDelete=!1,f),n.$$.dirty&1&&f.required&&t(0,f.nullable=!1,f),n.$$.dirty&1&&t(7,i=!f.toDelete&&!(f.id&&f.system)),n.$$.dirty&4098&&t(6,s=!H.isEmpty(H.getNestedVal(o,`schema.${u}`))),n.$$.dirty&1&&t(5,l=g[f==null?void 0:f.type]||"Nonempty")},[f,u,d,p,m,l,s,i,_,b,k,$,o,r,T,C,O,M,D,I,L,F,q,a]}class di extends be{constructor(e){super(),ge(this,e,G$,Z$,_e,{key:1,field:0})}}function X$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min","0")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},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=y("label"),t=W("Max length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min",r=n[0].options.min||0)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&8192&&i!==(i=f[13])&&h(e,"for",i),d&8192&&o!==(o=f[13])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min||0)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function x$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Regex pattern"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","text"),h(l,"id",o=n[13]),h(l,"placeholder","Valid Go regular expression, eg. ^w+$")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&&l.value!==u[0].options.pattern&&fe(l,u[0].options.pattern)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function eC(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[X$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[Q$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[x$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),h(t,"class","col-sm-3"),h(l,"class","col-sm-3"),h(a,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(d,p){S(d,e,p),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),f=!0},p(d,p){const m={};p&2&&(m.name="schema."+d[1]+".options.min"),p&24577&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const _={};p&2&&(_.name="schema."+d[1]+".options.max"),p&24577&&(_.$$scope={dirty:p,ctx:d}),o.$set(_);const g={};p&2&&(g.name="schema."+d[1]+".options.pattern"),p&24577&&(g.$$scope={dirty:p,ctx:d}),u.$set(g)},i(d){f||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),f=!1},d(d){d&&w(e),B(i),B(o),B(u)}}}function tC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[eC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("drop",n[9]),e.$on("dragstart",n[10]),e.$on("dragenter",n[11]),e.$on("dragleave",n[12]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Jt(r[2])]):{};a&16387&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function nC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(k){l=k,t(0,l)}function d(k){me.call(this,n,k)}function p(k){me.call(this,n,k)}function m(k){me.call(this,n,k)}function _(k){me.call(this,n,k)}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$set=k=>{e=je(je({},e),Kt(k)),t(2,s=Qe(e,i)),"field"in k&&t(0,l=k.field),"key"in k&&t(1,o=k.key)},[l,o,s,r,a,u,f,d,p,m,_,g,b]}class iC extends be{constructor(e){super(),ge(this,e,nC,tC,_e,{field:0,key:1})}}function sC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function lC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Max"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),h(l,"min",r=n[0].options.min)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&4096&&i!==(i=f[12])&&h(e,"for",i),d&4096&&o!==(o=f[12])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function oC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[sC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[lC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function rC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[oC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Jt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function aC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Kt(b)),t(2,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class uC extends be{constructor(e){super(),ge(this,e,aC,rC,_e,{field:0,key:1})}}function fC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Jt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function cC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Kt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class dC extends be{constructor(e){super(),ge(this,e,cC,fC,_e,{field:0,key:1})}}function pC(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=H.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=je(je({},e),Kt(u)),t(3,l=Qe(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 Vs extends be{constructor(e){super(),ge(this,e,mC,pC,_e,{value:0,separator:1})}}function hC(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[3](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(g.value=n[0].options.exceptDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`List of domains that are NOT allowed. +`)}},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 d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",_="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 xS(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(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")&&h(e,"class",i)},i:Q,o:Q,d(s){s&&w(e)}}}function e$(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=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.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 xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class rb extends ve{constructor(e){super(),be(this,e,e$,xS,_e,{class:0,content:2,language:3})}}const t$=n=>({}),Oc=n=>({}),n$=n=>({}),Dc=n=>({});function Ec(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T=n[4]&&!n[2]&&Ac(n);const C=n[19].header,D=wt(C,n,n[18],Dc);let M=n[4]&&n[2]&&Ic(n);const O=n[19].default,I=wt(O,n,n[18],null),L=n[19].footer,F=wt(L,n,n[18],Oc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),D&&D.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(q,N){S(q,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),D&&D.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",at(n[20])),J(f,"scroll",n[22])],k=!0)},p(q,N){n=q,n[4]&&!n[2]?T?T.p(n,N):(T=Ac(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),D&&D.p&&(!b||N[0]&262144)&&$t(D,C,n,n[18],b?St(C,n[18],N,n$):Ct(n[18]),Dc),n[4]&&n[2]?M?M.p(n,N):(M=Ic(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&$t(I,O,n,n[18],b?St(O,n[18],N,null):Ct(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&$t(F,L,n,n[18],b?St(L,n[18],N,t$):Ct(n[18]),Oc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(q){b||(q&&nt(()=>{b&&(i||(i=He(t,Xr,{duration:ys,opacity:0},!0)),i.run(1))}),A(D,q),A(I,q),A(F,q),nt(()=>{b&&(g&&g.end(1),_=X_(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),_.start())}),b=!0)},o(q){q&&(i||(i=He(t,Xr,{duration:ys,opacity:0},!1)),i.run(0)),P(D,q),P(I,q),P(F,q),_&&_.invalidate(),g=ka(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(q){q&&w(e),q&&i&&i.end(),T&&T.d(),D&&D.d(q),M&&M.d(),I&&I.d(q),n[21](null),F&&F.d(q),q&&g&&g.end(),k=!1,Ee($)}}}function Ac(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ic(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function i$(n){let e,t,i,s,l=n[0]&&Ec(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Ec(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Ee(s)}}}let Xi,Tr=[];function ab(){return Xi=Xi||document.querySelector(".overlays"),Xi||(Xi=document.createElement("div"),Xi.classList.add("overlays"),document.body.appendChild(Xi)),Xi}let ys=150;function Pc(){return 1e3+ab().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:d=void 0}=e,{beforeHide:p=void 0}=e;const m=Tt(),_="op_"+H.randomString(10);let g,b,k,$,T="",C=o;function D(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function O(){return o}async function I(G){t(17,C=G),G?(k=document.activeElement,m("show"),g==null||g.focus()):(clearTimeout($),m("hide"),k==null||k.focus()),await an(),L()}function L(){g&&(o?t(6,g.style.zIndex=Pc(),g):t(6,g.style="",g))}function F(){H.pushUnique(Tr,_),document.body.classList.add("overlay-active")}function q(){H.removeByValue(Tr,_),Tr.length||document.body.classList.remove("overlay-active")}function N(G){o&&f&&G.code=="Escape"&&!H.isInput(G.target)&&g&&g.style.zIndex==Pc()&&(G.preventDefault(),M())}function R(G){o&&j(b)}function j(G,ce){ce&&t(8,T=""),G&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}G.scrollTop==0?t(8,T+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}xt(()=>(ab().appendChild(g),()=>{var G;clearTimeout($),q(),(G=g==null?void 0:g.classList)==null||G.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const V=()=>a?M():!0;function K(G){se[G?"unshift":"push"](()=>{b=G,t(7,b)})}const ee=G=>j(G.target);function te(G){se[G?"unshift":"push"](()=>{g=G,t(6,g)})}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,d=G.beforeOpen),"beforeHide"in G&&t(14,p=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&j(b,!0),n.$$.dirty[0]&64&&g&&L(),n.$$.dirty[0]&1&&(o?F():q())},[o,l,r,a,u,M,g,b,T,N,R,j,f,d,p,D,O,C,s,i,V,K,ee,te]}class hn extends ve{constructor(e){super(),be(this,e,s$,i$,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function l$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function o$(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=W(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&oe(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function r$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function a$(n){let e,t,i;return t=new rb({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function u$(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,_,g=n[2].status+"",b,k,$,T,C,D,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",O,I,L,F,q,N,R=n[2].auth+"",j,V,K,ee,te,G,ce=n[2].url+"",X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye=n[2].remoteIp+"",ne,qe,xe,en,Ne,Ce,tt=n[2].userIp+"",Et,Rt,Ht,Ln,ti,Sn,ht=n[2].userAgent+"",Nn,ds,ni,Mi,ps,pi,ge,Ae,Fe,Xe,Ot,$n,Fn,Wi,tn,fn;function Fl(Le,Oe){return Le[2].referer?o$:l$}let Y=Fl(n),Z=Y(n);const ie=[a$,r$],re=[];function Te(Le,Oe){return Oe&4&&(ge=null),ge==null&&(ge=!H.isEmpty(Le[2].meta)),ge?0:1}return Ae=Te(n,-1),Fe=re[Ae]=ie[Ae](n),tn=new $i({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=W(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),_=y("span"),b=W(g),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),D=y("td"),O=W(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",q=E(),N=y("td"),j=W(R),V=E(),K=y("tr"),ee=y("td"),ee.textContent="URL",te=E(),G=y("td"),X=W(ce),le=E(),ye=y("tr"),Se=y("td"),Se.textContent="Referer",Ve=E(),ze=y("td"),Z.c(),we=E(),Me=y("tr"),Ze=y("td"),Ze.textContent="Remote IP",mt=E(),Ge=y("td"),ne=W(Ye),qe=E(),xe=y("tr"),en=y("td"),en.textContent="User IP",Ne=E(),Ce=y("td"),Et=W(tt),Rt=E(),Ht=y("tr"),Ln=y("td"),Ln.textContent="UserAgent",ti=E(),Sn=y("td"),Nn=W(ht),ds=E(),ni=y("tr"),Mi=y("td"),Mi.textContent="Meta",ps=E(),pi=y("td"),Fe.c(),Xe=E(),Ot=y("tr"),$n=y("td"),$n.textContent="Created",Fn=E(),Wi=y("td"),U(tn.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(_,"class","label"),x(_,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h(Se,"class","min-width txt-hint txt-bold"),h(Ze,"class","min-width txt-hint txt-bold"),h(en,"class","min-width txt-hint txt-bold"),h(Ln,"class","min-width txt-hint txt-bold"),h(Mi,"class","min-width txt-hint txt-bold"),h($n,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Le,Oe){S(Le,e,Oe),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,_),v(_,b),v(t,k),v(t,$),v($,T),v($,C),v($,D),v(D,O),v(t,I),v(t,L),v(L,F),v(L,q),v(L,N),v(N,j),v(t,V),v(t,K),v(K,ee),v(K,te),v(K,G),v(G,X),v(t,le),v(t,ye),v(ye,Se),v(ye,Ve),v(ye,ze),Z.m(ze,null),v(t,we),v(t,Me),v(Me,Ze),v(Me,mt),v(Me,Ge),v(Ge,ne),v(t,qe),v(t,xe),v(xe,en),v(xe,Ne),v(xe,Ce),v(Ce,Et),v(t,Rt),v(t,Ht),v(Ht,Ln),v(Ht,ti),v(Ht,Sn),v(Sn,Nn),v(t,ds),v(t,ni),v(ni,Mi),v(ni,ps),v(ni,pi),re[Ae].m(pi,null),v(t,Xe),v(t,Ot),v(Ot,$n),v(Ot,Fn),v(Ot,Wi),z(tn,Wi,null),fn=!0},p(Le,Oe){var Ue;(!fn||Oe&4)&&r!==(r=Le[2].id+"")&&oe(a,r),(!fn||Oe&4)&&g!==(g=Le[2].status+"")&&oe(b,g),(!fn||Oe&4)&&x(_,"label-danger",Le[2].status>=400),(!fn||Oe&4)&&M!==(M=((Ue=Le[2].method)==null?void 0:Ue.toUpperCase())+"")&&oe(O,M),(!fn||Oe&4)&&R!==(R=Le[2].auth+"")&&oe(j,R),(!fn||Oe&4)&&ce!==(ce=Le[2].url+"")&&oe(X,ce),Y===(Y=Fl(Le))&&Z?Z.p(Le,Oe):(Z.d(1),Z=Y(Le),Z&&(Z.c(),Z.m(ze,null))),(!fn||Oe&4)&&Ye!==(Ye=Le[2].remoteIp+"")&&oe(ne,Ye),(!fn||Oe&4)&&tt!==(tt=Le[2].userIp+"")&&oe(Et,tt),(!fn||Oe&4)&&ht!==(ht=Le[2].userAgent+"")&&oe(Nn,ht);let Ke=Ae;Ae=Te(Le,Oe),Ae===Ke?re[Ae].p(Le,Oe):(ae(),P(re[Ke],1,1,()=>{re[Ke]=null}),ue(),Fe=re[Ae],Fe?Fe.p(Le,Oe):(Fe=re[Ae]=ie[Ae](Le),Fe.c()),A(Fe,1),Fe.m(pi,null));const Re={};Oe&4&&(Re.date=Le[2].created),tn.$set(Re)},i(Le){fn||(A(Fe),A(tn.$$.fragment,Le),fn=!0)},o(Le){P(Fe),P(tn.$$.fragment,Le),fn=!1},d(Le){Le&&w(e),Z.d(),re[Ae].d(),B(tn)}}}function f$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function c$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function d$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[c$],header:[f$],default:[u$]},$$scope:{ctx:n}};return e=new hn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),B(e,s)}}}function p$(n,e,t){let i,s=new zr;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){se[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){me.call(this,n,d)}function f(d){me.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class m$ extends ve{constructor(e){super(),be(this,e,p$,d$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function h$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[1],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lc(n){let e,t;return e=new GS({props:{filter:n[4],presets:n[5]}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Nc(n){let e,t;return e=new h2({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function _$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$=n[3],T,C=n[3],D,M;r=new Fa({}),r.$on("refresh",n[9]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[h$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Yo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let O=Lc(n),I=Nc(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=W(n[6]),o=E(),U(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),U(p.$$.fragment),m=E(),U(_.$$.fragment),g=E(),b=y("div"),k=E(),O.c(),T=E(),I.c(),D=$e(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),z(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),z(p,d,null),v(e,m),z(_,e,null),v(e,g),v(e,b),v(e,k),O.m(e,null),S(L,T,F),I.m(L,F),S(L,D,F),M=!0},p(L,F){(!M||F&64)&&oe(l,L[6]);const q={};F&49154&&(q.$$scope={dirty:F,ctx:L}),p.$set(q);const N={};F&1&&(N.value=L[0]),_.$set(N),F&8&&_e($,$=L[3])?(ae(),P(O,1,1,Q),ue(),O=Lc(L),O.c(),A(O,1),O.m(e,null)):O.p(L,F),F&8&&_e(C,C=L[3])?(ae(),P(I,1,1,Q),ue(),I=Nc(L),I.c(),A(I,1),I.m(D.parentNode,D)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(_.$$.fragment,L),A(O),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(_.$$.fragment,L),P(O),P(I),M=!1},d(L){L&&w(e),B(r),B(p),B(_),O.d(L),L&&w(T),L&&w(D),I.d(L)}}}function g$(n){let e,t,i,s;e=new Pn({props:{$$slots:{default:[_$]},$$scope:{ctx:n}}});let l={};return i=new m$({props:l}),n[13](i),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(o,r){z(e,o,r),S(o,t,r),z(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){B(e,o),o&&w(t),n[13](null),B(i,o)}}}const Fc="includeAdminLogs";function b$(n,e,t){var k;let i,s,l;Je(n,Nt,$=>t(6,l=$));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];rn(Nt,l="Request logs",l);let r,a="",u=((k=window.localStorage)==null?void 0:k.getItem(Fc))<<0,f=1;function d(){t(3,f++,f)}const p=()=>d();function m(){u=this.checked,t(1,u)}const _=$=>t(0,a=$.detail),g=$=>r==null?void 0:r.show($==null?void 0:$.detail);function b($){se[$?"unshift":"push"](()=>{r=$,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Fc,u<<0),n.$$.dirty&1&&t(4,s=H.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,d,p,m,_,g,b]}class v$ extends ve{constructor(e){super(),be(this,e,b$,g$,_e,{})}}const ou=In({});function vn(n,e,t){ou.set({text:n,yesCallback:e,noCallback:t})}function ub(){ou.set({})}function Rc(n){let e,t,i;const s=n[17].default,l=wt(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&$t(l,s,o,o[16],i?St(s,o[16],r,null):Ct(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function y$(n){let e,t,i,s,l=n[0]&&Rc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Rc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,Ee(s)}}}function k$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,_,g=!1;const b=Tt();function k(){t(0,o=!1),g=!1,clearTimeout(_)}function $(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(V){return!d||V.classList.contains(u)||(m==null?void 0:m.contains(V))&&!d.contains(V)||d.contains(V)&&V.closest&&V.closest("."+u)}function D(V){(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function M(V){(V.code==="Enter"||V.code==="Space")&&(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function O(V){o&&r&&V.code==="Escape"&&(V.preventDefault(),k())}function I(V){o&&!(d!=null&&d.contains(V.target))?g=!0:g&&(g=!1)}function L(V){var K;o&&g&&!(d!=null&&d.contains(V.target))&&!(m!=null&&m.contains(V.target))&&!((K=V.target)!=null&&K.closest(".flatpickr-calendar"))&&k()}function F(V){I(V),L(V)}function q(V){N(),d==null||d.addEventListener("click",D),t(15,m=V||(d==null?void 0:d.parentNode)),m==null||m.addEventListener("click",D),m==null||m.addEventListener("keydown",M)}function N(){clearTimeout(_),d==null||d.removeEventListener("click",D),m==null||m.removeEventListener("click",D),m==null||m.removeEventListener("keydown",M)}xt(()=>(q(),()=>N()));function R(V){se[V?"unshift":"push"](()=>{p=V,t(3,p)})}function j(V){se[V?"unshift":"push"](()=>{d=V,t(2,d)})}return n.$$set=V=>{"trigger"in V&&t(8,l=V.trigger),"active"in V&&t(0,o=V.active),"escClose"in V&&t(9,r=V.escClose),"autoScroll"in V&&t(10,a=V.autoScroll),"closableClass"in V&&t(11,u=V.closableClass),"class"in V&&t(1,f=V.class),"$$scope"in V&&t(16,s=V.$$scope)},n.$$.update=()=>{var V,K;n.$$.dirty&260&&d&&q(l),n.$$.dirty&32769&&(o?((V=m==null?void 0:m.classList)==null||V.add("active"),b("show")):((K=m==null?void 0:m.classList)==null||K.remove("active"),b("hide")))},[o,f,d,p,O,I,L,F,l,r,a,u,k,$,T,m,s,i,R,j]}class Kn extends ve{constructor(e){super(),be(this,e,k$,y$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function qc(n,e,t){const i=n.slice();return i[27]=e[t],i}function w$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=W("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function S$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Lt(o,r(n)),se.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ke(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ae();const p=e;P(p.$$.fragment,1,0,()=>{B(p,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function $$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function C$(n){let e,t,i,s;const l=[$$,S$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function jc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[C$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&jc(n);return{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),r&&r.c(),l=$e()},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=jc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function M$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=W(t),s=W(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&oe(i,t)},d(l){l&&w(e)}}}function Hc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function O$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,Ee(o)}}}function D$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[O$],header:[M$],default:[T$]},$$scope:{ctx:n}};for(let l=0;lte.name==V);ee?H.removeByValue(K.columns,ee):H.pushUnique(K.columns,{name:V}),t(2,p=H.buildIndex(K))}xt(async()=>{t(8,g=!0);try{t(7,_=(await rt(()=>import("./CodeEditor-ed3b6d0c.js"),["./CodeEditor-ed3b6d0c.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(V){console.warn(V)}t(8,g=!1)});const M=()=>T(),O=()=>k(),I=()=>C(),L=V=>{t(3,s.unique=V.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=H.buildIndex(s))};function F(V){p=V,t(2,p)}const q=V=>D(V);function N(V){se[V?"unshift":"push"](()=>{f=V,t(4,f)})}function R(V){me.call(this,n,V)}function j(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Jt(V)),t(14,r=Qe(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,K,ee;n.$$.dirty[0]&1&&t(10,i=(((K=(V=u==null?void 0:u.schema)==null?void 0:V.filter(te=>!te.toDelete))==null?void 0:K.map(te=>te.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=H.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(te=>te.name))||[])},[u,k,p,s,f,d,m,_,g,l,i,T,C,D,r,b,M,O,I,L,F,q,N,R,j]}class A$ extends ve{constructor(e){super(),be(this,e,E$,D$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function zc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=H.parseIndex(i[10]);return i[11]=s,i}function Bc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Uc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(Wc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Bc();function d(){return n[4](n[10],n[13])}return{c(){var m,_;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=W(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var g,b;S(m,e,_),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[De(r=We.call(null,e,((b=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,_){var g,b,k,$,T;n=m,n[11].unique?f||(f=Bc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(Wc).join(", "))+"")&&oe(l,s),_&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&Vt(r.update)&&_&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,Ee(u)}}}function I$(n){var C,D,M;let e,t,i=(((D=(C=n[0])==null?void 0:C.indexes)==null?void 0:D.length)||0)+"",s,l,o,r,a,u,f,d,p,m,_,g,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let O=0;Ohe(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=W("Unique constraints and indexes ("),s=W(i),l=W(")"),o=E(),r=y("div");for(let O=0;O+ + New index`,f=E(),U(d.$$.fragment),h(e,"class","section-title"),h(u,"type","button"),h(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),h(r,"class","indexes-list svelte-167lbwu")},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),S(O,o,I),S(O,r,I);for(let L=0;Lp=!1)),d.$set(L)},i(O){m||(A(d.$$.fragment,O),m=!0)},o(O){P(d.$$.fragment,O),m=!1},d(O){O&&w(e),O&&w(o),O&&w(r),pt(k,O),O&&w(f),n[6](null),B(d,O),_=!1,g()}}}const Wc=n=>n.name;function P$(n,e,t){let i;Je(n,Ci,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let g=0;gl==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function u(m){se[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const d=m=>{for(let _=0;_{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,d,p]}class L$ extends ve{constructor(e){super(),be(this,e,P$,I$,_e,{collection:0})}}function Yc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Kc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function d(...p){return n[5](n[6],...p)}return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),o=W(l),r=E(),h(t,"class","icon "+n[6].icon+" svelte-1p626x7"),h(s,"class","txt"),h(e,"tabindex","0"),h(e,"class","dropdown-item closable svelte-1p626x7")},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),v(s,o),v(e,r),a||(u=[J(e,"click",An(f)),J(e,"keydown",An(d))],a=!0)},p(p,m){n=p},d(p){p&&w(e),a=!1,Ee(u)}}}function N$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class q$ extends ve{constructor(e){super(),be(this,e,R$,F$,_e,{class:0})}}const j$=n=>({interactive:n&128,hasErrors:n&64}),Jc=n=>({interactive:n[7],hasErrors:n[6]}),V$=n=>({interactive:n&128,hasErrors:n&64}),Zc=n=>({interactive:n[7],hasErrors:n[6]}),H$=n=>({interactive:n&128,hasErrors:n&64}),Gc=n=>({interactive:n[7],hasErrors:n[6]}),z$=n=>({interactive:n&128,hasErrors:n&64}),Xc=n=>({interactive:n[7],hasErrors:n[6]});function Qc(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","drag-handle-wrapper"),h(e,"draggable","true"),h(e,"aria-label","Sort")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xc(n){let e,t,i,s;return{c(){e=y("span"),h(e,"class","marker marker-required")},m(l,o){S(l,e,o),i||(s=De(t=We.call(null,e,n[5])),i=!0)},p(l,o){t&&Vt(t.update)&&o&32&&t.update.call(null,l[5])},d(l){l&&w(e),i=!1,s()}}}function B$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_=n[0].required&&xc(n);return{c(){e=y("div"),_&&_.c(),t=E(),i=y("div"),s=y("i"),o=E(),r=y("input"),h(e,"class","markers"),h(s,"class",l=H.getFieldTypeIcon(n[0].type)),h(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),x(i,"txt-disabled",!n[7]),h(r,"type","text"),r.required=!0,r.disabled=a=!n[7],r.readOnly=u=n[0].id&&n[0].system,h(r,"spellcheck","false"),r.autofocus=f=!n[0].id,h(r,"placeholder","Field name"),r.value=d=n[0].name},m(g,b){S(g,e,b),_&&_.m(e,null),S(g,t,b),S(g,i,b),v(i,s),S(g,o,b),S(g,r,b),n[15](r),n[0].id||r.focus(),p||(m=J(r,"input",n[16]),p=!0)},p(g,b){g[0].required?_?_.p(g,b):(_=xc(g),_.c(),_.m(e,null)):_&&(_.d(1),_=null),b&1&&l!==(l=H.getFieldTypeIcon(g[0].type))&&h(s,"class",l),b&128&&x(i,"txt-disabled",!g[7]),b&128&&a!==(a=!g[7])&&(r.disabled=a),b&1&&u!==(u=g[0].id&&g[0].system)&&(r.readOnly=u),b&1&&f!==(f=!g[0].id)&&(r.autofocus=f),b&1&&d!==(d=g[0].name)&&r.value!==d&&(r.value=d)},d(g){g&&w(e),_&&_.d(),g&&w(t),g&&w(i),g&&w(o),g&&w(r),n[15](null),p=!1,m()}}}function U$(n){let e,t,i;return{c(){e=y("button"),t=y("i"),h(t,"class","ri-settings-3-line"),h(e,"type","button"),h(e,"aria-label","Field options"),h(e,"class",i="btn btn-sm btn-circle btn-transparent options-trigger "+(n[6]?"btn-danger":"btn-hint"))},m(s,l){S(s,e,l),v(e,t),n[17](e)},p(s,l){l&64&&i!==(i="btn btn-sm btn-circle btn-transparent options-trigger "+(s[6]?"btn-danger":"btn-hint"))&&h(e,"class",i)},d(s){s&&w(e),n[17](null)}}}function W$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),h(e,"aria-label","Restore")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,"Restore")),J(e,"click",n[10])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function ed(n){let e,t;return e=new Kn({props:{class:"dropdown dropdown-block schema-field-dropdown",trigger:n[3],$$slots:{default:[J$]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.trigger=i[3]),s&8388833&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Y$(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),o=W(n[5]),r=E(),a=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(a,"class","ri-information-line link-hint"),h(s,"for",f=n[25])},m(m,_){S(m,e,_),e.checked=n[0].required,S(m,i,_),S(m,s,_),v(s,l),v(l,o),v(s,r),v(s,a),d||(p=[J(e,"change",n[18]),De(u=We.call(null,a,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(n[0])}.`,position:"right"}))],d=!0)},p(m,_){_&33554432&&t!==(t=m[25])&&h(e,"id",t),_&1&&(e.checked=m[0].required),_&32&&oe(o,m[5]),u&&Vt(u.update)&&_&1&&u.update.call(null,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(m[0])}.`,position:"right"}),_&33554432&&f!==(f=m[25])&&h(s,"for",f)},d(m){m&&w(e),m&&w(i),m&&w(s),d=!1,Ee(p)}}}function td(n){let e,t,i,s,l,o,r,a,u;return a=new Kn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[K$]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=E(),s=y("div"),l=y("button"),o=y("i"),r=E(),U(a.$$.fragment),h(t,"class","flex-fill"),h(o,"class","ri-more-line"),h(l,"type","button"),h(l,"aria-label","More"),h(l,"class","btn btn-circle btn-sm btn-transparent"),h(s,"class","inline-flex flex-gap-sm flex-nowrap"),h(e,"class","col-sm-4 m-l-auto txt-right")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(s,l),v(l,o),v(l,r),z(a,l,null),u=!0},p(f,d){const p={};d&8388608&&(p.$$scope={dirty:d,ctx:f}),a.$set(p)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){P(a.$$.fragment,f),u=!1},d(f){f&&w(e),B(a)}}}function K$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Remove',h(e,"type","button"),h(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[9]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function J$(n){let e,t,i,s,l,o,r,a,u;const f=n[13].options,d=wt(f,n,n[23],Gc),p=n[13].beforeNonempty,m=wt(p,n,n[23],Zc);o=new de({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[Y$,({uniqueId:k})=>({25:k}),({uniqueId:k})=>k?33554432:0]},$$scope:{ctx:n}}});const _=n[13].afterNonempty,g=wt(_,n,n[23],Jc);let b=!n[0].toDelete&&td(n);return{c(){e=y("div"),t=y("div"),d&&d.c(),i=E(),m&&m.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),g&&g.c(),a=E(),b&&b.c(),h(t,"class","col-sm-12 hidden-empty"),h(l,"class","col-sm-4"),h(e,"class","grid grid-sm")},m(k,$){S(k,e,$),v(e,t),d&&d.m(t,null),v(e,i),m&&m.m(e,null),v(e,s),v(e,l),z(o,l,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0},p(k,$){d&&d.p&&(!u||$&8388800)&&$t(d,f,k,k[23],u?St(f,k[23],$,H$):Ct(k[23]),Gc),m&&m.p&&(!u||$&8388800)&&$t(m,p,k,k[23],u?St(p,k[23],$,V$):Ct(k[23]),Zc);const T={};$&41943073&&(T.$$scope={dirty:$,ctx:k}),o.$set(T),g&&g.p&&(!u||$&8388800)&&$t(g,_,k,k[23],u?St(_,k[23],$,j$):Ct(k[23]),Jc),k[0].toDelete?b&&(ae(),P(b,1,1,()=>{b=null}),ue()):b?(b.p(k,$),$&1&&A(b,1)):(b=td(k),b.c(),A(b,1),b.m(e,null))},i(k){u||(A(d,k),A(m,k),A(o.$$.fragment,k),A(g,k),A(b),u=!0)},o(k){P(d,k),P(m,k),P(o.$$.fragment,k),P(g,k),P(b),u=!1},d(k){k&&w(e),d&&d.d(k),m&&m.d(k),B(o),g&&g.d(k),b&&b.d()}}}function Z$(n){let e,t,i,s,l,o,r,a,u,f,d,p=n[7]&&Qc();s=new de({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[B$]},$$scope:{ctx:n}}});const m=n[13].default,_=wt(m,n,n[23],Xc);function g(T,C){if(T[0].toDelete)return W$;if(T[7])return U$}let b=g(n),k=b&&b(n),$=n[7]&&ed(n);return{c(){e=y("div"),t=y("div"),p&&p.c(),i=E(),U(s.$$.fragment),l=E(),_&&_.c(),o=E(),k&&k.c(),r=E(),$&&$.c(),h(t,"class","schema-field-header"),h(e,"draggable",!0),h(e,"class","schema-field"),x(e,"drag-over",n[4])},m(T,C){S(T,e,C),v(e,t),p&&p.m(t,null),v(t,i),z(s,t,null),v(t,l),_&&_.m(t,null),v(t,o),k&&k.m(t,null),v(e,r),$&&$.m(e,null),u=!0,f||(d=[J(e,"dragstart",n[19]),J(e,"dragenter",n[20]),J(e,"drop",at(n[21])),J(e,"dragleave",n[22]),J(e,"dragover",at(n[14]))],f=!0)},p(T,[C]){T[7]?p||(p=Qc(),p.c(),p.m(t,i)):p&&(p.d(1),p=null);const D={};C&128&&(D.class="form-field required m-0 "+(T[7]?"":"disabled")),C&2&&(D.name="schema."+T[1]+".name"),C&8388773&&(D.$$scope={dirty:C,ctx:T}),s.$set(D),_&&_.p&&(!u||C&8388800)&&$t(_,m,T,T[23],u?St(m,T[23],C,z$):Ct(T[23]),Xc),b===(b=g(T))&&k?k.p(T,C):(k&&k.d(1),k=b&&b(T),k&&(k.c(),k.m(t,null))),T[7]?$?($.p(T,C),C&128&&A($,1)):($=ed(T),$.c(),A($,1),$.m(e,null)):$&&(ae(),P($,1,1,()=>{$=null}),ue()),(!u||C&16)&&x(e,"drag-over",T[4])},i(T){u||(A(s.$$.fragment,T),A(_,T),A($),T&&nt(()=>{u&&(a||(a=He(e,yt,{duration:150},!0)),a.run(1))}),u=!0)},o(T){P(s.$$.fragment,T),P(_,T),P($),T&&(a||(a=He(e,yt,{duration:150},!1)),a.run(0)),u=!1},d(T){T&&w(e),p&&p.d(),B(s),_&&_.d(T),k&&k.d(),$&&$.d(),T&&a&&a.end(),f=!1,Ee(d)}}}function G$(n,e,t){let i,s,l,o;Je(n,Ci,N=>t(12,o=N));let{$$slots:r={},$$scope:a}=e,{key:u=""}=e,{field:f=new wn}=e,d,p,m=!1;const _=Tt(),g={bool:"Nonfalsey",number:"Nonzero"};function b(){f.id?t(0,f.toDelete=!0,f):_("remove")}function k(){t(0,f.toDelete=!1,f),un({})}function $(N){return H.slugify(N)}xt(()=>{f.onMountSelect&&(t(0,f.onMountSelect=!1,f),d==null||d.select())});function T(N){me.call(this,n,N)}function C(N){se[N?"unshift":"push"](()=>{d=N,t(2,d)})}const D=N=>{const R=f.name;t(0,f.name=$(N.target.value),f),N.target.value=f.name,_("rename",{oldName:R,newName:f.name})};function M(N){se[N?"unshift":"push"](()=>{p=N,t(3,p)})}function O(){f.required=this.checked,t(0,f)}const I=N=>{if(!N.target.classList.contains("drag-handle-wrapper")){N.preventDefault();return}const R=document.createElement("div");N.dataTransfer.setDragImage(R,0,0),i&&_("dragstart",N)},L=N=>{i&&(t(4,m=!0),_("dragenter",N))},F=N=>{i&&(t(4,m=!1),_("drop",N))},q=N=>{i&&(t(4,m=!1),_("dragleave",N))};return n.$$set=N=>{"key"in N&&t(1,u=N.key),"field"in N&&t(0,f=N.field),"$$scope"in N&&t(23,a=N.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&f.toDelete&&f.originalName&&f.name!==f.originalName&&t(0,f.name=f.originalName,f),n.$$.dirty&1&&!f.originalName&&f.name&&t(0,f.originalName=f.name,f),n.$$.dirty&1&&typeof f.toDelete>"u"&&t(0,f.toDelete=!1,f),n.$$.dirty&1&&f.required&&t(0,f.nullable=!1,f),n.$$.dirty&1&&t(7,i=!f.toDelete&&!(f.id&&f.system)),n.$$.dirty&4098&&t(6,s=!H.isEmpty(H.getNestedVal(o,`schema.${u}`))),n.$$.dirty&1&&t(5,l=g[f==null?void 0:f.type]||"Nonempty")},[f,u,d,p,m,l,s,i,_,b,k,$,o,r,T,C,D,M,O,I,L,F,q,a]}class di extends ve{constructor(e){super(),be(this,e,G$,Z$,_e,{key:1,field:0})}}function X$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min","0")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},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=y("label"),t=W("Max length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min",r=n[0].options.min||0)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&8192&&i!==(i=f[13])&&h(e,"for",i),d&8192&&o!==(o=f[13])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min||0)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function x$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Regex pattern"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","text"),h(l,"id",o=n[13]),h(l,"placeholder","Valid Go regular expression, eg. ^w+$")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&&l.value!==u[0].options.pattern&&fe(l,u[0].options.pattern)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function eC(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[X$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[Q$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[x$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),h(t,"class","col-sm-3"),h(l,"class","col-sm-3"),h(a,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(d,p){S(d,e,p),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),f=!0},p(d,p){const m={};p&2&&(m.name="schema."+d[1]+".options.min"),p&24577&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const _={};p&2&&(_.name="schema."+d[1]+".options.max"),p&24577&&(_.$$scope={dirty:p,ctx:d}),o.$set(_);const g={};p&2&&(g.name="schema."+d[1]+".options.pattern"),p&24577&&(g.$$scope={dirty:p,ctx:d}),u.$set(g)},i(d){f||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),f=!1},d(d){d&&w(e),B(i),B(o),B(u)}}}function tC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[eC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("drop",n[9]),e.$on("dragstart",n[10]),e.$on("dragenter",n[11]),e.$on("dragleave",n[12]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};a&16387&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function nC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(k){l=k,t(0,l)}function d(k){me.call(this,n,k)}function p(k){me.call(this,n,k)}function m(k){me.call(this,n,k)}function _(k){me.call(this,n,k)}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$set=k=>{e=je(je({},e),Jt(k)),t(2,s=Qe(e,i)),"field"in k&&t(0,l=k.field),"key"in k&&t(1,o=k.key)},[l,o,s,r,a,u,f,d,p,m,_,g,b]}class iC extends ve{constructor(e){super(),be(this,e,nC,tC,_e,{field:0,key:1})}}function sC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function lC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Max"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),h(l,"min",r=n[0].options.min)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&4096&&i!==(i=f[12])&&h(e,"for",i),d&4096&&o!==(o=f[12])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function oC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[sC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[lC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function rC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[oC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function aC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Jt(b)),t(2,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class uC extends ve{constructor(e){super(),be(this,e,aC,rC,_e,{field:0,key:1})}}function fC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function cC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Jt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class dC extends ve{constructor(e){super(),be(this,e,cC,fC,_e,{field:0,key:1})}}function pC(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=H.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=je(je({},e),Jt(u)),t(3,l=Qe(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 Vs extends ve{constructor(e){super(),be(this,e,mC,pC,_e,{value:0,separator:1})}}function hC(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[3](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(g.value=n[0].options.exceptDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`List of domains that are NOT allowed. This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.onlyDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function _C(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[4](b)}let g={id:n[12]+".options.onlyDomains",disabled:!H.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(g.value=n[0].options.onlyDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]+".options.onlyDomains"),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]+".options.onlyDomains"))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]+".options.onlyDomains"),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function gC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[hC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[_C,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.onlyDomains"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function bC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[gC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Jt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function vC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(b){n.$$.not_equal(l.options.exceptDomains,b)&&(l.options.exceptDomains=b,t(0,l))}function a(b){n.$$.not_equal(l.options.onlyDomains,b)&&(l.options.onlyDomains=b,t(0,l))}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Kt(b)),t(2,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class ub extends be{constructor(e){super(),ge(this,e,vC,bC,_e,{field:0,key:1})}}function yC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Jt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function kC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Kt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class wC extends be{constructor(e){super(),ge(this,e,kC,yC,_e,{field:0,key:1})}}function SC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Jt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function $C(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Kt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class CC extends be{constructor(e){super(),ge(this,e,$C,SC,_e,{field:0,key:1})}}var Or=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ts={_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},kl={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},_n=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function td(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Dr=function(n){return n instanceof Array?n:[n]};function un(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(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 fb(n,e){if(e(n))return n;if(n.parentNode)return fb(n.parentNode,e)}function so(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("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 Tn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Er=function(){},Fo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},TC={D:Er,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*Vn(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:Er,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:Er,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ts={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})"},cl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[cl.w(n,e,t)]},F:function(n,e,t){return Fo(cl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return _n(cl.h(n,e,t))},H:function(n){return _n(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[Vn(n.getHours()>11)]},M:function(n,e){return Fo(n.getMonth(),!0,e)},S:function(n){return _n(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return _n(n.getFullYear(),4)},d:function(n){return _n(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return _n(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return _n(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)}},cb=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl: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(d,p,m){return cl[d]&&m[p-1]!=="\\"?cl[d](r,f,t):d!=="\\"?d:""}).join("")}},ha=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,d=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 p=o||(t||Ts).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,p);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var _=void 0,g=[],b=0,k=0,$="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Ir(t.config);Z.setHours(ie.hours,ie.minutes,ie.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}Y!==void 0&&Y.type!=="blur"&&Fl(Y);var re=t._input.value;d(),tn(),t._input.value!==re&&t._debouncedChange()}function u(Y,Z){return Y%12+12*Vn(Z===t.l10n.amPM[1])}function f(Y){switch(Y%24){case 0:case 12:return 12;default:return Y%12}}function d(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Y=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Y=u(Y,t.amPM.textContent));var re=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Mn(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 Pe=Ar(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Le=Ar(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Oe=Ar(Y,Z,ie);if(Oe>Le&&Oe=12)]),t.secondElement!==void 0&&(t.secondElement.value=_n(ie)))}function _(Y){var Z=Tn(Y),ie=parseInt(Z.value)+(Y.delta||0);(ie/1e3>1||Y.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&we(ie)}function g(Y,Z,ie,re){if(Z instanceof Array)return Z.forEach(function(Te){return g(Y,Te,ie,re)});if(Y instanceof Array)return Y.forEach(function(Te){return g(Te,Z,ie,re)});Y.addEventListener(Z,ie,re),t._handlers.push({remove:function(){return Y.removeEventListener(Z,ie,re)}})}function b(){Fe("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(re){return g(re,"click",t[ie])})}),t.isMobile){ye();return}var Y=td(ne,50);if(t._debouncedChange=td(b,EC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&Ye(Tn(ie))}),g(t._input,"keydown",Ge),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Ge),!t.config.inline&&!t.config.static&&g(window,"resize",Y),window.ontouchstart!==void 0?g(window.document,"touchstart",ze):g(window.document,"mousedown",ze),g(window.document,"focus",ze,{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",an),g(t.monthNav,["keyup","increment"],_),g(t.daysContainer,"click",ti)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ie){return Tn(ie).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&g(t._input,"blur",mt)}function $(Y,Z){var ie=Y!==void 0?t.parseDate(Y):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Y);var Te=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&&(!Te&&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 Pe=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Pe,t.element),Pe.appendChild(t.element),t.altInput&&Pe.appendChild(t.altInput),Pe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(Y,Z,ie,re){var Te=Me(Z,!0),Pe=ft("span",Y,Z.getDate().toString());return Pe.dateObj=Z,Pe.$i=re,Pe.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),Y.indexOf("hidden")===-1&&Mn(Z,t.now)===0&&(t.todayDateElem=Pe,Pe.classList.add("today"),Pe.setAttribute("aria-current","date")),Te?(Pe.tabIndex=-1,Ot(Z)&&(Pe.classList.add("selected"),t.selectedDateElem=Pe,t.config.mode==="range"&&(un(Pe,"startRange",t.selectedDates[0]&&Mn(Z,t.selectedDates[0],!0)===0),un(Pe,"endRange",t.selectedDates[1]&&Mn(Z,t.selectedDates[1],!0)===0),Y==="nextMonthDay"&&Pe.classList.add("inRange")))):Pe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&$n(Z)&&!Ot(Z)&&Pe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Y!=="prevMonthDay"&&re%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),Fe("onDayCreate",Pe),Pe}function D(Y){Y.focus(),t.config.mode==="range"&&Ye(Y)}function I(Y){for(var Z=Y>0?0:t.config.showMonths-1,ie=Y>0?t.config.showMonths:-1,re=Z;re!=ie;re+=Y)for(var Te=t.daysContainer.children[re],Pe=Y>0?0:Te.children.length-1,Le=Y>0?Te.children.length:-1,Oe=Pe;Oe!=Le;Oe+=Y){var Ke=Te.children[Oe];if(Ke.className.indexOf("hidden")===-1&&Me(Ke.dateObj))return Ke}}function L(Y,Z){for(var ie=Y.className.indexOf("Month")===-1?Y.dateObj.getMonth():t.currentMonth,re=Z>0?t.config.showMonths:-1,Te=Z>0?1:-1,Pe=ie-t.currentMonth;Pe!=re;Pe+=Te)for(var Le=t.daysContainer.children[Pe],Oe=ie-t.currentMonth===Pe?Y.$i+Z:Z<0?Le.children.length-1:0,Ke=Le.children.length,Re=Oe;Re>=0&&Re0?Ke:-1);Re+=Te){var Ue=Le.children[Re];if(Ue.className.indexOf("hidden")===-1&&Me(Ue.dateObj)&&Math.abs(Y.$i-Re)>=Math.abs(Z))return D(Ue)}t.changeMonth(Te),F(I(Te),0)}function F(Y,Z){var ie=l(),re=Ze(ie||document.body),Te=Y!==void 0?Y:re?ie:t.selectedDateElem!==void 0&&Ze(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ze(t.todayDateElem)?t.todayDateElem:I(Z>0?1:-1);Te===void 0?t._input.focus():re?L(Te,Z):D(Te)}function q(Y,Z){for(var ie=(new Date(Y,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,re=t.utils.getDaysInMonth((Z-1+12)%12,Y),Te=t.utils.getDaysInMonth(Z,Y),Pe=window.document.createDocumentFragment(),Le=t.config.showMonths>1,Oe=Le?"prevMonthDay hidden":"prevMonthDay",Ke=Le?"nextMonthDay hidden":"nextMonthDay",Re=re+1-ie,Ue=0;Re<=re;Re++,Ue++)Pe.appendChild(M("flatpickr-day "+Oe,new Date(Y,Z-1,Re),Re,Ue));for(Re=1;Re<=Te;Re++,Ue++)Pe.appendChild(M("flatpickr-day",new Date(Y,Z,Re),Re,Ue));for(var bt=Te+1;bt<=42-ie&&(t.config.showMonths===1||Ue%7!==0);bt++,Ue++)Pe.appendChild(M("flatpickr-day "+Ke,new Date(Y,Z+1,bt%Te),bt,Ue));var ii=ft("div","dayContainer");return ii.appendChild(Pe),ii}function N(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var Y=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var Y=function(re){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&ret.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(Y(Z)){var ie=ft("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,Z).getMonth().toString(),ie.textContent=Fo(Z,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===Z&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function j(){var Y=ft("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Le){var Oe=Tn(Le),Ke=parseInt(Oe.value,10);t.changeMonth(Ke-t.currentMonth),Fe("onMonthChange")}),R(),ie=t.monthsDropdownContainer);var re=so("cur-year",{tabindex:"-1"}),Te=re.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Pe=ft("div","flatpickr-current-month");return Pe.appendChild(ie),Pe.appendChild(re),Z.appendChild(Pe),Y.appendChild(Z),{container:Y,yearElement:Te,monthElement:ie}}function V(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Y=t.config.showMonths;Y--;){var Z=j();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Y){t.__hidePrevMonthArrow!==Y&&(un(t.prevMonthNav,"flatpickr-disabled",Y),t.__hidePrevMonthArrow=Y)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Y){t.__hideNextMonthArrow!==Y&&(un(t.nextMonthNav,"flatpickr-disabled",Y),t.__hideNextMonthArrow=Y)}}),t.currentYearElement=t.yearElements[0],Fn(),t.monthNav}function ee(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Y=Ir(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ft("span","flatpickr-time-separator",":"),ie=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var re=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=re.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Y.hours:f(Y.hours)),t.minuteElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Y.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(ie),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(re),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=so("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Y.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(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[Vn((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 te(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var Y=t.config.showMonths;Y--;){var Z=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var Y=t.l10n.firstDayOfWeek,Z=nd(t.l10n.weekdays.shorthand);Y>0&&Ya=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function gC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[hC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[_C,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.onlyDomains"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function bC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[gC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function vC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(b){n.$$.not_equal(l.options.exceptDomains,b)&&(l.options.exceptDomains=b,t(0,l))}function a(b){n.$$.not_equal(l.options.onlyDomains,b)&&(l.options.onlyDomains=b,t(0,l))}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Jt(b)),t(2,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class fb extends ve{constructor(e){super(),be(this,e,vC,bC,_e,{field:0,key:1})}}function yC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function kC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Jt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class wC extends ve{constructor(e){super(),be(this,e,kC,yC,_e,{field:0,key:1})}}function SC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function $C(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Jt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class CC extends ve{constructor(e){super(),be(this,e,$C,SC,_e,{field:0,key:1})}}var Mr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ts={_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},kl={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},_n=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function nd(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Or=function(n){return n instanceof Array?n:[n]};function cn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(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 cb(n,e){if(e(n))return n;if(n.parentNode)return cb(n.parentNode,e)}function so(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("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 Tn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Dr=function(){},No=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},TC={D:Dr,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*Vn(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:Dr,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:Dr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ts={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})"},cl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[cl.w(n,e,t)]},F:function(n,e,t){return No(cl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return _n(cl.h(n,e,t))},H:function(n){return _n(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[Vn(n.getHours()>11)]},M:function(n,e){return No(n.getMonth(),!0,e)},S:function(n){return _n(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return _n(n.getFullYear(),4)},d:function(n){return _n(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return _n(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return _n(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)}},db=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl: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(d,p,m){return cl[d]&&m[p-1]!=="\\"?cl[d](r,f,t):d!=="\\"?d:""}).join("")}},ha=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,d=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 p=o||(t||Ts).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,p);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var _=void 0,g=[],b=0,k=0,$="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Ar(t.config);Z.setHours(ie.hours,ie.minutes,ie.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}Y!==void 0&&Y.type!=="blur"&&Fl(Y);var re=t._input.value;d(),tn(),t._input.value!==re&&t._debouncedChange()}function u(Y,Z){return Y%12+12*Vn(Z===t.l10n.amPM[1])}function f(Y){switch(Y%24){case 0:case 12:return 12;default:return Y%12}}function d(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Y=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Y=u(Y,t.amPM.textContent));var re=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Mn(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 Pe=Er(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Le=Er(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Oe=Er(Y,Z,ie);if(Oe>Le&&Oe=12)]),t.secondElement!==void 0&&(t.secondElement.value=_n(ie)))}function _(Y){var Z=Tn(Y),ie=parseInt(Z.value)+(Y.delta||0);(ie/1e3>1||Y.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&we(ie)}function g(Y,Z,ie,re){if(Z instanceof Array)return Z.forEach(function(Te){return g(Y,Te,ie,re)});if(Y instanceof Array)return Y.forEach(function(Te){return g(Te,Z,ie,re)});Y.addEventListener(Z,ie,re),t._handlers.push({remove:function(){return Y.removeEventListener(Z,ie,re)}})}function b(){Fe("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(re){return g(re,"click",t[ie])})}),t.isMobile){ge();return}var Y=nd(ne,50);if(t._debouncedChange=nd(b,EC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&Ye(Tn(ie))}),g(t._input,"keydown",Ge),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Ge),!t.config.inline&&!t.config.static&&g(window,"resize",Y),window.ontouchstart!==void 0?g(window.document,"touchstart",ze):g(window.document,"mousedown",ze),g(window.document,"focus",ze,{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",fn),g(t.monthNav,["keyup","increment"],_),g(t.daysContainer,"click",ti)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ie){return Tn(ie).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&g(t._input,"blur",mt)}function $(Y,Z){var ie=Y!==void 0?t.parseDate(Y):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Y);var Te=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&&(!Te&&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 Pe=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Pe,t.element),Pe.appendChild(t.element),t.altInput&&Pe.appendChild(t.altInput),Pe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(Y,Z,ie,re){var Te=Me(Z,!0),Pe=ft("span",Y,Z.getDate().toString());return Pe.dateObj=Z,Pe.$i=re,Pe.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),Y.indexOf("hidden")===-1&&Mn(Z,t.now)===0&&(t.todayDateElem=Pe,Pe.classList.add("today"),Pe.setAttribute("aria-current","date")),Te?(Pe.tabIndex=-1,Ot(Z)&&(Pe.classList.add("selected"),t.selectedDateElem=Pe,t.config.mode==="range"&&(cn(Pe,"startRange",t.selectedDates[0]&&Mn(Z,t.selectedDates[0],!0)===0),cn(Pe,"endRange",t.selectedDates[1]&&Mn(Z,t.selectedDates[1],!0)===0),Y==="nextMonthDay"&&Pe.classList.add("inRange")))):Pe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&$n(Z)&&!Ot(Z)&&Pe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Y!=="prevMonthDay"&&re%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),Fe("onDayCreate",Pe),Pe}function O(Y){Y.focus(),t.config.mode==="range"&&Ye(Y)}function I(Y){for(var Z=Y>0?0:t.config.showMonths-1,ie=Y>0?t.config.showMonths:-1,re=Z;re!=ie;re+=Y)for(var Te=t.daysContainer.children[re],Pe=Y>0?0:Te.children.length-1,Le=Y>0?Te.children.length:-1,Oe=Pe;Oe!=Le;Oe+=Y){var Ke=Te.children[Oe];if(Ke.className.indexOf("hidden")===-1&&Me(Ke.dateObj))return Ke}}function L(Y,Z){for(var ie=Y.className.indexOf("Month")===-1?Y.dateObj.getMonth():t.currentMonth,re=Z>0?t.config.showMonths:-1,Te=Z>0?1:-1,Pe=ie-t.currentMonth;Pe!=re;Pe+=Te)for(var Le=t.daysContainer.children[Pe],Oe=ie-t.currentMonth===Pe?Y.$i+Z:Z<0?Le.children.length-1:0,Ke=Le.children.length,Re=Oe;Re>=0&&Re0?Ke:-1);Re+=Te){var Ue=Le.children[Re];if(Ue.className.indexOf("hidden")===-1&&Me(Ue.dateObj)&&Math.abs(Y.$i-Re)>=Math.abs(Z))return O(Ue)}t.changeMonth(Te),F(I(Te),0)}function F(Y,Z){var ie=l(),re=Ze(ie||document.body),Te=Y!==void 0?Y:re?ie:t.selectedDateElem!==void 0&&Ze(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ze(t.todayDateElem)?t.todayDateElem:I(Z>0?1:-1);Te===void 0?t._input.focus():re?L(Te,Z):O(Te)}function q(Y,Z){for(var ie=(new Date(Y,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,re=t.utils.getDaysInMonth((Z-1+12)%12,Y),Te=t.utils.getDaysInMonth(Z,Y),Pe=window.document.createDocumentFragment(),Le=t.config.showMonths>1,Oe=Le?"prevMonthDay hidden":"prevMonthDay",Ke=Le?"nextMonthDay hidden":"nextMonthDay",Re=re+1-ie,Ue=0;Re<=re;Re++,Ue++)Pe.appendChild(M("flatpickr-day "+Oe,new Date(Y,Z-1,Re),Re,Ue));for(Re=1;Re<=Te;Re++,Ue++)Pe.appendChild(M("flatpickr-day",new Date(Y,Z,Re),Re,Ue));for(var bt=Te+1;bt<=42-ie&&(t.config.showMonths===1||Ue%7!==0);bt++,Ue++)Pe.appendChild(M("flatpickr-day "+Ke,new Date(Y,Z+1,bt%Te),bt,Ue));var ii=ft("div","dayContainer");return ii.appendChild(Pe),ii}function N(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var Y=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var Y=function(re){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&ret.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(Y(Z)){var ie=ft("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,Z).getMonth().toString(),ie.textContent=No(Z,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===Z&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function j(){var Y=ft("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Le){var Oe=Tn(Le),Ke=parseInt(Oe.value,10);t.changeMonth(Ke-t.currentMonth),Fe("onMonthChange")}),R(),ie=t.monthsDropdownContainer);var re=so("cur-year",{tabindex:"-1"}),Te=re.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Pe=ft("div","flatpickr-current-month");return Pe.appendChild(ie),Pe.appendChild(re),Z.appendChild(Pe),Y.appendChild(Z),{container:Y,yearElement:Te,monthElement:ie}}function V(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Y=t.config.showMonths;Y--;){var Z=j();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Y){t.__hidePrevMonthArrow!==Y&&(cn(t.prevMonthNav,"flatpickr-disabled",Y),t.__hidePrevMonthArrow=Y)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Y){t.__hideNextMonthArrow!==Y&&(cn(t.nextMonthNav,"flatpickr-disabled",Y),t.__hideNextMonthArrow=Y)}}),t.currentYearElement=t.yearElements[0],Fn(),t.monthNav}function ee(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Y=Ar(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ft("span","flatpickr-time-separator",":"),ie=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var re=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=re.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Y.hours:f(Y.hours)),t.minuteElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Y.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(ie),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(re),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=so("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Y.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(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[Vn((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 te(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var Y=t.config.showMonths;Y--;){var Z=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var Y=t.l10n.firstDayOfWeek,Z=id(t.l10n.weekdays.shorthand);Y>0&&Y `+Z.join("")+` - `}}function ce(){t.calendarContainer.classList.add("hasWeeks");var Y=ft("div","flatpickr-weekwrapper");Y.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ft("div","flatpickr-weeks");return Y.appendChild(Z),{weekWrapper:Y,weekNumbers:Z}}function X(Y,Z){Z===void 0&&(Z=!0);var ie=Z?Y:Y-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Fe("onYearChange"),R()),N(),Fe("onMonthChange"),Fn())}function le(Y,Z){if(Y===void 0&&(Y=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Ir(t.config),re=ie.hours,Te=ie.minutes,Pe=ie.seconds;m(re,Te,Pe)}t.redraw(),Y&&Fe("onChange")}function ve(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Fe("onClose")}function Se(){t.config!==void 0&&Fe("onDestroy");for(var Y=t._handlers.length;Y--;)t._handlers[Y].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 Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}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(ie){try{delete t[ie]}catch{}})}function Ve(Y){return t.calendarContainer.contains(Y)}function ze(Y){if(t.isOpen&&!t.config.inline){var Z=Tn(Y),ie=Ve(Z),re=Z===t.input||Z===t.altInput||t.element.contains(Z)||Y.path&&Y.path.indexOf&&(~Y.path.indexOf(t.input)||~Y.path.indexOf(t.altInput)),Te=!re&&!ie&&!Ve(Y.relatedTarget),Pe=!t.config.ignoredFocusElements.some(function(Le){return Le.contains(Z)});Te&&Pe&&(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 we(Y){if(!(!Y||t.config.minDate&&Yt.config.maxDate.getFullYear())){var Z=Y,ie=t.currentYear!==Z;t.currentYear=Z||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)),ie&&(t.redraw(),Fe("onYearChange"),R())}}function Me(Y,Z){var ie;Z===void 0&&(Z=!0);var re=t.parseDate(Y,void 0,Z);if(t.config.minDate&&re&&Mn(re,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&re&&Mn(re,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(re===void 0)return!1;for(var Te=!!t.config.enable,Pe=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Le=0,Oe=void 0;Le=Oe.from.getTime()&&re.getTime()<=Oe.to.getTime())return Te}return!Te}function Ze(Y){return t.daysContainer!==void 0?Y.className.indexOf("hidden")===-1&&Y.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(Y):!1}function mt(Y){var Z=Y.target===t._input,ie=t._input.value.trimEnd()!==Wi();Z&&ie&&!(Y.relatedTarget&&Ve(Y.relatedTarget))&&t.setDate(t._input.value,!0,Y.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ge(Y){var Z=Tn(Y),ie=t.config.wrap?n.contains(Z):Z===t._input,re=t.config.allowInput,Te=t.isOpen&&(!re||!ie),Pe=t.config.inline&&ie&&!re;if(Y.keyCode===13&&ie){if(re)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(Ve(Z)||Te||Pe){var Le=!!t.timeContainer&&t.timeContainer.contains(Z);switch(Y.keyCode){case 13:Le?(Y.preventDefault(),a(),Ln()):ti(Y);break;case 27:Y.preventDefault(),Ln();break;case 8:case 46:ie&&!t.config.allowInput&&(Y.preventDefault(),t.clear());break;case 37:case 39:if(!Le&&!ie){Y.preventDefault();var Oe=l();if(t.daysContainer!==void 0&&(re===!1||Oe&&Ze(Oe))){var Ke=Y.keyCode===39?1:-1;Y.ctrlKey?(Y.stopPropagation(),X(Ke),F(I(1),0)):F(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:Y.preventDefault();var Re=Y.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?Y.ctrlKey?(Y.stopPropagation(),we(t.currentYear-Re),F(I(1),0)):Le||F(void 0,Re*7):Z===t.currentYearElement?we(t.currentYear-Re):t.config.enableTime&&(!Le&&t.hourElement&&t.hourElement.focus(),a(Y),t._debouncedChange());break;case 9:if(Le){var Ue=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Cn){return Cn}),bt=Ue.indexOf(Z);if(bt!==-1){var ii=Ue[bt+(Y.shiftKey?-1:1)];Y.preventDefault(),(ii||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&Y.shiftKey&&(Y.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&Z===t.amPM)switch(Y.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],d(),tn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],d(),tn();break}(ie||Ve(Z))&&Fe("onKeyDown",Y)}function Ye(Y,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||Y&&(!Y.classList.contains(Z)||Y.classList.contains("flatpickr-disabled")))){for(var ie=Y?Y.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),re=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Te=Math.min(ie,t.selectedDates[0].getTime()),Pe=Math.max(ie,t.selectedDates[0].getTime()),Le=!1,Oe=0,Ke=0,Re=Te;ReTe&&ReOe)?Oe=Re:Re>re&&(!Ke||Re ."+Z));Ue.forEach(function(bt){var ii=bt.dateObj,Cn=ii.getTime(),Hs=Oe>0&&Cn0&&Cn>Ke;if(Hs){bt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ms){bt.classList.remove(ms)});return}else if(Le&&!Hs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ms){bt.classList.remove(ms)}),Y!==void 0&&(Y.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),reie&&Cn===re&&bt.classList.add("endRange"),Cn>=Oe&&(Ke===0||Cn<=Ke)&&MC(Cn,re,ie)&&bt.classList.add("inRange"))})}}function ne(){t.isOpen&&!t.config.static&&!t.config.inline&&tt()}function qe(Y,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(Y){Y.preventDefault();var ie=Tn(Y);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Fe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var re=t.isOpen;t.isOpen=!0,re||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Fe("onOpen"),tt(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(Y===void 0||!t.timeContainer.contains(Y.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function xe(Y){return function(Z){var ie=t.config["_"+Y+"Date"]=t.parseDate(Z,t.config.dateFormat),re=t.config["_"+(Y==="min"?"max":"min")+"Date"];ie!==void 0&&(t[Y==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Te){return Me(Te)}),!t.selectedDates.length&&Y==="min"&&p(ie),tn()),t.daysContainer&&(Ht(),ie!==void 0?t.currentYearElement[Y]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(Y),t.currentYearElement.disabled=!!re&&ie!==void 0&&re.getFullYear()===ie.getFullYear())}}function en(){var Y=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=sn(sn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Ue){t.config._enable=ni(Ue)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Ue){t.config._disable=ni(Ue)}});var re=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||re)){var Te=Ut.defaultConfig.dateFormat||Ts.dateFormat;ie.dateFormat=Z.noCalendar||re?"H:i"+(Z.enableSeconds?":S":""):Te+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||re)&&!Z.altFormat){var Pe=Ut.defaultConfig.altFormat||Ts.altFormat;ie.altFormat=Z.noCalendar||re?"h:i"+(Z.enableSeconds?":S K":" K"):Pe+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:xe("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:xe("max")});var Le=function(Ue){return function(bt){t.config[Ue==="min"?"_minTime":"_maxTime"]=t.parseDate(bt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Le("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Le("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var Oe=0;Oe-1?t.config[Re]=Dr(Ke[Re]).map(o).concat(t.config[Re]):typeof Z[Re]>"u"&&(t.config[Re]=Ke[Re])}Z.altInputClass||(t.config.altInputClass=Ne().className+" "+t.config.altInputClass),Fe("onParseConfig")}function Ne(){return t.config.wrap?n.querySelector("[data-input]"):n}function Ce(){typeof t.config.locale!="object"&&typeof Ut.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=sn(sn({},Ut.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ut.l10ns[t.config.locale]:void 0),ts.D="("+t.l10n.weekdays.shorthand.join("|")+")",ts.l="("+t.l10n.weekdays.longhand.join("|")+")",ts.M="("+t.l10n.months.shorthand.join("|")+")",ts.F="("+t.l10n.months.longhand.join("|")+")",ts.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var Y=sn(sn({},e),JSON.parse(JSON.stringify(n.dataset||{})));Y.time_24hr===void 0&&Ut.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=cb(t),t.parseDate=ha({config:t.config,l10n:t.l10n})}function tt(Y){if(typeof t.config.position=="function")return void t.config.position(t,Y);if(t.calendarContainer!==void 0){Fe("onPreCalendarPosition");var Z=Y||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,function($b,Cb){return $b+Cb.offsetHeight},0),re=t.calendarContainer.offsetWidth,Te=t.config.position.split(" "),Pe=Te[0],Le=Te.length>1?Te[1]:null,Oe=Z.getBoundingClientRect(),Ke=window.innerHeight-Oe.bottom,Re=Pe==="above"||Pe!=="below"&&Keie,Ue=window.pageYOffset+Oe.top+(Re?-ie-2:Z.offsetHeight+2);if(un(t.calendarContainer,"arrowTop",!Re),un(t.calendarContainer,"arrowBottom",Re),!t.config.inline){var bt=window.pageXOffset+Oe.left,ii=!1,Cn=!1;Le==="center"?(bt-=(re-Oe.width)/2,ii=!0):Le==="right"&&(bt-=re-Oe.width,Cn=!0),un(t.calendarContainer,"arrowLeft",!ii&&!Cn),un(t.calendarContainer,"arrowCenter",ii),un(t.calendarContainer,"arrowRight",Cn);var Hs=window.document.body.offsetWidth-(window.pageXOffset+Oe.right),ms=bt+re>window.document.body.offsetWidth,gb=Hs+re>window.document.body.offsetWidth;if(un(t.calendarContainer,"rightMost",ms),!t.config.static)if(t.calendarContainer.style.top=Ue+"px",!ms)t.calendarContainer.style.left=bt+"px",t.calendarContainer.style.right="auto";else if(!gb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Hs+"px";else{var nr=Et();if(nr===void 0)return;var bb=window.document.body.offsetWidth,vb=Math.max(0,bb/2-re/2),yb=".flatpickr-calendar.centerMost:before",kb=".flatpickr-calendar.centerMost:after",wb=nr.cssRules.length,Sb="{left:"+Oe.left+"px;right:auto;}";un(t.calendarContainer,"rightMost",!1),un(t.calendarContainer,"centerMost",!0),nr.insertRule(yb+","+kb+Sb,wb),t.calendarContainer.style.left=vb+"px",t.calendarContainer.style.right="auto"}}}}function Et(){for(var Y=null,Z=0;Zt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=re,t.config.mode==="single")t.selectedDates=[Te];else if(t.config.mode==="multiple"){var Le=Ot(Te);Le?t.selectedDates.splice(parseInt(Le),1):t.selectedDates.push(Te)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Te,t.selectedDates.push(Te),Mn(Te,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Ue,bt){return Ue.getTime()-bt.getTime()}));if(d(),Pe){var Oe=t.currentYear!==Te.getFullYear();t.currentYear=Te.getFullYear(),t.currentMonth=Te.getMonth(),Oe&&(Fe("onYearChange"),R()),Fe("onMonthChange")}if(Fn(),N(),tn(),!Pe&&t.config.mode!=="range"&&t.config.showMonths===1?D(re):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 Ke=t.config.mode==="single"&&!t.config.enableTime,Re=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Re)&&Ln()}b()}}var Sn={locale:[Ce,G],showMonths:[V,r,te],minDate:[$],maxDate:[$],positionElement:[pi],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 ht(Y,Z){if(Y!==null&&typeof Y=="object"){Object.assign(t.config,Y);for(var ie in Y)Sn[ie]!==void 0&&Sn[ie].forEach(function(re){return re()})}else t.config[Y]=Z,Sn[Y]!==void 0?Sn[Y].forEach(function(re){return re()}):Or.indexOf(Y)>-1&&(t.config[Y]=Dr(Z));t.redraw(),tn(!0)}function Nn(Y,Z){var ie=[];if(Y instanceof Array)ie=Y.map(function(re){return t.parseDate(re,Z)});else if(Y instanceof Date||typeof Y=="number")ie=[t.parseDate(Y,Z)];else if(typeof Y=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(Y,Z)];break;case"multiple":ie=Y.split(t.config.conjunction).map(function(re){return t.parseDate(re,Z)});break;case"range":ie=Y.split(t.l10n.rangeSeparator).map(function(re){return t.parseDate(re,Z)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(Y)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(re){return re instanceof Date&&Me(re,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(re,Te){return re.getTime()-Te.getTime()})}function ds(Y,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),Y!==0&&!Y||Y instanceof Array&&Y.length===0)return t.clear(Z);Nn(Y,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,Z),p(),t.selectedDates.length===0&&t.clear(!1),tn(Z),Z&&Fe("onChange")}function ni(Y){return Y.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function Mi(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var Y=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);Y&&Nn(Y,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 ps(){if(t.input=Ne(),!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=ft(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"),pi()}function pi(){t._positionElement=t.config.positionElement||t._input}function ye(){var Y=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ft("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=Y,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=Y==="datetime-local"?"Y-m-d\\TH:i:S":Y==="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(Z){t.setDate(Tn(Z).value,!1,t.mobileFormatStr),Fe("onChange"),Fe("onClose")})}function Ae(Y){if(t.isOpen===!0)return t.close();t.open(Y)}function Fe(Y,Z){if(t.config!==void 0){var ie=t.config[Y];if(ie!==void 0&&ie.length>0)for(var re=0;ie[re]&&re=0&&Mn(Y,t.selectedDates[1])<=0}function Fn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(Y,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=Fo(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),Y.value=ie.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 Wi(Y){var Z=Y||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,re,Te){return t.config.mode!=="range"||t.config.enableTime||Te.indexOf(ie)===re}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function tn(Y){Y===void 0&&(Y=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Wi(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Wi(t.config.altFormat)),Y!==!1&&Fe("onValueUpdate")}function an(Y){var Z=Tn(Y),ie=t.prevMonthNav.contains(Z),re=t.nextMonthNav.contains(Z);ie||re?X(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(Y){Y.preventDefault();var Z=Y.type==="keydown",ie=Tn(Y),re=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]);var Te=parseFloat(re.getAttribute("min")),Pe=parseFloat(re.getAttribute("max")),Le=parseFloat(re.getAttribute("step")),Oe=parseInt(re.value,10),Ke=Y.delta||(Z?Y.which===38?1:-1:0),Re=Oe+Le*Ke;if(typeof re.value<"u"&&re.value.length===2){var Ue=re===t.hourElement,bt=re===t.minuteElement;RePe&&(Re=re===t.hourElement?Re-Pe-Vn(!t.amPM):Te,bt&&C(void 0,1,t.hourElement)),t.amPM&&Ue&&(Le===1?Re+Oe===23:Math.abs(Re-Oe)>Le)&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]),re.value=_n(Re)}}return s(),t}function Ms(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function NC(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=Qe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:d=void 0}=e,{options:p={}}=e,m=!1,{input:_=void 0,flatpickr:g=void 0}=e;xt(()=>{const C=f??_,O=k(p);return O.onReady.push((M,D,I)=>{a===void 0&&$(M,D,I),pn().then(()=>{t(8,m=!0)})}),t(3,g=Ut(C,Object.assign(O,f?{wrap:!0}:{}))),()=>{g.destroy()}});const b=Tt();function k(C={}){C=Object.assign({},C);for(const O of r){const M=(D,I,L)=>{b(LC(O),[D,I,L])};O in C?(Array.isArray(C[O])||(C[O]=[C[O]]),C[O].push(M)):C[O]=[M]}return C.onChange&&!C.onChange.includes($)&&C.onChange.push($),C}function $(C,O,M){const D=id(M,C);!sd(a,D)&&(a||D)&&t(2,a=D),t(4,u=O)}function T(C){se[C?"unshift":"push"](()=>{_=C,t(0,_)})}return n.$$set=C=>{e=je(je({},e),Kt(C)),t(1,s=Qe(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,d=C.dateFormat),"options"in C&&t(7,p=C.options),"input"in C&&t(0,_=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&&m&&(sd(a,id(g,g.selectedDates))||g.setDate(a,!0,d)),n.$$.dirty&392&&g&&m)for(const[C,O]of Object.entries(k(p)))g.set(C,O)},[_,s,a,g,u,f,d,p,m,o,l,T]}class ou extends be{constructor(e){super(),ge(this,e,NC,PC,_e,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function FC(n){let e,t,i,s,l,o,r,a;function u(p){n[6](p)}function f(p){n[7](p)}let d={id:n[19],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(d.value=n[2]),n[0].options.min!==void 0&&(d.formattedValue=n[0].options.min),l=new ou({props:d}),se.push(()=>he(l,"value",u)),se.push(()=>he(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=y("label"),t=W("Min date (UTC)"),s=E(),U(l.$$.fragment),h(e,"for",i=n[19])},m(p,m){S(p,e,m),v(e,t),S(p,s,m),z(l,p,m),a=!0},p(p,m){(!a||m&524288&&i!==(i=p[19]))&&h(e,"for",i);const _={};m&524288&&(_.id=p[19]),!o&&m&4&&(o=!0,_.value=p[2],ke(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=p[0].options.min,ke(()=>r=!1)),l.$set(_)},i(p){a||(A(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),B(l,p)}}}function RC(n){let e,t,i,s,l,o,r,a;function u(p){n[9](p)}function f(p){n[10](p)}let d={id:n[19],options:H.defaultFlatpickrOptions()};return n[3]!==void 0&&(d.value=n[3]),n[0].options.max!==void 0&&(d.formattedValue=n[0].options.max),l=new ou({props:d}),se.push(()=>he(l,"value",u)),se.push(()=>he(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=y("label"),t=W("Max date (UTC)"),s=E(),U(l.$$.fragment),h(e,"for",i=n[19])},m(p,m){S(p,e,m),v(e,t),S(p,s,m),z(l,p,m),a=!0},p(p,m){(!a||m&524288&&i!==(i=p[19]))&&h(e,"for",i);const _={};m&524288&&(_.id=p[19]),!o&&m&8&&(o=!0,_.value=p[3],ke(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=p[0].options.max,ke(()=>r=!1)),l.$set(_)},i(p){a||(A(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),B(l,p)}}}function qC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[FC,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[RC,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1572869&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&1572873&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function jC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[qC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),e.$on("drop",n[15]),e.$on("dragstart",n[16]),e.$on("dragenter",n[17]),e.$on("dragleave",n[18]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Jt(r[5])]):{};a&1048591&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function VC(n,e,t){var D,I;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=(D=l==null?void 0:l.options)==null?void 0:D.min,a=(I=l==null?void 0:l.options)==null?void 0:I.max;function u(L,F){L.detail&&L.detail.length==3&&t(0,l.options[F]=L.detail[1],l)}function f(L){r=L,t(2,r),t(0,l)}function d(L){n.$$.not_equal(l.options.min,L)&&(l.options.min=L,t(0,l))}const p=L=>u(L,"min");function m(L){a=L,t(3,a),t(0,l)}function _(L){n.$$.not_equal(l.options.max,L)&&(l.options.max=L,t(0,l))}const g=L=>u(L,"max");function b(L){l=L,t(0,l)}function k(L){me.call(this,n,L)}function $(L){me.call(this,n,L)}function T(L){me.call(this,n,L)}function C(L){me.call(this,n,L)}function O(L){me.call(this,n,L)}function M(L){me.call(this,n,L)}return n.$$set=L=>{e=je(je({},e),Kt(L)),t(5,s=Qe(e,i)),"field"in L&&t(0,l=L.field),"key"in L&&t(1,o=L.key)},n.$$.update=()=>{var L,F,q,N;n.$$.dirty&5&&r!=((L=l==null?void 0:l.options)==null?void 0:L.min)&&t(2,r=(F=l==null?void 0:l.options)==null?void 0:F.min),n.$$.dirty&9&&a!=((q=l==null?void 0:l.options)==null?void 0:q.max)&&t(3,a=(N=l==null?void 0:l.options)==null?void 0:N.max)},[l,o,r,a,u,s,f,d,p,m,_,g,b,k,$,T,C,O,M]}class HC extends be{constructor(e){super(),ge(this,e,VC,jC,_e,{field:0,key:1})}}const zC=n=>({}),ld=n=>({});function od(n,e,t){const i=n.slice();return i[46]=e[t],i}const BC=n=>({}),rd=n=>({});function ad(n,e,t){const i=n.slice();return i[46]=e[t],i[50]=t,i}function ud(n){let e,t,i;return{c(){e=y("div"),t=W(n[2]),i=E(),h(e,"class","block txt-placeholder"),x(e,"link-hint",!n[5])},m(s,l){S(s,e,l),v(e,t),v(e,i)},p(s,l){l[0]&4&&oe(t,s[2]),l[0]&32&&x(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function UC(n){let e,t=n[46]+"",i;return{c(){e=y("span"),i=W(t),h(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&1&&t!==(t=s[46]+"")&&oe(i,t)},i:Q,o:Q,d(s){s&&w(e)}}}function WC(n){let e,t,i;const s=[{item:n[46]},n[9]];var l=n[8];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function fd(n){let e,t,i;function s(){return n[34](n[46])}return{c(){e=y("span"),e.innerHTML='',h(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[De(We.call(null,e,"Clear")),J(e,"click",An(at(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ee(i)}}}function cd(n){let e,t,i,s,l,o;const r=[WC,UC],a=[];function u(d,p){return d[8]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&fd(n);return{c(){e=y("div"),i.c(),s=E(),f&&f.c(),l=E(),h(e,"class","option")},m(d,p){S(d,e,p),a[t].m(e,null),v(e,s),f&&f.m(e,null),v(e,l),o=!0},p(d,p){let m=t;t=u(d),t===m?a[t].p(d,p):(ae(),P(a[m],1,1,()=>{a[m]=null}),ue(),i=a[t],i?i.p(d,p):(i=a[t]=r[t](d),i.c()),A(i,1),i.m(e,s)),d[4]||d[6]?f?f.p(d,p):(f=fd(d),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(d){o||(A(i),o=!0)},o(d){P(i),o=!1},d(d){d&&w(e),a[t].d(),f&&f.d()}}}function dd(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[18],$$slots:{default:[JC]},$$scope:{ctx:n}};return e=new Kn({props:i}),n[39](e),e.$on("show",n[24]),e.$on("hide",n[40]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,l){const o={};l[0]&262144&&(o.trigger=s[18]),l[0]&1612938|l[1]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[39](null),B(e,s)}}}function pd(n){let e,t,i,s,l,o,r,a,u=n[15].length&&md(n);return{c(){e=y("div"),t=y("label"),i=y("div"),i.innerHTML='',s=E(),l=y("input"),o=E(),u&&u.c(),h(i,"class","addon p-r-0"),l.autofocus=!0,h(l,"type","text"),h(l,"placeholder",n[3]),h(t,"class","input-group"),h(e,"class","form-field form-field-sm options-search")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(t,s),v(t,l),fe(l,n[15]),v(t,o),u&&u.m(t,null),l.focus(),r||(a=J(l,"input",n[36]),r=!0)},p(f,d){d[0]&8&&h(l,"placeholder",f[3]),d[0]&32768&&l.value!==f[15]&&fe(l,f[15]),f[15].length?u?u.p(f,d):(u=md(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 md(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","btn btn-sm btn-circle btn-transparent clear"),h(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",An(at(n[21]))),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function hd(n){let e,t=n[1]&&_d(n);return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=_d(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function _d(n){let e,t;return{c(){e=y("div"),t=W(n[1]),h(e,"class","txt-missing")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s[0]&2&&oe(t,i[1])},d(i){i&&w(e)}}}function YC(n){let e=n[46]+"",t;return{c(){t=W(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&1048576&&e!==(e=i[46]+"")&&oe(t,e)},i:Q,o:Q,d(i){i&&w(t)}}}function KC(n){let e,t,i;const s=[{item:n[46]},n[11]];var l=n[10];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function gd(n){let e,t,i,s,l,o,r;const a=[KC,YC],u=[];function f(m,_){return m[10]?0:1}t=f(n),i=u[t]=a[t](n);function d(...m){return n[37](n[46],...m)}function p(...m){return n[38](n[46],...m)}return{c(){e=y("div"),i.c(),s=E(),h(e,"tabindex","0"),h(e,"class","dropdown-item option"),x(e,"closable",n[7]),x(e,"selected",n[19](n[46]))},m(m,_){S(m,e,_),u[t].m(e,null),v(e,s),l=!0,o||(r=[J(e,"click",d),J(e,"keydown",p)],o=!0)},p(m,_){n=m;let g=t;t=f(n),t===g?u[t].p(n,_):(ae(),P(u[g],1,1,()=>{u[g]=null}),ue(),i=u[t],i?i.p(n,_):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||_[0]&128)&&x(e,"closable",n[7]),(!l||_[0]&1572864)&&x(e,"selected",n[19](n[46]))},i(m){l||(A(i),l=!0)},o(m){P(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Ee(r)}}}function JC(n){let e,t,i,s,l,o=n[12]&&pd(n);const r=n[33].beforeOptions,a=yt(r,n,n[42],rd);let u=n[20],f=[];for(let g=0;gP(f[g],1,1,()=>{f[g]=null});let p=null;u.length||(p=hd(n));const m=n[33].afterOptions,_=yt(m,n,n[42],ld);return{c(){o&&o.c(),e=E(),a&&a.c(),t=E(),i=y("div");for(let g=0;gP(a[p],1,1,()=>{a[p]=null});let f=null;r.length||(f=ud(n));let d=!n[5]&&dd(n);return{c(){e=y("div"),t=y("div");for(let p=0;p{d=null}),ue()):d?(d.p(p,m),m[0]&32&&A(d,1)):(d=dd(p),d.c(),A(d,1),d.m(e,null)),(!o||m[0]&8192&&l!==(l="select "+p[13]))&&h(e,"class",l),(!o||m[0]&8208)&&x(e,"multiple",p[4]),(!o||m[0]&8224)&&x(e,"disabled",p[5])},i(p){if(!o){for(let m=0;mxe(en,qe))||[]}function X(ne,qe){ne.preventDefault(),g&&p?j(qe):R(qe)}function le(ne,qe){(ne.code==="Enter"||ne.code==="Space")&&X(ne,qe)}function ve(){G(),setTimeout(()=>{const ne=F==null?void 0:F.querySelector(".dropdown-item.option.selected");ne&&(ne.focus(),ne.scrollIntoView({block:"nearest"}))},0)}function Se(ne){ne.stopPropagation(),!m&&(I==null||I.toggle())}xt(()=>{const ne=document.querySelectorAll(`label[for="${r}"]`);for(const qe of ne)qe.addEventListener("click",Se);return()=>{for(const qe of ne)qe.removeEventListener("click",Se)}});const Ve=ne=>N(ne);function ze(ne){se[ne?"unshift":"push"](()=>{q=ne,t(18,q)})}function we(){L=this.value,t(15,L)}const Me=(ne,qe)=>X(qe,ne),Ze=(ne,qe)=>le(qe,ne);function mt(ne){se[ne?"unshift":"push"](()=>{I=ne,t(16,I)})}function Ge(ne){me.call(this,n,ne)}function Ye(ne){se[ne?"unshift":"push"](()=>{F=ne,t(17,F)})}return n.$$set=ne=>{"id"in ne&&t(25,r=ne.id),"noOptionsText"in ne&&t(1,a=ne.noOptionsText),"selectPlaceholder"in ne&&t(2,u=ne.selectPlaceholder),"searchPlaceholder"in ne&&t(3,f=ne.searchPlaceholder),"items"in ne&&t(26,d=ne.items),"multiple"in ne&&t(4,p=ne.multiple),"disabled"in ne&&t(5,m=ne.disabled),"selected"in ne&&t(0,_=ne.selected),"toggle"in ne&&t(6,g=ne.toggle),"closable"in ne&&t(7,b=ne.closable),"labelComponent"in ne&&t(8,k=ne.labelComponent),"labelComponentProps"in ne&&t(9,$=ne.labelComponentProps),"optionComponent"in ne&&t(10,T=ne.optionComponent),"optionComponentProps"in ne&&t(11,C=ne.optionComponentProps),"searchable"in ne&&t(12,O=ne.searchable),"searchFunc"in ne&&t(27,M=ne.searchFunc),"class"in ne&&t(13,D=ne.class),"$$scope"in ne&&t(42,o=ne.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&67108864&&d&&(te(),G()),n.$$.dirty[0]&67141632&&t(20,i=ce(d,L)),n.$$.dirty[0]&1&&t(19,s=function(ne){const qe=H.toArray(_);return H.inArray(qe,ne)})},[_,a,u,f,p,m,g,b,k,$,T,C,O,D,N,L,I,F,q,s,i,G,X,le,ve,r,d,M,R,j,V,K,ee,l,Ve,ze,we,Me,Ze,mt,Ge,Ye,o]}class ru extends be{constructor(e){super(),ge(this,e,XC,ZC,_e,{id:25,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:26,multiple:4,disabled:5,selected:0,toggle:6,closable:7,labelComponent:8,labelComponentProps:9,optionComponent:10,optionComponentProps:11,searchable:12,searchFunc:27,class:13,deselectItem:14,selectItem:28,toggleItem:29,reset:30,showDropdown:31,hideDropdown:32},null,[-1,-1])}get deselectItem(){return this.$$.ctx[14]}get selectItem(){return this.$$.ctx[28]}get toggleItem(){return this.$$.ctx[29]}get reset(){return this.$$.ctx[30]}get showDropdown(){return this.$$.ctx[31]}get hideDropdown(){return this.$$.ctx[32]}}function bd(n){let e,t;return{c(){e=y("i"),h(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)&&h(e,"class",t)},d(i){i&&w(e)}}}function QC(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&&bd(n);return{c(){l&&l.c(),e=E(),t=y("span"),s=W(i),h(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),v(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=bd(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)+"")&&oe(s,i)},i:Q,o:Q,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function xC(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class vd extends be{constructor(e){super(),ge(this,e,xC,QC,_e,{item:0})}}const eT=n=>({}),yd=n=>({});function tT(n){let e;const t=n[8].afterOptions,i=yt(t,n,n[12],yd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&wt(i,t,s,s[12],e?kt(t,s[12],l,eT):St(s[12]),yd)},i(s){e||(A(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function nT(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:[tT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&62?Mt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Jt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function iT(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=Qe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=vd}=e,{optionComponent:d=vd}=e,{selectionKey:p="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function _(T){T=H.toArray(T,!0);let C=[];for(let O of T){const M=H.findByKey(r,p,O);M&&C.push(M)}T.length&&!C.length||t(0,u=a?C:C[0])}async function g(T){let C=H.toArray(T,!0).map(O=>O[p]);r.length&&t(6,m=a?C:C[0])}function b(T){u=T,t(0,u)}function k(T){me.call(this,n,T)}function $(T){me.call(this,n,T)}return n.$$set=T=>{e=je(je({},e),Kt(T)),t(5,s=Qe(e,i)),"items"in T&&t(1,r=T.items),"multiple"in T&&t(2,a=T.multiple),"selected"in T&&t(0,u=T.selected),"labelComponent"in T&&t(3,f=T.labelComponent),"optionComponent"in T&&t(4,d=T.optionComponent),"selectionKey"in T&&t(7,p=T.selectionKey),"keyOfSelected"in T&&t(6,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&_(m),n.$$.dirty&1&&g(u)},[u,r,a,f,d,s,m,p,l,b,k,$,o]}class Bi extends be{constructor(e){super(),ge(this,e,iT,nT,_e,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function sT(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[17],placeholder:"Choices: eg. optionA, optionB",required:!0,disabled:!n[18]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Vs({props:a}),se.push(()=>he(t,"value",r)),{c(){e=y("div"),U(t.$$.fragment)},m(u,f){S(u,e,f),z(t,e,null),s=!0,l||(o=De(We.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const d={};f&131072&&(d.id=u[17]),f&262144&&(d.disabled=!u[18]),!i&&f&1&&(i=!0,d.value=u[0].options.values,ke(()=>i=!1)),t.$set(d)},i(u){s||(A(t.$$.fragment,u),s=!0)},o(u){P(t.$$.fragment,u),s=!1},d(u){u&&w(e),B(t),l=!1,o()}}}function lT(n){let e,t,i;function s(o){n[8](o)}let l={id:n[17],items:n[3],disabled:!n[18]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&131072&&(a.id=o[17]),r&262144&&(a.disabled=!o[18]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function oT(n){let e,t,i,s;return e=new de({props:{class:"form-field required "+(n[18]?"":"disabled"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[sT,({uniqueId:l})=>({17:l}),({uniqueId:l})=>l?131072:0]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field form-field-single-multiple-select "+(n[18]?"":"disabled"),inlineError:!0,$$slots:{default:[lT,({uniqueId:l})=>({17:l}),({uniqueId:l})=>l?131072:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o&262144&&(r.class="form-field required "+(l[18]?"":"disabled")),o&2&&(r.name="schema."+l[1]+".options.values"),o&917505&&(r.$$scope={dirty:o,ctx:l}),e.$set(r);const a={};o&262144&&(a.class="form-field form-field-single-multiple-select "+(l[18]?"":"disabled")),o&917508&&(a.$$scope={dirty:o,ctx:l}),i.$set(a)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function kd(n){let e,t;return e=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[rT,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&655361&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function rT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Max select"),s=E(),l=y("input"),h(e,"for",i=n[17]),h(l,"id",o=n[17]),h(l,"type","number"),h(l,"step","1"),h(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.maxSelect),r||(a=J(l,"input",n[6]),r=!0)},p(u,f){f&131072&&i!==(i=u[17])&&h(e,"for",i),f&131072&&o!==(o=u[17])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.maxSelect&&fe(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aT(n){let e,t,i=!n[2]&&kd(n);return{c(){i&&i.c(),e=$e()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,l){s[2]?i&&(ae(),P(i,1,1,()=>{i=null}),ue()):i?(i.p(s,l),l&4&&A(i,1)):(i=kd(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function uT(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[aT],default:[oT,({interactive:r})=>({18:r}),({interactive:r})=>r?262144:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),e.$on("drop",n[12]),e.$on("dragstart",n[13]),e.$on("dragenter",n[14]),e.$on("dragleave",n[15]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&18?Mt(s,[a&2&&{key:r[1]},a&16&&Jt(r[4])]):{};a&786439&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function fT(n,e,t){var O;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((O=l.options)==null?void 0:O.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function d(){l.options.maxSelect=gt(this.value),t(0,l),t(5,u),t(2,a)}function p(M){n.$$.not_equal(l.options.values,M)&&(l.options.values=M,t(0,l),t(5,u),t(2,a))}function m(M){a=M,t(2,a)}function _(M){l=M,t(0,l),t(5,u),t(2,a)}function g(M){me.call(this,n,M)}function b(M){me.call(this,n,M)}function k(M){me.call(this,n,M)}function $(M){me.call(this,n,M)}function T(M){me.call(this,n,M)}function C(M){me.call(this,n,M)}return n.$$set=M=>{e=je(je({},e),Kt(M)),t(4,s=Qe(e,i)),"field"in M&&t(0,l=M.field),"key"in M&&t(1,o=M.key)},n.$$.update=()=>{var M,D;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((D=(M=l.options)==null?void 0:M.values)==null?void 0:D.length)||2,l)),n.$$.dirty&1&&H.isEmpty(l.options)&&f()},[l,o,a,r,s,u,d,p,m,_,g,b,k,$,T,C]}class cT extends be{constructor(e){super(),ge(this,e,fT,uT,_e,{field:0,key:1})}}function dT(n){let e;return{c(){e=y("i"),h(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pT(n){let e;return{c(){e=y("i"),h(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D='"{"a":1,"b":2}"',I,L,F,q,N,R,j,V,K,ee,te,G,ce;return{c(){e=y("div"),t=y("div"),i=y("div"),s=W("In order to support seamlessly both "),l=y("code"),l.textContent="application/json",o=W(` and + `}}function ce(){t.calendarContainer.classList.add("hasWeeks");var Y=ft("div","flatpickr-weekwrapper");Y.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=ft("div","flatpickr-weeks");return Y.appendChild(Z),{weekWrapper:Y,weekNumbers:Z}}function X(Y,Z){Z===void 0&&(Z=!0);var ie=Z?Y:Y-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Fe("onYearChange"),R()),N(),Fe("onMonthChange"),Fn())}function le(Y,Z){if(Y===void 0&&(Y=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Ar(t.config),re=ie.hours,Te=ie.minutes,Pe=ie.seconds;m(re,Te,Pe)}t.redraw(),Y&&Fe("onChange")}function ye(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Fe("onClose")}function Se(){t.config!==void 0&&Fe("onDestroy");for(var Y=t._handlers.length;Y--;)t._handlers[Y].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 Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}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(ie){try{delete t[ie]}catch{}})}function Ve(Y){return t.calendarContainer.contains(Y)}function ze(Y){if(t.isOpen&&!t.config.inline){var Z=Tn(Y),ie=Ve(Z),re=Z===t.input||Z===t.altInput||t.element.contains(Z)||Y.path&&Y.path.indexOf&&(~Y.path.indexOf(t.input)||~Y.path.indexOf(t.altInput)),Te=!re&&!ie&&!Ve(Y.relatedTarget),Pe=!t.config.ignoredFocusElements.some(function(Le){return Le.contains(Z)});Te&&Pe&&(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 we(Y){if(!(!Y||t.config.minDate&&Yt.config.maxDate.getFullYear())){var Z=Y,ie=t.currentYear!==Z;t.currentYear=Z||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)),ie&&(t.redraw(),Fe("onYearChange"),R())}}function Me(Y,Z){var ie;Z===void 0&&(Z=!0);var re=t.parseDate(Y,void 0,Z);if(t.config.minDate&&re&&Mn(re,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&re&&Mn(re,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(re===void 0)return!1;for(var Te=!!t.config.enable,Pe=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,Le=0,Oe=void 0;Le=Oe.from.getTime()&&re.getTime()<=Oe.to.getTime())return Te}return!Te}function Ze(Y){return t.daysContainer!==void 0?Y.className.indexOf("hidden")===-1&&Y.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(Y):!1}function mt(Y){var Z=Y.target===t._input,ie=t._input.value.trimEnd()!==Wi();Z&&ie&&!(Y.relatedTarget&&Ve(Y.relatedTarget))&&t.setDate(t._input.value,!0,Y.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ge(Y){var Z=Tn(Y),ie=t.config.wrap?n.contains(Z):Z===t._input,re=t.config.allowInput,Te=t.isOpen&&(!re||!ie),Pe=t.config.inline&&ie&&!re;if(Y.keyCode===13&&ie){if(re)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(Ve(Z)||Te||Pe){var Le=!!t.timeContainer&&t.timeContainer.contains(Z);switch(Y.keyCode){case 13:Le?(Y.preventDefault(),a(),Ln()):ti(Y);break;case 27:Y.preventDefault(),Ln();break;case 8:case 46:ie&&!t.config.allowInput&&(Y.preventDefault(),t.clear());break;case 37:case 39:if(!Le&&!ie){Y.preventDefault();var Oe=l();if(t.daysContainer!==void 0&&(re===!1||Oe&&Ze(Oe))){var Ke=Y.keyCode===39?1:-1;Y.ctrlKey?(Y.stopPropagation(),X(Ke),F(I(1),0)):F(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:Y.preventDefault();var Re=Y.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?Y.ctrlKey?(Y.stopPropagation(),we(t.currentYear-Re),F(I(1),0)):Le||F(void 0,Re*7):Z===t.currentYearElement?we(t.currentYear-Re):t.config.enableTime&&(!Le&&t.hourElement&&t.hourElement.focus(),a(Y),t._debouncedChange());break;case 9:if(Le){var Ue=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Cn){return Cn}),bt=Ue.indexOf(Z);if(bt!==-1){var ii=Ue[bt+(Y.shiftKey?-1:1)];Y.preventDefault(),(ii||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&Y.shiftKey&&(Y.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&Z===t.amPM)switch(Y.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],d(),tn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],d(),tn();break}(ie||Ve(Z))&&Fe("onKeyDown",Y)}function Ye(Y,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||Y&&(!Y.classList.contains(Z)||Y.classList.contains("flatpickr-disabled")))){for(var ie=Y?Y.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),re=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Te=Math.min(ie,t.selectedDates[0].getTime()),Pe=Math.max(ie,t.selectedDates[0].getTime()),Le=!1,Oe=0,Ke=0,Re=Te;ReTe&&ReOe)?Oe=Re:Re>re&&(!Ke||Re ."+Z));Ue.forEach(function(bt){var ii=bt.dateObj,Cn=ii.getTime(),Hs=Oe>0&&Cn0&&Cn>Ke;if(Hs){bt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ms){bt.classList.remove(ms)});return}else if(Le&&!Hs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ms){bt.classList.remove(ms)}),Y!==void 0&&(Y.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),reie&&Cn===re&&bt.classList.add("endRange"),Cn>=Oe&&(Ke===0||Cn<=Ke)&&MC(Cn,re,ie)&&bt.classList.add("inRange"))})}}function ne(){t.isOpen&&!t.config.static&&!t.config.inline&&tt()}function qe(Y,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(Y){Y.preventDefault();var ie=Tn(Y);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Fe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var re=t.isOpen;t.isOpen=!0,re||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Fe("onOpen"),tt(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(Y===void 0||!t.timeContainer.contains(Y.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function xe(Y){return function(Z){var ie=t.config["_"+Y+"Date"]=t.parseDate(Z,t.config.dateFormat),re=t.config["_"+(Y==="min"?"max":"min")+"Date"];ie!==void 0&&(t[Y==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Te){return Me(Te)}),!t.selectedDates.length&&Y==="min"&&p(ie),tn()),t.daysContainer&&(Ht(),ie!==void 0?t.currentYearElement[Y]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(Y),t.currentYearElement.disabled=!!re&&ie!==void 0&&re.getFullYear()===ie.getFullYear())}}function en(){var Y=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=sn(sn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Ue){t.config._enable=ni(Ue)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Ue){t.config._disable=ni(Ue)}});var re=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||re)){var Te=Ut.defaultConfig.dateFormat||Ts.dateFormat;ie.dateFormat=Z.noCalendar||re?"H:i"+(Z.enableSeconds?":S":""):Te+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||re)&&!Z.altFormat){var Pe=Ut.defaultConfig.altFormat||Ts.altFormat;ie.altFormat=Z.noCalendar||re?"h:i"+(Z.enableSeconds?":S K":" K"):Pe+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:xe("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:xe("max")});var Le=function(Ue){return function(bt){t.config[Ue==="min"?"_minTime":"_maxTime"]=t.parseDate(bt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Le("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Le("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var Oe=0;Oe-1?t.config[Re]=Or(Ke[Re]).map(o).concat(t.config[Re]):typeof Z[Re]>"u"&&(t.config[Re]=Ke[Re])}Z.altInputClass||(t.config.altInputClass=Ne().className+" "+t.config.altInputClass),Fe("onParseConfig")}function Ne(){return t.config.wrap?n.querySelector("[data-input]"):n}function Ce(){typeof t.config.locale!="object"&&typeof Ut.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=sn(sn({},Ut.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ut.l10ns[t.config.locale]:void 0),ts.D="("+t.l10n.weekdays.shorthand.join("|")+")",ts.l="("+t.l10n.weekdays.longhand.join("|")+")",ts.M="("+t.l10n.months.shorthand.join("|")+")",ts.F="("+t.l10n.months.longhand.join("|")+")",ts.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var Y=sn(sn({},e),JSON.parse(JSON.stringify(n.dataset||{})));Y.time_24hr===void 0&&Ut.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=db(t),t.parseDate=ha({config:t.config,l10n:t.l10n})}function tt(Y){if(typeof t.config.position=="function")return void t.config.position(t,Y);if(t.calendarContainer!==void 0){Fe("onPreCalendarPosition");var Z=Y||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,function(Cb,Tb){return Cb+Tb.offsetHeight},0),re=t.calendarContainer.offsetWidth,Te=t.config.position.split(" "),Pe=Te[0],Le=Te.length>1?Te[1]:null,Oe=Z.getBoundingClientRect(),Ke=window.innerHeight-Oe.bottom,Re=Pe==="above"||Pe!=="below"&&Keie,Ue=window.pageYOffset+Oe.top+(Re?-ie-2:Z.offsetHeight+2);if(cn(t.calendarContainer,"arrowTop",!Re),cn(t.calendarContainer,"arrowBottom",Re),!t.config.inline){var bt=window.pageXOffset+Oe.left,ii=!1,Cn=!1;Le==="center"?(bt-=(re-Oe.width)/2,ii=!0):Le==="right"&&(bt-=re-Oe.width,Cn=!0),cn(t.calendarContainer,"arrowLeft",!ii&&!Cn),cn(t.calendarContainer,"arrowCenter",ii),cn(t.calendarContainer,"arrowRight",Cn);var Hs=window.document.body.offsetWidth-(window.pageXOffset+Oe.right),ms=bt+re>window.document.body.offsetWidth,bb=Hs+re>window.document.body.offsetWidth;if(cn(t.calendarContainer,"rightMost",ms),!t.config.static)if(t.calendarContainer.style.top=Ue+"px",!ms)t.calendarContainer.style.left=bt+"px",t.calendarContainer.style.right="auto";else if(!bb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Hs+"px";else{var tr=Et();if(tr===void 0)return;var vb=window.document.body.offsetWidth,yb=Math.max(0,vb/2-re/2),kb=".flatpickr-calendar.centerMost:before",wb=".flatpickr-calendar.centerMost:after",Sb=tr.cssRules.length,$b="{left:"+Oe.left+"px;right:auto;}";cn(t.calendarContainer,"rightMost",!1),cn(t.calendarContainer,"centerMost",!0),tr.insertRule(kb+","+wb+$b,Sb),t.calendarContainer.style.left=yb+"px",t.calendarContainer.style.right="auto"}}}}function Et(){for(var Y=null,Z=0;Zt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=re,t.config.mode==="single")t.selectedDates=[Te];else if(t.config.mode==="multiple"){var Le=Ot(Te);Le?t.selectedDates.splice(parseInt(Le),1):t.selectedDates.push(Te)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Te,t.selectedDates.push(Te),Mn(Te,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Ue,bt){return Ue.getTime()-bt.getTime()}));if(d(),Pe){var Oe=t.currentYear!==Te.getFullYear();t.currentYear=Te.getFullYear(),t.currentMonth=Te.getMonth(),Oe&&(Fe("onYearChange"),R()),Fe("onMonthChange")}if(Fn(),N(),tn(),!Pe&&t.config.mode!=="range"&&t.config.showMonths===1?O(re):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 Ke=t.config.mode==="single"&&!t.config.enableTime,Re=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Re)&&Ln()}b()}}var Sn={locale:[Ce,G],showMonths:[V,r,te],minDate:[$],maxDate:[$],positionElement:[pi],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 ht(Y,Z){if(Y!==null&&typeof Y=="object"){Object.assign(t.config,Y);for(var ie in Y)Sn[ie]!==void 0&&Sn[ie].forEach(function(re){return re()})}else t.config[Y]=Z,Sn[Y]!==void 0?Sn[Y].forEach(function(re){return re()}):Mr.indexOf(Y)>-1&&(t.config[Y]=Or(Z));t.redraw(),tn(!0)}function Nn(Y,Z){var ie=[];if(Y instanceof Array)ie=Y.map(function(re){return t.parseDate(re,Z)});else if(Y instanceof Date||typeof Y=="number")ie=[t.parseDate(Y,Z)];else if(typeof Y=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(Y,Z)];break;case"multiple":ie=Y.split(t.config.conjunction).map(function(re){return t.parseDate(re,Z)});break;case"range":ie=Y.split(t.l10n.rangeSeparator).map(function(re){return t.parseDate(re,Z)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(Y)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(re){return re instanceof Date&&Me(re,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(re,Te){return re.getTime()-Te.getTime()})}function ds(Y,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),Y!==0&&!Y||Y instanceof Array&&Y.length===0)return t.clear(Z);Nn(Y,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,Z),p(),t.selectedDates.length===0&&t.clear(!1),tn(Z),Z&&Fe("onChange")}function ni(Y){return Y.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function Mi(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var Y=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);Y&&Nn(Y,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 ps(){if(t.input=Ne(),!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=ft(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"),pi()}function pi(){t._positionElement=t.config.positionElement||t._input}function ge(){var Y=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ft("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=Y,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=Y==="datetime-local"?"Y-m-d\\TH:i:S":Y==="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(Z){t.setDate(Tn(Z).value,!1,t.mobileFormatStr),Fe("onChange"),Fe("onClose")})}function Ae(Y){if(t.isOpen===!0)return t.close();t.open(Y)}function Fe(Y,Z){if(t.config!==void 0){var ie=t.config[Y];if(ie!==void 0&&ie.length>0)for(var re=0;ie[re]&&re=0&&Mn(Y,t.selectedDates[1])<=0}function Fn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(Y,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=No(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),Y.value=ie.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 Wi(Y){var Z=Y||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,re,Te){return t.config.mode!=="range"||t.config.enableTime||Te.indexOf(ie)===re}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function tn(Y){Y===void 0&&(Y=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Wi(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Wi(t.config.altFormat)),Y!==!1&&Fe("onValueUpdate")}function fn(Y){var Z=Tn(Y),ie=t.prevMonthNav.contains(Z),re=t.nextMonthNav.contains(Z);ie||re?X(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(Y){Y.preventDefault();var Z=Y.type==="keydown",ie=Tn(Y),re=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]);var Te=parseFloat(re.getAttribute("min")),Pe=parseFloat(re.getAttribute("max")),Le=parseFloat(re.getAttribute("step")),Oe=parseInt(re.value,10),Ke=Y.delta||(Z?Y.which===38?1:-1:0),Re=Oe+Le*Ke;if(typeof re.value<"u"&&re.value.length===2){var Ue=re===t.hourElement,bt=re===t.minuteElement;RePe&&(Re=re===t.hourElement?Re-Pe-Vn(!t.amPM):Te,bt&&C(void 0,1,t.hourElement)),t.amPM&&Ue&&(Le===1?Re+Oe===23:Math.abs(Re-Oe)>Le)&&(t.amPM.textContent=t.l10n.amPM[Vn(t.amPM.textContent===t.l10n.amPM[0])]),re.value=_n(Re)}}return s(),t}function Ms(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function NC(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=Qe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:d=void 0}=e,{options:p={}}=e,m=!1,{input:_=void 0,flatpickr:g=void 0}=e;xt(()=>{const C=f??_,D=k(p);return D.onReady.push((M,O,I)=>{a===void 0&&$(M,O,I),an().then(()=>{t(8,m=!0)})}),t(3,g=Ut(C,Object.assign(D,f?{wrap:!0}:{}))),()=>{g.destroy()}});const b=Tt();function k(C={}){C=Object.assign({},C);for(const D of r){const M=(O,I,L)=>{b(LC(D),[O,I,L])};D in C?(Array.isArray(C[D])||(C[D]=[C[D]]),C[D].push(M)):C[D]=[M]}return C.onChange&&!C.onChange.includes($)&&C.onChange.push($),C}function $(C,D,M){const O=sd(M,C);!ld(a,O)&&(a||O)&&t(2,a=O),t(4,u=D)}function T(C){se[C?"unshift":"push"](()=>{_=C,t(0,_)})}return n.$$set=C=>{e=je(je({},e),Jt(C)),t(1,s=Qe(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,d=C.dateFormat),"options"in C&&t(7,p=C.options),"input"in C&&t(0,_=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&&m&&(ld(a,sd(g,g.selectedDates))||g.setDate(a,!0,d)),n.$$.dirty&392&&g&&m)for(const[C,D]of Object.entries(k(p)))g.set(C,D)},[_,s,a,g,u,f,d,p,m,o,l,T]}class ru extends ve{constructor(e){super(),be(this,e,NC,PC,_e,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function FC(n){let e,t,i,s,l,o,r,a;function u(p){n[6](p)}function f(p){n[7](p)}let d={id:n[19],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(d.value=n[2]),n[0].options.min!==void 0&&(d.formattedValue=n[0].options.min),l=new ru({props:d}),se.push(()=>he(l,"value",u)),se.push(()=>he(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=y("label"),t=W("Min date (UTC)"),s=E(),U(l.$$.fragment),h(e,"for",i=n[19])},m(p,m){S(p,e,m),v(e,t),S(p,s,m),z(l,p,m),a=!0},p(p,m){(!a||m&524288&&i!==(i=p[19]))&&h(e,"for",i);const _={};m&524288&&(_.id=p[19]),!o&&m&4&&(o=!0,_.value=p[2],ke(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=p[0].options.min,ke(()=>r=!1)),l.$set(_)},i(p){a||(A(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),B(l,p)}}}function RC(n){let e,t,i,s,l,o,r,a;function u(p){n[9](p)}function f(p){n[10](p)}let d={id:n[19],options:H.defaultFlatpickrOptions()};return n[3]!==void 0&&(d.value=n[3]),n[0].options.max!==void 0&&(d.formattedValue=n[0].options.max),l=new ru({props:d}),se.push(()=>he(l,"value",u)),se.push(()=>he(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=y("label"),t=W("Max date (UTC)"),s=E(),U(l.$$.fragment),h(e,"for",i=n[19])},m(p,m){S(p,e,m),v(e,t),S(p,s,m),z(l,p,m),a=!0},p(p,m){(!a||m&524288&&i!==(i=p[19]))&&h(e,"for",i);const _={};m&524288&&(_.id=p[19]),!o&&m&8&&(o=!0,_.value=p[3],ke(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=p[0].options.max,ke(()=>r=!1)),l.$set(_)},i(p){a||(A(l.$$.fragment,p),a=!0)},o(p){P(l.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(s),B(l,p)}}}function qC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[FC,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[RC,({uniqueId:a})=>({19:a}),({uniqueId:a})=>a?524288:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1572869&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&1572873&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function jC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[qC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),e.$on("drop",n[15]),e.$on("dragstart",n[16]),e.$on("dragenter",n[17]),e.$on("dragleave",n[18]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Zt(r[5])]):{};a&1048591&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function VC(n,e,t){var O,I;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=(O=l==null?void 0:l.options)==null?void 0:O.min,a=(I=l==null?void 0:l.options)==null?void 0:I.max;function u(L,F){L.detail&&L.detail.length==3&&t(0,l.options[F]=L.detail[1],l)}function f(L){r=L,t(2,r),t(0,l)}function d(L){n.$$.not_equal(l.options.min,L)&&(l.options.min=L,t(0,l))}const p=L=>u(L,"min");function m(L){a=L,t(3,a),t(0,l)}function _(L){n.$$.not_equal(l.options.max,L)&&(l.options.max=L,t(0,l))}const g=L=>u(L,"max");function b(L){l=L,t(0,l)}function k(L){me.call(this,n,L)}function $(L){me.call(this,n,L)}function T(L){me.call(this,n,L)}function C(L){me.call(this,n,L)}function D(L){me.call(this,n,L)}function M(L){me.call(this,n,L)}return n.$$set=L=>{e=je(je({},e),Jt(L)),t(5,s=Qe(e,i)),"field"in L&&t(0,l=L.field),"key"in L&&t(1,o=L.key)},n.$$.update=()=>{var L,F,q,N;n.$$.dirty&5&&r!=((L=l==null?void 0:l.options)==null?void 0:L.min)&&t(2,r=(F=l==null?void 0:l.options)==null?void 0:F.min),n.$$.dirty&9&&a!=((q=l==null?void 0:l.options)==null?void 0:q.max)&&t(3,a=(N=l==null?void 0:l.options)==null?void 0:N.max)},[l,o,r,a,u,s,f,d,p,m,_,g,b,k,$,T,C,D,M]}class HC extends ve{constructor(e){super(),be(this,e,VC,jC,_e,{field:0,key:1})}}const zC=n=>({}),od=n=>({});function rd(n,e,t){const i=n.slice();return i[46]=e[t],i}const BC=n=>({}),ad=n=>({});function ud(n,e,t){const i=n.slice();return i[46]=e[t],i[50]=t,i}function fd(n){let e,t,i;return{c(){e=y("div"),t=W(n[2]),i=E(),h(e,"class","block txt-placeholder"),x(e,"link-hint",!n[5])},m(s,l){S(s,e,l),v(e,t),v(e,i)},p(s,l){l[0]&4&&oe(t,s[2]),l[0]&32&&x(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function UC(n){let e,t=n[46]+"",i;return{c(){e=y("span"),i=W(t),h(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&1&&t!==(t=s[46]+"")&&oe(i,t)},i:Q,o:Q,d(s){s&&w(e)}}}function WC(n){let e,t,i;const s=[{item:n[46]},n[9]];var l=n[8];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function cd(n){let e,t,i;function s(){return n[34](n[46])}return{c(){e=y("span"),e.innerHTML='',h(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[De(We.call(null,e,"Clear")),J(e,"click",An(at(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ee(i)}}}function dd(n){let e,t,i,s,l,o;const r=[WC,UC],a=[];function u(d,p){return d[8]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&cd(n);return{c(){e=y("div"),i.c(),s=E(),f&&f.c(),l=E(),h(e,"class","option")},m(d,p){S(d,e,p),a[t].m(e,null),v(e,s),f&&f.m(e,null),v(e,l),o=!0},p(d,p){let m=t;t=u(d),t===m?a[t].p(d,p):(ae(),P(a[m],1,1,()=>{a[m]=null}),ue(),i=a[t],i?i.p(d,p):(i=a[t]=r[t](d),i.c()),A(i,1),i.m(e,s)),d[4]||d[6]?f?f.p(d,p):(f=cd(d),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(d){o||(A(i),o=!0)},o(d){P(i),o=!1},d(d){d&&w(e),a[t].d(),f&&f.d()}}}function pd(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[18],$$slots:{default:[JC]},$$scope:{ctx:n}};return e=new Kn({props:i}),n[39](e),e.$on("show",n[24]),e.$on("hide",n[40]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,l){const o={};l[0]&262144&&(o.trigger=s[18]),l[0]&1612938|l[1]&2048&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[39](null),B(e,s)}}}function md(n){let e,t,i,s,l,o,r,a,u=n[15].length&&hd(n);return{c(){e=y("div"),t=y("label"),i=y("div"),i.innerHTML='',s=E(),l=y("input"),o=E(),u&&u.c(),h(i,"class","addon p-r-0"),l.autofocus=!0,h(l,"type","text"),h(l,"placeholder",n[3]),h(t,"class","input-group"),h(e,"class","form-field form-field-sm options-search")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(t,s),v(t,l),fe(l,n[15]),v(t,o),u&&u.m(t,null),l.focus(),r||(a=J(l,"input",n[36]),r=!0)},p(f,d){d[0]&8&&h(l,"placeholder",f[3]),d[0]&32768&&l.value!==f[15]&&fe(l,f[15]),f[15].length?u?u.p(f,d):(u=hd(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 hd(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","btn btn-sm btn-circle btn-transparent clear"),h(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",An(at(n[21]))),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function _d(n){let e,t=n[1]&&gd(n);return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=gd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function gd(n){let e,t;return{c(){e=y("div"),t=W(n[1]),h(e,"class","txt-missing")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s[0]&2&&oe(t,i[1])},d(i){i&&w(e)}}}function YC(n){let e=n[46]+"",t;return{c(){t=W(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&1048576&&e!==(e=i[46]+"")&&oe(t,e)},i:Q,o:Q,d(i){i&&w(t)}}}function KC(n){let e,t,i;const s=[{item:n[46]},n[11]];var l=n[10];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function bd(n){let e,t,i,s,l,o,r;const a=[KC,YC],u=[];function f(m,_){return m[10]?0:1}t=f(n),i=u[t]=a[t](n);function d(...m){return n[37](n[46],...m)}function p(...m){return n[38](n[46],...m)}return{c(){e=y("div"),i.c(),s=E(),h(e,"tabindex","0"),h(e,"class","dropdown-item option"),x(e,"closable",n[7]),x(e,"selected",n[19](n[46]))},m(m,_){S(m,e,_),u[t].m(e,null),v(e,s),l=!0,o||(r=[J(e,"click",d),J(e,"keydown",p)],o=!0)},p(m,_){n=m;let g=t;t=f(n),t===g?u[t].p(n,_):(ae(),P(u[g],1,1,()=>{u[g]=null}),ue(),i=u[t],i?i.p(n,_):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||_[0]&128)&&x(e,"closable",n[7]),(!l||_[0]&1572864)&&x(e,"selected",n[19](n[46]))},i(m){l||(A(i),l=!0)},o(m){P(i),l=!1},d(m){m&&w(e),u[t].d(),o=!1,Ee(r)}}}function JC(n){let e,t,i,s,l,o=n[12]&&md(n);const r=n[33].beforeOptions,a=wt(r,n,n[42],ad);let u=n[20],f=[];for(let g=0;gP(f[g],1,1,()=>{f[g]=null});let p=null;u.length||(p=_d(n));const m=n[33].afterOptions,_=wt(m,n,n[42],od);return{c(){o&&o.c(),e=E(),a&&a.c(),t=E(),i=y("div");for(let g=0;gP(a[p],1,1,()=>{a[p]=null});let f=null;r.length||(f=fd(n));let d=!n[5]&&pd(n);return{c(){e=y("div"),t=y("div");for(let p=0;p{d=null}),ue()):d?(d.p(p,m),m[0]&32&&A(d,1)):(d=pd(p),d.c(),A(d,1),d.m(e,null)),(!o||m[0]&8192&&l!==(l="select "+p[13]))&&h(e,"class",l),(!o||m[0]&8208)&&x(e,"multiple",p[4]),(!o||m[0]&8224)&&x(e,"disabled",p[5])},i(p){if(!o){for(let m=0;mxe(en,qe))||[]}function X(ne,qe){ne.preventDefault(),g&&p?j(qe):R(qe)}function le(ne,qe){(ne.code==="Enter"||ne.code==="Space")&&X(ne,qe)}function ye(){G(),setTimeout(()=>{const ne=F==null?void 0:F.querySelector(".dropdown-item.option.selected");ne&&(ne.focus(),ne.scrollIntoView({block:"nearest"}))},0)}function Se(ne){ne.stopPropagation(),!m&&(I==null||I.toggle())}xt(()=>{const ne=document.querySelectorAll(`label[for="${r}"]`);for(const qe of ne)qe.addEventListener("click",Se);return()=>{for(const qe of ne)qe.removeEventListener("click",Se)}});const Ve=ne=>N(ne);function ze(ne){se[ne?"unshift":"push"](()=>{q=ne,t(18,q)})}function we(){L=this.value,t(15,L)}const Me=(ne,qe)=>X(qe,ne),Ze=(ne,qe)=>le(qe,ne);function mt(ne){se[ne?"unshift":"push"](()=>{I=ne,t(16,I)})}function Ge(ne){me.call(this,n,ne)}function Ye(ne){se[ne?"unshift":"push"](()=>{F=ne,t(17,F)})}return n.$$set=ne=>{"id"in ne&&t(25,r=ne.id),"noOptionsText"in ne&&t(1,a=ne.noOptionsText),"selectPlaceholder"in ne&&t(2,u=ne.selectPlaceholder),"searchPlaceholder"in ne&&t(3,f=ne.searchPlaceholder),"items"in ne&&t(26,d=ne.items),"multiple"in ne&&t(4,p=ne.multiple),"disabled"in ne&&t(5,m=ne.disabled),"selected"in ne&&t(0,_=ne.selected),"toggle"in ne&&t(6,g=ne.toggle),"closable"in ne&&t(7,b=ne.closable),"labelComponent"in ne&&t(8,k=ne.labelComponent),"labelComponentProps"in ne&&t(9,$=ne.labelComponentProps),"optionComponent"in ne&&t(10,T=ne.optionComponent),"optionComponentProps"in ne&&t(11,C=ne.optionComponentProps),"searchable"in ne&&t(12,D=ne.searchable),"searchFunc"in ne&&t(27,M=ne.searchFunc),"class"in ne&&t(13,O=ne.class),"$$scope"in ne&&t(42,o=ne.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&67108864&&d&&(te(),G()),n.$$.dirty[0]&67141632&&t(20,i=ce(d,L)),n.$$.dirty[0]&1&&t(19,s=function(ne){const qe=H.toArray(_);return H.inArray(qe,ne)})},[_,a,u,f,p,m,g,b,k,$,T,C,D,O,N,L,I,F,q,s,i,G,X,le,ye,r,d,M,R,j,V,K,ee,l,Ve,ze,we,Me,Ze,mt,Ge,Ye,o]}class au extends ve{constructor(e){super(),be(this,e,XC,ZC,_e,{id:25,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:26,multiple:4,disabled:5,selected:0,toggle:6,closable:7,labelComponent:8,labelComponentProps:9,optionComponent:10,optionComponentProps:11,searchable:12,searchFunc:27,class:13,deselectItem:14,selectItem:28,toggleItem:29,reset:30,showDropdown:31,hideDropdown:32},null,[-1,-1])}get deselectItem(){return this.$$.ctx[14]}get selectItem(){return this.$$.ctx[28]}get toggleItem(){return this.$$.ctx[29]}get reset(){return this.$$.ctx[30]}get showDropdown(){return this.$$.ctx[31]}get hideDropdown(){return this.$$.ctx[32]}}function vd(n){let e,t;return{c(){e=y("i"),h(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)&&h(e,"class",t)},d(i){i&&w(e)}}}function QC(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&&vd(n);return{c(){l&&l.c(),e=E(),t=y("span"),s=W(i),h(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),v(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=vd(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)+"")&&oe(s,i)},i:Q,o:Q,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function xC(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class yd extends ve{constructor(e){super(),be(this,e,xC,QC,_e,{item:0})}}const eT=n=>({}),kd=n=>({});function tT(n){let e;const t=n[8].afterOptions,i=wt(t,n,n[12],kd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&$t(i,t,s,s[12],e?St(t,s[12],l,eT):Ct(s[12]),kd)},i(s){e||(A(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function nT(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:[tT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&62?Mt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Zt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function iT(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=Qe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=yd}=e,{optionComponent:d=yd}=e,{selectionKey:p="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function _(T){T=H.toArray(T,!0);let C=[];for(let D of T){const M=H.findByKey(r,p,D);M&&C.push(M)}T.length&&!C.length||t(0,u=a?C:C[0])}async function g(T){let C=H.toArray(T,!0).map(D=>D[p]);r.length&&t(6,m=a?C:C[0])}function b(T){u=T,t(0,u)}function k(T){me.call(this,n,T)}function $(T){me.call(this,n,T)}return n.$$set=T=>{e=je(je({},e),Jt(T)),t(5,s=Qe(e,i)),"items"in T&&t(1,r=T.items),"multiple"in T&&t(2,a=T.multiple),"selected"in T&&t(0,u=T.selected),"labelComponent"in T&&t(3,f=T.labelComponent),"optionComponent"in T&&t(4,d=T.optionComponent),"selectionKey"in T&&t(7,p=T.selectionKey),"keyOfSelected"in T&&t(6,m=T.keyOfSelected),"$$scope"in T&&t(12,o=T.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&_(m),n.$$.dirty&1&&g(u)},[u,r,a,f,d,s,m,p,l,b,k,$,o]}class Bi extends ve{constructor(e){super(),be(this,e,iT,nT,_e,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function sT(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[17],placeholder:"Choices: eg. optionA, optionB",required:!0,disabled:!n[18]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Vs({props:a}),se.push(()=>he(t,"value",r)),{c(){e=y("div"),U(t.$$.fragment)},m(u,f){S(u,e,f),z(t,e,null),s=!0,l||(o=De(We.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const d={};f&131072&&(d.id=u[17]),f&262144&&(d.disabled=!u[18]),!i&&f&1&&(i=!0,d.value=u[0].options.values,ke(()=>i=!1)),t.$set(d)},i(u){s||(A(t.$$.fragment,u),s=!0)},o(u){P(t.$$.fragment,u),s=!1},d(u){u&&w(e),B(t),l=!1,o()}}}function lT(n){let e,t,i;function s(o){n[8](o)}let l={id:n[17],items:n[3],disabled:!n[18]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&131072&&(a.id=o[17]),r&262144&&(a.disabled=!o[18]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function oT(n){let e,t,i,s;return e=new de({props:{class:"form-field required "+(n[18]?"":"disabled"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[sT,({uniqueId:l})=>({17:l}),({uniqueId:l})=>l?131072:0]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field form-field-single-multiple-select "+(n[18]?"":"disabled"),inlineError:!0,$$slots:{default:[lT,({uniqueId:l})=>({17:l}),({uniqueId:l})=>l?131072:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o&262144&&(r.class="form-field required "+(l[18]?"":"disabled")),o&2&&(r.name="schema."+l[1]+".options.values"),o&917505&&(r.$$scope={dirty:o,ctx:l}),e.$set(r);const a={};o&262144&&(a.class="form-field form-field-single-multiple-select "+(l[18]?"":"disabled")),o&917508&&(a.$$scope={dirty:o,ctx:l}),i.$set(a)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function wd(n){let e,t;return e=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[rT,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&655361&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function rT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Max select"),s=E(),l=y("input"),h(e,"for",i=n[17]),h(l,"id",o=n[17]),h(l,"type","number"),h(l,"step","1"),h(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.maxSelect),r||(a=J(l,"input",n[6]),r=!0)},p(u,f){f&131072&&i!==(i=u[17])&&h(e,"for",i),f&131072&&o!==(o=u[17])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.maxSelect&&fe(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aT(n){let e,t,i=!n[2]&&wd(n);return{c(){i&&i.c(),e=$e()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,l){s[2]?i&&(ae(),P(i,1,1,()=>{i=null}),ue()):i?(i.p(s,l),l&4&&A(i,1)):(i=wd(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function uT(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[aT],default:[oT,({interactive:r})=>({18:r}),({interactive:r})=>r?262144:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),e.$on("drop",n[12]),e.$on("dragstart",n[13]),e.$on("dragenter",n[14]),e.$on("dragleave",n[15]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&18?Mt(s,[a&2&&{key:r[1]},a&16&&Zt(r[4])]):{};a&786439&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function fT(n,e,t){var D;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((D=l.options)==null?void 0:D.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function d(){l.options.maxSelect=gt(this.value),t(0,l),t(5,u),t(2,a)}function p(M){n.$$.not_equal(l.options.values,M)&&(l.options.values=M,t(0,l),t(5,u),t(2,a))}function m(M){a=M,t(2,a)}function _(M){l=M,t(0,l),t(5,u),t(2,a)}function g(M){me.call(this,n,M)}function b(M){me.call(this,n,M)}function k(M){me.call(this,n,M)}function $(M){me.call(this,n,M)}function T(M){me.call(this,n,M)}function C(M){me.call(this,n,M)}return n.$$set=M=>{e=je(je({},e),Jt(M)),t(4,s=Qe(e,i)),"field"in M&&t(0,l=M.field),"key"in M&&t(1,o=M.key)},n.$$.update=()=>{var M,O;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((O=(M=l.options)==null?void 0:M.values)==null?void 0:O.length)||2,l)),n.$$.dirty&1&&H.isEmpty(l.options)&&f()},[l,o,a,r,s,u,d,p,m,_,g,b,k,$,T,C]}class cT extends ve{constructor(e){super(),be(this,e,fT,uT,_e,{field:0,key:1})}}function dT(n){let e;return{c(){e=y("i"),h(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pT(n){let e;return{c(){e=y("i"),h(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Sd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O='"{"a":1,"b":2}"',I,L,F,q,N,R,j,V,K,ee,te,G,ce;return{c(){e=y("div"),t=y("div"),i=y("div"),s=W("In order to support seamlessly both "),l=y("code"),l.textContent="application/json",o=W(` and `),r=y("code"),r.textContent="multipart/form-data",a=W(` requests, the following normalization rules are applied if the `),u=y("code"),u.textContent="json",f=W(` field is a `),d=y("strong"),d.textContent="plain string",p=W(`: - `),m=y("ul"),_=y("li"),_.innerHTML=""true" is converted to the json true",g=E(),b=y("li"),b.innerHTML=""false" is converted to the json false",k=E(),$=y("li"),$.innerHTML=""null" is converted to the json null",T=E(),C=y("li"),C.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",O=E(),M=y("li"),I=W(D),L=W(" is converted to the json "),F=y("code"),F.textContent='{"a":1,"b":2}',q=E(),N=y("li"),N.textContent="numeric strings are converted to json number",R=E(),j=y("li"),j.textContent="double quoted strings are left as they are (aka. without normalizations)",V=E(),K=y("li"),K.textContent="any other string (empty string too) is double quoted",ee=W(` + `),m=y("ul"),_=y("li"),_.innerHTML=""true" is converted to the json true",g=E(),b=y("li"),b.innerHTML=""false" is converted to the json false",k=E(),$=y("li"),$.innerHTML=""null" is converted to the json null",T=E(),C=y("li"),C.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",D=E(),M=y("li"),I=W(O),L=W(" is converted to the json "),F=y("code"),F.textContent='{"a":1,"b":2}',q=E(),N=y("li"),N.textContent="numeric strings are converted to json number",R=E(),j=y("li"),j.textContent="double quoted strings are left as they are (aka. without normalizations)",V=E(),K=y("li"),K.textContent="any other string (empty string too) is double quoted",ee=W(` Alternatively, if you want to avoid the string value normalizations, you can wrap your - data inside an object, eg.`),te=y("code"),te.textContent='{"data": anything}',h(i,"class","content"),h(t,"class","alert alert-warning m-b-0 m-t-10"),h(e,"class","block")},m(X,le){S(X,e,le),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(i,r),v(i,a),v(i,u),v(i,f),v(i,d),v(i,p),v(i,m),v(m,_),v(m,g),v(m,b),v(m,k),v(m,$),v(m,T),v(m,C),v(m,O),v(m,M),v(M,I),v(M,L),v(M,F),v(m,q),v(m,N),v(m,R),v(m,j),v(m,V),v(m,K),v(i,ee),v(i,te),ce=!0},i(X){ce||(X&&nt(()=>{ce&&(G||(G=He(e,Ct,{duration:150},!0)),G.run(1))}),ce=!0)},o(X){X&&(G||(G=He(e,Ct,{duration:150},!1)),G.run(0)),ce=!1},d(X){X&&w(e),X&&G&&G.end()}}}function mT(n){let e,t,i,s,l,o,r;function a(p,m){return p[2]?pT:dT}let u=a(n),f=u(n),d=n[2]&&wd();return{c(){e=y("button"),t=y("strong"),t.textContent="String value normalizations",i=E(),f.c(),s=E(),d&&d.c(),l=$e(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(p,m){S(p,e,m),v(e,t),v(e,i),f.m(e,null),S(p,s,m),d&&d.m(p,m),S(p,l,m),o||(r=J(e,"click",n[4]),o=!0)},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(e,null))),p[2]?d?m&4&&A(d,1):(d=wd(),d.c(),A(d,1),d.m(l.parentNode,l)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},d(p){p&&w(e),f.d(),p&&w(s),d&&d.d(p),p&&w(l),o=!1,r()}}}function hT(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[mT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&10?Mt(s,[a&2&&{key:r[1]},a&8&&Jt(r[3])]):{};a&4100&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function _T(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Kt(b)),t(3,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,r,s,a,u,f,d,p,m,_,g]}class gT extends be{constructor(e){super(),ge(this,e,_T,hT,_e,{field:0,key:1})}}function bT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=y("span"),i=W(t),s=E(),l=y("small"),r=W(o),h(e,"class","txt"),h(l,"class","txt-hint")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),S(a,l,u),v(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&oe(i,t),u&1&&o!==(o=a[0].mimeType+"")&&oe(r,o)},i:Q,o:Q,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function vT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Sd extends be{constructor(e){super(),ge(this,e,vT,bT,_e,{item:0})}}const yT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function kT(n){let e,t,i;function s(o){n[16](o)}let l={id:n[26],items:n[4],disabled:!n[27]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&67108864&&(a.id=o[26]),r&134217728&&(a.disabled=!o[27]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function wT(n){let e,t;return e=new de({props:{class:"form-field form-field-single-multiple-select "+(n[27]?"":"disabled"),inlineError:!0,$$slots:{default:[kT,({uniqueId:i})=>({26:i}),({uniqueId:i})=>i?67108864:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&134217728&&(l.class="form-field form-field-single-multiple-select "+(i[27]?"":"disabled")),s&469762052&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function ST(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=E(),i=y("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=E(),l=y("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=E(),r=y("button"),r.innerHTML='Archives (zip, 7zip, rar)',h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item closable"),h(r,"type","button"),h(r,"class","dropdown-item closable")},m(f,d){S(f,e,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),S(f,o,d),S(f,r,d),a||(u=[J(e,"click",n[9]),J(i,"click",n[10]),J(l,"click",n[11]),J(r,"click",n[12])],a=!0)},p:Q,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,Ee(u)}}}function $T(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T;function C(M){n[8](M)}let O={id:n[26],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:Sd,optionComponent:Sd};return n[0].options.mimeTypes!==void 0&&(O.keyOfSelected=n[0].options.mimeTypes),r=new Bi({props:O}),se.push(()=>he(r,"keyOfSelected",C)),b=new Kn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[ST]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Allowed mime types",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),d=y("button"),p=y("span"),p.textContent="Choose presets",m=E(),_=y("i"),g=E(),U(b.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[26]),h(p,"class","txt link-primary"),h(_,"class","ri-arrow-drop-down-fill"),h(d,"type","button"),h(d,"class","inline-flex flex-gap-0"),h(f,"class","help-block")},m(M,D){S(M,e,D),v(e,t),v(e,i),v(e,s),S(M,o,D),z(r,M,D),S(M,u,D),S(M,f,D),v(f,d),v(d,p),v(d,m),v(d,_),v(d,g),z(b,d,null),k=!0,$||(T=De(We.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),$=!0)},p(M,D){(!k||D&67108864&&l!==(l=M[26]))&&h(e,"for",l);const I={};D&67108864&&(I.id=M[26]),D&8&&(I.items=M[3]),!a&&D&1&&(a=!0,I.keyOfSelected=M[0].options.mimeTypes,ke(()=>a=!1)),r.$set(I);const L={};D&268435457&&(L.$$scope={dirty:D,ctx:M}),b.$set(L)},i(M){k||(A(r.$$.fragment,M),A(b.$$.fragment,M),k=!0)},o(M){P(r.$$.fragment,M),P(b.$$.fragment,M),k=!1},d(M){M&&w(e),M&&w(o),B(r,M),M&&w(u),M&&w(f),B(b),$=!1,T()}}}function CT(n){let e;return{c(){e=y("ul"),e.innerHTML=`
  • WxH + data inside an object, eg.`),te=y("code"),te.textContent='{"data": anything}',h(i,"class","content"),h(t,"class","alert alert-warning m-b-0 m-t-10"),h(e,"class","block")},m(X,le){S(X,e,le),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(i,r),v(i,a),v(i,u),v(i,f),v(i,d),v(i,p),v(i,m),v(m,_),v(m,g),v(m,b),v(m,k),v(m,$),v(m,T),v(m,C),v(m,D),v(m,M),v(M,I),v(M,L),v(M,F),v(m,q),v(m,N),v(m,R),v(m,j),v(m,V),v(m,K),v(i,ee),v(i,te),ce=!0},i(X){ce||(X&&nt(()=>{ce&&(G||(G=He(e,yt,{duration:150},!0)),G.run(1))}),ce=!0)},o(X){X&&(G||(G=He(e,yt,{duration:150},!1)),G.run(0)),ce=!1},d(X){X&&w(e),X&&G&&G.end()}}}function mT(n){let e,t,i,s,l,o,r;function a(p,m){return p[2]?pT:dT}let u=a(n),f=u(n),d=n[2]&&Sd();return{c(){e=y("button"),t=y("strong"),t.textContent="String value normalizations",i=E(),f.c(),s=E(),d&&d.c(),l=$e(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(p,m){S(p,e,m),v(e,t),v(e,i),f.m(e,null),S(p,s,m),d&&d.m(p,m),S(p,l,m),o||(r=J(e,"click",n[4]),o=!0)},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(e,null))),p[2]?d?m&4&&A(d,1):(d=Sd(),d.c(),A(d,1),d.m(l.parentNode,l)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},d(p){p&&w(e),f.d(),p&&w(s),d&&d.d(p),p&&w(l),o=!1,r()}}}function hT(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[mT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&10?Mt(s,[a&2&&{key:r[1]},a&8&&Zt(r[3])]):{};a&4100&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function _T(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Jt(b)),t(3,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,r,s,a,u,f,d,p,m,_,g]}class gT extends ve{constructor(e){super(),be(this,e,_T,hT,_e,{field:0,key:1})}}function bT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=y("span"),i=W(t),s=E(),l=y("small"),r=W(o),h(e,"class","txt"),h(l,"class","txt-hint")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),S(a,l,u),v(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&oe(i,t),u&1&&o!==(o=a[0].mimeType+"")&&oe(r,o)},i:Q,o:Q,d(a){a&&w(e),a&&w(s),a&&w(l)}}}function vT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class $d extends ve{constructor(e){super(),be(this,e,vT,bT,_e,{item:0})}}const yT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function kT(n){let e,t,i;function s(o){n[16](o)}let l={id:n[26],items:n[4],disabled:!n[27]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&67108864&&(a.id=o[26]),r&134217728&&(a.disabled=!o[27]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function wT(n){let e,t;return e=new de({props:{class:"form-field form-field-single-multiple-select "+(n[27]?"":"disabled"),inlineError:!0,$$slots:{default:[kT,({uniqueId:i})=>({26:i}),({uniqueId:i})=>i?67108864:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&134217728&&(l.class="form-field form-field-single-multiple-select "+(i[27]?"":"disabled")),s&469762052&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function ST(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=E(),i=y("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=E(),l=y("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=E(),r=y("button"),r.innerHTML='Archives (zip, 7zip, rar)',h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item closable"),h(r,"type","button"),h(r,"class","dropdown-item closable")},m(f,d){S(f,e,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),S(f,o,d),S(f,r,d),a||(u=[J(e,"click",n[9]),J(i,"click",n[10]),J(l,"click",n[11]),J(r,"click",n[12])],a=!0)},p:Q,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,Ee(u)}}}function $T(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T;function C(M){n[8](M)}let D={id:n[26],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:$d,optionComponent:$d};return n[0].options.mimeTypes!==void 0&&(D.keyOfSelected=n[0].options.mimeTypes),r=new Bi({props:D}),se.push(()=>he(r,"keyOfSelected",C)),b=new Kn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[ST]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Allowed mime types",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),d=y("button"),p=y("span"),p.textContent="Choose presets",m=E(),_=y("i"),g=E(),U(b.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[26]),h(p,"class","txt link-primary"),h(_,"class","ri-arrow-drop-down-fill"),h(d,"type","button"),h(d,"class","inline-flex flex-gap-0"),h(f,"class","help-block")},m(M,O){S(M,e,O),v(e,t),v(e,i),v(e,s),S(M,o,O),z(r,M,O),S(M,u,O),S(M,f,O),v(f,d),v(d,p),v(d,m),v(d,_),v(d,g),z(b,d,null),k=!0,$||(T=De(We.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),$=!0)},p(M,O){(!k||O&67108864&&l!==(l=M[26]))&&h(e,"for",l);const I={};O&67108864&&(I.id=M[26]),O&8&&(I.items=M[3]),!a&&O&1&&(a=!0,I.keyOfSelected=M[0].options.mimeTypes,ke(()=>a=!1)),r.$set(I);const L={};O&268435457&&(L.$$scope={dirty:O,ctx:M}),b.$set(L)},i(M){k||(A(r.$$.fragment,M),A(b.$$.fragment,M),k=!0)},o(M){P(r.$$.fragment,M),P(b.$$.fragment,M),k=!1},d(M){M&&w(e),M&&w(o),B(r,M),M&&w(u),M&&w(f),B(b),$=!1,T()}}}function CT(n){let e;return{c(){e=y("ul"),e.innerHTML=`
  • WxH (eg. 100x50) - crop to WxH viewbox (from center)
  • WxHt (eg. 100x50t) - crop to WxH viewbox (from top)
  • @@ -75,67 +75,67 @@
  • 0xH (eg. 0x50) - resize to H height preserving the aspect ratio
  • Wx0 - (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,h(e,"class","m-0")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function TT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O;function M(I){n[13](I)}let D={id:n[26],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(D.value=n[0].options.thumbs),r=new Vs({props:D}),se.push(()=>he(r,"value",M)),$=new Kn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[CT]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Thumb sizes",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),d=y("span"),d.textContent="Use comma as separator.",p=E(),m=y("button"),_=y("span"),_.textContent="Supported formats",g=E(),b=y("i"),k=E(),U($.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[26]),h(d,"class","txt"),h(_,"class","txt link-primary"),h(b,"class","ri-arrow-drop-down-fill"),h(m,"type","button"),h(m,"class","inline-flex flex-gap-0"),h(f,"class","help-block")},m(I,L){S(I,e,L),v(e,t),v(e,i),v(e,s),S(I,o,L),z(r,I,L),S(I,u,L),S(I,f,L),v(f,d),v(f,p),v(f,m),v(m,_),v(m,g),v(m,b),v(m,k),z($,m,null),T=!0,C||(O=De(We.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(I,L){(!T||L&67108864&&l!==(l=I[26]))&&h(e,"for",l);const F={};L&67108864&&(F.id=I[26]),!a&&L&1&&(a=!0,F.value=I[0].options.thumbs,ke(()=>a=!1)),r.$set(F);const q={};L&268435456&&(q.$$scope={dirty:L,ctx:I}),$.$set(q)},i(I){T||(A(r.$$.fragment,I),A($.$$.fragment,I),T=!0)},o(I){P(r.$$.fragment,I),P($.$$.fragment,I),T=!1},d(I){I&&w(e),I&&w(o),B(r,I),I&&w(u),I&&w(f),B($),C=!1,O()}}}function MT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Max file size"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Must be in bytes.",h(e,"for",i=n[26]),h(l,"type","number"),h(l,"id",o=n[26]),h(l,"step","1"),h(l,"min","0"),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[0].options.maxSize),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[14]),u=!0)},p(d,p){p&67108864&&i!==(i=d[26])&&h(e,"for",i),p&67108864&&o!==(o=d[26])&&h(l,"id",o),p&1&>(l.value)!==d[0].options.maxSize&&fe(l,d[0].options.maxSize)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function $d(n){let e,t,i;return t=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[OT,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","col-sm-3")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function OT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Max select"),s=E(),l=y("input"),h(e,"for",i=n[26]),h(l,"id",o=n[26]),h(l,"type","number"),h(l,"step","1"),h(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.maxSelect),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&67108864&&i!==(i=u[26])&&h(e,"for",i),f&67108864&&o!==(o=u[26])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.maxSelect&&fe(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[$T,({uniqueId:g})=>({26:g}),({uniqueId:g})=>g?67108864:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[TT,({uniqueId:g})=>({26:g}),({uniqueId:g})=>g?67108864:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[MT,({uniqueId:g})=>({26:g}),({uniqueId:g})=>g?67108864:0]},$$scope:{ctx:n}}});let _=!n[2]&&$d(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),a=E(),u=y("div"),U(f.$$.fragment),p=E(),_&&_.c(),h(t,"class","col-sm-12"),h(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),h(u,"class",d=n[2]?"col-sm-4":"col-sm-3"),h(e,"class","grid grid-sm")},m(g,b){S(g,e,b),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,a),v(e,u),z(f,u,null),v(e,p),_&&_.m(e,null),m=!0},p(g,b){const k={};b&2&&(k.name="schema."+g[1]+".options.mimeTypes"),b&335544329&&(k.$$scope={dirty:b,ctx:g}),i.$set(k);const $={};b&2&&($.name="schema."+g[1]+".options.thumbs"),b&335544321&&($.$$scope={dirty:b,ctx:g}),o.$set($),(!m||b&4&&r!==(r=g[2]?"col-sm-8":"col-sm-6"))&&h(l,"class",r);const T={};b&2&&(T.name="schema."+g[1]+".options.maxSize"),b&335544321&&(T.$$scope={dirty:b,ctx:g}),f.$set(T),(!m||b&4&&d!==(d=g[2]?"col-sm-4":"col-sm-3"))&&h(u,"class",d),g[2]?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(g,b),b&4&&A(_,1)):(_=$d(g),_.c(),A(_,1),_.m(e,null))},i(g){m||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(f.$$.fragment,g),A(_),m=!0)},o(g){P(i.$$.fragment,g),P(o.$$.fragment,g),P(f.$$.fragment,g),P(_),m=!1},d(g){g&&w(e),B(i),B(o),B(f),_&&_.d()}}}function ET(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Protected",r=E(),a=y("a"),a.textContent="(Learn more)",h(e,"type","checkbox"),h(e,"id",t=n[26]),h(l,"class","txt"),h(s,"for",o=n[26]),h(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),h(a,"class","toggle-info txt-sm txt-hint m-l-5"),h(a,"target","_blank"),h(a,"rel","noopener")},m(d,p){S(d,e,p),e.checked=n[0].options.protected,S(d,i,p),S(d,s,p),v(s,l),S(d,r,p),S(d,a,p),u||(f=J(e,"change",n[7]),u=!0)},p(d,p){p&67108864&&t!==(t=d[26])&&h(e,"id",t),p&1&&(e.checked=d[0].options.protected),p&67108864&&o!==(o=d[26])&&h(s,"for",o)},d(d){d&&w(e),d&&w(i),d&&w(s),d&&w(r),d&&w(a),u=!1,f()}}}function AT(n){let e,t,i;return t=new de({props:{class:"form-field form-field-toggle m-0",name:"schema."+n[1]+".options.protected",$$slots:{default:[ET,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","col-sm-4")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.protected"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function IT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{afterNonempty:[AT],options:[DT],default:[wT,({interactive:r})=>({27:r}),({interactive:r})=>r?134217728:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),e.$on("drop",n[20]),e.$on("dragstart",n[21]),e.$on("dragenter",n[22]),e.$on("dragleave",n[23]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Jt(r[5])]):{};a&402653199&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function PT(n,e,t){var j;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=yT.slice(),u=((j=l.options)==null?void 0:j.maxSelect)<=1,f=u;function d(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function p(){if(H.isEmpty(l.options.mimeTypes))return;const V=[];for(const K of l.options.mimeTypes)a.find(ee=>ee.mimeType===K)||V.push({mimeType:K});V.length&&t(3,a=a.concat(V))}function m(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function _(V){n.$$.not_equal(l.options.mimeTypes,V)&&(l.options.mimeTypes=V,t(0,l),t(6,f),t(2,u))}const g=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},b=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},k=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},$=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function T(V){n.$$.not_equal(l.options.thumbs,V)&&(l.options.thumbs=V,t(0,l),t(6,f),t(2,u))}function C(){l.options.maxSize=gt(this.value),t(0,l),t(6,f),t(2,u)}function O(){l.options.maxSelect=gt(this.value),t(0,l),t(6,f),t(2,u)}function M(V){u=V,t(2,u)}function D(V){l=V,t(0,l),t(6,f),t(2,u)}function I(V){me.call(this,n,V)}function L(V){me.call(this,n,V)}function F(V){me.call(this,n,V)}function q(V){me.call(this,n,V)}function N(V){me.call(this,n,V)}function R(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Kt(V)),t(5,s=Qe(e,i)),"field"in V&&t(0,l=V.field),"key"in V&&t(1,o=V.key)},n.$$.update=()=>{var V,K;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((K=(V=l.options)==null?void 0:V.values)==null?void 0:K.length)||99,l)),n.$$.dirty&1&&(H.isEmpty(l.options)?d():p())},[l,o,u,a,r,s,f,m,_,g,b,k,$,T,C,O,M,D,I,L,F,q,N,R]}class LT extends be{constructor(e){super(),ge(this,e,PT,IT,_e,{field:0,key:1})}}function NT(n){let e,t,i,s,l;return{c(){e=y("hr"),t=E(),i=y("button"),i.innerHTML=` - New collection`,h(i,"type","button"),h(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=J(i,"click",n[17]),s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function FT(n){let e,t,i;function s(o){n[18](o)}let l={id:n[33],searchable:n[3].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[3],disabled:!n[34]||n[0].id,$$slots:{afterOptions:[NT]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[0]&8&&(a.searchable=o[3].length>5),r[0]&8&&(a.items=o[3]),r[0]&1|r[1]&8&&(a.disabled=!o[34]||o[0].id),r[0]&16|r[1]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function RT(n){let e,t,i;function s(o){n[19](o)}let l={id:n[33],items:n[8],disabled:!n[34]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[1]&8&&(a.disabled=!o[34]),!t&&r[0]&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function qT(n){let e,t,i,s;return e=new de({props:{class:"form-field required "+(n[34]?"":"disabled"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[FT,({uniqueId:l})=>({33:l}),({uniqueId:l})=>[0,l?4:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field form-field-single-multiple-select "+(n[34]?"":"disabled"),inlineError:!0,$$slots:{default:[RT,({uniqueId:l})=>({33:l}),({uniqueId:l})=>[0,l?4:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[1]&8&&(r.class="form-field required "+(l[34]?"":"disabled")),o[0]&2&&(r.name="schema."+l[1]+".options.collectionId"),o[0]&25|o[1]&28&&(r.$$scope={dirty:o,ctx:l}),e.$set(r);const a={};o[1]&8&&(a.class="form-field form-field-single-multiple-select "+(l[34]?"":"disabled")),o[0]&4|o[1]&28&&(a.$$scope={dirty:o,ctx:l}),i.$set(a)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function Cd(n){let e,t,i,s,l,o;return t=new de({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[jT,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[VT,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),i=E(),s=y("div"),U(l.$$.fragment),h(e,"class","col-sm-6"),h(s,"class","col-sm-6")},m(r,a){S(r,e,a),z(t,e,null),S(r,i,a),S(r,s,a),z(l,s,null),o=!0},p(r,a){const u={};a[0]&2&&(u.name="schema."+r[1]+".options.minSelect"),a[0]&1|a[1]&20&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&2&&(f.name="schema."+r[1]+".options.maxSelect"),a[0]&1|a[1]&20&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(t.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(t.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(t),r&&w(i),r&&w(s),B(l)}}}function jT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min select"),s=E(),l=y("input"),h(e,"for",i=n[33]),h(l,"type","number"),h(l,"id",o=n[33]),h(l,"step","1"),h(l,"min","1"),h(l,"placeholder","No min limit")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.minSelect),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&4&&i!==(i=u[33])&&h(e,"for",i),f[1]&4&&o!==(o=u[33])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].options.minSelect&&fe(l,u[0].options.minSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Max select"),s=E(),l=y("input"),h(e,"for",i=n[33]),h(l,"type","number"),h(l,"id",o=n[33]),h(l,"step","1"),h(l,"placeholder","No max limit"),h(l,"min",r=n[0].options.minSelect||2)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.maxSelect),a||(u=J(l,"input",n[14]),a=!0)},p(f,d){d[1]&4&&i!==(i=f[33])&&h(e,"for",i),d[1]&4&&o!==(o=f[33])&&h(l,"id",o),d[0]&1&&r!==(r=f[0].options.minSelect||2)&&h(l,"min",r),d[0]&1&>(l.value)!==f[0].options.maxSelect&&fe(l,f[0].options.maxSelect)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function HT(n){let e,t,i,s,l,o,r,a,u,f,d;function p(_){n[15](_)}let m={multiple:!0,searchable:!0,id:n[33],selectPlaceholder:"Auto",items:n[5]};return n[0].options.displayFields!==void 0&&(m.selected=n[0].options.displayFields),r=new ru({props:m}),se.push(()=>he(r,"selected",p)),{c(){e=y("label"),t=y("span"),t.textContent="Display fields",i=E(),s=y("i"),o=E(),U(r.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[33])},m(_,g){S(_,e,g),v(e,t),v(e,i),v(e,s),S(_,o,g),z(r,_,g),u=!0,f||(d=De(We.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(_,g){(!u||g[1]&4&&l!==(l=_[33]))&&h(e,"for",l);const b={};g[1]&4&&(b.id=_[33]),g[0]&32&&(b.items=_[5]),!a&&g[0]&1&&(a=!0,b.selected=_[0].options.displayFields,ke(()=>a=!1)),r.$set(b)},i(_){u||(A(r.$$.fragment,_),u=!0)},o(_){P(r.$$.fragment,_),u=!1},d(_){_&&w(e),_&&w(o),B(r,_),f=!1,d()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f,d,p;function m(g){n[16](g)}let _={id:n[33],items:n[9]};return n[0].options.cascadeDelete!==void 0&&(_.keyOfSelected=n[0].options.cascadeDelete),a=new Bi({props:_}),se.push(()=>he(a,"keyOfSelected",m)),{c(){e=y("label"),t=y("span"),t.textContent="Cascade delete",i=E(),s=y("i"),r=E(),U(a.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",o=n[33])},m(g,b){var k,$;S(g,e,b),v(e,t),v(e,i),v(e,s),S(g,r,b),z(a,g,b),f=!0,d||(p=De(l=We.call(null,s,{text:`Whether on ${((k=n[6])==null?void 0:k.name)||"relation"} record deletion to delete also the ${(($=n[7])==null?void 0:$.name)||"field"} associated records.`,position:"top"})),d=!0)},p(g,b){var $,T;l&&Vt(l.update)&&b[0]&192&&l.update.call(null,{text:`Whether on ${(($=g[6])==null?void 0:$.name)||"relation"} record deletion to delete also the ${((T=g[7])==null?void 0:T.name)||"field"} associated records.`,position:"top"}),(!f||b[1]&4&&o!==(o=g[33]))&&h(e,"for",o);const k={};b[1]&4&&(k.id=g[33]),!u&&b[0]&1&&(u=!0,k.keyOfSelected=g[0].options.cascadeDelete,ke(()=>u=!1)),a.$set(k)},i(g){f||(A(a.$$.fragment,g),f=!0)},o(g){P(a.$$.fragment,g),f=!1},d(g){g&&w(e),g&&w(r),B(a,g),d=!1,p()}}}function BT(n){let e,t,i,s,l,o,r,a,u=!n[2]&&Cd(n);return s=new de({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[HT,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[zT,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),u&&u.c(),t=E(),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(f,d){S(f,e,d),u&&u.m(e,null),v(e,t),v(e,i),z(s,i,null),v(e,l),v(e,o),z(r,o,null),a=!0},p(f,d){f[2]?u&&(ae(),P(u,1,1,()=>{u=null}),ue()):u?(u.p(f,d),d[0]&4&&A(u,1)):(u=Cd(f),u.c(),A(u,1),u.m(e,t));const p={};d[0]&2&&(p.name="schema."+f[1]+".options.displayFields"),d[0]&33|d[1]&20&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d[0]&2&&(m.name="schema."+f[1]+".options.cascadeDelete"),d[0]&193|d[1]&20&&(m.$$scope={dirty:d,ctx:f}),r.$set(m)},i(f){a||(A(u),A(s.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){P(u),P(s.$$.fragment,f),P(r.$$.fragment,f),a=!1},d(f){f&&w(e),u&&u.d(),B(s),B(r)}}}function UT(n){let e,t,i,s,l;const o=[{key:n[1]},n[10]];function r(f){n[20](f)}let a={$$slots:{options:[BT],default:[qT,({interactive:f})=>({34:f}),({interactive:f})=>[0,f?8:0]]},$$scope:{ctx:n}};for(let f=0;fhe(e,"field",r)),e.$on("rename",n[21]),e.$on("remove",n[22]),e.$on("drop",n[23]),e.$on("dragstart",n[24]),e.$on("dragenter",n[25]),e.$on("dragleave",n[26]);let u={};return s=new au({props:u}),n[27](s),s.$on("save",n[28]),{c(){U(e.$$.fragment),i=E(),U(s.$$.fragment)},m(f,d){z(e,f,d),S(f,i,d),z(s,f,d),l=!0},p(f,d){const p=d[0]&1026?Mt(o,[d[0]&2&&{key:f[1]},d[0]&1024&&Jt(f[10])]):{};d[0]&255|d[1]&24&&(p.$$scope={dirty:d,ctx:f}),!t&&d[0]&1&&(t=!0,p.field=f[0],ke(()=>t=!1)),e.$set(p);const m={};s.$set(m)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),P(s.$$.fragment,f),l=!1},d(f){B(e,f),f&&w(i),n[27](null),B(s,f)}}}function WT(n,e,t){var X;let i;const s=["field","key"];let l=Qe(e,s),o,r;Je(n,ci,le=>t(3,o=le)),Je(n,ui,le=>t(7,r=le));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],d=[{label:"False",value:!1},{label:"True",value:!0}],p=["id","created","updated"],m=["username","email","emailVisibility","verified"];let _=null,g=[],b=null,k=((X=a.options)==null?void 0:X.maxSelect)==1,$=k;function T(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]},a),t(2,k=!0),t(12,$=k)}function C(){var le,ve;if(t(5,g=p.slice(0)),!!i){i.isAuth&&t(5,g=g.concat(m));for(const Se of i.schema)g.push(Se.name);if(((ve=(le=a.options)==null?void 0:le.displayFields)==null?void 0:ve.length)>0)for(let Se=a.options.displayFields.length-1;Se>=0;Se--)g.includes(a.options.displayFields[Se])||a.options.displayFields.splice(Se,1)}}function O(){a.options.minSelect=gt(this.value),t(0,a),t(12,$),t(2,k)}function M(){a.options.maxSelect=gt(this.value),t(0,a),t(12,$),t(2,k)}function D(le){n.$$.not_equal(a.options.displayFields,le)&&(a.options.displayFields=le,t(0,a),t(12,$),t(2,k))}function I(le){n.$$.not_equal(a.options.cascadeDelete,le)&&(a.options.cascadeDelete=le,t(0,a),t(12,$),t(2,k))}const L=()=>_==null?void 0:_.show();function F(le){n.$$.not_equal(a.options.collectionId,le)&&(a.options.collectionId=le,t(0,a),t(12,$),t(2,k))}function q(le){k=le,t(2,k)}function N(le){a=le,t(0,a),t(12,$),t(2,k)}function R(le){me.call(this,n,le)}function j(le){me.call(this,n,le)}function V(le){me.call(this,n,le)}function K(le){me.call(this,n,le)}function ee(le){me.call(this,n,le)}function te(le){me.call(this,n,le)}function G(le){se[le?"unshift":"push"](()=>{_=le,t(4,_)})}const ce=le=>{var ve,Se;(Se=(ve=le==null?void 0:le.detail)==null?void 0:ve.collection)!=null&&Se.id&&t(0,a.options.collectionId=le.detail.collection.id,a)};return n.$$set=le=>{e=je(je({},e),Kt(le)),t(10,l=Qe(e,s)),"field"in le&&t(0,a=le.field),"key"in le&&t(1,u=le.key)},n.$$.update=()=>{n.$$.dirty[0]&4100&&$!=k&&(t(12,$=k),k?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty[0]&1&&H.isEmpty(a.options)&&T(),n.$$.dirty[0]&9&&t(6,i=o.find(le=>le.id==a.options.collectionId)||null),n.$$.dirty[0]&2049&&b!=a.options.collectionId&&(t(11,b=a.options.collectionId),C())},[a,u,k,o,_,g,i,r,f,d,l,b,$,O,M,D,I,L,F,q,N,R,j,V,K,ee,te,G,ce]}class YT extends be{constructor(e){super(),ge(this,e,WT,UT,_e,{field:0,key:1},null,[-1,-1])}}function Td(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Md(n){let e,t,i,s,l,o,r,a;return{c(){e=W(`, + (eg. 100x0) - resize to W width preserving the aspect ratio`,h(e,"class","m-0")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function TT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D;function M(I){n[13](I)}let O={id:n[26],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new Vs({props:O}),se.push(()=>he(r,"value",M)),$=new Kn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[CT]},$$scope:{ctx:n}}}),{c(){e=y("label"),t=y("span"),t.textContent="Thumb sizes",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),d=y("span"),d.textContent="Use comma as separator.",p=E(),m=y("button"),_=y("span"),_.textContent="Supported formats",g=E(),b=y("i"),k=E(),U($.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[26]),h(d,"class","txt"),h(_,"class","txt link-primary"),h(b,"class","ri-arrow-drop-down-fill"),h(m,"type","button"),h(m,"class","inline-flex flex-gap-0"),h(f,"class","help-block")},m(I,L){S(I,e,L),v(e,t),v(e,i),v(e,s),S(I,o,L),z(r,I,L),S(I,u,L),S(I,f,L),v(f,d),v(f,p),v(f,m),v(m,_),v(m,g),v(m,b),v(m,k),z($,m,null),T=!0,C||(D=De(We.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(I,L){(!T||L&67108864&&l!==(l=I[26]))&&h(e,"for",l);const F={};L&67108864&&(F.id=I[26]),!a&&L&1&&(a=!0,F.value=I[0].options.thumbs,ke(()=>a=!1)),r.$set(F);const q={};L&268435456&&(q.$$scope={dirty:L,ctx:I}),$.$set(q)},i(I){T||(A(r.$$.fragment,I),A($.$$.fragment,I),T=!0)},o(I){P(r.$$.fragment,I),P($.$$.fragment,I),T=!1},d(I){I&&w(e),I&&w(o),B(r,I),I&&w(u),I&&w(f),B($),C=!1,D()}}}function MT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Max file size"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Must be in bytes.",h(e,"for",i=n[26]),h(l,"type","number"),h(l,"id",o=n[26]),h(l,"step","1"),h(l,"min","0"),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[0].options.maxSize),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[14]),u=!0)},p(d,p){p&67108864&&i!==(i=d[26])&&h(e,"for",i),p&67108864&&o!==(o=d[26])&&h(l,"id",o),p&1&>(l.value)!==d[0].options.maxSize&&fe(l,d[0].options.maxSize)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Cd(n){let e,t,i;return t=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[OT,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","col-sm-3")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function OT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Max select"),s=E(),l=y("input"),h(e,"for",i=n[26]),h(l,"id",o=n[26]),h(l,"type","number"),h(l,"step","1"),h(l,"min","2"),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.maxSelect),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&67108864&&i!==(i=u[26])&&h(e,"for",i),f&67108864&&o!==(o=u[26])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.maxSelect&&fe(l,u[0].options.maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[$T,({uniqueId:g})=>({26:g}),({uniqueId:g})=>g?67108864:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[TT,({uniqueId:g})=>({26:g}),({uniqueId:g})=>g?67108864:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[MT,({uniqueId:g})=>({26:g}),({uniqueId:g})=>g?67108864:0]},$$scope:{ctx:n}}});let _=!n[2]&&Cd(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),a=E(),u=y("div"),U(f.$$.fragment),p=E(),_&&_.c(),h(t,"class","col-sm-12"),h(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),h(u,"class",d=n[2]?"col-sm-4":"col-sm-3"),h(e,"class","grid grid-sm")},m(g,b){S(g,e,b),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,a),v(e,u),z(f,u,null),v(e,p),_&&_.m(e,null),m=!0},p(g,b){const k={};b&2&&(k.name="schema."+g[1]+".options.mimeTypes"),b&335544329&&(k.$$scope={dirty:b,ctx:g}),i.$set(k);const $={};b&2&&($.name="schema."+g[1]+".options.thumbs"),b&335544321&&($.$$scope={dirty:b,ctx:g}),o.$set($),(!m||b&4&&r!==(r=g[2]?"col-sm-8":"col-sm-6"))&&h(l,"class",r);const T={};b&2&&(T.name="schema."+g[1]+".options.maxSize"),b&335544321&&(T.$$scope={dirty:b,ctx:g}),f.$set(T),(!m||b&4&&d!==(d=g[2]?"col-sm-4":"col-sm-3"))&&h(u,"class",d),g[2]?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(g,b),b&4&&A(_,1)):(_=Cd(g),_.c(),A(_,1),_.m(e,null))},i(g){m||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(f.$$.fragment,g),A(_),m=!0)},o(g){P(i.$$.fragment,g),P(o.$$.fragment,g),P(f.$$.fragment,g),P(_),m=!1},d(g){g&&w(e),B(i),B(o),B(f),_&&_.d()}}}function ET(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Protected",r=E(),a=y("a"),a.textContent="(Learn more)",h(e,"type","checkbox"),h(e,"id",t=n[26]),h(l,"class","txt"),h(s,"for",o=n[26]),h(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),h(a,"class","toggle-info txt-sm txt-hint m-l-5"),h(a,"target","_blank"),h(a,"rel","noopener")},m(d,p){S(d,e,p),e.checked=n[0].options.protected,S(d,i,p),S(d,s,p),v(s,l),S(d,r,p),S(d,a,p),u||(f=J(e,"change",n[7]),u=!0)},p(d,p){p&67108864&&t!==(t=d[26])&&h(e,"id",t),p&1&&(e.checked=d[0].options.protected),p&67108864&&o!==(o=d[26])&&h(s,"for",o)},d(d){d&&w(e),d&&w(i),d&&w(s),d&&w(r),d&&w(a),u=!1,f()}}}function AT(n){let e,t,i;return t=new de({props:{class:"form-field form-field-toggle m-0",name:"schema."+n[1]+".options.protected",$$slots:{default:[ET,({uniqueId:s})=>({26:s}),({uniqueId:s})=>s?67108864:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","col-sm-4")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.protected"),l&335544321&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function IT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{afterNonempty:[AT],options:[DT],default:[wT,({interactive:r})=>({27:r}),({interactive:r})=>r?134217728:0]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),e.$on("drop",n[20]),e.$on("dragstart",n[21]),e.$on("dragenter",n[22]),e.$on("dragleave",n[23]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Zt(r[5])]):{};a&402653199&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function PT(n,e,t){var j;const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=yT.slice(),u=((j=l.options)==null?void 0:j.maxSelect)<=1,f=u;function d(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function p(){if(H.isEmpty(l.options.mimeTypes))return;const V=[];for(const K of l.options.mimeTypes)a.find(ee=>ee.mimeType===K)||V.push({mimeType:K});V.length&&t(3,a=a.concat(V))}function m(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function _(V){n.$$.not_equal(l.options.mimeTypes,V)&&(l.options.mimeTypes=V,t(0,l),t(6,f),t(2,u))}const g=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},b=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},k=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},$=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function T(V){n.$$.not_equal(l.options.thumbs,V)&&(l.options.thumbs=V,t(0,l),t(6,f),t(2,u))}function C(){l.options.maxSize=gt(this.value),t(0,l),t(6,f),t(2,u)}function D(){l.options.maxSelect=gt(this.value),t(0,l),t(6,f),t(2,u)}function M(V){u=V,t(2,u)}function O(V){l=V,t(0,l),t(6,f),t(2,u)}function I(V){me.call(this,n,V)}function L(V){me.call(this,n,V)}function F(V){me.call(this,n,V)}function q(V){me.call(this,n,V)}function N(V){me.call(this,n,V)}function R(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Jt(V)),t(5,s=Qe(e,i)),"field"in V&&t(0,l=V.field),"key"in V&&t(1,o=V.key)},n.$$.update=()=>{var V,K;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((K=(V=l.options)==null?void 0:V.values)==null?void 0:K.length)||99,l)),n.$$.dirty&1&&(H.isEmpty(l.options)?d():p())},[l,o,u,a,r,s,f,m,_,g,b,k,$,T,C,D,M,O,I,L,F,q,N,R]}class LT extends ve{constructor(e){super(),be(this,e,PT,IT,_e,{field:0,key:1})}}function NT(n){let e,t,i,s,l;return{c(){e=y("hr"),t=E(),i=y("button"),i.innerHTML=` + New collection`,h(i,"type","button"),h(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=J(i,"click",n[17]),s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function FT(n){let e,t,i;function s(o){n[18](o)}let l={id:n[33],searchable:n[3].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[3],disabled:!n[34]||n[0].id,$$slots:{afterOptions:[NT]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[0]&8&&(a.searchable=o[3].length>5),r[0]&8&&(a.items=o[3]),r[0]&1|r[1]&8&&(a.disabled=!o[34]||o[0].id),r[0]&16|r[1]&16&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function RT(n){let e,t,i;function s(o){n[19](o)}let l={id:n[33],items:n[8],disabled:!n[34]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Bi({props:l}),se.push(()=>he(e,"keyOfSelected",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[1]&4&&(a.id=o[33]),r[1]&8&&(a.disabled=!o[34]),!t&&r[0]&4&&(t=!0,a.keyOfSelected=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function qT(n){let e,t,i,s;return e=new de({props:{class:"form-field required "+(n[34]?"":"disabled"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[FT,({uniqueId:l})=>({33:l}),({uniqueId:l})=>[0,l?4:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field form-field-single-multiple-select "+(n[34]?"":"disabled"),inlineError:!0,$$slots:{default:[RT,({uniqueId:l})=>({33:l}),({uniqueId:l})=>[0,l?4:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[1]&8&&(r.class="form-field required "+(l[34]?"":"disabled")),o[0]&2&&(r.name="schema."+l[1]+".options.collectionId"),o[0]&25|o[1]&28&&(r.$$scope={dirty:o,ctx:l}),e.$set(r);const a={};o[1]&8&&(a.class="form-field form-field-single-multiple-select "+(l[34]?"":"disabled")),o[0]&4|o[1]&28&&(a.$$scope={dirty:o,ctx:l}),i.$set(a)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function Td(n){let e,t,i,s,l,o;return t=new de({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[jT,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[VT,({uniqueId:r})=>({33:r}),({uniqueId:r})=>[0,r?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),i=E(),s=y("div"),U(l.$$.fragment),h(e,"class","col-sm-6"),h(s,"class","col-sm-6")},m(r,a){S(r,e,a),z(t,e,null),S(r,i,a),S(r,s,a),z(l,s,null),o=!0},p(r,a){const u={};a[0]&2&&(u.name="schema."+r[1]+".options.minSelect"),a[0]&1|a[1]&20&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&2&&(f.name="schema."+r[1]+".options.maxSelect"),a[0]&1|a[1]&20&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(t.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(t.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(t),r&&w(i),r&&w(s),B(l)}}}function jT(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min select"),s=E(),l=y("input"),h(e,"for",i=n[33]),h(l,"type","number"),h(l,"id",o=n[33]),h(l,"step","1"),h(l,"min","1"),h(l,"placeholder","No min limit")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.minSelect),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&4&&i!==(i=u[33])&&h(e,"for",i),f[1]&4&&o!==(o=u[33])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].options.minSelect&&fe(l,u[0].options.minSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Max select"),s=E(),l=y("input"),h(e,"for",i=n[33]),h(l,"type","number"),h(l,"id",o=n[33]),h(l,"step","1"),h(l,"placeholder","No max limit"),h(l,"min",r=n[0].options.minSelect||2)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.maxSelect),a||(u=J(l,"input",n[14]),a=!0)},p(f,d){d[1]&4&&i!==(i=f[33])&&h(e,"for",i),d[1]&4&&o!==(o=f[33])&&h(l,"id",o),d[0]&1&&r!==(r=f[0].options.minSelect||2)&&h(l,"min",r),d[0]&1&>(l.value)!==f[0].options.maxSelect&&fe(l,f[0].options.maxSelect)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function HT(n){let e,t,i,s,l,o,r,a,u,f,d;function p(_){n[15](_)}let m={multiple:!0,searchable:!0,id:n[33],selectPlaceholder:"Auto",items:n[5]};return n[0].options.displayFields!==void 0&&(m.selected=n[0].options.displayFields),r=new au({props:m}),se.push(()=>he(r,"selected",p)),{c(){e=y("label"),t=y("span"),t.textContent="Display fields",i=E(),s=y("i"),o=E(),U(r.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[33])},m(_,g){S(_,e,g),v(e,t),v(e,i),v(e,s),S(_,o,g),z(r,_,g),u=!0,f||(d=De(We.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(_,g){(!u||g[1]&4&&l!==(l=_[33]))&&h(e,"for",l);const b={};g[1]&4&&(b.id=_[33]),g[0]&32&&(b.items=_[5]),!a&&g[0]&1&&(a=!0,b.selected=_[0].options.displayFields,ke(()=>a=!1)),r.$set(b)},i(_){u||(A(r.$$.fragment,_),u=!0)},o(_){P(r.$$.fragment,_),u=!1},d(_){_&&w(e),_&&w(o),B(r,_),f=!1,d()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f,d,p;function m(g){n[16](g)}let _={id:n[33],items:n[9]};return n[0].options.cascadeDelete!==void 0&&(_.keyOfSelected=n[0].options.cascadeDelete),a=new Bi({props:_}),se.push(()=>he(a,"keyOfSelected",m)),{c(){e=y("label"),t=y("span"),t.textContent="Cascade delete",i=E(),s=y("i"),r=E(),U(a.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",o=n[33])},m(g,b){var k,$;S(g,e,b),v(e,t),v(e,i),v(e,s),S(g,r,b),z(a,g,b),f=!0,d||(p=De(l=We.call(null,s,{text:`Whether on ${((k=n[6])==null?void 0:k.name)||"relation"} record deletion to delete also the ${(($=n[7])==null?void 0:$.name)||"field"} associated records.`,position:"top"})),d=!0)},p(g,b){var $,T;l&&Vt(l.update)&&b[0]&192&&l.update.call(null,{text:`Whether on ${(($=g[6])==null?void 0:$.name)||"relation"} record deletion to delete also the ${((T=g[7])==null?void 0:T.name)||"field"} associated records.`,position:"top"}),(!f||b[1]&4&&o!==(o=g[33]))&&h(e,"for",o);const k={};b[1]&4&&(k.id=g[33]),!u&&b[0]&1&&(u=!0,k.keyOfSelected=g[0].options.cascadeDelete,ke(()=>u=!1)),a.$set(k)},i(g){f||(A(a.$$.fragment,g),f=!0)},o(g){P(a.$$.fragment,g),f=!1},d(g){g&&w(e),g&&w(r),B(a,g),d=!1,p()}}}function BT(n){let e,t,i,s,l,o,r,a,u=!n[2]&&Td(n);return s=new de({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[HT,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[zT,({uniqueId:f})=>({33:f}),({uniqueId:f})=>[0,f?4:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),u&&u.c(),t=E(),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(f,d){S(f,e,d),u&&u.m(e,null),v(e,t),v(e,i),z(s,i,null),v(e,l),v(e,o),z(r,o,null),a=!0},p(f,d){f[2]?u&&(ae(),P(u,1,1,()=>{u=null}),ue()):u?(u.p(f,d),d[0]&4&&A(u,1)):(u=Td(f),u.c(),A(u,1),u.m(e,t));const p={};d[0]&2&&(p.name="schema."+f[1]+".options.displayFields"),d[0]&33|d[1]&20&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d[0]&2&&(m.name="schema."+f[1]+".options.cascadeDelete"),d[0]&193|d[1]&20&&(m.$$scope={dirty:d,ctx:f}),r.$set(m)},i(f){a||(A(u),A(s.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){P(u),P(s.$$.fragment,f),P(r.$$.fragment,f),a=!1},d(f){f&&w(e),u&&u.d(),B(s),B(r)}}}function UT(n){let e,t,i,s,l;const o=[{key:n[1]},n[10]];function r(f){n[20](f)}let a={$$slots:{options:[BT],default:[qT,({interactive:f})=>({34:f}),({interactive:f})=>[0,f?8:0]]},$$scope:{ctx:n}};for(let f=0;fhe(e,"field",r)),e.$on("rename",n[21]),e.$on("remove",n[22]),e.$on("drop",n[23]),e.$on("dragstart",n[24]),e.$on("dragenter",n[25]),e.$on("dragleave",n[26]);let u={};return s=new uu({props:u}),n[27](s),s.$on("save",n[28]),{c(){U(e.$$.fragment),i=E(),U(s.$$.fragment)},m(f,d){z(e,f,d),S(f,i,d),z(s,f,d),l=!0},p(f,d){const p=d[0]&1026?Mt(o,[d[0]&2&&{key:f[1]},d[0]&1024&&Zt(f[10])]):{};d[0]&255|d[1]&24&&(p.$$scope={dirty:d,ctx:f}),!t&&d[0]&1&&(t=!0,p.field=f[0],ke(()=>t=!1)),e.$set(p);const m={};s.$set(m)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),P(s.$$.fragment,f),l=!1},d(f){B(e,f),f&&w(i),n[27](null),B(s,f)}}}function WT(n,e,t){var X;let i;const s=["field","key"];let l=Qe(e,s),o,r;Je(n,ci,le=>t(3,o=le)),Je(n,ui,le=>t(7,r=le));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],d=[{label:"False",value:!1},{label:"True",value:!0}],p=["id","created","updated"],m=["username","email","emailVisibility","verified"];let _=null,g=[],b=null,k=((X=a.options)==null?void 0:X.maxSelect)==1,$=k;function T(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]},a),t(2,k=!0),t(12,$=k)}function C(){var le,ye;if(t(5,g=p.slice(0)),!!i){i.isAuth&&t(5,g=g.concat(m));for(const Se of i.schema)g.push(Se.name);if(((ye=(le=a.options)==null?void 0:le.displayFields)==null?void 0:ye.length)>0)for(let Se=a.options.displayFields.length-1;Se>=0;Se--)g.includes(a.options.displayFields[Se])||a.options.displayFields.splice(Se,1)}}function D(){a.options.minSelect=gt(this.value),t(0,a),t(12,$),t(2,k)}function M(){a.options.maxSelect=gt(this.value),t(0,a),t(12,$),t(2,k)}function O(le){n.$$.not_equal(a.options.displayFields,le)&&(a.options.displayFields=le,t(0,a),t(12,$),t(2,k))}function I(le){n.$$.not_equal(a.options.cascadeDelete,le)&&(a.options.cascadeDelete=le,t(0,a),t(12,$),t(2,k))}const L=()=>_==null?void 0:_.show();function F(le){n.$$.not_equal(a.options.collectionId,le)&&(a.options.collectionId=le,t(0,a),t(12,$),t(2,k))}function q(le){k=le,t(2,k)}function N(le){a=le,t(0,a),t(12,$),t(2,k)}function R(le){me.call(this,n,le)}function j(le){me.call(this,n,le)}function V(le){me.call(this,n,le)}function K(le){me.call(this,n,le)}function ee(le){me.call(this,n,le)}function te(le){me.call(this,n,le)}function G(le){se[le?"unshift":"push"](()=>{_=le,t(4,_)})}const ce=le=>{var ye,Se;(Se=(ye=le==null?void 0:le.detail)==null?void 0:ye.collection)!=null&&Se.id&&t(0,a.options.collectionId=le.detail.collection.id,a)};return n.$$set=le=>{e=je(je({},e),Jt(le)),t(10,l=Qe(e,s)),"field"in le&&t(0,a=le.field),"key"in le&&t(1,u=le.key)},n.$$.update=()=>{n.$$.dirty[0]&4100&&$!=k&&(t(12,$=k),k?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty[0]&1&&H.isEmpty(a.options)&&T(),n.$$.dirty[0]&9&&t(6,i=o.find(le=>le.id==a.options.collectionId)||null),n.$$.dirty[0]&2049&&b!=a.options.collectionId&&(t(11,b=a.options.collectionId),C())},[a,u,k,o,_,g,i,r,f,d,l,b,$,D,M,O,I,L,F,q,N,R,j,V,K,ee,te,G,ce]}class YT extends ve{constructor(e){super(),be(this,e,WT,UT,_e,{field:0,key:1},null,[-1,-1])}}function Md(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Od(n){let e,t,i,s,l,o,r,a;return{c(){e=W(`, `),t=y("code"),t.textContent="username",i=W(` , `),s=y("code"),s.textContent="email",l=W(` , `),o=y("code"),o.textContent="emailVisibility",r=W(` , - `),a=y("code"),a.textContent="verified",h(t,"class","txt-sm"),h(s,"class","txt-sm"),h(o,"class","txt-sm"),h(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 Od(n,e){let t,i,s,l,o;function r(m){e[7](m,e[17],e[18],e[19])}function a(){return e[8](e[19])}function u(...m){return e[10](e[19],...m)}function f(...m){return e[11](e[19],...m)}var d=e[1][e[17].type];function p(m){let _={key:m[4](m[17])};return m[17]!==void 0&&(_.field=m[17]),{props:_}}return d&&(i=Lt(d,p(e)),se.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f)),{key:n,first:null,c(){t=$e(),i&&U(i.$$.fragment),l=$e(),this.first=t},m(m,_){S(m,t,_),i&&z(i,m,_),S(m,l,_),o=!0},p(m,_){e=m;const g={};if(_&1&&(g.key=e[4](e[17])),!s&&_&1&&(s=!0,g.field=e[17],ke(()=>s=!1)),_&1&&d!==(d=e[1][e[17].type])){if(i){ae();const b=i;P(b.$$.fragment,1,0,()=>{B(b,1)}),ue()}d?(i=Lt(d,p(e)),se.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f),U(i.$$.fragment),A(i.$$.fragment,1),z(i,l.parentNode,l)):i=null}else d&&i.$set(g)},i(m){o||(i&&A(i.$$.fragment,m),o=!0)},o(m){i&&P(i.$$.fragment,m),o=!1},d(m){m&&w(t),m&&w(l),i&&B(i,m)}}}function KT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m=[],_=new Map,g,b,k,$,T,C,O,M,D=n[0].$isAuth&&Md(),I=n[0].schema;const L=N=>N[17];for(let N=0;Nhe(C,"collection",F)),{c(){e=y("div"),t=y("p"),i=W(`System fields: + `),a=y("code"),a.textContent="verified",h(t,"class","txt-sm"),h(s,"class","txt-sm"),h(o,"class","txt-sm"),h(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 Dd(n,e){let t,i,s,l,o;function r(m){e[7](m,e[17],e[18],e[19])}function a(){return e[8](e[19])}function u(...m){return e[10](e[19],...m)}function f(...m){return e[11](e[19],...m)}var d=e[1][e[17].type];function p(m){let _={key:m[4](m[17])};return m[17]!==void 0&&(_.field=m[17]),{props:_}}return d&&(i=Lt(d,p(e)),se.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f)),{key:n,first:null,c(){t=$e(),i&&U(i.$$.fragment),l=$e(),this.first=t},m(m,_){S(m,t,_),i&&z(i,m,_),S(m,l,_),o=!0},p(m,_){e=m;const g={};if(_&1&&(g.key=e[4](e[17])),!s&&_&1&&(s=!0,g.field=e[17],ke(()=>s=!1)),_&1&&d!==(d=e[1][e[17].type])){if(i){ae();const b=i;P(b.$$.fragment,1,0,()=>{B(b,1)}),ue()}d?(i=Lt(d,p(e)),se.push(()=>he(i,"field",r)),i.$on("remove",a),i.$on("rename",e[9]),i.$on("dragstart",u),i.$on("drop",f),U(i.$$.fragment),A(i.$$.fragment,1),z(i,l.parentNode,l)):i=null}else d&&i.$set(g)},i(m){o||(i&&A(i.$$.fragment,m),o=!0)},o(m){i&&P(i.$$.fragment,m),o=!1},d(m){m&&w(t),m&&w(l),i&&B(i,m)}}}function KT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m=[],_=new Map,g,b,k,$,T,C,D,M,O=n[0].$isAuth&&Od(),I=n[0].schema;const L=N=>N[17];for(let N=0;Nhe(C,"collection",F)),{c(){e=y("div"),t=y("p"),i=W(`System fields: `),s=y("code"),s.textContent="id",l=W(` , `),o=y("code"),o.textContent="created",r=W(` , - `),a=y("code"),a.textContent="updated",u=E(),D&&D.c(),f=W(` - .`),d=E(),p=y("div");for(let N=0;NO=!1)),C.$set(j)},i(N){if(!M){for(let R=0;RO.name===C)}function f(C){return i.findIndex(O=>O===C)}function d(C,O){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===O||!O||t(0,s.indexes=s.indexes.map(D=>H.replaceIndexColumn(D,C,O)),s)}function p(C,O){if(!C)return;C.dataTransfer.dropEffect="move";const M=parseInt(C.dataTransfer.getData("text/plain")),D=s.schema;Mo(C),g=C=>d(C.detail.oldName,C.detail.newName),b=(C,O)=>JT(O.detail,C),k=(C,O)=>p(O.detail,C),$=C=>r(C.detail);function T(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new kn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,f,d,p,m,_,g,b,k,$,T]}class GT extends be{constructor(e){super(),ge(this,e,ZT,KT,_e,{collection:0})}}const XT=n=>({isAdminOnly:n&512}),Dd=n=>({isAdminOnly:n[9]}),QT=n=>({isAdminOnly:n&512}),Ed=n=>({isAdminOnly:n[9]}),xT=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]});function e4(n){let e,t;return e=new de({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[n4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function t4(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","txt-center")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function Id(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Set Admins only`,h(e,"type","button"),h(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Pd(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=`Unlock and set custom rule -
    `,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function n4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,d,p,m,_,g,b,k,$;const T=n[12].beforeLabel,C=yt(T,n,n[15],Ad),O=n[12].afterLabel,M=yt(O,n,n[15],Ed);let D=!n[9]&&Id(n);function I(j){n[14](j)}var L=n[7];function F(j){let V={id:j[18],baseCollection:j[1],disabled:j[9],placeholder:j[9]?"":j[5]};return j[0]!==void 0&&(V.value=j[0]),{props:V}}L&&(m=Lt(L,F(n)),n[13](m),se.push(()=>he(m,"value",I)));let q=n[9]&&Pd(n);const N=n[12].default,R=yt(N,n,n[15],Dd);return{c(){e=y("div"),t=y("label"),C&&C.c(),i=E(),s=y("span"),l=W(n[2]),o=E(),a=W(r),u=E(),M&&M.c(),f=E(),D&&D.c(),p=E(),m&&U(m.$$.fragment),g=E(),q&&q.c(),b=E(),k=y("div"),R&&R.c(),h(s,"class","txt"),x(s,"txt-hint",n[9]),h(t,"for",d=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(k,"class","help-block")},m(j,V){S(j,e,V),v(e,t),C&&C.m(t,null),v(t,i),v(t,s),v(s,l),v(s,o),v(s,a),v(t,u),M&&M.m(t,null),v(t,f),D&&D.m(t,null),v(e,p),m&&z(m,e,null),v(e,g),q&&q.m(e,null),S(j,b,V),S(j,k,V),R&&R.m(k,null),$=!0},p(j,V){C&&C.p&&(!$||V&33280)&&wt(C,T,j,j[15],$?kt(T,j[15],V,xT):St(j[15]),Ad),(!$||V&4)&&oe(l,j[2]),(!$||V&512)&&r!==(r=j[9]?"- Admins only":"")&&oe(a,r),(!$||V&512)&&x(s,"txt-hint",j[9]),M&&M.p&&(!$||V&33280)&&wt(M,O,j,j[15],$?kt(O,j[15],V,QT):St(j[15]),Ed),j[9]?D&&(D.d(1),D=null):D?D.p(j,V):(D=Id(j),D.c(),D.m(t,null)),(!$||V&262144&&d!==(d=j[18]))&&h(t,"for",d);const K={};if(V&262144&&(K.id=j[18]),V&2&&(K.baseCollection=j[1]),V&512&&(K.disabled=j[9]),V&544&&(K.placeholder=j[9]?"":j[5]),!_&&V&1&&(_=!0,K.value=j[0],ke(()=>_=!1)),V&128&&L!==(L=j[7])){if(m){ae();const ee=m;P(ee.$$.fragment,1,0,()=>{B(ee,1)}),ue()}L?(m=Lt(L,F(j)),j[13](m),se.push(()=>he(m,"value",I)),U(m.$$.fragment),A(m.$$.fragment,1),z(m,e,g)):m=null}else L&&m.$set(K);j[9]?q?(q.p(j,V),V&512&&A(q,1)):(q=Pd(j),q.c(),A(q,1),q.m(e,null)):q&&(ae(),P(q,1,1,()=>{q=null}),ue()),R&&R.p&&(!$||V&33280)&&wt(R,N,j,j[15],$?kt(N,j[15],V,XT):St(j[15]),Dd)},i(j){$||(A(C,j),A(M,j),m&&A(m.$$.fragment,j),A(q),A(R,j),$=!0)},o(j){P(C,j),P(M,j),m&&P(m.$$.fragment,j),P(q),P(R,j),$=!1},d(j){j&&w(e),C&&C.d(j),M&&M.d(j),D&&D.d(),n[13](null),m&&B(m),q&&q.d(),j&&w(b),j&&w(k),R&&R.d(j)}}}function i4(n){let e,t,i,s;const l=[t4,e4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Ld;function s4(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,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,_=Ld,g=!1;b();async function b(){_||g||(t(8,g=!0),t(7,_=(await rt(()=>import("./FilterAutocompleteInput-7075cc59.js"),["./FilterAutocompleteInput-7075cc59.js","./index-c4d2d831.js"],import.meta.url)).default),Ld=_,t(8,g=!1))}async function k(){t(0,r=m||""),await pn(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(O){se[O?"unshift":"push"](()=>{p=O,t(6,p)})}function C(O){r=O,t(0,r)}return n.$$set=O=>{"collection"in O&&t(1,o=O.collection),"rule"in O&&t(0,r=O.rule),"label"in O&&t(2,a=O.label),"formKey"in O&&t(3,u=O.formKey),"required"in O&&t(4,f=O.required),"placeholder"in O&&t(5,d=O.placeholder),"$$scope"in O&&t(15,l=O.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,_,g,i,k,$,s,T,C,l]}class Os extends be{constructor(e){super(),ge(this,e,s4,i4,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Nd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Fd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L=n[2],F=[];for(let q=0;q@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* + `),a=y("code"),a.textContent="updated",u=E(),O&&O.c(),f=W(` + .`),d=E(),p=y("div");for(let N=0;ND=!1)),C.$set(j)},i(N){if(!M){for(let R=0;RD.name===C)}function f(C){return i.findIndex(D=>D===C)}function d(C,D){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===D||!D||t(0,s.indexes=s.indexes.map(O=>H.replaceIndexColumn(O,C,D)),s)}function p(C,D){if(!C)return;C.dataTransfer.dropEffect="move";const M=parseInt(C.dataTransfer.getData("text/plain")),O=s.schema;Mo(C),g=C=>d(C.detail.oldName,C.detail.newName),b=(C,D)=>JT(D.detail,C),k=(C,D)=>p(D.detail,C),$=C=>r(C.detail);function T(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new kn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,f,d,p,m,_,g,b,k,$,T]}class GT extends ve{constructor(e){super(),be(this,e,ZT,KT,_e,{collection:0})}}const XT=n=>({isAdminOnly:n&512}),Ed=n=>({isAdminOnly:n[9]}),QT=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]}),xT=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]});function e4(n){let e,t;return e=new de({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[n4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function t4(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","txt-center")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function Pd(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Set Admins only`,h(e,"type","button"),h(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ld(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=`Unlock and set custom rule +
    `,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function n4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,d,p,m,_,g,b,k,$;const T=n[12].beforeLabel,C=wt(T,n,n[15],Id),D=n[12].afterLabel,M=wt(D,n,n[15],Ad);let O=!n[9]&&Pd(n);function I(j){n[14](j)}var L=n[7];function F(j){let V={id:j[18],baseCollection:j[1],disabled:j[9],placeholder:j[9]?"":j[5]};return j[0]!==void 0&&(V.value=j[0]),{props:V}}L&&(m=Lt(L,F(n)),n[13](m),se.push(()=>he(m,"value",I)));let q=n[9]&&Ld(n);const N=n[12].default,R=wt(N,n,n[15],Ed);return{c(){e=y("div"),t=y("label"),C&&C.c(),i=E(),s=y("span"),l=W(n[2]),o=E(),a=W(r),u=E(),M&&M.c(),f=E(),O&&O.c(),p=E(),m&&U(m.$$.fragment),g=E(),q&&q.c(),b=E(),k=y("div"),R&&R.c(),h(s,"class","txt"),x(s,"txt-hint",n[9]),h(t,"for",d=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(k,"class","help-block")},m(j,V){S(j,e,V),v(e,t),C&&C.m(t,null),v(t,i),v(t,s),v(s,l),v(s,o),v(s,a),v(t,u),M&&M.m(t,null),v(t,f),O&&O.m(t,null),v(e,p),m&&z(m,e,null),v(e,g),q&&q.m(e,null),S(j,b,V),S(j,k,V),R&&R.m(k,null),$=!0},p(j,V){C&&C.p&&(!$||V&33280)&&$t(C,T,j,j[15],$?St(T,j[15],V,xT):Ct(j[15]),Id),(!$||V&4)&&oe(l,j[2]),(!$||V&512)&&r!==(r=j[9]?"- Admins only":"")&&oe(a,r),(!$||V&512)&&x(s,"txt-hint",j[9]),M&&M.p&&(!$||V&33280)&&$t(M,D,j,j[15],$?St(D,j[15],V,QT):Ct(j[15]),Ad),j[9]?O&&(O.d(1),O=null):O?O.p(j,V):(O=Pd(j),O.c(),O.m(t,null)),(!$||V&262144&&d!==(d=j[18]))&&h(t,"for",d);const K={};if(V&262144&&(K.id=j[18]),V&2&&(K.baseCollection=j[1]),V&512&&(K.disabled=j[9]),V&544&&(K.placeholder=j[9]?"":j[5]),!_&&V&1&&(_=!0,K.value=j[0],ke(()=>_=!1)),V&128&&L!==(L=j[7])){if(m){ae();const ee=m;P(ee.$$.fragment,1,0,()=>{B(ee,1)}),ue()}L?(m=Lt(L,F(j)),j[13](m),se.push(()=>he(m,"value",I)),U(m.$$.fragment),A(m.$$.fragment,1),z(m,e,g)):m=null}else L&&m.$set(K);j[9]?q?(q.p(j,V),V&512&&A(q,1)):(q=Ld(j),q.c(),A(q,1),q.m(e,null)):q&&(ae(),P(q,1,1,()=>{q=null}),ue()),R&&R.p&&(!$||V&33280)&&$t(R,N,j,j[15],$?St(N,j[15],V,XT):Ct(j[15]),Ed)},i(j){$||(A(C,j),A(M,j),m&&A(m.$$.fragment,j),A(q),A(R,j),$=!0)},o(j){P(C,j),P(M,j),m&&P(m.$$.fragment,j),P(q),P(R,j),$=!1},d(j){j&&w(e),C&&C.d(j),M&&M.d(j),O&&O.d(),n[13](null),m&&B(m),q&&q.d(),j&&w(b),j&&w(k),R&&R.d(j)}}}function i4(n){let e,t,i,s;const l=[t4,e4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Nd;function s4(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,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,_=Nd,g=!1;b();async function b(){_||g||(t(8,g=!0),t(7,_=(await rt(()=>import("./FilterAutocompleteInput-5ad2deed.js"),["./FilterAutocompleteInput-5ad2deed.js","./index-c4d2d831.js"],import.meta.url)).default),Nd=_,t(8,g=!1))}async function k(){t(0,r=m||""),await an(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(D){se[D?"unshift":"push"](()=>{p=D,t(6,p)})}function C(D){r=D,t(0,r)}return n.$$set=D=>{"collection"in D&&t(1,o=D.collection),"rule"in D&&t(0,r=D.rule),"label"in D&&t(2,a=D.label),"formKey"in D&&t(3,u=D.formKey),"required"in D&&t(4,f=D.required),"placeholder"in D&&t(5,d=D.placeholder),"$$scope"in D&&t(15,l=D.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,_,g,i,k,$,s,T,C,l]}class Os extends ve{constructor(e){super(),be(this,e,s4,i4,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Fd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Rd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L=n[2],F=[];for(let q=0;q@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* @request.query.* @request.data.* - @request.auth.*`,m=E(),_=y("hr"),g=E(),b=y("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=E(),$=y("div"),$.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=E(),C=y("hr"),O=E(),M=y("p"),M.innerHTML=`Example rule: + @request.auth.*`,m=E(),_=y("hr"),g=E(),b=y("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=E(),$=y("div"),$.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=E(),C=y("hr"),D=E(),M=y("p"),M.innerHTML=`Example rule:
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,h(s,"class","m-b-0"),h(o,"class","inline-flex flex-gap-5"),h(a,"class","m-t-10 m-b-5"),h(f,"class","m-b-0"),h(p,"class","inline-flex flex-gap-5"),h(_,"class","m-t-10 m-b-5"),h(b,"class","m-b-0"),h($,"class","inline-flex flex-gap-5"),h(C,"class","m-t-10 m-b-5"),h(i,"class","content"),h(t,"class","alert alert-warning m-0")},m(q,N){S(q,e,N),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o);for(let R=0;R{I&&(D||(D=He(e,Ct,{duration:150},!0)),D.run(1))}),I=!0)},o(q){q&&(D||(D=He(e,Ct,{duration:150},!1)),D.run(0)),I=!1},d(q){q&&w(e),dt(F,q),q&&D&&D.end()}}}function Rd(n){let e,t=n[11]+"",i;return{c(){e=y("code"),i=W(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&oe(i,t)},d(s){s&&w(e)}}}function qd(n){let e,t,i,s,l,o,r,a,u;function f(b){n[6](b)}let d={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[l4,({isAdminOnly:b})=>({10:b}),({isAdminOnly:b})=>b?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(d.rule=n[0].createRule),e=new Os({props:d}),se.push(()=>he(e,"rule",f));function p(b){n[7](b)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),s=new Os({props:m}),se.push(()=>he(s,"rule",p));function _(b){n[8](b)}let g={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(g.rule=n[0].deleteRule),r=new Os({props:g}),se.push(()=>he(r,"rule",_)),{c(){U(e.$$.fragment),i=E(),U(s.$$.fragment),o=E(),U(r.$$.fragment)},m(b,k){z(e,b,k),S(b,i,k),z(s,b,k),S(b,o,k),z(r,b,k),u=!0},p(b,k){const $={};k&1&&($.collection=b[0]),k&17408&&($.$$scope={dirty:k,ctx:b}),!t&&k&1&&(t=!0,$.rule=b[0].createRule,ke(()=>t=!1)),e.$set($);const T={};k&1&&(T.collection=b[0]),!l&&k&1&&(l=!0,T.rule=b[0].updateRule,ke(()=>l=!1)),s.$set(T);const C={};k&1&&(C.collection=b[0]),!a&&k&1&&(a=!0,C.rule=b[0].deleteRule,ke(()=>a=!1)),r.$set(C)},i(b){u||(A(e.$$.fragment,b),A(s.$$.fragment,b),A(r.$$.fragment,b),u=!0)},o(b){P(e.$$.fragment,b),P(s.$$.fragment,b),P(r.$$.fragment,b),u=!1},d(b){B(e,b),b&&w(i),B(s,b),b&&w(o),B(r,b)}}}function jd(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-information-line link-hint")},m(s,l){S(s,e,l),t||(i=De(We.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&w(e),t=!1,i()}}}function l4(n){let e,t=!n[10]&&jd();return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=jd(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&w(e)}}}function Vd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[o4]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Os({props:l}),se.push(()=>he(e,"rule",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function o4(n){let e,t,i;return{c(){e=y("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"`,h(s,"class","m-b-0"),h(o,"class","inline-flex flex-gap-5"),h(a,"class","m-t-10 m-b-5"),h(f,"class","m-b-0"),h(p,"class","inline-flex flex-gap-5"),h(_,"class","m-t-10 m-b-5"),h(b,"class","m-b-0"),h($,"class","inline-flex flex-gap-5"),h(C,"class","m-t-10 m-b-5"),h(i,"class","content"),h(t,"class","alert alert-warning m-0")},m(q,N){S(q,e,N),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o);for(let R=0;R{I&&(O||(O=He(e,yt,{duration:150},!0)),O.run(1))}),I=!0)},o(q){q&&(O||(O=He(e,yt,{duration:150},!1)),O.run(0)),I=!1},d(q){q&&w(e),pt(F,q),q&&O&&O.end()}}}function qd(n){let e,t=n[11]+"",i;return{c(){e=y("code"),i=W(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&oe(i,t)},d(s){s&&w(e)}}}function jd(n){let e,t,i,s,l,o,r,a,u;function f(b){n[6](b)}let d={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[l4,({isAdminOnly:b})=>({10:b}),({isAdminOnly:b})=>b?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(d.rule=n[0].createRule),e=new Os({props:d}),se.push(()=>he(e,"rule",f));function p(b){n[7](b)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),s=new Os({props:m}),se.push(()=>he(s,"rule",p));function _(b){n[8](b)}let g={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(g.rule=n[0].deleteRule),r=new Os({props:g}),se.push(()=>he(r,"rule",_)),{c(){U(e.$$.fragment),i=E(),U(s.$$.fragment),o=E(),U(r.$$.fragment)},m(b,k){z(e,b,k),S(b,i,k),z(s,b,k),S(b,o,k),z(r,b,k),u=!0},p(b,k){const $={};k&1&&($.collection=b[0]),k&17408&&($.$$scope={dirty:k,ctx:b}),!t&&k&1&&(t=!0,$.rule=b[0].createRule,ke(()=>t=!1)),e.$set($);const T={};k&1&&(T.collection=b[0]),!l&&k&1&&(l=!0,T.rule=b[0].updateRule,ke(()=>l=!1)),s.$set(T);const C={};k&1&&(C.collection=b[0]),!a&&k&1&&(a=!0,C.rule=b[0].deleteRule,ke(()=>a=!1)),r.$set(C)},i(b){u||(A(e.$$.fragment,b),A(s.$$.fragment,b),A(r.$$.fragment,b),u=!0)},o(b){P(e.$$.fragment,b),P(s.$$.fragment,b),P(r.$$.fragment,b),u=!1},d(b){B(e,b),b&&w(i),B(s,b),b&&w(o),B(r,b)}}}function Vd(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-information-line link-hint")},m(s,l){S(s,e,l),t||(i=De(We.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&w(e),t=!1,i()}}}function l4(n){let e,t=!n[10]&&Vd();return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Vd(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&w(e)}}}function Hd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[o4]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Os({props:l}),se.push(()=>he(e,"rule",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function o4(n){let e,t,i;return{c(){e=y("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=E(),i=y("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:Q,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function r4(n){var N,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,d,p,m,_,g,b,k,$,T,C,O=n[1]&&Fd(n);function M(j){n[4](j)}let D={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(D.rule=n[0].listRule),f=new Os({props:D}),se.push(()=>he(f,"rule",M));function I(j){n[5](j)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),m=new Os({props:L}),se.push(()=>he(m,"rule",I));let F=!((N=n[0])!=null&&N.$isView)&&qd(n),q=((R=n[0])==null?void 0:R.$isAuth)&&Vd(n);return{c(){e=y("div"),t=y("div"),i=y("p"),i.innerHTML=`All rules follow the + state or email, etc.`,t=E(),i=y("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:Q,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function r4(n){var N,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,d,p,m,_,g,b,k,$,T,C,D=n[1]&&Rd(n);function M(j){n[4](j)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),f=new Os({props:O}),se.push(()=>he(f,"rule",M));function I(j){n[5](j)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),m=new Os({props:L}),se.push(()=>he(m,"rule",I));let F=!((N=n[0])!=null&&N.$isView)&&jd(n),q=((R=n[0])==null?void 0:R.$isAuth)&&Hd(n);return{c(){e=y("div"),t=y("div"),i=y("p"),i.innerHTML=`All rules follow the
    PocketBase filter syntax and operators - .`,s=E(),l=y("button"),r=W(o),a=E(),O&&O.c(),u=E(),U(f.$$.fragment),p=E(),U(m.$$.fragment),g=E(),F&&F.c(),b=E(),q&&q.c(),k=$e(),h(l,"type","button"),h(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),h(t,"class","flex txt-sm txt-hint m-b-5"),h(e,"class","block m-b-sm handle")},m(j,V){S(j,e,V),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),O&&O.m(e,null),S(j,u,V),z(f,j,V),S(j,p,V),z(m,j,V),S(j,g,V),F&&F.m(j,V),S(j,b,V),q&&q.m(j,V),S(j,k,V),$=!0,T||(C=J(l,"click",n[3]),T=!0)},p(j,[V]){var te,G;(!$||V&2)&&o!==(o=j[1]?"Hide available fields":"Show available fields")&&oe(r,o),j[1]?O?(O.p(j,V),V&2&&A(O,1)):(O=Fd(j),O.c(),A(O,1),O.m(e,null)):O&&(ae(),P(O,1,1,()=>{O=null}),ue());const K={};V&1&&(K.collection=j[0]),!d&&V&1&&(d=!0,K.rule=j[0].listRule,ke(()=>d=!1)),f.$set(K);const ee={};V&1&&(ee.collection=j[0]),!_&&V&1&&(_=!0,ee.rule=j[0].viewRule,ke(()=>_=!1)),m.$set(ee),(te=j[0])!=null&&te.$isView?F&&(ae(),P(F,1,1,()=>{F=null}),ue()):F?(F.p(j,V),V&1&&A(F,1)):(F=qd(j),F.c(),A(F,1),F.m(b.parentNode,b)),(G=j[0])!=null&&G.$isAuth?q?(q.p(j,V),V&1&&A(q,1)):(q=Vd(j),q.c(),A(q,1),q.m(k.parentNode,k)):q&&(ae(),P(q,1,1,()=>{q=null}),ue())},i(j){$||(A(O),A(f.$$.fragment,j),A(m.$$.fragment,j),A(F),A(q),$=!0)},o(j){P(O),P(f.$$.fragment,j),P(m.$$.fragment,j),P(F),P(q),$=!1},d(j){j&&w(e),O&&O.d(),j&&w(u),B(f,j),j&&w(p),B(m,j),j&&w(g),F&&F.d(j),j&&w(b),q&&q.d(j),j&&w(k),T=!1,C()}}}function a4(n,e,t){let i,{collection:s=new kn}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function u(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function f(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function d(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function p(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=H.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,d,p]}class u4 extends be{constructor(e){super(),ge(this,e,a4,r4,_e,{collection:0})}}function Hd(n,e,t){const i=n.slice();return i[9]=e[t],i}function f4(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=Lt(o,r(n)),se.push(()=>he(e,"value",l)),e.$on("change",n[6])),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,ke(()=>t=!1)),u&2&&o!==(o=a[1])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),e.$on("change",a[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function c4(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function zd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • + .`,s=E(),l=y("button"),r=W(o),a=E(),D&&D.c(),u=E(),U(f.$$.fragment),p=E(),U(m.$$.fragment),g=E(),F&&F.c(),b=E(),q&&q.c(),k=$e(),h(l,"type","button"),h(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),h(t,"class","flex txt-sm txt-hint m-b-5"),h(e,"class","block m-b-sm handle")},m(j,V){S(j,e,V),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),D&&D.m(e,null),S(j,u,V),z(f,j,V),S(j,p,V),z(m,j,V),S(j,g,V),F&&F.m(j,V),S(j,b,V),q&&q.m(j,V),S(j,k,V),$=!0,T||(C=J(l,"click",n[3]),T=!0)},p(j,[V]){var te,G;(!$||V&2)&&o!==(o=j[1]?"Hide available fields":"Show available fields")&&oe(r,o),j[1]?D?(D.p(j,V),V&2&&A(D,1)):(D=Rd(j),D.c(),A(D,1),D.m(e,null)):D&&(ae(),P(D,1,1,()=>{D=null}),ue());const K={};V&1&&(K.collection=j[0]),!d&&V&1&&(d=!0,K.rule=j[0].listRule,ke(()=>d=!1)),f.$set(K);const ee={};V&1&&(ee.collection=j[0]),!_&&V&1&&(_=!0,ee.rule=j[0].viewRule,ke(()=>_=!1)),m.$set(ee),(te=j[0])!=null&&te.$isView?F&&(ae(),P(F,1,1,()=>{F=null}),ue()):F?(F.p(j,V),V&1&&A(F,1)):(F=jd(j),F.c(),A(F,1),F.m(b.parentNode,b)),(G=j[0])!=null&&G.$isAuth?q?(q.p(j,V),V&1&&A(q,1)):(q=Hd(j),q.c(),A(q,1),q.m(k.parentNode,k)):q&&(ae(),P(q,1,1,()=>{q=null}),ue())},i(j){$||(A(D),A(f.$$.fragment,j),A(m.$$.fragment,j),A(F),A(q),$=!0)},o(j){P(D),P(f.$$.fragment,j),P(m.$$.fragment,j),P(F),P(q),$=!1},d(j){j&&w(e),D&&D.d(),j&&w(u),B(f,j),j&&w(p),B(m,j),j&&w(g),F&&F.d(j),j&&w(b),q&&q.d(j),j&&w(k),T=!1,C()}}}function a4(n,e,t){let i,{collection:s=new kn}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function u(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function f(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function d(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function p(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=H.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,d,p]}class u4 extends ve{constructor(e){super(),be(this,e,a4,r4,_e,{collection:0})}}function zd(n,e,t){const i=n.slice();return i[9]=e[t],i}function f4(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=Lt(o,r(n)),se.push(()=>he(e,"value",l)),e.$on("change",n[6])),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,ke(()=>t=!1)),u&2&&o!==(o=a[1])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),e.$on("change",a[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function c4(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function Bd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • The query must have a unique id column.
    If your query doesn't have a suitable one, you can use the universal (ROW_NUMBER() OVER()) as id.
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,u=E(),g&&g.c(),f=$e(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=_(b),l===$?m[l].p(b,k):(ae(),P(m[$],1,1,()=>{m[$]=null}),ue(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=zd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function p4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[d4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function m4(n,e,t){let i;Je(n,Ci,d=>t(4,i=d));let{collection:s=new kn}=e,l,o=!1,r=[];function a(d){var _;t(3,r=[]);const p=H.getNestedVal(d,"schema",null);if(H.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=H.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);H.removeByValue(m,"id"),H.removeByValue(m,"created"),H.removeByValue(m,"updated");for(let g in p)for(let b in p[g]){const k=p[g][b].message,$=m[g]||g;r.push(H.sentenize($+": "+k))}}xt(async()=>{t(2,o=!0);try{t(1,l=(await rt(()=>import("./CodeEditor-65cf3b79.js"),["./CodeEditor-65cf3b79.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Ri("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class h4 extends be{constructor(e){super(),ge(this,e,m4,p4,_e,{collection:0})}}const _4=n=>({active:n&1}),Ud=n=>({active:n[0]});function Wd(n){let e,t,i;const s=n[15].default,l=yt(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(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&16384)&&wt(l,s,o,o[14],i?kt(s,o[14],r,null):St(o[14]),null)},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,Ct,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,Ct,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function g4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=yt(a,n,n[14],Ud);let f=n[0]&&Wd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",at(n[17])),J(t,"drop",at(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",at(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&wt(u,a,d,d[14],l?kt(a,d[14],p,_4):St(d[14]),Ud),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Wd(d),f.c(),A(f,1),f.m(e,null)):f&&(ae(),P(f,1,1,()=>{f=null}),ue()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,Ee(r)}}}function b4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function _(){return!!f}function g(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const q of F)q.click()}}xt(()=>()=>clearTimeout(r));function T(F){me.call(this,n,F)}const C=()=>d&&k(),O=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),D=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){se[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,_,g,b,r,s,i,T,C,O,M,D,I,L]}class co extends be{constructor(e){super(),ge(this,e,b4,g4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function v4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function y4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[v4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function k4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function w4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function S4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?w4:k4}let u=a(n),f=u(n),d=n[3]&&Yd();return{c(){e=y("div"),e.innerHTML=` - Username/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[3]?d?m&8&&A(d,1):(d=Yd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function $4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Kd(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[C4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[T4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),a=!0},p(u,f){const d={};f&1&&(d.class="form-field "+(H.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(H.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&nt(()=>{a&&(r||(r=He(e,Ct,{duration:150},!0)),r.run(1))}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=He(e,Ct,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),B(i),B(o),u&&r&&r.end()}}}function C4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[7](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`Email domains that are NOT allowed to sign up. + MAX(balance) as maxBalance).`,u=E(),g&&g.c(),f=$e(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=_(b),l===$?m[l].p(b,k):(ae(),P(m[$],1,1,()=>{m[$]=null}),ue(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=Bd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function p4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[d4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function m4(n,e,t){let i;Je(n,Ci,d=>t(4,i=d));let{collection:s=new kn}=e,l,o=!1,r=[];function a(d){var _;t(3,r=[]);const p=H.getNestedVal(d,"schema",null);if(H.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=H.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);H.removeByValue(m,"id"),H.removeByValue(m,"created"),H.removeByValue(m,"updated");for(let g in p)for(let b in p[g]){const k=p[g][b].message,$=m[g]||g;r.push(H.sentenize($+": "+k))}}xt(async()=>{t(2,o=!0);try{t(1,l=(await rt(()=>import("./CodeEditor-ed3b6d0c.js"),["./CodeEditor-ed3b6d0c.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Ri("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class h4 extends ve{constructor(e){super(),be(this,e,m4,p4,_e,{collection:0})}}const _4=n=>({active:n&1}),Wd=n=>({active:n[0]});function Yd(n){let e,t,i;const s=n[15].default,l=wt(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(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&16384)&&$t(l,s,o,o[14],i?St(s,o[14],r,null):Ct(o[14]),null)},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,yt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,yt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function g4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=wt(a,n,n[14],Wd);let f=n[0]&&Yd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",at(n[17])),J(t,"drop",at(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",at(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&$t(u,a,d,d[14],l?St(a,d[14],p,_4):Ct(d[14]),Wd),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Yd(d),f.c(),A(f,1),f.m(e,null)):f&&(ae(),P(f,1,1,()=>{f=null}),ue()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,Ee(r)}}}function b4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function _(){return!!f}function g(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const q of F)q.click()}}xt(()=>()=>clearTimeout(r));function T(F){me.call(this,n,F)}const C=()=>d&&k(),D=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),O=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){se[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,_,g,b,r,s,i,T,C,D,M,O,I,L]}class co extends ve{constructor(e){super(),be(this,e,b4,g4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function v4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function y4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[v4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function k4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function w4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function S4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?w4:k4}let u=a(n),f=u(n),d=n[3]&&Kd();return{c(){e=y("div"),e.innerHTML=` + Username/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[3]?d?m&8&&A(d,1):(d=Kd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function $4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Jd(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[C4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[T4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),a=!0},p(u,f){const d={};f&1&&(d.class="form-field "+(H.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(H.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&nt(()=>{a&&(r||(r=He(e,yt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=He(e,yt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),B(i),B(o),u&&r&&r.end()}}}function C4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[7](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`Email domains that are NOT allowed to sign up. This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.onlyEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function T4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[8](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`Email domains that are ONLY allowed to sign up. - This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function M4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[$4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Kd(n);return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=$e()},m(o,r){z(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&&A(l,1)):(l=Kd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function O4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function D4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function E4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowEmailAuth?D4:O4}let u=a(n),f=u(n),d=n[2]&&Jd();return{c(){e=y("div"),e.innerHTML=` - Email/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[2]?d?m&4&&A(d,1):(d=Jd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function A4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Zd(n){let e,t,i;return{c(){e=y("div"),e.innerHTML='',h(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,Ct,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,Ct,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function I4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[A4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Zd();return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=$e()},m(o,r){z(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&&A(l,1):(l=Zd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function P4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function L4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function N4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowOAuth2Auth?L4:P4}let u=a(n),f=u(n),d=n[1]&&Gd();return{c(){e=y("div"),e.innerHTML=` - OAuth2`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[1]?d?m&2&&A(d,1):(d=Gd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function F4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Minimum password length"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),l.required=!0,h(l,"min","6"),h(l,"max","72")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.minPasswordLength),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.minPasswordLength&&fe(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function R4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Always require email",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(l,"class","txt"),h(r,"class","ri-information-line txt-sm link-hint"),h(s,"for",a=n[12])},m(d,p){S(d,e,p),e.checked=n[0].options.requireEmail,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),De(We.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(d,p){p&4096&&t!==(t=d[12])&&h(e,"id",t),p&1&&(e.checked=d[0].options.requireEmail),p&4096&&a!==(a=d[12])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function q4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k;return s=new co({props:{single:!0,$$slots:{header:[S4],default:[y4]},$$scope:{ctx:n}}}),o=new co({props:{single:!0,$$slots:{header:[E4],default:[M4]},$$scope:{ctx:n}}}),a=new co({props:{single:!0,$$slots:{header:[N4],default:[I4]},$$scope:{ctx:n}}}),_=new de({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[F4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),b=new de({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[R4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("h4"),e.textContent="Auth methods",t=E(),i=y("div"),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("hr"),d=E(),p=y("h4"),p.textContent="General",m=E(),U(_.$$.fragment),g=E(),U(b.$$.fragment),h(e,"class","section-title"),h(i,"class","accordions"),h(p,"class","section-title")},m($,T){S($,e,T),S($,t,T),S($,i,T),z(s,i,null),v(i,l),z(o,i,null),v(i,r),z(a,i,null),S($,u,T),S($,f,T),S($,d,T),S($,p,T),S($,m,T),z(_,$,T),S($,g,T),z(b,$,T),k=!0},p($,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:$}),s.$set(C);const O={};T&8197&&(O.$$scope={dirty:T,ctx:$}),o.$set(O);const M={};T&8195&&(M.$$scope={dirty:T,ctx:$}),a.$set(M);const D={};T&12289&&(D.$$scope={dirty:T,ctx:$}),_.$set(D);const I={};T&12289&&(I.$$scope={dirty:T,ctx:$}),b.$set(I)},i($){k||(A(s.$$.fragment,$),A(o.$$.fragment,$),A(a.$$.fragment,$),A(_.$$.fragment,$),A(b.$$.fragment,$),k=!0)},o($){P(s.$$.fragment,$),P(o.$$.fragment,$),P(a.$$.fragment,$),P(_.$$.fragment,$),P(b.$$.fragment,$),k=!1},d($){$&&w(e),$&&w(t),$&&w(i),B(s),B(o),B(a),$&&w(u),$&&w(f),$&&w(d),$&&w(p),$&&w(m),B(_,$),$&&w(g),B(b,$)}}}function j4(n,e,t){let i,s,l,o;Je(n,Ci,g=>t(4,o=g));let{collection:r=new kn}=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 d(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function p(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=gt(this.value),t(0,r)}function _(){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,k,$;n.$$.dirty&1&&r.$isAuth&&H.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!H.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!H.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!H.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!H.isEmpty(($=o==null?void 0:o.options)==null?void 0:$.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,d,p,m,_]}class V4 extends be{constructor(e){super(),ge(this,e,j4,q4,_e,{collection:0})}}function Xd(n,e,t){const i=n.slice();return i[17]=e[t],i}function Qd(n,e,t){const i=n.slice();return i[17]=e[t],i}function xd(n,e,t){const i=n.slice();return i[17]=e[t],i}function ep(n){let e;return{c(){e=y("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 tp(n){var r;let e,t,i,s,l=n[3]&&np(n),o=!((r=n[2])!=null&&r.$isView)&&ip(n);return{c(){e=y("h6"),e.textContent="Changes:",t=E(),i=y("ul"),l&&l.c(),s=E(),o&&o.c(),h(i,"class","changes-list svelte-xqpcsf")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),l&&l.m(i,null),v(i,s),o&&o.m(i,null)},p(a,u){var f;a[3]?l?l.p(a,u):(l=np(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[2])!=null&&f.$isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=ip(a),o.c(),o.m(i,null))},d(a){a&&w(e),a&&w(t),a&&w(i),l&&l.d(),o&&o.d()}}}function np(n){var m,_;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,u,f,d=((_=n[2])==null?void 0:_.name)+"",p;return{c(){e=y("li"),t=y("div"),i=W(`Renamed collection - `),s=y("strong"),o=W(l),r=E(),a=y("i"),u=E(),f=y("strong"),p=W(d),h(s,"class","txt-strikethrough txt-hint"),h(a,"class","ri-arrow-right-line txt-sm"),h(f,"class","txt"),h(t,"class","inline-flex"),h(e,"class","svelte-xqpcsf")},m(g,b){S(g,e,b),v(e,t),v(t,i),v(t,s),v(s,o),v(t,r),v(t,a),v(t,u),v(t,f),v(f,p)},p(g,b){var k,$;b&2&&l!==(l=((k=g[1])==null?void 0:k.name)+"")&&oe(o,l),b&4&&d!==(d=(($=g[2])==null?void 0:$.name)+"")&&oe(p,d)},d(g){g&&w(e)}}}function ip(n){let e,t,i,s=n[5],l=[];for(let f=0;f
    ',i=E(),s=y("div"),l=y("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, - you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=$e(),h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),u&&u.m(s,null),S(d,r,p),f&&f.m(d,p),S(d,a,p)},p(d,p){d[6].length?u||(u=ep(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),d[8]?f?f.p(d,p):(f=tp(d),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(d){d&&w(e),u&&u.d(),d&&w(r),f&&f.d(d),d&&w(a)}}}function z4(n){let e;return{c(){e=y("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function B4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Cancel',t=E(),i=y("button"),i.innerHTML='Confirm',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function U4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[B4],header:[z4],default:[H4]},$$scope:{ctx:n}};return e=new hn({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[13](null),B(e,s)}}}function W4(n,e,t){let i,s,l,o,r;const a=Tt();let u,f,d;async function p(C,O){t(1,f=C),t(2,d=O),await pn(),i||s.length||l.length||o.length?u==null||u.show():_()}function m(){u==null||u.hide()}function _(){m(),a("confirm")}const g=()=>m(),b=()=>_();function k(C){se[C?"unshift":"push"](()=>{u=C,t(4,u)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{var C,O,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(7,s=((C=d==null?void 0:d.schema)==null?void 0:C.filter(D=>D.id&&!D.toDelete&&D.originalName!=D.name))||[]),n.$$.dirty&4&&t(6,l=((O=d==null?void 0:d.schema)==null?void 0:O.filter(D=>D.id&&D.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(D=>{var L,F,q;const I=(L=f==null?void 0:f.schema)==null?void 0:L.find(N=>N.id==D.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((q=D.options)==null?void 0:q.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(d!=null&&d.$isView)||i)},[m,f,d,i,u,o,l,s,r,_,p,g,b,k,$,T]}class Y4 extends be{constructor(e){super(),ge(this,e,W4,U4,_e,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function rp(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function K4(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new GT({props:l}),se.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function J4(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new h4({props:l}),se.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function ap(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new u4({props:o}),se.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function up(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new V4({props:o}),se.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Ls)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function Z4(n){let e,t,i,s,l,o,r;const a=[J4,K4],u=[];function f(m,_){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let d=n[3]===wl&&ap(n),p=n[2].$isAuth&&up(n);return{c(){e=y("div"),t=y("div"),s.c(),l=E(),d&&d.c(),o=E(),p&&p.c(),h(t,"class","tab-item"),x(t,"active",n[3]===Li),h(e,"class","tabs-content svelte-12y0yzb")},m(m,_){S(m,e,_),v(e,t),u[i].m(t,null),v(e,l),d&&d.m(e,null),v(e,o),p&&p.m(e,null),r=!0},p(m,_){let g=i;i=f(m),i===g?u[i].p(m,_):(ae(),P(u[g],1,1,()=>{u[g]=null}),ue(),s=u[i],s?s.p(m,_):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&x(t,"active",m[3]===Li),m[3]===wl?d?(d.p(m,_),_[0]&8&&A(d,1)):(d=ap(m),d.c(),A(d,1),d.m(e,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue()),m[2].$isAuth?p?(p.p(m,_),_[0]&4&&A(p,1)):(p=up(m),p.c(),A(p,1),p.m(e,null)):p&&(ae(),P(p,1,1,()=>{p=null}),ue())},i(m){r||(A(s),A(d),A(p),r=!0)},o(m){P(s),P(d),P(p),r=!1},d(m){m&&w(e),u[i].d(),d&&d.d(),p&&p.d()}}}function fp(n){let e,t,i,s,l,o,r;return o=new Kn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[G4]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),i=y("button"),s=y("i"),l=E(),U(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"aria-label","More"),h(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),v(i,s),v(i,l),z(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),B(o)}}}function G4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=` + This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function M4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[$4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Jd(n);return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=$e()},m(o,r){z(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&&A(l,1)):(l=Jd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function O4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function D4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Zd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function E4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowEmailAuth?D4:O4}let u=a(n),f=u(n),d=n[2]&&Zd();return{c(){e=y("div"),e.innerHTML=` + Email/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[2]?d?m&4&&A(d,1):(d=Zd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function A4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Gd(n){let e,t,i;return{c(){e=y("div"),e.innerHTML='',h(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,yt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,yt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function I4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[A4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Gd();return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=$e()},m(o,r){z(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&&A(l,1):(l=Gd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function P4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function L4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function N4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowOAuth2Auth?L4:P4}let u=a(n),f=u(n),d=n[1]&&Xd();return{c(){e=y("div"),e.innerHTML=` + OAuth2`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[1]?d?m&2&&A(d,1):(d=Xd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function F4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Minimum password length"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),l.required=!0,h(l,"min","6"),h(l,"max","72")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.minPasswordLength),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.minPasswordLength&&fe(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function R4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Always require email",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(l,"class","txt"),h(r,"class","ri-information-line txt-sm link-hint"),h(s,"for",a=n[12])},m(d,p){S(d,e,p),e.checked=n[0].options.requireEmail,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),De(We.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(d,p){p&4096&&t!==(t=d[12])&&h(e,"id",t),p&1&&(e.checked=d[0].options.requireEmail),p&4096&&a!==(a=d[12])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function q4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k;return s=new co({props:{single:!0,$$slots:{header:[S4],default:[y4]},$$scope:{ctx:n}}}),o=new co({props:{single:!0,$$slots:{header:[E4],default:[M4]},$$scope:{ctx:n}}}),a=new co({props:{single:!0,$$slots:{header:[N4],default:[I4]},$$scope:{ctx:n}}}),_=new de({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[F4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),b=new de({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[R4,({uniqueId:$})=>({12:$}),({uniqueId:$})=>$?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("h4"),e.textContent="Auth methods",t=E(),i=y("div"),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("hr"),d=E(),p=y("h4"),p.textContent="General",m=E(),U(_.$$.fragment),g=E(),U(b.$$.fragment),h(e,"class","section-title"),h(i,"class","accordions"),h(p,"class","section-title")},m($,T){S($,e,T),S($,t,T),S($,i,T),z(s,i,null),v(i,l),z(o,i,null),v(i,r),z(a,i,null),S($,u,T),S($,f,T),S($,d,T),S($,p,T),S($,m,T),z(_,$,T),S($,g,T),z(b,$,T),k=!0},p($,[T]){const C={};T&8201&&(C.$$scope={dirty:T,ctx:$}),s.$set(C);const D={};T&8197&&(D.$$scope={dirty:T,ctx:$}),o.$set(D);const M={};T&8195&&(M.$$scope={dirty:T,ctx:$}),a.$set(M);const O={};T&12289&&(O.$$scope={dirty:T,ctx:$}),_.$set(O);const I={};T&12289&&(I.$$scope={dirty:T,ctx:$}),b.$set(I)},i($){k||(A(s.$$.fragment,$),A(o.$$.fragment,$),A(a.$$.fragment,$),A(_.$$.fragment,$),A(b.$$.fragment,$),k=!0)},o($){P(s.$$.fragment,$),P(o.$$.fragment,$),P(a.$$.fragment,$),P(_.$$.fragment,$),P(b.$$.fragment,$),k=!1},d($){$&&w(e),$&&w(t),$&&w(i),B(s),B(o),B(a),$&&w(u),$&&w(f),$&&w(d),$&&w(p),$&&w(m),B(_,$),$&&w(g),B(b,$)}}}function j4(n,e,t){let i,s,l,o;Je(n,Ci,g=>t(4,o=g));let{collection:r=new kn}=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 d(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function p(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=gt(this.value),t(0,r)}function _(){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,k,$;n.$$.dirty&1&&r.$isAuth&&H.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!H.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!H.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!H.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!H.isEmpty(($=o==null?void 0:o.options)==null?void 0:$.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,d,p,m,_]}class V4 extends ve{constructor(e){super(),be(this,e,j4,q4,_e,{collection:0})}}function Qd(n,e,t){const i=n.slice();return i[17]=e[t],i}function xd(n,e,t){const i=n.slice();return i[17]=e[t],i}function ep(n,e,t){const i=n.slice();return i[17]=e[t],i}function tp(n){let e;return{c(){e=y("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 np(n){var r;let e,t,i,s,l=n[3]&&ip(n),o=!((r=n[2])!=null&&r.$isView)&&sp(n);return{c(){e=y("h6"),e.textContent="Changes:",t=E(),i=y("ul"),l&&l.c(),s=E(),o&&o.c(),h(i,"class","changes-list svelte-xqpcsf")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),l&&l.m(i,null),v(i,s),o&&o.m(i,null)},p(a,u){var f;a[3]?l?l.p(a,u):(l=ip(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[2])!=null&&f.$isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=sp(a),o.c(),o.m(i,null))},d(a){a&&w(e),a&&w(t),a&&w(i),l&&l.d(),o&&o.d()}}}function ip(n){var m,_;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,u,f,d=((_=n[2])==null?void 0:_.name)+"",p;return{c(){e=y("li"),t=y("div"),i=W(`Renamed collection + `),s=y("strong"),o=W(l),r=E(),a=y("i"),u=E(),f=y("strong"),p=W(d),h(s,"class","txt-strikethrough txt-hint"),h(a,"class","ri-arrow-right-line txt-sm"),h(f,"class","txt"),h(t,"class","inline-flex"),h(e,"class","svelte-xqpcsf")},m(g,b){S(g,e,b),v(e,t),v(t,i),v(t,s),v(s,o),v(t,r),v(t,a),v(t,u),v(t,f),v(f,p)},p(g,b){var k,$;b&2&&l!==(l=((k=g[1])==null?void 0:k.name)+"")&&oe(o,l),b&4&&d!==(d=(($=g[2])==null?void 0:$.name)+"")&&oe(p,d)},d(g){g&&w(e)}}}function sp(n){let e,t,i,s=n[5],l=[];for(let f=0;f
    ',i=E(),s=y("div"),l=y("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, + you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=$e(),h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),u&&u.m(s,null),S(d,r,p),f&&f.m(d,p),S(d,a,p)},p(d,p){d[6].length?u||(u=tp(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),d[8]?f?f.p(d,p):(f=np(d),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(d){d&&w(e),u&&u.d(),d&&w(r),f&&f.d(d),d&&w(a)}}}function z4(n){let e;return{c(){e=y("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function B4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Cancel',t=E(),i=y("button"),i.innerHTML='Confirm',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function U4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[B4],header:[z4],default:[H4]},$$scope:{ctx:n}};return e=new hn({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[13](null),B(e,s)}}}function W4(n,e,t){let i,s,l,o,r;const a=Tt();let u,f,d;async function p(C,D){t(1,f=C),t(2,d=D),await an(),i||s.length||l.length||o.length?u==null||u.show():_()}function m(){u==null||u.hide()}function _(){m(),a("confirm")}const g=()=>m(),b=()=>_();function k(C){se[C?"unshift":"push"](()=>{u=C,t(4,u)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{var C,D,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(7,s=((C=d==null?void 0:d.schema)==null?void 0:C.filter(O=>O.id&&!O.toDelete&&O.originalName!=O.name))||[]),n.$$.dirty&4&&t(6,l=((D=d==null?void 0:d.schema)==null?void 0:D.filter(O=>O.id&&O.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(O=>{var L,F,q;const I=(L=f==null?void 0:f.schema)==null?void 0:L.find(N=>N.id==O.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((q=O.options)==null?void 0:q.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(d!=null&&d.$isView)||i)},[m,f,d,i,u,o,l,s,r,_,p,g,b,k,$,T]}class Y4 extends ve{constructor(e){super(),be(this,e,W4,U4,_e,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function ap(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function K4(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new GT({props:l}),se.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function J4(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new h4({props:l}),se.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function up(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new u4({props:o}),se.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function fp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new V4({props:o}),se.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Ls)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function Z4(n){let e,t,i,s,l,o,r;const a=[J4,K4],u=[];function f(m,_){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let d=n[3]===wl&&up(n),p=n[2].$isAuth&&fp(n);return{c(){e=y("div"),t=y("div"),s.c(),l=E(),d&&d.c(),o=E(),p&&p.c(),h(t,"class","tab-item"),x(t,"active",n[3]===Li),h(e,"class","tabs-content svelte-12y0yzb")},m(m,_){S(m,e,_),v(e,t),u[i].m(t,null),v(e,l),d&&d.m(e,null),v(e,o),p&&p.m(e,null),r=!0},p(m,_){let g=i;i=f(m),i===g?u[i].p(m,_):(ae(),P(u[g],1,1,()=>{u[g]=null}),ue(),s=u[i],s?s.p(m,_):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&x(t,"active",m[3]===Li),m[3]===wl?d?(d.p(m,_),_[0]&8&&A(d,1)):(d=up(m),d.c(),A(d,1),d.m(e,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue()),m[2].$isAuth?p?(p.p(m,_),_[0]&4&&A(p,1)):(p=fp(m),p.c(),A(p,1),p.m(e,null)):p&&(ae(),P(p,1,1,()=>{p=null}),ue())},i(m){r||(A(s),A(d),A(p),r=!0)},o(m){P(s),P(d),P(p),r=!1},d(m){m&&w(e),u[i].d(),d&&d.d(),p&&p.d()}}}function cp(n){let e,t,i,s,l,o,r;return o=new Kn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[G4]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),i=y("button"),s=y("i"),l=E(),U(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"aria-label","More"),h(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),v(i,s),v(i,l),z(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),B(o)}}}function G4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=` Duplicate`,t=E(),i=y("button"),i.innerHTML=` - Delete`,h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",An(at(n[25])))],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function cp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[X4]},$$scope:{ctx:n}}}),{c(){e=y("i"),t=E(),U(i.$$.fragment),h(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),B(i,l)}}}function dp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,d;function p(){return n[27](n[47])}return{c(){e=y("button"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" collection"),u=E(),h(t,"class",i=wi(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),h(l,"class","txt"),h(e,"type","button"),h(e,"class","dropdown-item closable"),x(e,"selected",n[47]==n[2].type)},m(m,_){S(m,e,_),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),v(e,u),f||(d=J(e,"click",p),f=!0)},p(m,_){n=m,_[0]&64&&i!==(i=wi(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&h(t,"class",i),_[0]&64&&o!==(o=n[48]+"")&&oe(r,o),_[0]&68&&x(e,"selected",n[47]==n[2].type)},d(m){m&&w(e),f=!1,d()}}}function X4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{q=null}),ue()),(!I||j[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(R[2].$isNew?"btn-outline":"btn-transparent")))&&h(p,"class",C),(!I||j[0]&4&&O!==(O=!R[2].$isNew))&&(p.disabled=O),R[2].system?N||(N=pp(),N.c(),N.m(D.parentNode,D)):N&&(N.d(1),N=null)},i(R){I||(A(q),I=!0)},o(R){P(q),I=!1},d(R){R&&w(e),R&&w(s),R&&w(l),R&&w(f),R&&w(d),q&&q.d(),R&&w(M),N&&N.d(R),R&&w(D),L=!1,F()}}}function mp(n){let e,t,i,s,l,o;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=De(t=We.call(null,e,n[11])),l=!0)},p(r,a){t&&Vt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&nt(()=>{s&&(i||(i=He(e,Wt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=He(e,Wt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function hp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function _p(n){var a,u,f;let e,t,i,s=!H.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&&gp();return{c(){e=y("button"),t=y("span"),t.textContent="Options",i=E(),r&&r.c(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(d,p){S(d,e,p),v(e,t),v(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(d,p){var m,_,g;p[0]&32&&(s=!H.isEmpty((m=d[5])==null?void 0:m.options)&&!((g=(_=d[5])==null?void 0:_.options)!=null&&g.manageRule)),s?r?p[0]&32&&A(r,1):(r=gp(),r.c(),A(r,1),r.m(e,null)):r&&(ae(),P(r,1,1,()=>{r=null}),ue()),p[0]&8&&x(e,"active",d[3]===Ls)},d(d){d&&w(e),r&&r.d(),l=!1,o()}}}function gp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function x4(n){var V,K,ee,te,G,ce,X,le;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,d,p,m,_=(V=n[2])!=null&&V.$isView?"Query":"Fields",g,b,k=!H.isEmpty(n[11]),$,T,C,O,M=!H.isEmpty((K=n[5])==null?void 0:K.listRule)||!H.isEmpty((ee=n[5])==null?void 0:ee.viewRule)||!H.isEmpty((te=n[5])==null?void 0:te.createRule)||!H.isEmpty((G=n[5])==null?void 0:G.updateRule)||!H.isEmpty((ce=n[5])==null?void 0:ce.deleteRule)||!H.isEmpty((le=(X=n[5])==null?void 0:X.options)==null?void 0:le.manageRule),D,I,L,F,q=!n[2].$isNew&&!n[2].system&&fp(n);r=new de({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[Q4,({uniqueId:ve})=>({46:ve}),({uniqueId:ve})=>[0,ve?32768:0]]},$$scope:{ctx:n}}});let N=k&&mp(n),R=M&&hp(),j=n[2].$isAuth&&_p(n);return{c(){e=y("h4"),i=W(t),s=E(),q&&q.c(),l=E(),o=y("form"),U(r.$$.fragment),a=E(),u=y("input"),f=E(),d=y("div"),p=y("button"),m=y("span"),g=W(_),b=E(),N&&N.c(),$=E(),T=y("button"),C=y("span"),C.textContent="API Rules",O=E(),R&&R.c(),D=E(),j&&j.c(),h(e,"class","upsert-panel-title svelte-12y0yzb"),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(m,"class","txt"),h(p,"type","button"),h(p,"class","tab-item"),x(p,"active",n[3]===Li),h(C,"class","txt"),h(T,"type","button"),h(T,"class","tab-item"),x(T,"active",n[3]===wl),h(d,"class","tabs-header stretched")},m(ve,Se){S(ve,e,Se),v(e,i),S(ve,s,Se),q&&q.m(ve,Se),S(ve,l,Se),S(ve,o,Se),z(r,o,null),v(o,a),v(o,u),S(ve,f,Se),S(ve,d,Se),v(d,p),v(p,m),v(m,g),v(p,b),N&&N.m(p,null),v(d,$),v(d,T),v(T,C),v(T,O),R&&R.m(T,null),v(d,D),j&&j.m(d,null),I=!0,L||(F=[J(o,"submit",at(n[28])),J(p,"click",n[29]),J(T,"click",n[30])],L=!0)},p(ve,Se){var ze,we,Me,Ze,mt,Ge,Ye,ne;(!I||Se[0]&4)&&t!==(t=ve[2].$isNew?"New collection":"Edit collection")&&oe(i,t),!ve[2].$isNew&&!ve[2].system?q?(q.p(ve,Se),Se[0]&4&&A(q,1)):(q=fp(ve),q.c(),A(q,1),q.m(l.parentNode,l)):q&&(ae(),P(q,1,1,()=>{q=null}),ue());const Ve={};Se[0]&8192&&(Ve.class="form-field collection-field-name required m-b-0 "+(ve[13]?"disabled":"")),Se[0]&8260|Se[1]&1081344&&(Ve.$$scope={dirty:Se,ctx:ve}),r.$set(Ve),(!I||Se[0]&4)&&_!==(_=(ze=ve[2])!=null&&ze.$isView?"Query":"Fields")&&oe(g,_),Se[0]&2048&&(k=!H.isEmpty(ve[11])),k?N?(N.p(ve,Se),Se[0]&2048&&A(N,1)):(N=mp(ve),N.c(),A(N,1),N.m(p,null)):N&&(ae(),P(N,1,1,()=>{N=null}),ue()),(!I||Se[0]&8)&&x(p,"active",ve[3]===Li),Se[0]&32&&(M=!H.isEmpty((we=ve[5])==null?void 0:we.listRule)||!H.isEmpty((Me=ve[5])==null?void 0:Me.viewRule)||!H.isEmpty((Ze=ve[5])==null?void 0:Ze.createRule)||!H.isEmpty((mt=ve[5])==null?void 0:mt.updateRule)||!H.isEmpty((Ge=ve[5])==null?void 0:Ge.deleteRule)||!H.isEmpty((ne=(Ye=ve[5])==null?void 0:Ye.options)==null?void 0:ne.manageRule)),M?R?Se[0]&32&&A(R,1):(R=hp(),R.c(),A(R,1),R.m(T,null)):R&&(ae(),P(R,1,1,()=>{R=null}),ue()),(!I||Se[0]&8)&&x(T,"active",ve[3]===wl),ve[2].$isAuth?j?j.p(ve,Se):(j=_p(ve),j.c(),j.m(d,null)):j&&(j.d(1),j=null)},i(ve){I||(A(q),A(r.$$.fragment,ve),A(N),A(R),I=!0)},o(ve){P(q),P(r.$$.fragment,ve),P(N),P(R),I=!1},d(ve){ve&&w(e),ve&&w(s),q&&q.d(ve),ve&&w(l),ve&&w(o),B(r),ve&&w(f),ve&&w(d),N&&N.d(),R&&R.d(),j&&j.d(),L=!1,Ee(F)}}}function eM(n){let e,t,i,s,l,o=n[2].$isNew?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=W(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[9],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],x(s,"btn-loading",n[9])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(d,p){p[0]&512&&(e.disabled=d[9]),p[0]&4&&o!==(o=d[2].$isNew?"Create":"Save changes")&&oe(r,o),p[0]&4608&&a!==(a=!d[12]||d[9])&&(s.disabled=a),p[0]&512&&x(s,"btn-loading",d[9])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function tM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[eM],header:[x4],default:[Z4]},$$scope:{ctx:n}};e=new hn({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new Y4({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[37](null),B(e,r),r&&w(t),n[40](null),B(i,r)}}}const Li="schema",wl="api_rules",Ls="options",nM="base",bp="auth",vp="view";function Pr(n){return JSON.stringify(n)}function iM(n,e,t){let i,s,l,o;Je(n,Ci,ne=>t(5,o=ne));const r={};r[nM]="Base",r[vp]="View",r[bp]="Auth";const a=Tt();let u,f,d=null,p=new kn,m=!1,_=!1,g=Li,b=Pr(p),k="";function $(ne){t(3,g=ne)}function T(ne){return O(ne),t(10,_=!0),$(Li),u==null?void 0:u.show()}function C(){return u==null?void 0:u.hide()}async function O(ne){mn({}),typeof ne<"u"?(t(20,d=ne),t(2,p=ne.$clone())):(t(20,d=null),t(2,p=new kn)),t(2,p.schema=p.schema||[],p),t(2,p.originalName=p.name||"",p),await pn(),t(21,b=Pr(p))}function M(){p.$isNew?D():f==null||f.show(d,p)}function D(){if(m)return;t(9,m=!0);const ne=I();let qe;p.$isNew?qe=pe.collections.create(ne):qe=pe.collections.update(p.id,ne),qe.then(xe=>{Aa(),gy(xe),t(10,_=!1),C(),Xt(p.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:p.$isNew,collection:xe})}).catch(xe=>{pe.errorResponseHandler(xe)}).finally(()=>{t(9,m=!1)})}function I(){const ne=p.$export();ne.schema=ne.schema.slice(0);for(let qe=ne.schema.length-1;qe>=0;qe--)ne.schema[qe].toDelete&&ne.schema.splice(qe,1);return ne}function L(){d!=null&&d.id&&vn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>pe.collections.delete(d==null?void 0:d.id).then(()=>{C(),Xt(`Successfully deleted collection "${d==null?void 0:d.name}".`),a("delete",d),by(d)}).catch(ne=>{pe.errorResponseHandler(ne)}))}function F(ne){t(2,p.type=ne,p),Ri("schema")}function q(){s?vn("You have unsaved changes. Do you really want to discard them?",()=>{N()}):N()}async function N(){const ne=d==null?void 0:d.$clone();if(ne){if(ne.id="",ne.created="",ne.updated="",ne.name+="_duplicate",!H.isEmpty(ne.schema))for(const qe of ne.schema)qe.id="";if(!H.isEmpty(ne.indexes))for(let qe=0;qeC(),j=()=>M(),V=()=>q(),K=()=>L(),ee=ne=>{t(2,p.name=H.slugify(ne.target.value),p),ne.target.value=p.name},te=ne=>F(ne),G=()=>{l&&M()},ce=()=>$(Li),X=()=>$(wl),le=()=>$(Ls);function ve(ne){p=ne,t(2,p),t(20,d)}function Se(ne){p=ne,t(2,p),t(20,d)}function Ve(ne){p=ne,t(2,p),t(20,d)}function ze(ne){p=ne,t(2,p),t(20,d)}const we=()=>s&&_?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),C()}),!1):!0;function Me(ne){se[ne?"unshift":"push"](()=>{u=ne,t(7,u)})}function Ze(ne){me.call(this,n,ne)}function mt(ne){me.call(this,n,ne)}function Ge(ne){se[ne?"unshift":"push"](()=>{f=ne,t(8,f)})}const Ye=()=>D();return n.$$.update=()=>{var ne,qe;n.$$.dirty[0]&32&&(o.schema||(ne=o.options)!=null&&ne.query?t(11,k=H.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&p.type===vp&&(t(2,p.createRule=null,p),t(2,p.updateRule=null,p),t(2,p.deleteRule=null,p),t(2,p.indexes=[],p)),n.$$.dirty[0]&1048580&&p!=null&&p.name&&(d==null?void 0:d.name)!=(p==null?void 0:p.name)&&t(2,p.indexes=(qe=p.indexes)==null?void 0:qe.map(xe=>H.replaceIndexTableName(xe,p.name)),p),n.$$.dirty[0]&4&&t(13,i=!p.$isNew&&p.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Pr(p)),n.$$.dirty[0]&20&&t(12,l=p.$isNew||s),n.$$.dirty[0]&12&&g===Ls&&p.type!==bp&&$(Li)},[$,C,p,g,s,o,r,u,f,m,_,k,l,i,M,D,L,F,q,T,d,b,R,j,V,K,ee,te,G,ce,X,le,ve,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye]}class au extends be{constructor(e){super(),ge(this,e,iM,tM,_e,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function yp(n,e,t){const i=n.slice();return i[15]=e[t],i}function kp(n){let e,t=n[1].length&&wp();return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=wp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function wp(n){let e;return{c(){e=y("p"),e.textContent="No collections found.",h(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 Sp(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,d,p;return{key:n,first:null,c(){var m;t=y("a"),i=y("i"),l=E(),o=y("span"),a=W(r),u=E(),h(i,"class",s=H.getCollectionTypeIcon(e[15].type)),h(o,"class","txt"),h(t,"href",f="/collections?collectionId="+e[15].id),h(t,"class","sidebar-list-item"),x(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,_){S(m,t,_),v(t,i),v(t,l),v(t,o),v(o,a),v(t,u),d||(p=De(fn.call(null,t)),d=!0)},p(m,_){var g;e=m,_&8&&s!==(s=H.getCollectionTypeIcon(e[15].type))&&h(i,"class",s),_&8&&r!==(r=e[15].name+"")&&oe(a,r),_&8&&f!==(f="/collections?collectionId="+e[15].id)&&h(t,"href",f),_&40&&x(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),d=!1,p()}}}function $p(n){let e,t,i,s;return{c(){e=y("footer"),t=y("button"),t.innerHTML=` - New collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function sM(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[3];const O=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),fe(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let q=0;q20),L[7]?D&&(D.d(1),D=null):D?D.p(L,F):(D=$p(L),D.c(),D.m(e,null));const q={};b.$set(q)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function oM(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,$=>t(5,o=$)),Je(n,ci,$=>t(9,r=$)),Je(n,yo,$=>t(6,a=$)),Je(n,Es,$=>t(7,u=$));let f,d="";function p($){rn(ui,o=$,o)}const m=()=>t(0,d="");function _(){d=this.value,t(0,d)}const g=()=>f==null?void 0:f.show();function b($){se[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&lM(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,_,g,b,k]}class rM extends be{constructor(e){super(),ge(this,e,oM,sM,_e,{})}}function Cp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Tp(n){n[18]=n[19].default}function Mp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Op(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Dp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Op();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=$e(),d&&d.c(),s=E(),l=y("button"),r=W(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,_){S(m,t,_),d&&d.m(m,_),S(m,s,_),S(m,l,_),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Op(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),_&8&&o!==(o=e[15].label+"")&&oe(r,o),_&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Ep(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:fM,then:uM,catch:aM,value:19,blocks:[,,,]};return mu(t=n[15].component,s),{c(){e=$e(),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)&&mu(t,s)||zb(s,n,o)},i(l){i||(A(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 aM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function uM(n){Tp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){U(e.$$.fragment),t=E()},m(s,l){z(e,s,l),S(s,t,l),i=!0},p(s,l){Tp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){B(e,s),s&&w(t)}}}function fM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function Ap(n,e){let t,i,s,l=e[5]===e[14]&&Ep(e);return{key:n,first:null,c(){t=$e(),l&&l.c(),i=$e(),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&&A(l,1)):(l=Ep(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function cM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function pM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[dM],default:[cM]},$$scope:{ctx:n}};return e=new hn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),B(e,s)}}}function mM(n,e,t){const i={list:{label:"List/Search",component:rt(()=>import("./ListApiDocs-8a057460.js"),["./ListApiDocs-8a057460.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:rt(()=>import("./ViewApiDocs-9dc7a74b.js"),["./ViewApiDocs-9dc7a74b.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:rt(()=>import("./CreateApiDocs-fee96749.js"),["./CreateApiDocs-fee96749.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:rt(()=>import("./UpdateApiDocs-bf9cd75a.js"),["./UpdateApiDocs-bf9cd75a.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:rt(()=>import("./DeleteApiDocs-de585481.js"),["./DeleteApiDocs-de585481.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:rt(()=>import("./RealtimeApiDocs-f19df2b7.js"),["./RealtimeApiDocs-f19df2b7.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:rt(()=>import("./AuthWithPasswordDocs-9c29a2e1.js"),["./AuthWithPasswordDocs-9c29a2e1.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:rt(()=>import("./AuthWithOAuth2Docs-a8d1b46f.js"),["./AuthWithOAuth2Docs-a8d1b46f.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:rt(()=>import("./AuthRefreshDocs-db82a233.js"),["./AuthRefreshDocs-db82a233.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:rt(()=>import("./RequestVerificationDocs-74701cdf.js"),["./RequestVerificationDocs-74701cdf.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:rt(()=>import("./ConfirmVerificationDocs-bab2ffd7.js"),["./ConfirmVerificationDocs-bab2ffd7.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:rt(()=>import("./RequestPasswordResetDocs-1b6864da.js"),["./RequestPasswordResetDocs-1b6864da.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:rt(()=>import("./ConfirmPasswordResetDocs-d78ea0ab.js"),["./ConfirmPasswordResetDocs-d78ea0ab.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:rt(()=>import("./RequestEmailChangeDocs-25b63fa1.js"),["./RequestEmailChangeDocs-25b63fa1.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:rt(()=>import("./ConfirmEmailChangeDocs-2bb81251.js"),["./ConfirmEmailChangeDocs-2bb81251.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:rt(()=>import("./AuthMethodsDocs-6288cc38.js"),["./AuthMethodsDocs-6288cc38.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:rt(()=>import("./ListExternalAuthsDocs-9ac3ef33.js"),["./ListExternalAuthsDocs-9ac3ef33.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:rt(()=>import("./UnlinkExternalAuthDocs-72a9b84b.js"),["./UnlinkExternalAuthDocs-72a9b84b.js","./SdkTabs-ae399d8e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new kn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function _(k){se[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}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"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,_,g,b]}class hM extends be{constructor(e){super(),ge(this,e,mM,pM,_e,{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 _M(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","text"),h(r,"requried",a=!n[2]),h(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),h(r,"id",f=n[13])},m(m,_){S(m,e,_),v(e,t),v(e,i),v(e,s),S(m,o,_),S(m,r,_),fe(r,n[0].username),d||(p=J(r,"input",n[5]),d=!0)},p(m,_){_&8192&&l!==(l=m[13])&&h(e,"for",l),_&4&&a!==(a=!m[2])&&h(r,"requried",a),_&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&h(r,"placeholder",u),_&8192&&f!==(f=m[13])&&h(r,"id",f),_&1&&r.value!==m[0].username&&fe(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function gM(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,_,g,b,k,$,T;return{c(){var C;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=W("Public: "),p=W(d),_=E(),g=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[13]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(g,"type","email"),g.autofocus=n[2],h(g,"autocomplete","off"),h(g,"id",b=n[13]),g.required=k=(C=n[1].options)==null?void 0:C.requireEmail,h(g,"class","svelte-1751a4d")},m(C,O){S(C,e,O),v(e,t),v(e,i),v(e,s),S(C,o,O),S(C,r,O),v(r,a),v(a,u),v(u,f),v(u,p),S(C,_,O),S(C,g,O),fe(g,n[0].email),n[2]&&g.focus(),$||(T=[De(We.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(g,"input",n[7])],$=!0)},p(C,O){var M;O&8192&&l!==(l=C[13])&&h(e,"for",l),O&1&&d!==(d=C[0].emailVisibility?"On":"Off")&&oe(p,d),O&1&&m!==(m="btn btn-sm btn-transparent "+(C[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),O&4&&(g.autofocus=C[2]),O&8192&&b!==(b=C[13])&&h(g,"id",b),O&2&&k!==(k=(M=C[1].options)==null?void 0:M.requireEmail)&&(g.required=k),O&1&&g.value!==C[0].email&&fe(g,C[0].email)},d(C){C&&w(e),C&&w(o),C&&w(r),C&&w(_),C&&w(g),$=!1,Ee(T)}}}function Ip(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[bM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[3],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Pp(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[vM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[3]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d&24577&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&24577&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&8)&&x(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{u&&(a||(a=He(e,Ct,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=He(e,Ct,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function vM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].password&&fe(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function yM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&fe(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function kM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",at(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function wM(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[_M,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[gM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Ip(n),g=(n[2]||n[3])&&Pp(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[kM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),_&&_.c(),u=E(),g&&g.c(),f=E(),d=y("div"),U(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),_&&_.m(a,null),v(a,u),g&&g.m(a,null),v(e,f),v(e,d),z(p,d,null),m=!0},p(k,[$]){var M;const T={};$&4&&(T.class="form-field "+(k[2]?"":"required")),$&24581&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&24583&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[2]?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(k,$),$&4&&A(_,1)):(_=Ip(k),_.c(),A(_,1),_.m(a,u)),k[2]||k[3]?g?(g.p(k,$),$&12&&A(g,1)):(g=Pp(k),g.c(),A(g,1),g.m(a,null)):g&&(ae(),P(g,1,1,()=>{g=null}),ue());const O={};$&24581&&(O.$$scope={dirty:$,ctx:k}),p.$set(O)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(_),A(g),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(_),P(g),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),B(i),B(o),_&&_.d(),g&&g.d(),B(p)}}}function SM(n,e,t){let{collection:i=new kn}=e,{record:s=new ki}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function d(){r=this.checked,t(3,r)}function p(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function _(){s.verified=this.checked,t(0,s),t(3,r)}const g=b=>{l||vn("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),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ri("password"),Ri("passwordConfirm")))},[s,i,l,r,o,a,u,f,d,p,m,_,g]}class $M extends be{constructor(e){super(),ge(this,e,SM,wM,_e,{collection:1,record:0,isNew:2})}}function CM(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,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}xt(()=>(u(),()=>clearTimeout(a)));function d(m){se[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Kt(m)),t(3,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class MM extends be{constructor(e){super(),ge(this,e,TM,CM,_e,{value:0,maxHeight:4})}}function OM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new MM({props:_}),se.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),z(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&oe(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!d&&b&1&&(d=!0,k.value=g[0],ke(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),B(f,g)}}}function DM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[OM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function EM(n,e,t){let{field:i=new wn}=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 AM extends be{constructor(e){super(),ge(this,e,EM,DM,_e,{field:1,value:0})}}function IM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",_=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),fe(f,n[0]),g||(b=J(f,"input",n[2]),g=!0)},p(k,$){var T,C;$&2&&i!==(i=H.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&oe(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&_!==(_=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",_),$&1&>(f.value)!==k[0]&&fe(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function PM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[IM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function LM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=gt(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 NM extends be{constructor(e){super(),ge(this,e,LM,PM,_e,{field:1,value:0})}}function FM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=W(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&oe(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function RM(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[FM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qM(n,e,t){let{field:i=new wn}=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 jM extends be{constructor(e){super(),ge(this,e,qM,RM,_e,{field:1,value:0})}}function VM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function HM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[VM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function zM(n,e,t){let{field:i=new wn}=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 BM extends be{constructor(e){super(),ge(this,e,zM,HM,_e,{field:1,value:0})}}function UM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function WM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[UM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function YM(n,e,t){let{field:i=new wn}=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 KM extends be{constructor(e){super(),ge(this,e,YM,WM,_e,{field:1,value:0})}}function Lp(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[De(We.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function JM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b=n[0]&&!n[1].required&&Lp(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new ou({props:T}),se.push(()=>he(p,"value",k)),se.push(()=>he(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" (UTC)"),f=E(),b&&b.c(),d=E(),U(p.$$.fragment),h(t,"class",i=wi(H.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,O){S(C,e,O),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,O),b&&b.m(C,O),S(C,d,O),z(p,C,O),g=!0},p(C,O){(!g||O&2&&i!==(i=wi(H.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!g||O&2)&&o!==(o=C[1].name+"")&&oe(r,o),(!g||O&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,O):(b=Lp(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};O&256&&(M.id=C[8]),!m&&O&4&&(m=!0,M.value=C[2],ke(()=>m=!1)),!_&&O&1&&(_=!0,M.formattedValue=C[0],ke(()=>_=!1)),p.$set(M)},i(C){g||(A(p.$$.fragment,C),g=!0)},o(C){P(p.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),B(p,C)}}}function ZM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[JM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function GM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class XM extends be{constructor(e){super(),ge(this,e,GM,ZM,_e,{field:1,value:0})}}function Np(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=W("Select up to "),s=W(i),l=W(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&oe(s,i)},d(o){o&&w(e)}}}function QM(n){var $,T,C,O,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;function g(D){n[3](D)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((O=n[1].options)==null?void 0:O.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new ru({props:b}),se.push(()=>he(f,"selected",g));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Np(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),p=E(),k&&k.c(),m=$e(),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(D,I){S(D,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(D,u,I),z(f,D,I),S(D,p,I),k&&k.m(D,I),S(D,m,I),_=!0},p(D,I){var F,q,N,R,j;(!_||I&2&&i!==(i=H.getFieldTypeIcon(D[1].type)))&&h(t,"class",i),(!_||I&2)&&o!==(o=D[1].name+"")&&oe(r,o),(!_||I&16&&a!==(a=D[4]))&&h(e,"for",a);const L={};I&16&&(L.id=D[4]),I&6&&(L.toggle=!D[1].required||D[2]),I&4&&(L.multiple=D[2]),I&7&&(L.closable=!D[2]||((F=D[0])==null?void 0:F.length)>=((q=D[1].options)==null?void 0:q.maxSelect)),I&2&&(L.items=(N=D[1].options)==null?void 0:N.values),I&2&&(L.searchable=((R=D[1].options)==null?void 0:R.values)>5),!d&&I&1&&(d=!0,L.selected=D[0],ke(()=>d=!1)),f.$set(L),((j=D[1].options)==null?void 0:j.maxSelect)>1?k?k.p(D,I):(k=Np(D),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(D){_||(A(f.$$.fragment,D),_=!0)},o(D){P(f.$$.fragment,D),_=!1},d(D){D&&w(e),D&&w(u),B(f,D),D&&w(p),k&&k.d(D),D&&w(m)}}}function xM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[QM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function e5(n,e,t){let i,{field:s=new wn}=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 t5 extends be{constructor(e){super(),ge(this,e,e5,xM,_e,{field:1,value:0})}}function n5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("textarea"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&16&&a!==(a=g[4])&&h(e,"for",a),b&16&&d!==(d=g[4])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function i5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function s5(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class l5 extends be{constructor(e){super(),ge(this,e,s5,i5,_e,{field:1,value:0})}}function o5(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function r5(n){let e,t,i;return{c(){e=y("img"),dn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!dn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function a5(n){let e;function t(l,o){return l[2]?r5:o5}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function u5(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),H.hasImageExtension(s==null?void 0:s.name)&&H.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 f5 extends be{constructor(e){super(),ge(this,e,u5,a5,_e,{file:0,size:1})}}function Fp(n){let e;function t(l,o){return l[4]==="image"?d5:c5}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 c5(n){let e,t;return{c(){e=y("object"),t=W("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function d5(n){let e,t,i;return{c(){e=y("img"),dn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!dn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function p5(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Fp(n);return{c(){i&&i.c(),t=$e()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Fp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function m5(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[0])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function h5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=W(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&oe(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function _5(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[h5],header:[m5],default:[p5]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function g5(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){se[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=H.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class b5 extends be{constructor(e){super(),ge(this,e,g5,_5,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function v5(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?S5:u[3]==="video"||u[3]==="audio"?w5:k5}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function y5(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function k5(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function w5(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function S5(n){let e,t,i,s,l;return{c(){e=y("img"),dn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!dn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function $5(n){let e,t,i;function s(a,u){return a[2]?y5:v5}let l=s(n),o=l(n),r={};return t=new b5({props:r}),n[12](t),{c(){o.c(),e=E(),U(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),z(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||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[12](null),B(t,a)}}}function C5(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",d="",p=!1;m();async function m(){t(2,p=!0);try{t(10,d=await pe.getAdminFileToken(l.collectionId))}catch(k){console.warn("File token failure:",k)}t(2,p=!1)}function _(){t(5,u="")}const g=k=>{s&&(k.preventDefault(),a==null||a.show(f))};function b(k){se[k?"unshift":"push"](()=>{a=k,t(4,a)})}return n.$$set=k=>{"record"in k&&t(9,l=k.record),"filename"in k&&t(0,o=k.filename),"size"in k&&t(1,r=k.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=H.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=p?"":pe.files.getUrl(l,o,{token:d})),n.$$.dirty&1541&&t(5,u=p?"":pe.files.getUrl(l,o,{thumb:"100x100",token:d}))},[o,r,p,i,a,u,f,s,_,l,d,g,b]}class uu extends be{constructor(e){super(),ge(this,e,C5,$5,_e,{record:9,filename:0,size:1})}}function Rp(n,e,t){const i=n.slice();return i[27]=e[t],i[29]=t,i}function qp(n,e,t){const i=n.slice();i[30]=e[t],i[29]=t;const s=i[1].includes(i[29]);return i[31]=s,i}function T5(n){let e,t,i;function s(){return n[17](n[29])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[De(We.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ee(i)}}}function M5(n){let e,t,i;function s(){return n[16](n[29])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function jp(n,e){let t,i,s,l,o,r,a=e[30]+"",u,f,d,p,m,_,g;s=new uu({props:{record:e[2],filename:e[30]}});function b(T,C){return C[0]&18&&(_=null),_==null&&(_=!!T[1].includes(T[29])),_?M5:T5}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=W(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[29])),h(r,"href",f=pe.files.getUrl(e[2],e[30],{token:e[9]})),h(r,"class",d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),g=!0},p(T,C){e=T;const O={};C[0]&4&&(O.record=e[2]),C[0]&16&&(O.filename=e[30]),s.$set(O),(!g||C[0]&18)&&x(i,"fade",e[1].includes(e[29])),(!g||C[0]&16)&&a!==(a=e[30]+"")&&oe(u,a),(!g||C[0]&532&&f!==(f=pe.files.getUrl(e[2],e[30],{token:e[9]})))&&h(r,"href",f),(!g||C[0]&18&&d!==(d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),B(s),$.d()}}}function Vp(n){let e,t,i,s,l,o,r,a,u=n[27].name+"",f,d,p,m,_,g,b;i=new f5({props:{file:n[27]}});function k(){return n[18](n[29])}return{c(){e=y("div"),t=y("figure"),U(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=W(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[27].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),_=!0,g||(b=[De(We.call(null,m,"Remove file")),J(m,"click",k)],g=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[27]),i.$set(C),(!_||T[0]&1)&&u!==(u=n[27].name+"")&&oe(f,u),(!_||T[0]&1&&d!==(d=n[27].name))&&h(l,"title",d)},i($){_||(A(i.$$.fragment,$),_=!0)},o($){P(i.$$.fragment,$),_=!1},d($){$&&w(e),B(i),g=!1,Ee(b)}}}function O5(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,_,g,b,k,$,T,C,O,M,D,I,L=n[4];const F=j=>j[30]+j[2].id;for(let j=0;jP(N[j],1,1,()=>{N[j]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("div");for(let j=0;jDelete`,h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",An(at(n[25])))],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function dp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[X4]},$$scope:{ctx:n}}}),{c(){e=y("i"),t=E(),U(i.$$.fragment),h(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),B(i,l)}}}function pp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,d;function p(){return n[27](n[47])}return{c(){e=y("button"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" collection"),u=E(),h(t,"class",i=wi(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),h(l,"class","txt"),h(e,"type","button"),h(e,"class","dropdown-item closable"),x(e,"selected",n[47]==n[2].type)},m(m,_){S(m,e,_),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),v(e,u),f||(d=J(e,"click",p),f=!0)},p(m,_){n=m,_[0]&64&&i!==(i=wi(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&h(t,"class",i),_[0]&64&&o!==(o=n[48]+"")&&oe(r,o),_[0]&68&&x(e,"selected",n[47]==n[2].type)},d(m){m&&w(e),f=!1,d()}}}function X4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{q=null}),ue()),(!I||j[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(R[2].$isNew?"btn-outline":"btn-transparent")))&&h(p,"class",C),(!I||j[0]&4&&D!==(D=!R[2].$isNew))&&(p.disabled=D),R[2].system?N||(N=mp(),N.c(),N.m(O.parentNode,O)):N&&(N.d(1),N=null)},i(R){I||(A(q),I=!0)},o(R){P(q),I=!1},d(R){R&&w(e),R&&w(s),R&&w(l),R&&w(f),R&&w(d),q&&q.d(),R&&w(M),N&&N.d(R),R&&w(O),L=!1,F()}}}function hp(n){let e,t,i,s,l,o;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=De(t=We.call(null,e,n[11])),l=!0)},p(r,a){t&&Vt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&nt(()=>{s&&(i||(i=He(e,Wt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=He(e,Wt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function _p(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function gp(n){var a,u,f;let e,t,i,s=!H.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&&bp();return{c(){e=y("button"),t=y("span"),t.textContent="Options",i=E(),r&&r.c(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(d,p){S(d,e,p),v(e,t),v(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(d,p){var m,_,g;p[0]&32&&(s=!H.isEmpty((m=d[5])==null?void 0:m.options)&&!((g=(_=d[5])==null?void 0:_.options)!=null&&g.manageRule)),s?r?p[0]&32&&A(r,1):(r=bp(),r.c(),A(r,1),r.m(e,null)):r&&(ae(),P(r,1,1,()=>{r=null}),ue()),p[0]&8&&x(e,"active",d[3]===Ls)},d(d){d&&w(e),r&&r.d(),l=!1,o()}}}function bp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function x4(n){var V,K,ee,te,G,ce,X,le;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,d,p,m,_=(V=n[2])!=null&&V.$isView?"Query":"Fields",g,b,k=!H.isEmpty(n[11]),$,T,C,D,M=!H.isEmpty((K=n[5])==null?void 0:K.listRule)||!H.isEmpty((ee=n[5])==null?void 0:ee.viewRule)||!H.isEmpty((te=n[5])==null?void 0:te.createRule)||!H.isEmpty((G=n[5])==null?void 0:G.updateRule)||!H.isEmpty((ce=n[5])==null?void 0:ce.deleteRule)||!H.isEmpty((le=(X=n[5])==null?void 0:X.options)==null?void 0:le.manageRule),O,I,L,F,q=!n[2].$isNew&&!n[2].system&&cp(n);r=new de({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[Q4,({uniqueId:ye})=>({46:ye}),({uniqueId:ye})=>[0,ye?32768:0]]},$$scope:{ctx:n}}});let N=k&&hp(n),R=M&&_p(),j=n[2].$isAuth&&gp(n);return{c(){e=y("h4"),i=W(t),s=E(),q&&q.c(),l=E(),o=y("form"),U(r.$$.fragment),a=E(),u=y("input"),f=E(),d=y("div"),p=y("button"),m=y("span"),g=W(_),b=E(),N&&N.c(),$=E(),T=y("button"),C=y("span"),C.textContent="API Rules",D=E(),R&&R.c(),O=E(),j&&j.c(),h(e,"class","upsert-panel-title svelte-12y0yzb"),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(m,"class","txt"),h(p,"type","button"),h(p,"class","tab-item"),x(p,"active",n[3]===Li),h(C,"class","txt"),h(T,"type","button"),h(T,"class","tab-item"),x(T,"active",n[3]===wl),h(d,"class","tabs-header stretched")},m(ye,Se){S(ye,e,Se),v(e,i),S(ye,s,Se),q&&q.m(ye,Se),S(ye,l,Se),S(ye,o,Se),z(r,o,null),v(o,a),v(o,u),S(ye,f,Se),S(ye,d,Se),v(d,p),v(p,m),v(m,g),v(p,b),N&&N.m(p,null),v(d,$),v(d,T),v(T,C),v(T,D),R&&R.m(T,null),v(d,O),j&&j.m(d,null),I=!0,L||(F=[J(o,"submit",at(n[28])),J(p,"click",n[29]),J(T,"click",n[30])],L=!0)},p(ye,Se){var ze,we,Me,Ze,mt,Ge,Ye,ne;(!I||Se[0]&4)&&t!==(t=ye[2].$isNew?"New collection":"Edit collection")&&oe(i,t),!ye[2].$isNew&&!ye[2].system?q?(q.p(ye,Se),Se[0]&4&&A(q,1)):(q=cp(ye),q.c(),A(q,1),q.m(l.parentNode,l)):q&&(ae(),P(q,1,1,()=>{q=null}),ue());const Ve={};Se[0]&8192&&(Ve.class="form-field collection-field-name required m-b-0 "+(ye[13]?"disabled":"")),Se[0]&8260|Se[1]&1081344&&(Ve.$$scope={dirty:Se,ctx:ye}),r.$set(Ve),(!I||Se[0]&4)&&_!==(_=(ze=ye[2])!=null&&ze.$isView?"Query":"Fields")&&oe(g,_),Se[0]&2048&&(k=!H.isEmpty(ye[11])),k?N?(N.p(ye,Se),Se[0]&2048&&A(N,1)):(N=hp(ye),N.c(),A(N,1),N.m(p,null)):N&&(ae(),P(N,1,1,()=>{N=null}),ue()),(!I||Se[0]&8)&&x(p,"active",ye[3]===Li),Se[0]&32&&(M=!H.isEmpty((we=ye[5])==null?void 0:we.listRule)||!H.isEmpty((Me=ye[5])==null?void 0:Me.viewRule)||!H.isEmpty((Ze=ye[5])==null?void 0:Ze.createRule)||!H.isEmpty((mt=ye[5])==null?void 0:mt.updateRule)||!H.isEmpty((Ge=ye[5])==null?void 0:Ge.deleteRule)||!H.isEmpty((ne=(Ye=ye[5])==null?void 0:Ye.options)==null?void 0:ne.manageRule)),M?R?Se[0]&32&&A(R,1):(R=_p(),R.c(),A(R,1),R.m(T,null)):R&&(ae(),P(R,1,1,()=>{R=null}),ue()),(!I||Se[0]&8)&&x(T,"active",ye[3]===wl),ye[2].$isAuth?j?j.p(ye,Se):(j=gp(ye),j.c(),j.m(d,null)):j&&(j.d(1),j=null)},i(ye){I||(A(q),A(r.$$.fragment,ye),A(N),A(R),I=!0)},o(ye){P(q),P(r.$$.fragment,ye),P(N),P(R),I=!1},d(ye){ye&&w(e),ye&&w(s),q&&q.d(ye),ye&&w(l),ye&&w(o),B(r),ye&&w(f),ye&&w(d),N&&N.d(),R&&R.d(),j&&j.d(),L=!1,Ee(F)}}}function eM(n){let e,t,i,s,l,o=n[2].$isNew?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=W(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[9],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],x(s,"btn-loading",n[9])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(d,p){p[0]&512&&(e.disabled=d[9]),p[0]&4&&o!==(o=d[2].$isNew?"Create":"Save changes")&&oe(r,o),p[0]&4608&&a!==(a=!d[12]||d[9])&&(s.disabled=a),p[0]&512&&x(s,"btn-loading",d[9])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function tM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[eM],header:[x4],default:[Z4]},$$scope:{ctx:n}};e=new hn({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new Y4({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[37](null),B(e,r),r&&w(t),n[40](null),B(i,r)}}}const Li="schema",wl="api_rules",Ls="options",nM="base",vp="auth",yp="view";function Ir(n){return JSON.stringify(n)}function iM(n,e,t){let i,s,l,o;Je(n,Ci,ne=>t(5,o=ne));const r={};r[nM]="Base",r[yp]="View",r[vp]="Auth";const a=Tt();let u,f,d=null,p=new kn,m=!1,_=!1,g=Li,b=Ir(p),k="";function $(ne){t(3,g=ne)}function T(ne){return D(ne),t(10,_=!0),$(Li),u==null?void 0:u.show()}function C(){return u==null?void 0:u.hide()}async function D(ne){un({}),typeof ne<"u"?(t(20,d=ne),t(2,p=ne.$clone())):(t(20,d=null),t(2,p=new kn)),t(2,p.schema=p.schema||[],p),t(2,p.originalName=p.name||"",p),await an(),t(21,b=Ir(p))}function M(){p.$isNew?O():f==null||f.show(d,p)}function O(){if(m)return;t(9,m=!0);const ne=I();let qe;p.$isNew?qe=pe.collections.create(ne):qe=pe.collections.update(p.id,ne),qe.then(xe=>{Ia(),gy(xe),t(10,_=!1),C(),Qt(p.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:p.$isNew,collection:xe})}).catch(xe=>{pe.errorResponseHandler(xe)}).finally(()=>{t(9,m=!1)})}function I(){const ne=p.$export();ne.schema=ne.schema.slice(0);for(let qe=ne.schema.length-1;qe>=0;qe--)ne.schema[qe].toDelete&&ne.schema.splice(qe,1);return ne}function L(){d!=null&&d.id&&vn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>pe.collections.delete(d==null?void 0:d.id).then(()=>{C(),Qt(`Successfully deleted collection "${d==null?void 0:d.name}".`),a("delete",d),by(d)}).catch(ne=>{pe.errorResponseHandler(ne)}))}function F(ne){t(2,p.type=ne,p),Ri("schema")}function q(){s?vn("You have unsaved changes. Do you really want to discard them?",()=>{N()}):N()}async function N(){const ne=d==null?void 0:d.$clone();if(ne){if(ne.id="",ne.created="",ne.updated="",ne.name+="_duplicate",!H.isEmpty(ne.schema))for(const qe of ne.schema)qe.id="";if(!H.isEmpty(ne.indexes))for(let qe=0;qeC(),j=()=>M(),V=()=>q(),K=()=>L(),ee=ne=>{t(2,p.name=H.slugify(ne.target.value),p),ne.target.value=p.name},te=ne=>F(ne),G=()=>{l&&M()},ce=()=>$(Li),X=()=>$(wl),le=()=>$(Ls);function ye(ne){p=ne,t(2,p),t(20,d)}function Se(ne){p=ne,t(2,p),t(20,d)}function Ve(ne){p=ne,t(2,p),t(20,d)}function ze(ne){p=ne,t(2,p),t(20,d)}const we=()=>s&&_?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),C()}),!1):!0;function Me(ne){se[ne?"unshift":"push"](()=>{u=ne,t(7,u)})}function Ze(ne){me.call(this,n,ne)}function mt(ne){me.call(this,n,ne)}function Ge(ne){se[ne?"unshift":"push"](()=>{f=ne,t(8,f)})}const Ye=()=>O();return n.$$.update=()=>{var ne,qe;n.$$.dirty[0]&32&&(o.schema||(ne=o.options)!=null&&ne.query?t(11,k=H.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&p.type===yp&&(t(2,p.createRule=null,p),t(2,p.updateRule=null,p),t(2,p.deleteRule=null,p),t(2,p.indexes=[],p)),n.$$.dirty[0]&1048580&&p!=null&&p.name&&(d==null?void 0:d.name)!=(p==null?void 0:p.name)&&t(2,p.indexes=(qe=p.indexes)==null?void 0:qe.map(xe=>H.replaceIndexTableName(xe,p.name)),p),n.$$.dirty[0]&4&&t(13,i=!p.$isNew&&p.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Ir(p)),n.$$.dirty[0]&20&&t(12,l=p.$isNew||s),n.$$.dirty[0]&12&&g===Ls&&p.type!==vp&&$(Li)},[$,C,p,g,s,o,r,u,f,m,_,k,l,i,M,O,L,F,q,T,d,b,R,j,V,K,ee,te,G,ce,X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye]}class uu extends ve{constructor(e){super(),be(this,e,iM,tM,_e,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function kp(n,e,t){const i=n.slice();return i[15]=e[t],i}function wp(n){let e,t=n[1].length&&Sp();return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Sp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Sp(n){let e;return{c(){e=y("p"),e.textContent="No collections found.",h(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 $p(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,d,p;return{key:n,first:null,c(){var m;t=y("a"),i=y("i"),l=E(),o=y("span"),a=W(r),u=E(),h(i,"class",s=H.getCollectionTypeIcon(e[15].type)),h(o,"class","txt"),h(t,"href",f="/collections?collectionId="+e[15].id),h(t,"class","sidebar-list-item"),x(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,_){S(m,t,_),v(t,i),v(t,l),v(t,o),v(o,a),v(t,u),d||(p=De(dn.call(null,t)),d=!0)},p(m,_){var g;e=m,_&8&&s!==(s=H.getCollectionTypeIcon(e[15].type))&&h(i,"class",s),_&8&&r!==(r=e[15].name+"")&&oe(a,r),_&8&&f!==(f="/collections?collectionId="+e[15].id)&&h(t,"href",f),_&40&&x(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),d=!1,p()}}}function Cp(n){let e,t,i,s;return{c(){e=y("footer"),t=y("button"),t.innerHTML=` + New collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function sM(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[3];const D=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),fe(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let q=0;q20),L[7]?O&&(O.d(1),O=null):O?O.p(L,F):(O=Cp(L),O.c(),O.m(e,null));const q={};b.$set(q)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function oM(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,$=>t(5,o=$)),Je(n,ci,$=>t(9,r=$)),Je(n,yo,$=>t(6,a=$)),Je(n,Es,$=>t(7,u=$));let f,d="";function p($){rn(ui,o=$,o)}const m=()=>t(0,d="");function _(){d=this.value,t(0,d)}const g=()=>f==null?void 0:f.show();function b($){se[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&lM(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,_,g,b,k]}class rM extends ve{constructor(e){super(),be(this,e,oM,sM,_e,{})}}function Tp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Mp(n){n[18]=n[19].default}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Dp(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ep(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Dp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=$e(),d&&d.c(),s=E(),l=y("button"),r=W(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,_){S(m,t,_),d&&d.m(m,_),S(m,s,_),S(m,l,_),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Dp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),_&8&&o!==(o=e[15].label+"")&&oe(r,o),_&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Ap(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:fM,then:uM,catch:aM,value:19,blocks:[,,,]};return hu(t=n[15].component,s),{c(){e=$e(),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)&&hu(t,s)||zb(s,n,o)},i(l){i||(A(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 aM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function uM(n){Mp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){U(e.$$.fragment),t=E()},m(s,l){z(e,s,l),S(s,t,l),i=!0},p(s,l){Mp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){B(e,s),s&&w(t)}}}function fM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function Ip(n,e){let t,i,s,l=e[5]===e[14]&&Ap(e);return{key:n,first:null,c(){t=$e(),l&&l.c(),i=$e(),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&&A(l,1)):(l=Ap(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function cM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function pM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[dM],default:[cM]},$$scope:{ctx:n}};return e=new hn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),B(e,s)}}}function mM(n,e,t){const i={list:{label:"List/Search",component:rt(()=>import("./ListApiDocs-7984933b.js"),["./ListApiDocs-7984933b.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:rt(()=>import("./ViewApiDocs-e1f1acb4.js"),["./ViewApiDocs-e1f1acb4.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:rt(()=>import("./CreateApiDocs-6fd167db.js"),["./CreateApiDocs-6fd167db.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:rt(()=>import("./UpdateApiDocs-992b265a.js"),["./UpdateApiDocs-992b265a.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:rt(()=>import("./DeleteApiDocs-c0d2fce4.js"),["./DeleteApiDocs-c0d2fce4.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:rt(()=>import("./RealtimeApiDocs-eaba7ffc.js"),["./RealtimeApiDocs-eaba7ffc.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:rt(()=>import("./AuthWithPasswordDocs-6b6ca833.js"),["./AuthWithPasswordDocs-6b6ca833.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:rt(()=>import("./AuthWithOAuth2Docs-ea3b1fde.js"),["./AuthWithOAuth2Docs-ea3b1fde.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:rt(()=>import("./AuthRefreshDocs-4103ee7c.js"),["./AuthRefreshDocs-4103ee7c.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:rt(()=>import("./RequestVerificationDocs-d948a007.js"),["./RequestVerificationDocs-d948a007.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:rt(()=>import("./ConfirmVerificationDocs-d1d2a4dc.js"),["./ConfirmVerificationDocs-d1d2a4dc.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:rt(()=>import("./RequestPasswordResetDocs-16e43168.js"),["./RequestPasswordResetDocs-16e43168.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:rt(()=>import("./ConfirmPasswordResetDocs-0123ea90.js"),["./ConfirmPasswordResetDocs-0123ea90.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:rt(()=>import("./RequestEmailChangeDocs-2a33c31c.js"),["./RequestEmailChangeDocs-2a33c31c.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:rt(()=>import("./ConfirmEmailChangeDocs-727175b6.js"),["./ConfirmEmailChangeDocs-727175b6.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:rt(()=>import("./AuthMethodsDocs-45c570e8.js"),["./AuthMethodsDocs-45c570e8.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:rt(()=>import("./ListExternalAuthsDocs-368be48d.js"),["./ListExternalAuthsDocs-368be48d.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:rt(()=>import("./UnlinkExternalAuthDocs-86559302.js"),["./UnlinkExternalAuthDocs-86559302.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new kn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function _(k){se[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}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"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,_,g,b]}class hM extends ve{constructor(e){super(),be(this,e,mM,pM,_e,{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 _M(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","text"),h(r,"requried",a=!n[2]),h(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),h(r,"id",f=n[13])},m(m,_){S(m,e,_),v(e,t),v(e,i),v(e,s),S(m,o,_),S(m,r,_),fe(r,n[0].username),d||(p=J(r,"input",n[5]),d=!0)},p(m,_){_&8192&&l!==(l=m[13])&&h(e,"for",l),_&4&&a!==(a=!m[2])&&h(r,"requried",a),_&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&h(r,"placeholder",u),_&8192&&f!==(f=m[13])&&h(r,"id",f),_&1&&r.value!==m[0].username&&fe(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function gM(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,_,g,b,k,$,T;return{c(){var C;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=W("Public: "),p=W(d),_=E(),g=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[13]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(g,"type","email"),g.autofocus=n[2],h(g,"autocomplete","off"),h(g,"id",b=n[13]),g.required=k=(C=n[1].options)==null?void 0:C.requireEmail,h(g,"class","svelte-1751a4d")},m(C,D){S(C,e,D),v(e,t),v(e,i),v(e,s),S(C,o,D),S(C,r,D),v(r,a),v(a,u),v(u,f),v(u,p),S(C,_,D),S(C,g,D),fe(g,n[0].email),n[2]&&g.focus(),$||(T=[De(We.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(g,"input",n[7])],$=!0)},p(C,D){var M;D&8192&&l!==(l=C[13])&&h(e,"for",l),D&1&&d!==(d=C[0].emailVisibility?"On":"Off")&&oe(p,d),D&1&&m!==(m="btn btn-sm btn-transparent "+(C[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),D&4&&(g.autofocus=C[2]),D&8192&&b!==(b=C[13])&&h(g,"id",b),D&2&&k!==(k=(M=C[1].options)==null?void 0:M.requireEmail)&&(g.required=k),D&1&&g.value!==C[0].email&&fe(g,C[0].email)},d(C){C&&w(e),C&&w(o),C&&w(r),C&&w(_),C&&w(g),$=!1,Ee(T)}}}function Pp(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[bM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[3],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lp(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[vM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[3]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d&24577&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&24577&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&8)&&x(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{u&&(a||(a=He(e,yt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=He(e,yt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function vM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].password&&fe(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function yM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&fe(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function kM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",at(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function wM(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[_M,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[gM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Pp(n),g=(n[2]||n[3])&&Lp(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[kM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),_&&_.c(),u=E(),g&&g.c(),f=E(),d=y("div"),U(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),_&&_.m(a,null),v(a,u),g&&g.m(a,null),v(e,f),v(e,d),z(p,d,null),m=!0},p(k,[$]){var M;const T={};$&4&&(T.class="form-field "+(k[2]?"":"required")),$&24581&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&24583&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[2]?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(k,$),$&4&&A(_,1)):(_=Pp(k),_.c(),A(_,1),_.m(a,u)),k[2]||k[3]?g?(g.p(k,$),$&12&&A(g,1)):(g=Lp(k),g.c(),A(g,1),g.m(a,null)):g&&(ae(),P(g,1,1,()=>{g=null}),ue());const D={};$&24581&&(D.$$scope={dirty:$,ctx:k}),p.$set(D)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(_),A(g),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(_),P(g),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),B(i),B(o),_&&_.d(),g&&g.d(),B(p)}}}function SM(n,e,t){let{collection:i=new kn}=e,{record:s=new ki}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function d(){r=this.checked,t(3,r)}function p(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function _(){s.verified=this.checked,t(0,s),t(3,r)}const g=b=>{l||vn("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),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ri("password"),Ri("passwordConfirm")))},[s,i,l,r,o,a,u,f,d,p,m,_,g]}class $M extends ve{constructor(e){super(),be(this,e,SM,wM,_e,{collection:1,record:0,isNew:2})}}function CM(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,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}xt(()=>(u(),()=>clearTimeout(a)));function d(m){se[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Jt(m)),t(3,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class MM extends ve{constructor(e){super(),be(this,e,TM,CM,_e,{value:0,maxHeight:4})}}function OM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new MM({props:_}),se.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),z(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&oe(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!d&&b&1&&(d=!0,k.value=g[0],ke(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),B(f,g)}}}function DM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[OM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function EM(n,e,t){let{field:i=new wn}=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 AM extends ve{constructor(e){super(),be(this,e,EM,DM,_e,{field:1,value:0})}}function IM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",_=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),fe(f,n[0]),g||(b=J(f,"input",n[2]),g=!0)},p(k,$){var T,C;$&2&&i!==(i=H.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&oe(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&_!==(_=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",_),$&1&>(f.value)!==k[0]&&fe(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function PM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[IM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function LM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=gt(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 NM extends ve{constructor(e){super(),be(this,e,LM,PM,_e,{field:1,value:0})}}function FM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=W(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&oe(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function RM(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[FM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qM(n,e,t){let{field:i=new wn}=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 jM extends ve{constructor(e){super(),be(this,e,qM,RM,_e,{field:1,value:0})}}function VM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function HM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[VM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function zM(n,e,t){let{field:i=new wn}=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 BM extends ve{constructor(e){super(),be(this,e,zM,HM,_e,{field:1,value:0})}}function UM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function WM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[UM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function YM(n,e,t){let{field:i=new wn}=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 KM extends ve{constructor(e){super(),be(this,e,YM,WM,_e,{field:1,value:0})}}function Np(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[De(We.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function JM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b=n[0]&&!n[1].required&&Np(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new ru({props:T}),se.push(()=>he(p,"value",k)),se.push(()=>he(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" (UTC)"),f=E(),b&&b.c(),d=E(),U(p.$$.fragment),h(t,"class",i=wi(H.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,D){S(C,e,D),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,D),b&&b.m(C,D),S(C,d,D),z(p,C,D),g=!0},p(C,D){(!g||D&2&&i!==(i=wi(H.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!g||D&2)&&o!==(o=C[1].name+"")&&oe(r,o),(!g||D&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,D):(b=Np(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};D&256&&(M.id=C[8]),!m&&D&4&&(m=!0,M.value=C[2],ke(()=>m=!1)),!_&&D&1&&(_=!0,M.formattedValue=C[0],ke(()=>_=!1)),p.$set(M)},i(C){g||(A(p.$$.fragment,C),g=!0)},o(C){P(p.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),B(p,C)}}}function ZM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[JM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function GM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class XM extends ve{constructor(e){super(),be(this,e,GM,ZM,_e,{field:1,value:0})}}function Fp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=W("Select up to "),s=W(i),l=W(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&oe(s,i)},d(o){o&&w(e)}}}function QM(n){var $,T,C,D,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;function g(O){n[3](O)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((D=n[1].options)==null?void 0:D.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new au({props:b}),se.push(()=>he(f,"selected",g));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Fp(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),p=E(),k&&k.c(),m=$e(),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,I),z(f,O,I),S(O,p,I),k&&k.m(O,I),S(O,m,I),_=!0},p(O,I){var F,q,N,R,j;(!_||I&2&&i!==(i=H.getFieldTypeIcon(O[1].type)))&&h(t,"class",i),(!_||I&2)&&o!==(o=O[1].name+"")&&oe(r,o),(!_||I&16&&a!==(a=O[4]))&&h(e,"for",a);const L={};I&16&&(L.id=O[4]),I&6&&(L.toggle=!O[1].required||O[2]),I&4&&(L.multiple=O[2]),I&7&&(L.closable=!O[2]||((F=O[0])==null?void 0:F.length)>=((q=O[1].options)==null?void 0:q.maxSelect)),I&2&&(L.items=(N=O[1].options)==null?void 0:N.values),I&2&&(L.searchable=((R=O[1].options)==null?void 0:R.values)>5),!d&&I&1&&(d=!0,L.selected=O[0],ke(()=>d=!1)),f.$set(L),((j=O[1].options)==null?void 0:j.maxSelect)>1?k?k.p(O,I):(k=Fp(O),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(O){_||(A(f.$$.fragment,O),_=!0)},o(O){P(f.$$.fragment,O),_=!1},d(O){O&&w(e),O&&w(u),B(f,O),O&&w(p),k&&k.d(O),O&&w(m)}}}function xM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[QM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function e6(n,e,t){let i,{field:s=new wn}=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 t6 extends ve{constructor(e){super(),be(this,e,e6,xM,_e,{field:1,value:0})}}function n6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("textarea"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&16&&a!==(a=g[4])&&h(e,"for",a),b&16&&d!==(d=g[4])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function i6(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function s6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class l6 extends ve{constructor(e){super(),be(this,e,s6,i6,_e,{field:1,value:0})}}function o6(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function r6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!mn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function a6(n){let e;function t(l,o){return l[2]?r6:o6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function u6(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),H.hasImageExtension(s==null?void 0:s.name)&&H.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 f6 extends ve{constructor(e){super(),be(this,e,u6,a6,_e,{file:0,size:1})}}function Rp(n){let e;function t(l,o){return l[4]==="image"?d6:c6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 c6(n){let e,t;return{c(){e=y("object"),t=W("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function d6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!mn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function p6(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Rp(n);return{c(){i&&i.c(),t=$e()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Rp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function m6(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[0])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function h6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=W(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&oe(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function _6(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[h6],header:[m6],default:[p6]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function g6(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){se[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=H.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class b6 extends ve{constructor(e){super(),be(this,e,g6,_6,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function v6(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?S6:u[3]==="video"||u[3]==="audio"?w6:k6}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function y6(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function k6(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function w6(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function S6(n){let e,t,i,s,l;return{c(){e=y("img"),mn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!mn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function $6(n){let e,t,i;function s(a,u){return a[2]?y6:v6}let l=s(n),o=l(n),r={};return t=new b6({props:r}),n[12](t),{c(){o.c(),e=E(),U(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),z(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||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[12](null),B(t,a)}}}function C6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",d="",p=!1;m();async function m(){t(2,p=!0);try{t(10,d=await pe.getAdminFileToken(l.collectionId))}catch(k){console.warn("File token failure:",k)}t(2,p=!1)}function _(){t(5,u="")}const g=k=>{s&&(k.preventDefault(),a==null||a.show(f))};function b(k){se[k?"unshift":"push"](()=>{a=k,t(4,a)})}return n.$$set=k=>{"record"in k&&t(9,l=k.record),"filename"in k&&t(0,o=k.filename),"size"in k&&t(1,r=k.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=H.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=p?"":pe.files.getUrl(l,o,{token:d})),n.$$.dirty&1541&&t(5,u=p?"":pe.files.getUrl(l,o,{thumb:"100x100",token:d}))},[o,r,p,i,a,u,f,s,_,l,d,g,b]}class fu extends ve{constructor(e){super(),be(this,e,C6,$6,_e,{record:9,filename:0,size:1})}}function qp(n,e,t){const i=n.slice();return i[27]=e[t],i[29]=t,i}function jp(n,e,t){const i=n.slice();i[30]=e[t],i[29]=t;const s=i[1].includes(i[29]);return i[31]=s,i}function T6(n){let e,t,i;function s(){return n[17](n[29])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[De(We.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ee(i)}}}function M6(n){let e,t,i;function s(){return n[16](n[29])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Vp(n,e){let t,i,s,l,o,r,a=e[30]+"",u,f,d,p,m,_,g;s=new fu({props:{record:e[2],filename:e[30]}});function b(T,C){return C[0]&18&&(_=null),_==null&&(_=!!T[1].includes(T[29])),_?M6:T6}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=W(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[29])),h(r,"href",f=pe.files.getUrl(e[2],e[30],{token:e[9]})),h(r,"class",d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),g=!0},p(T,C){e=T;const D={};C[0]&4&&(D.record=e[2]),C[0]&16&&(D.filename=e[30]),s.$set(D),(!g||C[0]&18)&&x(i,"fade",e[1].includes(e[29])),(!g||C[0]&16)&&a!==(a=e[30]+"")&&oe(u,a),(!g||C[0]&532&&f!==(f=pe.files.getUrl(e[2],e[30],{token:e[9]})))&&h(r,"href",f),(!g||C[0]&18&&d!==(d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),B(s),$.d()}}}function Hp(n){let e,t,i,s,l,o,r,a,u=n[27].name+"",f,d,p,m,_,g,b;i=new f6({props:{file:n[27]}});function k(){return n[18](n[29])}return{c(){e=y("div"),t=y("figure"),U(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=W(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[27].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),_=!0,g||(b=[De(We.call(null,m,"Remove file")),J(m,"click",k)],g=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[27]),i.$set(C),(!_||T[0]&1)&&u!==(u=n[27].name+"")&&oe(f,u),(!_||T[0]&1&&d!==(d=n[27].name))&&h(l,"title",d)},i($){_||(A(i.$$.fragment,$),_=!0)},o($){P(i.$$.fragment,$),_=!1},d($){$&&w(e),B(i),g=!1,Ee(b)}}}function O6(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,_,g,b,k,$,T,C,D,M,O,I,L=n[4];const F=j=>j[30]+j[2].id;for(let j=0;jP(N[j],1,1,()=>{N[j]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("div");for(let j=0;j({26:o}),({uniqueId:o})=>[o?67108864:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(o,r){S(o,e,r),z(t,e,null),i=!0,s||(l=[J(e,"dragover",at(n[23])),J(e,"dragleave",n[24]),J(e,"drop",n[14])],s=!0)},p(o,r){const a={};r[0]&264&&(a.class=` + `,name:n[3].name,$$slots:{default:[O6,({uniqueId:o})=>({26:o}),({uniqueId:o})=>[o?67108864:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(o,r){S(o,e,r),z(t,e,null),i=!0,s||(l=[J(e,"dragover",at(n[23])),J(e,"dragleave",n[24]),J(e,"drop",n[14])],s=!0)},p(o,r){const a={};r[0]&264&&(a.class=` form-field form-field-list form-field-file `+(o[3].required?"required":"")+` `+(o[8]?"dragover":"")+` - `),r[0]&8&&(a.name=o[3].name),r[0]&67110655|r[1]&4&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){P(t.$$.fragment,o),i=!1},d(o){o&&w(e),B(t),s=!1,Ee(l)}}}function E5(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,d,p,m=!1,_="";function g(R){H.removeByValue(u,R),t(1,u)}function b(R){H.pushUnique(u,R),t(1,u)}function k(R){H.isEmpty(a[R])||a.splice(R,1),t(0,a)}function $(){p==null||p.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}function T(R){var V,K;R.preventDefault(),t(8,m=!1);const j=((V=R.dataTransfer)==null?void 0:V.files)||[];if(!(l||!j.length)){for(const ee of j){const te=s.length+a.length-u.length;if(((K=f.options)==null?void 0:K.maxSelect)<=te)break;a.push(ee)}t(0,a)}}xt(async()=>{t(9,_=await pe.getAdminFileToken(o.collectionId))});const C=R=>g(R),O=R=>b(R),M=R=>k(R);function D(R){se[R?"unshift":"push"](()=>{d=R,t(6,d)})}const I=()=>{for(let R of d.files)a.push(R);t(0,a),t(6,d.value=null,d)},L=()=>d==null?void 0:d.click();function F(R){se[R?"unshift":"push"](()=>{p=R,t(7,p)})}const q=()=>{t(8,m=!0)},N=()=>{t(8,m=!1)};return n.$$set=R=>{"record"in R&&t(2,o=R.record),"value"in R&&t(15,r=R.value),"uploadedFiles"in R&&t(0,a=R.uploadedFiles),"deletedFileIndexes"in R&&t(1,u=R.deletedFileIndexes),"field"in R&&t(3,f=R.field)},n.$$.update=()=>{var R,j;n.$$.dirty[0]&1&&(Array.isArray(a)||t(0,a=H.toArray(a))),n.$$.dirty[0]&2&&(Array.isArray(u)||t(1,u=H.toArray(u))),n.$$.dirty[0]&8&&t(5,i=((R=f.options)==null?void 0:R.maxSelect)>1),n.$$.dirty[0]&32800&&H.isEmpty(r)&&t(15,r=i?[]:""),n.$$.dirty[0]&32768&&t(4,s=H.toArray(r)),n.$$.dirty[0]&27&&t(10,l=(s.length||a.length)&&((j=f.options)==null?void 0:j.maxSelect)<=s.length+a.length-u.length),n.$$.dirty[0]&3&&(a!==-1||u!==-1)&&$()},[a,u,o,f,s,i,d,p,m,_,l,g,b,k,T,r,C,O,M,D,I,L,F,q,N]}class A5 extends be{constructor(e){super(),ge(this,e,E5,D5,_e,{record:2,value:15,uploadedFiles:0,deletedFileIndexes:1,field:3},null,[-1,-1])}}function Hp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function I5(n,e){e=Hp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=Hp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const P5=n=>({dragging:n&2,dragover:n&4}),zp=n=>({dragging:n[1],dragover:n[2]});function L5(n){let e,t,i,s;const l=n[8].default,o=yt(l,n,n[7],zp);return{c(){e=y("div"),o&&o.c(),h(e,"draggable",!0),h(e,"class","draggable svelte-28orm4"),x(e,"dragging",n[1]),x(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[J(e,"dragover",at(n[9])),J(e,"dragleave",at(n[10])),J(e,"dragend",n[11]),J(e,"dragstart",n[12]),J(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&wt(o,l,r,r[7],t?kt(l,r[7],a,P5):St(r[7]),zp),(!t||a&2)&&x(e,"dragging",r[1]),(!t||a&4)&&x(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,Ee(s)}}}function N5(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function d($,T){!$&&!a||(t(1,u=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",T))}function p($,T){if(!$&&!a)return;t(2,f=!1),t(1,u=!1),$.dataTransfer.dropEffect="move";const C=parseInt($.dataTransfer.getData("text/plain"));C{t(2,f=!0)},_=()=>{t(2,f=!1)},g=()=>{t(2,f=!1),t(1,u=!1)},b=$=>d($,o),k=$=>p($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(5,r=$.list),"disabled"in $&&t(6,a=$.disabled),"$$scope"in $&&t(7,s=$.$$scope)},[o,u,f,d,p,r,a,s,i,m,_,g,b,k]}class F5 extends be{constructor(e){super(),ge(this,e,N5,L5,_e,{index:0,list:5,disabled:6})}}function Bp(n,e,t){const i=n.slice();i[6]=e[t];const s=H.toArray(i[0][i[6]]).slice(0,5);return i[7]=s,i}function Up(n,e,t){const i=n.slice();return i[10]=e[t],i}function Wp(n){let e,t;return e=new uu({props:{record:n[0],filename:n[10],size:"xs"}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[10]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Yp(n){let e=!H.isEmpty(n[10]),t,i,s=e&&Wp(n);return{c(){s&&s.c(),t=$e()},m(l,o){s&&s.m(l,o),S(l,t,o),i=!0},p(l,o){o&3&&(e=!H.isEmpty(l[10])),e?s?(s.p(l,o),o&3&&A(s,1)):(s=Wp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(ae(),P(s,1,1,()=>{s=null}),ue())},i(l){i||(A(s),i=!0)},o(l){P(s),i=!1},d(l){s&&s.d(l),l&&w(t)}}}function Kp(n){let e,t,i=n[7],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oP(m[g],1,1,()=>{m[g]=null});return{c(){e=y("div"),t=y("i"),s=E();for(let g=0;gt(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(d=>d.name==u&&d.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class er extends be{constructor(e){super(),ge(this,e,q5,R5,_e,{record:0,displayFields:3})}}function Jp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Zp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function Gp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='
    New record
    ',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Xp(n){let e,t;function i(o,r){return o[12]?V5:j5}let s=i(n),l=s(n);return{c(){e=y("div"),l.c(),t=E(),h(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),v(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 j5(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&Qp(n);return{c(){e=y("span"),e.textContent="No records found.",t=E(),s&&s.c(),i=$e(),h(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=Qp(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function V5(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Qp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[35]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function H5(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function z5(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xp(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),h(e,"class","actions nonintrusive")},m(o,r){S(o,e,r),v(e,t),i||(s=[De(We.call(null,t,"Edit")),J(t,"keydown",An(n[27])),J(t,"click",An(l))],i=!0)},p(o,r){n=o},d(o){o&&w(e),i=!1,Ee(s)}}}function em(n,e){var k;let t,i,s,l,o,r,a,u,f;function d($,T){return $[6]?z5:H5}let p=d(e),m=p(e);l=new er({props:{record:e[49],displayFields:e[13]}});let _=!((k=e[10])!=null&&k.$isView)&&xp(e);function g(){return e[33](e[49])}function b(...$){return e[34](e[49],...$)}return{key:n,first:null,c(){t=y("div"),m.c(),i=E(),s=y("div"),U(l.$$.fragment),o=E(),_&&_.c(),r=E(),h(s,"class","content"),h(t,"tabindex","0"),h(t,"class","list-item handle"),x(t,"selected",e[6]),x(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m($,T){S($,t,T),m.m(t,null),v(t,i),v(t,s),z(l,s,null),v(t,o),_&&_.m(t,null),v(t,r),a=!0,u||(f=[J(t,"click",g),J(t,"keydown",b)],u=!0)},p($,T){var O;e=$,p!==(p=d(e))&&(m.d(1),m=p(e),m&&(m.c(),m.m(t,i)));const C={};T[0]&8&&(C.record=e[49]),T[0]&8192&&(C.displayFields=e[13]),l.$set(C),(O=e[10])!=null&&O.$isView?_&&(_.d(1),_=null):_?_.p(e,T):(_=xp(e),_.c(),_.m(t,r)),(!a||T[0]&264)&&x(t,"selected",e[6]),(!a||T[0]&808)&&x(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i($){a||(A(l.$$.fragment,$),a=!0)},o($){P(l.$$.fragment,$),a=!1},d($){$&&w(t),m.d(),B(l),_&&_.d(),u=!1,Ee(f)}}}function tm(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=W("("),i=W(t),s=W(" of MAX "),l=W(n[5]),o=W(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&oe(i,t),a[0]&32&&oe(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function B5(n){let e;return{c(){e=y("p"),e.textContent="No selected records.",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function U5(n){let e,t,i=n[6],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){e=y("div");for(let o=0;o',l=E(),h(s,"type","button"),h(s,"title","Remove"),h(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),h(e,"class","label"),x(e,"label-danger",n[52]),x(e,"label-warning",n[53])},m(f,d){S(f,e,d),z(t,e,null),v(e,i),v(e,s),S(f,l,d),o=!0,r||(a=J(s,"click",u),r=!0)},p(f,d){n=f;const p={};d[0]&64&&(p.record=n[49]),d[0]&8192&&(p.displayFields=n[13]),t.$set(p),(!o||d[1]&2097152)&&x(e,"label-danger",n[52]),(!o||d[1]&4194304)&&x(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){P(t.$$.fragment,f),o=!1},d(f){f&&w(e),B(t),f&&w(l),r=!1,a()}}}function nm(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[W5,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new F5({props:l}),se.push(()=>he(e,"list",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function Y5(n){var q;let e,t,i,s,l,o=[],r=new Map,a,u,f,d,p,m,_,g,b,k,$;t=new Ko({props:{value:n[2],autocompleteCollection:n[10]}}),t.$on("submit",n[30]);let T=!((q=n[10])!=null&&q.$isView)&&Gp(n),C=n[3];const O=N=>N[49].id;for(let N=0;N1&&tm(n);const I=[U5,B5],L=[];function F(N,R){return N[6].length?0:1}return m=F(n),_=L[m]=I[m](n),{c(){e=y("div"),U(t.$$.fragment),i=E(),T&&T.c(),s=E(),l=y("div");for(let N=0;N1?D?D.p(N,R):(D=tm(N),D.c(),D.m(f,null)):D&&(D.d(1),D=null);let V=m;m=F(N),m===V?L[m].p(N,R):(ae(),P(L[V],1,1,()=>{L[V]=null}),ue(),_=L[m],_?_.p(N,R):(_=L[m]=I[m](N),_.c()),A(_,1),_.m(g.parentNode,g))},i(N){if(!b){A(t.$$.fragment,N);for(let R=0;RCancel',t=E(),i=y("button"),i.innerHTML='Save selection',h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[28]),J(i,"click",n[29])],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function Z5(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[J5],header:[K5],default:[Y5]},$$scope:{ctx:n}};for(let a=0;at(26,m=Ne));const _=Tt(),g="picker_"+H.randomString(5);let{value:b}=e,{field:k}=e,$,T,C="",O=[],M=[],D=1,I=0,L=!1,F=!1;function q(){return t(2,C=""),t(3,O=[]),t(6,M=[]),R(),j(!0),$==null?void 0:$.show()}function N(){return $==null?void 0:$.hide()}async function R(){const Ne=H.toArray(b);if(!s||!Ne.length)return;t(24,F=!0);let Ce=[];const tt=Ne.slice(),Et=[];for(;tt.length>0;){const Rt=[];for(const Ht of tt.splice(0,Lr))Rt.push(`id="${Ht}"`);Et.push(pe.collection(s).getFullList(Lr,{filter:Rt.join("||"),$autoCancel:!1}))}try{await Promise.all(Et).then(Rt=>{Ce=Ce.concat(...Rt)}),t(6,M=[]);for(const Rt of Ne){const Ht=H.findByKey(Ce,"id",Rt);Ht&&M.push(Ht)}C.trim()||t(3,O=H.filterDuplicatesByKey(M.concat(O)))}catch(Rt){pe.errorResponseHandler(Rt)}t(24,F=!1)}async function j(Ne=!1){if(s){t(4,L=!0),Ne&&(C.trim()?t(3,O=[]):t(3,O=H.toArray(M).slice()));try{const Ce=Ne?1:D+1,tt=H.getAllCollectionIdentifiers(o),Et=await pe.collection(s).getList(Ce,Lr,{filter:H.normalizeSearchFilter(C,tt),sort:o!=null&&o.$isView?"":"-created",$cancelKey:g+"loadList"});t(3,O=H.filterDuplicatesByKey(O.concat(Et.items))),D=Et.page,t(23,I=Et.totalItems)}catch(Ce){pe.errorResponseHandler(Ce)}t(4,L=!1)}}function V(Ne){i==1?t(6,M=[Ne]):u&&(H.pushOrReplaceByKey(M,Ne),t(6,M))}function K(Ne){H.removeByKey(M,"id",Ne.id),t(6,M)}function ee(Ne){f(Ne)?K(Ne):V(Ne)}function te(){var Ne;i!=1?t(20,b=M.map(Ce=>Ce.id)):t(20,b=((Ne=M==null?void 0:M[0])==null?void 0:Ne.id)||""),_("save",M),N()}function G(Ne){me.call(this,n,Ne)}const ce=()=>N(),X=()=>te(),le=Ne=>t(2,C=Ne.detail),ve=()=>T==null?void 0:T.show(),Se=Ne=>T==null?void 0:T.show(Ne),Ve=Ne=>ee(Ne),ze=(Ne,Ce)=>{(Ce.code==="Enter"||Ce.code==="Space")&&(Ce.preventDefault(),Ce.stopPropagation(),ee(Ne))},we=()=>t(2,C=""),Me=()=>{a&&!L&&j()},Ze=Ne=>K(Ne);function mt(Ne){M=Ne,t(6,M)}function Ge(Ne){se[Ne?"unshift":"push"](()=>{$=Ne,t(1,$)})}function Ye(Ne){me.call(this,n,Ne)}function ne(Ne){me.call(this,n,Ne)}function qe(Ne){se[Ne?"unshift":"push"](()=>{T=Ne,t(7,T)})}const xe=Ne=>{H.removeByKey(O,"id",Ne.detail.id),O.unshift(Ne.detail),t(3,O),V(Ne.detail)},en=Ne=>{H.removeByKey(O,"id",Ne.detail.id),t(3,O),K(Ne.detail)};return n.$$set=Ne=>{e=je(je({},e),Kt(Ne)),t(19,p=Qe(e,d)),"value"in Ne&&t(20,b=Ne.value),"field"in Ne&&t(21,k=Ne.field)},n.$$.update=()=>{var Ne,Ce,tt;n.$$.dirty[0]&2097152&&t(5,i=((Ne=k==null?void 0:k.options)==null?void 0:Ne.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(Ce=k==null?void 0:k.options)==null?void 0:Ce.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(tt=k==null?void 0:k.options)==null?void 0:tt.displayFields),n.$$.dirty[0]&100663296&&t(10,o=m.find(Et=>Et.id==s)||null),n.$$.dirty[0]&16777222&&typeof C<"u"&&!F&&$!=null&&$.isActive()&&j(!0),n.$$.dirty[0]&16777232&&t(12,r=L||F),n.$$.dirty[0]&8388616&&t(11,a=I>O.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>M.length),n.$$.dirty[0]&64&&t(8,f=function(Et){return H.findByKey(M,"id",Et.id)})},[N,$,C,O,L,i,M,T,f,u,o,a,r,l,j,V,K,ee,te,p,b,k,q,I,F,s,m,G,ce,X,le,ve,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye,ne,qe,xe,en]}class X5 extends be{constructor(e){super(),ge(this,e,G5,Z5,_e,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function im(n,e,t){const i=n.slice();return i[15]=e[t],i}function sm(n,e,t){const i=n.slice();return i[18]=e[t],i}function lm(n){let e,t=n[5]&&om(n);return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=om(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function om(n){let e,t=H.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    - `,h(e,"class","list-item")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function am(n){var p;let e,t,i,s,l,o,r,a,u,f;i=new er({props:{record:n[15],displayFields:(p=n[2].options)==null?void 0:p.displayFields}});function d(){return n[8](n[15])}return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),o=y("button"),o.innerHTML='',r=E(),h(t,"class","content"),h(o,"type","button"),h(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(l,"class","actions"),h(e,"class","list-item")},m(m,_){S(m,e,_),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(e,r),a=!0,u||(f=[De(We.call(null,o,"Remove")),J(o,"click",d)],u=!0)},p(m,_){var b;n=m;const g={};_&16&&(g.record=n[15]),_&4&&(g.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(g)},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){P(i.$$.fragment,m),a=!1},d(m){m&&w(e),B(i),u=!1,Ee(f)}}}function Q5(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p,m,_,g,b,k,$=n[4],T=[];for(let M=0;M<$.length;M+=1)T[M]=am(im(n,$,M));const C=M=>P(T[M],1,1,()=>{T[M]=null});let O=null;return $.length||(O=lm(n)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("div"),d=y("div");for(let M=0;M + `),r[0]&8&&(a.name=o[3].name),r[0]&67110655|r[1]&4&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){P(t.$$.fragment,o),i=!1},d(o){o&&w(e),B(t),s=!1,Ee(l)}}}function E6(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,d,p,m=!1,_="";function g(R){H.removeByValue(u,R),t(1,u)}function b(R){H.pushUnique(u,R),t(1,u)}function k(R){H.isEmpty(a[R])||a.splice(R,1),t(0,a)}function $(){p==null||p.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}function T(R){var V,K;R.preventDefault(),t(8,m=!1);const j=((V=R.dataTransfer)==null?void 0:V.files)||[];if(!(l||!j.length)){for(const ee of j){const te=s.length+a.length-u.length;if(((K=f.options)==null?void 0:K.maxSelect)<=te)break;a.push(ee)}t(0,a)}}xt(async()=>{t(9,_=await pe.getAdminFileToken(o.collectionId))});const C=R=>g(R),D=R=>b(R),M=R=>k(R);function O(R){se[R?"unshift":"push"](()=>{d=R,t(6,d)})}const I=()=>{for(let R of d.files)a.push(R);t(0,a),t(6,d.value=null,d)},L=()=>d==null?void 0:d.click();function F(R){se[R?"unshift":"push"](()=>{p=R,t(7,p)})}const q=()=>{t(8,m=!0)},N=()=>{t(8,m=!1)};return n.$$set=R=>{"record"in R&&t(2,o=R.record),"value"in R&&t(15,r=R.value),"uploadedFiles"in R&&t(0,a=R.uploadedFiles),"deletedFileIndexes"in R&&t(1,u=R.deletedFileIndexes),"field"in R&&t(3,f=R.field)},n.$$.update=()=>{var R,j;n.$$.dirty[0]&1&&(Array.isArray(a)||t(0,a=H.toArray(a))),n.$$.dirty[0]&2&&(Array.isArray(u)||t(1,u=H.toArray(u))),n.$$.dirty[0]&8&&t(5,i=((R=f.options)==null?void 0:R.maxSelect)>1),n.$$.dirty[0]&32800&&H.isEmpty(r)&&t(15,r=i?[]:""),n.$$.dirty[0]&32768&&t(4,s=H.toArray(r)),n.$$.dirty[0]&27&&t(10,l=(s.length||a.length)&&((j=f.options)==null?void 0:j.maxSelect)<=s.length+a.length-u.length),n.$$.dirty[0]&3&&(a!==-1||u!==-1)&&$()},[a,u,o,f,s,i,d,p,m,_,l,g,b,k,T,r,C,D,M,O,I,L,F,q,N]}class A6 extends ve{constructor(e){super(),be(this,e,E6,D6,_e,{record:2,value:15,uploadedFiles:0,deletedFileIndexes:1,field:3},null,[-1,-1])}}function zp(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function I6(n,e){e=zp(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=zp(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}const P6=n=>({dragging:n&2,dragover:n&4}),Bp=n=>({dragging:n[1],dragover:n[2]});function L6(n){let e,t,i,s;const l=n[8].default,o=wt(l,n,n[7],Bp);return{c(){e=y("div"),o&&o.c(),h(e,"draggable",!0),h(e,"class","draggable svelte-28orm4"),x(e,"dragging",n[1]),x(e,"dragover",n[2])},m(r,a){S(r,e,a),o&&o.m(e,null),t=!0,i||(s=[J(e,"dragover",at(n[9])),J(e,"dragleave",at(n[10])),J(e,"dragend",n[11]),J(e,"dragstart",n[12]),J(e,"drop",n[13])],i=!0)},p(r,[a]){o&&o.p&&(!t||a&134)&&$t(o,l,r,r[7],t?St(l,r[7],a,P6):Ct(r[7]),Bp),(!t||a&2)&&x(e,"dragging",r[1]),(!t||a&4)&&x(e,"dragover",r[2])},i(r){t||(A(o,r),t=!0)},o(r){P(o,r),t=!1},d(r){r&&w(e),o&&o.d(r),i=!1,Ee(s)}}}function N6(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let{index:o}=e,{list:r=[]}=e,{disabled:a=!1}=e,u=!1,f=!1;function d($,T){!$&&!a||(t(1,u=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",T))}function p($,T){if(!$&&!a)return;t(2,f=!1),t(1,u=!1),$.dataTransfer.dropEffect="move";const C=parseInt($.dataTransfer.getData("text/plain"));C{t(2,f=!0)},_=()=>{t(2,f=!1)},g=()=>{t(2,f=!1),t(1,u=!1)},b=$=>d($,o),k=$=>p($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(5,r=$.list),"disabled"in $&&t(6,a=$.disabled),"$$scope"in $&&t(7,s=$.$$scope)},[o,u,f,d,p,r,a,s,i,m,_,g,b,k]}class F6 extends ve{constructor(e){super(),be(this,e,N6,L6,_e,{index:0,list:5,disabled:6})}}function Up(n,e,t){const i=n.slice();i[6]=e[t];const s=H.toArray(i[0][i[6]]).slice(0,5);return i[7]=s,i}function Wp(n,e,t){const i=n.slice();return i[10]=e[t],i}function Yp(n){let e,t;return e=new fu({props:{record:n[0],filename:n[10],size:"xs"}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[10]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Kp(n){let e=!H.isEmpty(n[10]),t,i,s=e&&Yp(n);return{c(){s&&s.c(),t=$e()},m(l,o){s&&s.m(l,o),S(l,t,o),i=!0},p(l,o){o&3&&(e=!H.isEmpty(l[10])),e?s?(s.p(l,o),o&3&&A(s,1)):(s=Yp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(ae(),P(s,1,1,()=>{s=null}),ue())},i(l){i||(A(s),i=!0)},o(l){P(s),i=!1},d(l){s&&s.d(l),l&&w(t)}}}function Jp(n){let e,t,i=n[7],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oP(m[g],1,1,()=>{m[g]=null});return{c(){e=y("div"),t=y("i"),s=E();for(let g=0;gt(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(d=>d.name==u&&d.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class xo extends ve{constructor(e){super(),be(this,e,q6,R6,_e,{record:0,displayFields:3})}}function Zp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Gp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function Xp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='
    New record
    ',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Qp(n){let e,t;function i(o,r){return o[12]?V6:j6}let s=i(n),l=s(n);return{c(){e=y("div"),l.c(),t=E(),h(e,"class","list-item")},m(o,r){S(o,e,r),l.m(e,null),v(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 j6(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&xp(n);return{c(){e=y("span"),e.textContent="No records found.",t=E(),s&&s.c(),i=$e(),h(e,"class","txt txt-hint")},m(o,r){S(o,e,r),S(o,t,r),s&&s.m(o,r),S(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=xp(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&w(e),o&&w(t),s&&s.d(o),o&&w(i)}}}function V6(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function xp(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[35]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function H6(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function z6(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function em(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),h(e,"class","actions nonintrusive")},m(o,r){S(o,e,r),v(e,t),i||(s=[De(We.call(null,t,"Edit")),J(t,"keydown",An(n[27])),J(t,"click",An(l))],i=!0)},p(o,r){n=o},d(o){o&&w(e),i=!1,Ee(s)}}}function tm(n,e){var k;let t,i,s,l,o,r,a,u,f;function d($,T){return $[6]?z6:H6}let p=d(e),m=p(e);l=new xo({props:{record:e[49],displayFields:e[13]}});let _=!((k=e[10])!=null&&k.$isView)&&em(e);function g(){return e[33](e[49])}function b(...$){return e[34](e[49],...$)}return{key:n,first:null,c(){t=y("div"),m.c(),i=E(),s=y("div"),U(l.$$.fragment),o=E(),_&&_.c(),r=E(),h(s,"class","content"),h(t,"tabindex","0"),h(t,"class","list-item handle"),x(t,"selected",e[6]),x(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m($,T){S($,t,T),m.m(t,null),v(t,i),v(t,s),z(l,s,null),v(t,o),_&&_.m(t,null),v(t,r),a=!0,u||(f=[J(t,"click",g),J(t,"keydown",b)],u=!0)},p($,T){var D;e=$,p!==(p=d(e))&&(m.d(1),m=p(e),m&&(m.c(),m.m(t,i)));const C={};T[0]&8&&(C.record=e[49]),T[0]&8192&&(C.displayFields=e[13]),l.$set(C),(D=e[10])!=null&&D.$isView?_&&(_.d(1),_=null):_?_.p(e,T):(_=em(e),_.c(),_.m(t,r)),(!a||T[0]&264)&&x(t,"selected",e[6]),(!a||T[0]&808)&&x(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i($){a||(A(l.$$.fragment,$),a=!0)},o($){P(l.$$.fragment,$),a=!1},d($){$&&w(t),m.d(),B(l),_&&_.d(),u=!1,Ee(f)}}}function nm(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=W("("),i=W(t),s=W(" of MAX "),l=W(n[5]),o=W(")")},m(r,a){S(r,e,a),S(r,i,a),S(r,s,a),S(r,l,a),S(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&oe(i,t),a[0]&32&&oe(l,r[5])},d(r){r&&w(e),r&&w(i),r&&w(s),r&&w(l),r&&w(o)}}}function B6(n){let e;return{c(){e=y("p"),e.textContent="No selected records.",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function U6(n){let e,t,i=n[6],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){e=y("div");for(let o=0;o',l=E(),h(s,"type","button"),h(s,"title","Remove"),h(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),h(e,"class","label"),x(e,"label-danger",n[52]),x(e,"label-warning",n[53])},m(f,d){S(f,e,d),z(t,e,null),v(e,i),v(e,s),S(f,l,d),o=!0,r||(a=J(s,"click",u),r=!0)},p(f,d){n=f;const p={};d[0]&64&&(p.record=n[49]),d[0]&8192&&(p.displayFields=n[13]),t.$set(p),(!o||d[1]&2097152)&&x(e,"label-danger",n[52]),(!o||d[1]&4194304)&&x(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){P(t.$$.fragment,f),o=!1},d(f){f&&w(e),B(t),f&&w(l),r=!1,a()}}}function im(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[W6,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new F6({props:l}),se.push(()=>he(e,"list",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function Y6(n){var q;let e,t,i,s,l,o=[],r=new Map,a,u,f,d,p,m,_,g,b,k,$;t=new Yo({props:{value:n[2],autocompleteCollection:n[10]}}),t.$on("submit",n[30]);let T=!((q=n[10])!=null&&q.$isView)&&Xp(n),C=n[3];const D=N=>N[49].id;for(let N=0;N1&&nm(n);const I=[U6,B6],L=[];function F(N,R){return N[6].length?0:1}return m=F(n),_=L[m]=I[m](n),{c(){e=y("div"),U(t.$$.fragment),i=E(),T&&T.c(),s=E(),l=y("div");for(let N=0;N1?O?O.p(N,R):(O=nm(N),O.c(),O.m(f,null)):O&&(O.d(1),O=null);let V=m;m=F(N),m===V?L[m].p(N,R):(ae(),P(L[V],1,1,()=>{L[V]=null}),ue(),_=L[m],_?_.p(N,R):(_=L[m]=I[m](N),_.c()),A(_,1),_.m(g.parentNode,g))},i(N){if(!b){A(t.$$.fragment,N);for(let R=0;RCancel',t=E(),i=y("button"),i.innerHTML='Set selection',h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[28]),J(i,"click",n[29])],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function Z6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[J6],header:[K6],default:[Y6]},$$scope:{ctx:n}};for(let a=0;at(26,m=Ne));const _=Tt(),g="picker_"+H.randomString(5);let{value:b}=e,{field:k}=e,$,T,C="",D=[],M=[],O=1,I=0,L=!1,F=!1;function q(){return t(2,C=""),t(3,D=[]),t(6,M=[]),R(),j(!0),$==null?void 0:$.show()}function N(){return $==null?void 0:$.hide()}async function R(){const Ne=H.toArray(b);if(!s||!Ne.length)return;t(24,F=!0);let Ce=[];const tt=Ne.slice(),Et=[];for(;tt.length>0;){const Rt=[];for(const Ht of tt.splice(0,Pr))Rt.push(`id="${Ht}"`);Et.push(pe.collection(s).getFullList(Pr,{filter:Rt.join("||"),$autoCancel:!1}))}try{await Promise.all(Et).then(Rt=>{Ce=Ce.concat(...Rt)}),t(6,M=[]);for(const Rt of Ne){const Ht=H.findByKey(Ce,"id",Rt);Ht&&M.push(Ht)}C.trim()||t(3,D=H.filterDuplicatesByKey(M.concat(D)))}catch(Rt){pe.errorResponseHandler(Rt)}t(24,F=!1)}async function j(Ne=!1){if(s){t(4,L=!0),Ne&&(C.trim()?t(3,D=[]):t(3,D=H.toArray(M).slice()));try{const Ce=Ne?1:O+1,tt=H.getAllCollectionIdentifiers(o),Et=await pe.collection(s).getList(Ce,Pr,{filter:H.normalizeSearchFilter(C,tt),sort:o!=null&&o.$isView?"":"-created",$cancelKey:g+"loadList"});t(3,D=H.filterDuplicatesByKey(D.concat(Et.items))),O=Et.page,t(23,I=Et.totalItems)}catch(Ce){pe.errorResponseHandler(Ce)}t(4,L=!1)}}function V(Ne){i==1?t(6,M=[Ne]):u&&(H.pushOrReplaceByKey(M,Ne),t(6,M))}function K(Ne){H.removeByKey(M,"id",Ne.id),t(6,M)}function ee(Ne){f(Ne)?K(Ne):V(Ne)}function te(){var Ne;i!=1?t(20,b=M.map(Ce=>Ce.id)):t(20,b=((Ne=M==null?void 0:M[0])==null?void 0:Ne.id)||""),_("save",M),N()}function G(Ne){me.call(this,n,Ne)}const ce=()=>N(),X=()=>te(),le=Ne=>t(2,C=Ne.detail),ye=()=>T==null?void 0:T.show(),Se=Ne=>T==null?void 0:T.show(Ne),Ve=Ne=>ee(Ne),ze=(Ne,Ce)=>{(Ce.code==="Enter"||Ce.code==="Space")&&(Ce.preventDefault(),Ce.stopPropagation(),ee(Ne))},we=()=>t(2,C=""),Me=()=>{a&&!L&&j()},Ze=Ne=>K(Ne);function mt(Ne){M=Ne,t(6,M)}function Ge(Ne){se[Ne?"unshift":"push"](()=>{$=Ne,t(1,$)})}function Ye(Ne){me.call(this,n,Ne)}function ne(Ne){me.call(this,n,Ne)}function qe(Ne){se[Ne?"unshift":"push"](()=>{T=Ne,t(7,T)})}const xe=Ne=>{H.removeByKey(D,"id",Ne.detail.id),D.unshift(Ne.detail),t(3,D),V(Ne.detail)},en=Ne=>{H.removeByKey(D,"id",Ne.detail.id),t(3,D),K(Ne.detail)};return n.$$set=Ne=>{e=je(je({},e),Jt(Ne)),t(19,p=Qe(e,d)),"value"in Ne&&t(20,b=Ne.value),"field"in Ne&&t(21,k=Ne.field)},n.$$.update=()=>{var Ne,Ce,tt;n.$$.dirty[0]&2097152&&t(5,i=((Ne=k==null?void 0:k.options)==null?void 0:Ne.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=(Ce=k==null?void 0:k.options)==null?void 0:Ce.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(tt=k==null?void 0:k.options)==null?void 0:tt.displayFields),n.$$.dirty[0]&100663296&&t(10,o=m.find(Et=>Et.id==s)||null),n.$$.dirty[0]&16777222&&typeof C<"u"&&!F&&$!=null&&$.isActive()&&j(!0),n.$$.dirty[0]&16777232&&t(12,r=L||F),n.$$.dirty[0]&8388616&&t(11,a=I>D.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>M.length),n.$$.dirty[0]&64&&t(8,f=function(Et){return H.findByKey(M,"id",Et.id)})},[N,$,C,D,L,i,M,T,f,u,o,a,r,l,j,V,K,ee,te,p,b,k,q,I,F,s,m,G,ce,X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye,ne,qe,xe,en]}class X6 extends ve{constructor(e){super(),be(this,e,G6,Z6,_e,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function sm(n,e,t){const i=n.slice();return i[16]=e[t],i}function lm(n,e,t){const i=n.slice();return i[19]=e[t],i}function om(n){let e,t=n[5]&&rm(n);return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=rm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function rm(n){let e,t=H.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    + `,h(e,"class","list-item")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function um(n,e){var m;let t,i,s,l,o,r,a,u,f,d;s=new xo({props:{record:e[16],displayFields:(m=e[2].options)==null?void 0:m.displayFields}});function p(){return e[8](e[16])}return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("button"),r.innerHTML='',a=E(),h(i,"class","content"),h(r,"type","button"),h(r,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(o,"class","actions"),h(t,"class","list-item"),this.first=t},m(_,g){S(_,t,g),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(t,a),u=!0,f||(d=[De(We.call(null,r,"Remove")),J(r,"click",p)],f=!0)},p(_,g){var k;e=_;const b={};g&16&&(b.record=e[16]),g&4&&(b.displayFields=(k=e[2].options)==null?void 0:k.displayFields),s.$set(b)},i(_){u||(A(s.$$.fragment,_),u=!0)},o(_){P(s.$$.fragment,_),u=!1},d(_){_&&w(t),B(s),f=!1,Ee(d)}}}function Q6(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[4];const D=O=>O[16].id;for(let O=0;O - Open picker`,h(t,"class",i=wi(H.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),h(l,"class","txt"),h(e,"for",a=n[14]),h(d,"class","relations-list svelte-1ynw0pc"),h(_,"type","button"),h(_,"class","btn btn-transparent btn-sm btn-block"),h(m,"class","list-item list-item-btn"),h(f,"class","list")},m(M,D){S(M,e,D),v(e,t),v(e,s),v(e,l),v(l,r),S(M,u,D),S(M,f,D),v(f,d);for(let I=0;I({14:r}),({uniqueId:r})=>r?16384:0]},$$scope:{ctx:n}};e=new de({props:l}),n[10](e);let o={value:n[0],field:n[2]};return i=new X5({props:o}),n[11](i),i.$on("save",n[12]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&2113591&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[10](null),B(e,r),r&&w(t),n[11](null),B(i,r)}}}const um=100;function e6(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new wn}=e,r,a=[],u=!1;f();async function f(){var C,O;const k=H.toArray(s);if(!((C=o==null?void 0:o.options)!=null&&C.collectionId)||!k.length){t(4,a=[]),t(5,u=!1);return}t(5,u=!0);const $=k.slice(),T=[];for(;$.length>0;){const M=[];for(const D of $.splice(0,um))M.push(`id="${D}"`);T.push(pe.collection((O=o==null?void 0:o.options)==null?void 0:O.collectionId).getFullList(um,{filter:M.join("||"),$autoCancel:!1}))}try{let M=[];await Promise.all(T).then(D=>{M=M.concat(...D)});for(const D of k){const I=H.findByKey(M,"id",D);I&&a.push(I)}t(4,a)}catch(M){pe.errorResponseHandler(M)}t(5,u=!1)}function d(k){var $;H.removeByKey(a,"id",k.id),t(4,a),i?t(0,s=a.map(T=>T.id)):t(0,s=(($=a[0])==null?void 0:$.id)||"")}const p=k=>d(k),m=()=>l==null?void 0:l.show();function _(k){se[k?"unshift":"push"](()=>{r=k,t(3,r)})}function g(k){se[k?"unshift":"push"](()=>{l=k,t(1,l)})}const b=k=>{var $;t(4,a=k.detail||[]),t(0,s=i?a.map(T=>T.id):(($=a[0])==null?void 0:$.id)||"")};return n.$$set=k=>{"value"in k&&t(0,s=k.value),"picker"in k&&t(1,l=k.picker),"field"in k&&t(2,o=k.field)},n.$$.update=()=>{var k;n.$$.dirty&4&&t(6,i=((k=o.options)==null?void 0:k.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed())},[s,l,o,r,a,u,i,d,p,m,_,g,b]}class t6 extends be{constructor(e){super(),ge(this,e,e6,x5,_e,{value:0,picker:1,field:2})}}const n6=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],i6=(n,e)=>{n6.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function s6(n){let e;return{c(){e=y("textarea"),h(e,"id",n[0]),qr(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function l6(n){let e;return{c(){e=y("div"),h(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function o6(n){let e;function t(l,o){return l[1]?l6:s6}let i=t(n),s=i(n);return{c(){e=y("div"),s.c(),h(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},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))),o&4&&h(e,"class",l[2])},i:Q,o:Q,d(l){l&&w(e),s.d(),n[19](null)}}}const db=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),r6=()=>{let n={listeners:[],scriptId:db("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let a6=r6();function u6(n,e,t){var i;let{id:s=db("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:d="change input undo redo"}=e,{value:p=""}=e,{text:m=""}=e,{cssClass:_="tinymce-wrapper"}=e,g,b,k,$=p,T=o;const C=Tt(),O=()=>{const q=(()=>typeof window<"u"?window:global)();return q&&q.tinymce?q.tinymce:null},M=()=>{const F=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:q=>{t(14,k=q),q.on("init",()=>{q.setContent(p),q.on(d,()=>{t(15,$=q.getContent()),$!==p&&(t(5,p=$),t(6,m=q.getContent({format:"text"})))})}),i6(q,C),typeof f.setup=="function"&&f.setup(q)}});t(4,b.style.visibility="",b),O().init(F)};xt(()=>{if(O()!==null)M();else{const F=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;a6.load(g.ownerDocument,F,()=>{M()})}}),K_(()=>{var F;k&&((F=O())===null||F===void 0||F.remove(k))});function D(F){se[F?"unshift":"push"](()=>{b=F,t(4,b)})}function I(F){se[F?"unshift":"push"](()=>{b=F,t(4,b)})}function L(F){se[F?"unshift":"push"](()=>{g=F,t(3,g)})}return n.$$set=F=>{"id"in F&&t(0,s=F.id),"inline"in F&&t(1,l=F.inline),"disabled"in F&&t(7,o=F.disabled),"apiKey"in F&&t(8,r=F.apiKey),"channel"in F&&t(9,a=F.channel),"scriptSrc"in F&&t(10,u=F.scriptSrc),"conf"in F&&t(11,f=F.conf),"modelEvents"in F&&t(12,d=F.modelEvents),"value"in F&&t(5,p=F.value),"text"in F&&t(6,m=F.text),"cssClass"in F&&t(2,_=F.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(k&&$!==p&&(k.setContent(p),t(6,m=k.getContent({format:"text"}))),k&&o!==T&&(t(16,T=o),typeof(t(13,i=k.mode)===null||i===void 0?void 0:i.set)=="function"?k.mode.set(o?"readonly":"design"):k.setMode(o?"readonly":"design")))},[s,l,_,g,b,p,m,o,r,a,u,f,d,i,k,$,T,D,I,L]}class fu extends be{constructor(e){super(),ge(this,e,u6,o6,_e,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function f6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()};return n[0]!==void 0&&(_.value=n[0]),f=new fu({props:_}),se.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),z(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&oe(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),!d&&b&1&&(d=!0,k.value=g[0],ke(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),B(f,g)}}}function c6(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[f6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function d6(n,e,t){let{field:i=new wn}=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 p6 extends be{constructor(e){super(),ge(this,e,d6,c6,_e,{field:1,value:0})}}function m6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Auth URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].authUrl),r||(a=J(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].authUrl&&fe(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function h6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Token URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].tokenUrl),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&fe(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("User API URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].userApiUrl),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&fe(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function g6(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[m6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[h6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[_6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Selfhosted endpoints (optional)",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),o=E(),U(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),B(i,u),u&&w(s),B(l,u),u&&w(o),B(r,u)}}}function b6(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 fm extends be{constructor(e){super(),ge(this,e,b6,g6,_e,{key:1,config:0})}}function v6(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&fe(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function y6(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&fe(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function k6(n){let e,t,i,s,l,o;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[v6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[y6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Azure AD endpoints",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),h(e,"class","section-title")},m(r,a){S(r,e,a),S(r,t,a),z(i,r,a),S(r,s,a),z(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function w6(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 S6 extends be{constructor(e){super(),ge(this,e,w6,k6,_e,{key:1,config:0})}}function $6(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/authorize/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&fe(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function C6(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/token/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&fe(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function T6(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("User API URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/userinfo/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].userApiUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[4]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].userApiUrl&&fe(l,p[0].userApiUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function M6(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[$6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[C6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[T6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Endpoints",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),o=E(),U(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(u[0].enabled?"required":"")),f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&1&&(m.class="form-field "+(u[0].enabled?"required":"")),f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),B(i,u),u&&w(s),B(l,u),u&&w(o),B(r,u)}}}function O6(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 Nr extends be{constructor(e){super(),ge(this,e,O6,M6,_e,{key:1,config:0})}}function D6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function E6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Team ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[3]),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&8&&l.value!==u[3]&&fe(l,u[3])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function A6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Key ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[4]),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&16&&l.value!==u[4]&&fe(l,u[4])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function I6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("span"),t.textContent="Duration (in seconds)",i=E(),s=y("i"),o=E(),r=y("input"),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[23]),h(r,"type","text"),h(r,"id",a=n[23]),h(r,"max",po),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[6]),u||(f=[De(We.call(null,s,{text:`Max ${po} seconds (~${po/(60*60*24*30)<<0} months).`,position:"top"})),J(r,"input",n[15])],u=!0)},p(d,p){p&8388608&&l!==(l=d[23])&&h(e,"for",l),p&8388608&&a!==(a=d[23])&&h(r,"id",a),p&64&&r.value!==d[6]&&fe(r,d[6])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,Ee(f)}}}function P6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Private key"),s=E(),l=y("textarea"),r=E(),a=y("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",h(e,"for",i=n[23]),h(l,"id",o=n[23]),l.required=!0,h(l,"rows","8"),h(l,"placeholder",`-----BEGIN PRIVATE KEY----- + Open picker`,h(t,"class",i=wi(H.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),h(l,"class","txt"),h(e,"for",a=n[15]),h(d,"class","relations-list svelte-1ynw0pc"),h(b,"type","button"),h(b,"class","btn btn-transparent btn-sm btn-block"),h(g,"class","list-item list-item-btn"),h(f,"class","list")},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,I),S(O,f,I),v(f,d);for(let L=0;L({15:r}),({uniqueId:r})=>r?32768:0]},$$scope:{ctx:n}};e=new de({props:l}),n[10](e);let o={value:n[0],field:n[2]};return i=new X6({props:o}),n[11](i),i.$on("save",n[12]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&4227127&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[10](null),B(e,r),r&&w(t),n[11](null),B(i,r)}}}const fm=100;function e5(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new wn}=e,r,a=[],u=!1;function f(){if(u)return!1;const $=H.toArray(s);return t(4,a=a.filter(T=>$.includes(T.id))),$.length!=a.length}async function d(){var D,M;const $=H.toArray(s);if(t(4,a=[]),!((D=o==null?void 0:o.options)!=null&&D.collectionId)||!$.length){t(5,u=!1);return}t(5,u=!0);const T=$.slice(),C=[];for(;T.length>0;){const O=[];for(const I of T.splice(0,fm))O.push(`id="${I}"`);C.push(pe.collection((M=o==null?void 0:o.options)==null?void 0:M.collectionId).getFullList(fm,{filter:O.join("||"),$autoCancel:!1}))}try{let O=[];await Promise.all(C).then(I=>{O=O.concat(...I)});for(const I of $){const L=H.findByKey(O,"id",I);L&&a.push(L)}t(4,a)}catch(O){pe.errorResponseHandler(O)}t(5,u=!1)}function p($){var T;H.removeByKey(a,"id",$.id),t(4,a),i?t(0,s=a.map(C=>C.id)):t(0,s=((T=a[0])==null?void 0:T.id)||"")}const m=$=>p($),_=()=>l==null?void 0:l.show();function g($){se[$?"unshift":"push"](()=>{r=$,t(3,r)})}function b($){se[$?"unshift":"push"](()=>{l=$,t(1,l)})}const k=$=>{var T;t(4,a=$.detail||[]),t(0,s=i?a.map(C=>C.id):((T=a[0])==null?void 0:T.id)||"")};return n.$$set=$=>{"value"in $&&t(0,s=$.value),"picker"in $&&t(1,l=$.picker),"field"in $&&t(2,o=$.field)},n.$$.update=()=>{var $;n.$$.dirty&4&&t(6,i=(($=o.options)==null?void 0:$.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed()),n.$$.dirty&17&&f()&&d()},[s,l,o,r,a,u,i,p,m,_,g,b,k]}class t5 extends ve{constructor(e){super(),be(this,e,e5,x6,_e,{value:0,picker:1,field:2})}}const n5=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],i5=(n,e)=>{n5.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function s5(n){let e;return{c(){e=y("textarea"),h(e,"id",n[0]),Rr(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function l5(n){let e;return{c(){e=y("div"),h(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function o5(n){let e;function t(l,o){return l[1]?l5:s5}let i=t(n),s=i(n);return{c(){e=y("div"),s.c(),h(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},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))),o&4&&h(e,"class",l[2])},i:Q,o:Q,d(l){l&&w(e),s.d(),n[19](null)}}}const pb=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),r5=()=>{let n={listeners:[],scriptId:pb("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let a5=r5();function u5(n,e,t){var i;let{id:s=pb("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:d="change input undo redo"}=e,{value:p=""}=e,{text:m=""}=e,{cssClass:_="tinymce-wrapper"}=e,g,b,k,$=p,T=o;const C=Tt(),D=()=>{const q=(()=>typeof window<"u"?window:global)();return q&&q.tinymce?q.tinymce:null},M=()=>{const F=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:q=>{t(14,k=q),q.on("init",()=>{q.setContent(p),q.on(d,()=>{t(15,$=q.getContent()),$!==p&&(t(5,p=$),t(6,m=q.getContent({format:"text"})))})}),i5(q,C),typeof f.setup=="function"&&f.setup(q)}});t(4,b.style.visibility="",b),D().init(F)};xt(()=>{if(D()!==null)M();else{const F=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;a5.load(g.ownerDocument,F,()=>{M()})}}),J_(()=>{var F;k&&((F=D())===null||F===void 0||F.remove(k))});function O(F){se[F?"unshift":"push"](()=>{b=F,t(4,b)})}function I(F){se[F?"unshift":"push"](()=>{b=F,t(4,b)})}function L(F){se[F?"unshift":"push"](()=>{g=F,t(3,g)})}return n.$$set=F=>{"id"in F&&t(0,s=F.id),"inline"in F&&t(1,l=F.inline),"disabled"in F&&t(7,o=F.disabled),"apiKey"in F&&t(8,r=F.apiKey),"channel"in F&&t(9,a=F.channel),"scriptSrc"in F&&t(10,u=F.scriptSrc),"conf"in F&&t(11,f=F.conf),"modelEvents"in F&&t(12,d=F.modelEvents),"value"in F&&t(5,p=F.value),"text"in F&&t(6,m=F.text),"cssClass"in F&&t(2,_=F.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(k&&$!==p&&(k.setContent(p),t(6,m=k.getContent({format:"text"}))),k&&o!==T&&(t(16,T=o),typeof(t(13,i=k.mode)===null||i===void 0?void 0:i.set)=="function"?k.mode.set(o?"readonly":"design"):k.setMode(o?"readonly":"design")))},[s,l,_,g,b,p,m,o,r,a,u,f,d,i,k,$,T,O,I,L]}class cu extends ve{constructor(e){super(),be(this,e,u5,o5,_e,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function f5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()};return n[0]!==void 0&&(_.value=n[0]),f=new cu({props:_}),se.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),z(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&oe(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),!d&&b&1&&(d=!0,k.value=g[0],ke(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),B(f,g)}}}function c5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[f5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function d5(n,e,t){let{field:i=new wn}=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 p5 extends ve{constructor(e){super(),be(this,e,d5,c5,_e,{field:1,value:0})}}function m5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Auth URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].authUrl),r||(a=J(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].authUrl&&fe(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function h5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Token URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].tokenUrl),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&fe(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("User API URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].userApiUrl),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&fe(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function g5(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[m5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[h5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[_5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Selfhosted endpoints (optional)",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),o=E(),U(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),B(i,u),u&&w(s),B(l,u),u&&w(o),B(r,u)}}}function b5(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 cm extends ve{constructor(e){super(),be(this,e,b5,g5,_e,{key:1,config:0})}}function v5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&fe(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function y5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&fe(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function k5(n){let e,t,i,s,l,o;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[v5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[y5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Azure AD endpoints",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),h(e,"class","section-title")},m(r,a){S(r,e,a),S(r,t,a),z(i,r,a),S(r,s,a),z(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function w5(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 S5 extends ve{constructor(e){super(),be(this,e,w5,k5,_e,{key:1,config:0})}}function $5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/authorize/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&fe(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function C5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/token/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&fe(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function T5(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("User API URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/userinfo/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0].userApiUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[4]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].userApiUrl&&fe(l,p[0].userApiUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function M5(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[$5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[C5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[T5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Endpoints",t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment),o=E(),U(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),z(i,u,f),S(u,s,f),z(l,u,f),S(u,o,f),z(r,u,f),a=!0},p(u,[f]){const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(u[0].enabled?"required":"")),f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&1&&(m.class="form-field "+(u[0].enabled?"required":"")),f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),B(i,u),u&&w(s),B(l,u),u&&w(o),B(r,u)}}}function O5(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 Lr extends ve{constructor(e){super(),be(this,e,O5,M5,_e,{key:1,config:0})}}function D5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function E5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Team ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[3]),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&8&&l.value!==u[3]&&fe(l,u[3])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function A5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Key ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[4]),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&16&&l.value!==u[4]&&fe(l,u[4])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function I5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("span"),t.textContent="Duration (in seconds)",i=E(),s=y("i"),o=E(),r=y("input"),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[23]),h(r,"type","text"),h(r,"id",a=n[23]),h(r,"max",po),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[6]),u||(f=[De(We.call(null,s,{text:`Max ${po} seconds (~${po/(60*60*24*30)<<0} months).`,position:"top"})),J(r,"input",n[15])],u=!0)},p(d,p){p&8388608&&l!==(l=d[23])&&h(e,"for",l),p&8388608&&a!==(a=d[23])&&h(r,"id",a),p&64&&r.value!==d[6]&&fe(r,d[6])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,Ee(f)}}}function P5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Private key"),s=E(),l=y("textarea"),r=E(),a=y("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",h(e,"for",i=n[23]),h(l,"id",o=n[23]),l.required=!0,h(l,"rows","8"),h(l,"placeholder",`-----BEGIN PRIVATE KEY----- ... ------END PRIVATE KEY-----`),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[5]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[16]),u=!0)},p(d,p){p&8388608&&i!==(i=d[23])&&h(e,"for",i),p&8388608&&o!==(o=d[23])&&h(l,"id",o),p&32&&fe(l,d[5])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function L6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return s=new de({props:{class:"form-field required",name:"clientId",$$slots:{default:[D6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"teamId",$$slots:{default:[E6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"keyId",$$slots:{default:[A6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new de({props:{class:"form-field required",name:"duration",$$slots:{default:[I6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"privateKey",$$slots:{default:[P6,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),a=E(),u=y("div"),U(f.$$.fragment),d=E(),p=y("div"),U(m.$$.fragment),_=E(),U(g.$$.fragment),h(i,"class","col-lg-6"),h(o,"class","col-lg-6"),h(u,"class","col-lg-6"),h(p,"class","col-lg-6"),h(t,"class","grid"),h(e,"id",n[9]),h(e,"autocomplete","off")},m(T,C){S(T,e,C),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),v(t,a),v(t,u),z(f,u,null),v(t,d),v(t,p),z(m,p,null),v(t,_),z(g,t,null),b=!0,k||($=J(e,"submit",at(n[17])),k=!0)},p(T,C){const O={};C&25165828&&(O.$$scope={dirty:C,ctx:T}),s.$set(O);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:T}),r.$set(M);const D={};C&25165840&&(D.$$scope={dirty:C,ctx:T}),f.$set(D);const I={};C&25165888&&(I.$$scope={dirty:C,ctx:T}),m.$set(I);const L={};C&25165856&&(L.$$scope={dirty:C,ctx:T}),g.$set(L)},i(T){b||(A(s.$$.fragment,T),A(r.$$.fragment,T),A(f.$$.fragment,T),A(m.$$.fragment,T),A(g.$$.fragment,T),b=!0)},o(T){P(s.$$.fragment,T),P(r.$$.fragment,T),P(f.$$.fragment,T),P(m.$$.fragment,T),P(g.$$.fragment,T),b=!1},d(T){T&&w(e),B(s),B(r),B(f),B(m),B(g),k=!1,$()}}}function N6(n){let e;return{c(){e=y("h4"),e.textContent="Generate Apple client secret",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function F6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Generate and set secret",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[7],h(l,"class","ri-key-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[9]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],x(s,"btn-loading",n[7])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&128&&(e.disabled=d[7]),p&384&&a!==(a=!d[8]||d[7])&&(s.disabled=a),p&128&&x(s,"btn-loading",d[7])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function R6(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[F6],header:[N6],default:[L6]},$$scope:{ctx:n}};return e=new hn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[19](null),B(e,s)}}}const po=15777e3;function q6(n,e,t){let i;const s=Tt(),l="apple_secret_"+H.randomString(5);let o,r,a,u,f,d,p=!1;function m(F={}){t(2,r=F.clientId||""),t(3,a=F.teamId||""),t(4,u=F.keyId||""),t(5,f=F.privateKey||""),t(6,d=F.duration||po),mn({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function g(){t(7,p=!0);try{const F=await pe.settings.generateAppleClientSecret(r,a,u,f.trim(),d);t(7,p=!1),Xt("Successfully generated client secret."),s("submit",F),o==null||o.hide()}catch(F){pe.errorResponseHandler(F)}t(7,p=!1)}function b(){r=this.value,t(2,r)}function k(){a=this.value,t(3,a)}function $(){u=this.value,t(4,u)}function T(){d=this.value,t(6,d)}function C(){f=this.value,t(5,f)}const O=()=>g(),M=()=>!p;function D(F){se[F?"unshift":"push"](()=>{o=F,t(1,o)})}function I(F){me.call(this,n,F)}function L(F){me.call(this,n,F)}return t(8,i=!0),[_,o,r,a,u,f,d,p,i,l,g,m,b,k,$,T,C,O,M,D,I,L]}class j6 extends be{constructor(e){super(),ge(this,e,q6,R6,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function V6(n){let e,t,i,s,l,o,r,a,u,f,d={};return r=new j6({props:d}),n[4](r),r.$on("submit",n[5]),{c(){e=y("button"),t=y("i"),i=E(),s=y("span"),s.textContent="Generate secret",o=E(),U(r.$$.fragment),h(t,"class","ri-key-line"),h(s,"class","txt"),h(e,"type","button"),h(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),S(p,o,m),z(r,p,m),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(p,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+p[1]))&&h(e,"class",l);const _={};r.$set(_)},i(p){a||(A(r.$$.fragment,p),a=!0)},o(p){P(r.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(o),n[4](null),B(r,p),u=!1,f()}}}function H6(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class z6 extends be{constructor(e){super(),ge(this,e,H6,V6,_e,{key:1,config:0})}}const mo=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:z6},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:S6},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:fm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:fm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Nr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Nr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Nr}];function cm(n,e,t){const i=n.slice();return i[9]=e[t],i}function B6(n){let e;return{c(){e=y("h6"),e.textContent="No linked OAuth2 providers.",h(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function U6(n){let e,t=n[1],i=[];for(let s=0;s',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function dm(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,d,p=n[9].providerId+"",m,_,g,b,k,$;function T(){return n[6](n[9])}return{c(){var C;e=y("div"),t=y("figure"),i=y("img"),l=E(),o=y("span"),a=W(r),u=E(),f=y("div"),d=W("ID: "),m=W(p),_=E(),g=y("button"),g.innerHTML='',b=E(),dn(i.src,s="./images/oauth2/"+((C=n[3](n[9].provider))==null?void 0:C.logo))||h(i,"src",s),h(i,"alt","Provider logo"),h(t,"class","provider-logo"),h(o,"class","txt"),h(f,"class","txt-hint"),h(g,"type","button"),h(g,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),h(e,"class","list-item")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(e,l),v(e,o),v(o,a),v(e,u),v(e,f),v(f,d),v(f,m),v(e,_),v(e,g),v(e,b),k||($=J(g,"click",T),k=!0)},p(C,O){var M;n=C,O&2&&!dn(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&h(i,"src",s),O&2&&r!==(r=n[4](n[9].provider)+"")&&oe(a,r),O&2&&p!==(p=n[9].providerId+"")&&oe(m,p)},d(C){C&&w(e),k=!1,$()}}}function Y6(n){let e;function t(l,o){var r;return l[2]?W6:(r=l[0])!=null&&r.id&&l[1].length?U6:B6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function K6(n,e,t){const i=Tt();let{record:s}=e,l=[],o=!1;function r(p){return mo.find(m=>m.key==p+"Auth")||{}}function a(p){var m;return((m=r(p))==null?void 0:m.title)||H.sentenize(p,!1)}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 pe.collection(s.collectionId).listExternalAuths(s.id))}catch(p){pe.errorResponseHandler(p)}t(2,o=!1)}function f(p){!(s!=null&&s.id)||!p||vn(`Do you really want to unlink the ${a(p)} provider?`,()=>pe.collection(s.collectionId).unlinkExternalAuth(s.id,p).then(()=>{Xt(`Successfully unlinked the ${a(p)} provider.`),i("unlink",p),u()}).catch(m=>{pe.errorResponseHandler(m)}))}u();const d=p=>f(p.provider);return n.$$set=p=>{"record"in p&&t(0,s=p.record)},[s,l,o,r,a,f,d]}class J6 extends be{constructor(e){super(),ge(this,e,K6,Y6,_e,{record:0})}}function pm(n,e,t){const i=n.slice();return i[66]=e[t],i[67]=e,i[68]=t,i}function mm(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=W(`The record has previous unsaved changes. - `),r=y("button"),r.textContent="Restore draft",a=E(),u=y("button"),u.innerHTML='',f=E(),d=y("div"),h(i,"class","icon"),h(r,"type","button"),h(r,"class","btn btn-sm btn-secondary"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(u,"aria-label","Discard draft"),h(t,"class","alert alert-info m-0"),h(d,"class","clearfix p-b-base"),h(e,"class","block")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(t,a),v(t,u),v(e,f),v(e,d),m=!0,_||(g=[J(r,"click",n[36]),De(We.call(null,u,"Discard draft")),J(u,"click",at(n[37]))],_=!0)},p:Q,i(b){m||(p&&p.end(1),m=!0)},o(b){p=G_(e,Ct,{duration:150}),m=!1},d(b){b&&w(e),b&&p&&p.end(),_=!1,Ee(g)}}}function hm(n){let e,t,i,s,l;return{c(){e=y("div"),t=y("i"),h(t,"class","ri-calendar-event-line txt-disabled"),h(e,"class","form-field-addon")},m(o,r){S(o,e,r),v(e,t),s||(l=De(i=We.call(null,t,{text:`Created: ${n[3].created} +-----END PRIVATE KEY-----`),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[5]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[16]),u=!0)},p(d,p){p&8388608&&i!==(i=d[23])&&h(e,"for",i),p&8388608&&o!==(o=d[23])&&h(l,"id",o),p&32&&fe(l,d[5])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function L5(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return s=new de({props:{class:"form-field required",name:"clientId",$$slots:{default:[D5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"teamId",$$slots:{default:[E5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"keyId",$$slots:{default:[A5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new de({props:{class:"form-field required",name:"duration",$$slots:{default:[I5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"privateKey",$$slots:{default:[P5,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),a=E(),u=y("div"),U(f.$$.fragment),d=E(),p=y("div"),U(m.$$.fragment),_=E(),U(g.$$.fragment),h(i,"class","col-lg-6"),h(o,"class","col-lg-6"),h(u,"class","col-lg-6"),h(p,"class","col-lg-6"),h(t,"class","grid"),h(e,"id",n[9]),h(e,"autocomplete","off")},m(T,C){S(T,e,C),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),v(t,a),v(t,u),z(f,u,null),v(t,d),v(t,p),z(m,p,null),v(t,_),z(g,t,null),b=!0,k||($=J(e,"submit",at(n[17])),k=!0)},p(T,C){const D={};C&25165828&&(D.$$scope={dirty:C,ctx:T}),s.$set(D);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:T}),r.$set(M);const O={};C&25165840&&(O.$$scope={dirty:C,ctx:T}),f.$set(O);const I={};C&25165888&&(I.$$scope={dirty:C,ctx:T}),m.$set(I);const L={};C&25165856&&(L.$$scope={dirty:C,ctx:T}),g.$set(L)},i(T){b||(A(s.$$.fragment,T),A(r.$$.fragment,T),A(f.$$.fragment,T),A(m.$$.fragment,T),A(g.$$.fragment,T),b=!0)},o(T){P(s.$$.fragment,T),P(r.$$.fragment,T),P(f.$$.fragment,T),P(m.$$.fragment,T),P(g.$$.fragment,T),b=!1},d(T){T&&w(e),B(s),B(r),B(f),B(m),B(g),k=!1,$()}}}function N5(n){let e;return{c(){e=y("h4"),e.textContent="Generate Apple client secret",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function F5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Generate and set secret",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[7],h(l,"class","ri-key-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[9]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],x(s,"btn-loading",n[7])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&128&&(e.disabled=d[7]),p&384&&a!==(a=!d[8]||d[7])&&(s.disabled=a),p&128&&x(s,"btn-loading",d[7])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function R5(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[F5],header:[N5],default:[L5]},$$scope:{ctx:n}};return e=new hn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[19](null),B(e,s)}}}const po=15777e3;function q5(n,e,t){let i;const s=Tt(),l="apple_secret_"+H.randomString(5);let o,r,a,u,f,d,p=!1;function m(F={}){t(2,r=F.clientId||""),t(3,a=F.teamId||""),t(4,u=F.keyId||""),t(5,f=F.privateKey||""),t(6,d=F.duration||po),un({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function g(){t(7,p=!0);try{const F=await pe.settings.generateAppleClientSecret(r,a,u,f.trim(),d);t(7,p=!1),Qt("Successfully generated client secret."),s("submit",F),o==null||o.hide()}catch(F){pe.errorResponseHandler(F)}t(7,p=!1)}function b(){r=this.value,t(2,r)}function k(){a=this.value,t(3,a)}function $(){u=this.value,t(4,u)}function T(){d=this.value,t(6,d)}function C(){f=this.value,t(5,f)}const D=()=>g(),M=()=>!p;function O(F){se[F?"unshift":"push"](()=>{o=F,t(1,o)})}function I(F){me.call(this,n,F)}function L(F){me.call(this,n,F)}return t(8,i=!0),[_,o,r,a,u,f,d,p,i,l,g,m,b,k,$,T,C,D,M,O,I,L]}class j5 extends ve{constructor(e){super(),be(this,e,q5,R5,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function V5(n){let e,t,i,s,l,o,r,a,u,f,d={};return r=new j5({props:d}),n[4](r),r.$on("submit",n[5]),{c(){e=y("button"),t=y("i"),i=E(),s=y("span"),s.textContent="Generate secret",o=E(),U(r.$$.fragment),h(t,"class","ri-key-line"),h(s,"class","txt"),h(e,"type","button"),h(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),S(p,o,m),z(r,p,m),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(p,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+p[1]))&&h(e,"class",l);const _={};r.$set(_)},i(p){a||(A(r.$$.fragment,p),a=!0)},o(p){P(r.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(o),n[4](null),B(r,p),u=!1,f()}}}function H5(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class z5 extends ve{constructor(e){super(),be(this,e,H5,V5,_e,{key:1,config:0})}}const mo=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:z5},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:S5},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:cm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:cm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Lr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Lr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Lr}];function dm(n,e,t){const i=n.slice();return i[9]=e[t],i}function B5(n){let e;return{c(){e=y("h6"),e.textContent="No linked OAuth2 providers.",h(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function U5(n){let e,t=n[1],i=[];for(let s=0;s',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function pm(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,d,p=n[9].providerId+"",m,_,g,b,k,$;function T(){return n[6](n[9])}return{c(){var C;e=y("div"),t=y("figure"),i=y("img"),l=E(),o=y("span"),a=W(r),u=E(),f=y("div"),d=W("ID: "),m=W(p),_=E(),g=y("button"),g.innerHTML='',b=E(),mn(i.src,s="./images/oauth2/"+((C=n[3](n[9].provider))==null?void 0:C.logo))||h(i,"src",s),h(i,"alt","Provider logo"),h(t,"class","provider-logo"),h(o,"class","txt"),h(f,"class","txt-hint"),h(g,"type","button"),h(g,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),h(e,"class","list-item")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(e,l),v(e,o),v(o,a),v(e,u),v(e,f),v(f,d),v(f,m),v(e,_),v(e,g),v(e,b),k||($=J(g,"click",T),k=!0)},p(C,D){var M;n=C,D&2&&!mn(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&h(i,"src",s),D&2&&r!==(r=n[4](n[9].provider)+"")&&oe(a,r),D&2&&p!==(p=n[9].providerId+"")&&oe(m,p)},d(C){C&&w(e),k=!1,$()}}}function Y5(n){let e;function t(l,o){var r;return l[2]?W5:(r=l[0])!=null&&r.id&&l[1].length?U5:B5}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function K5(n,e,t){const i=Tt();let{record:s}=e,l=[],o=!1;function r(p){return mo.find(m=>m.key==p+"Auth")||{}}function a(p){var m;return((m=r(p))==null?void 0:m.title)||H.sentenize(p,!1)}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 pe.collection(s.collectionId).listExternalAuths(s.id))}catch(p){pe.errorResponseHandler(p)}t(2,o=!1)}function f(p){!(s!=null&&s.id)||!p||vn(`Do you really want to unlink the ${a(p)} provider?`,()=>pe.collection(s.collectionId).unlinkExternalAuth(s.id,p).then(()=>{Qt(`Successfully unlinked the ${a(p)} provider.`),i("unlink",p),u()}).catch(m=>{pe.errorResponseHandler(m)}))}u();const d=p=>f(p.provider);return n.$$set=p=>{"record"in p&&t(0,s=p.record)},[s,l,o,r,a,f,d]}class J5 extends ve{constructor(e){super(),be(this,e,K5,Y5,_e,{record:0})}}function mm(n,e,t){const i=n.slice();return i[66]=e[t],i[67]=e,i[68]=t,i}function hm(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=W(`The record has previous unsaved changes. + `),r=y("button"),r.textContent="Restore draft",a=E(),u=y("button"),u.innerHTML='',f=E(),d=y("div"),h(i,"class","icon"),h(r,"type","button"),h(r,"class","btn btn-sm btn-secondary"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(u,"aria-label","Discard draft"),h(t,"class","alert alert-info m-0"),h(d,"class","clearfix p-b-base"),h(e,"class","block")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(t,a),v(t,u),v(e,f),v(e,d),m=!0,_||(g=[J(r,"click",n[36]),De(We.call(null,u,"Discard draft")),J(u,"click",at(n[37]))],_=!0)},p:Q,i(b){m||(p&&p.end(1),m=!0)},o(b){p=ka(e,yt,{duration:150}),m=!1},d(b){b&&w(e),b&&p&&p.end(),_=!1,Ee(g)}}}function _m(n){let e,t,i,s,l;return{c(){e=y("div"),t=y("i"),h(t,"class","ri-calendar-event-line txt-disabled"),h(e,"class","form-field-addon")},m(o,r){S(o,e,r),v(e,t),s||(l=De(i=We.call(null,t,{text:`Created: ${n[3].created} Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&Vt(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created} -Updated: ${o[3].updated}`,position:"left"})},d(o){o&&w(e),s=!1,l()}}}function Z6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g=!n[6]&&hm(n);return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",l=E(),o=y("span"),a=E(),g&&g.c(),u=E(),f=y("input"),h(t,"class",wi(H.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),h(s,"class","txt"),h(o,"class","flex-fill"),h(e,"for",r=n[69]),h(f,"type","text"),h(f,"id",d=n[69]),h(f,"placeholder","Leave empty to auto generate..."),h(f,"minlength","15"),f.readOnly=p=!n[6]},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),S(b,a,k),g&&g.m(b,k),S(b,u,k),S(b,f,k),fe(f,n[3].id),m||(_=J(f,"input",n[38]),m=!0)},p(b,k){k[2]&128&&r!==(r=b[69])&&h(e,"for",r),b[6]?g&&(g.d(1),g=null):g?g.p(b,k):(g=hm(b),g.c(),g.m(u.parentNode,u)),k[2]&128&&d!==(d=b[69])&&h(f,"id",d),k[0]&64&&p!==(p=!b[6])&&(f.readOnly=p),k[0]&8&&f.value!==b[3].id&&fe(f,b[3].id)},d(b){b&&w(e),b&&w(a),g&&g.d(b),b&&w(u),b&&w(f),m=!1,_()}}}function _m(n){var u,f;let e,t,i,s,l;function o(d){n[39](d)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new $M({props:r}),se.push(()=>he(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&gm();return{c(){U(e.$$.fragment),i=E(),a&&a.c(),s=$e()},m(d,p){z(e,d,p),S(d,i,p),a&&a.m(d,p),S(d,s,p),l=!0},p(d,p){var _,g;const m={};p[0]&64&&(m.isNew=d[6]),p[0]&1&&(m.collection=d[0]),!t&&p[0]&8&&(t=!0,m.record=d[3],ke(()=>t=!1)),e.$set(m),(g=(_=d[0])==null?void 0:_.schema)!=null&&g.length?a||(a=gm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(d){l||(A(e.$$.fragment,d),l=!0)},o(d){P(e.$$.fragment,d),l=!1},d(d){B(e,d),d&&w(i),a&&a.d(d),d&&w(s)}}}function gm(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function G6(n){let e,t,i;function s(o){n[52](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new t6({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function X6(n){let e,t,i,s,l;function o(f){n[49](f,n[66])}function r(f){n[50](f,n[66])}function a(f){n[51](f,n[66])}let u={field:n[66],record:n[3]};return n[3][n[66].name]!==void 0&&(u.value=n[3][n[66].name]),n[4][n[66].name]!==void 0&&(u.uploadedFiles=n[4][n[66].name]),n[5][n[66].name]!==void 0&&(u.deletedFileIndexes=n[5][n[66].name]),e=new A5({props:u}),se.push(()=>he(e,"value",o)),se.push(()=>he(e,"uploadedFiles",r)),se.push(()=>he(e,"deletedFileIndexes",a)),{c(){U(e.$$.fragment)},m(f,d){z(e,f,d),l=!0},p(f,d){n=f;const p={};d[0]&1&&(p.field=n[66]),d[0]&8&&(p.record=n[3]),!t&&d[0]&9&&(t=!0,p.value=n[3][n[66].name],ke(()=>t=!1)),!i&&d[0]&17&&(i=!0,p.uploadedFiles=n[4][n[66].name],ke(()=>i=!1)),!s&&d[0]&33&&(s=!0,p.deletedFileIndexes=n[5][n[66].name],ke(()=>s=!1)),e.$set(p)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){B(e,f)}}}function Q6(n){let e,t,i;function s(o){n[48](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new l5({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function x6(n){let e,t,i;function s(o){n[47](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new t5({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function eO(n){let e,t,i;function s(o){n[46](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new XM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function tO(n){let e,t,i;function s(o){n[45](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new p6({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function nO(n){let e,t,i;function s(o){n[44](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new KM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function iO(n){let e,t,i;function s(o){n[43](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new BM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function sO(n){let e,t,i;function s(o){n[42](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new jM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function lO(n){let e,t,i;function s(o){n[41](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new NM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function oO(n){let e,t,i;function s(o){n[40](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new AM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function bm(n,e){let t,i,s,l,o;const r=[oO,lO,sO,iO,nO,tO,eO,x6,Q6,X6,G6],a=[];function u(f,d){return f[66].type==="text"?0:f[66].type==="number"?1:f[66].type==="bool"?2:f[66].type==="email"?3:f[66].type==="url"?4:f[66].type==="editor"?5:f[66].type==="date"?6:f[66].type==="select"?7:f[66].type==="json"?8:f[66].type==="file"?9:f[66].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=$e(),s&&s.c(),l=$e(),this.first=t},m(f,d){S(f,t,d),~i&&a[i].m(f,d),S(f,l,d),o=!0},p(f,d){e=f;let p=i;i=u(e),i===p?~i&&a[i].p(e,d):(s&&(ae(),P(a[p],1,1,()=>{a[p]=null}),ue()),~i?(s=a[i],s?s.p(e,d):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function vm(n){let e,t,i;return t=new J6({props:{record:n[3]}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[12]===Sl)},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&x(e,"active",s[12]===Sl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function rO(n){var $,T;let e,t,i,s,l,o,r=[],a=new Map,u,f,d,p,m=!n[7]&&n[9]&&mm(n);s=new de({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[Z6,({uniqueId:C})=>({69:C}),({uniqueId:C})=>[0,0,C?128:0]]},$$scope:{ctx:n}}});let _=(($=n[0])==null?void 0:$.isAuth)&&_m(n),g=((T=n[0])==null?void 0:T.schema)||[];const b=C=>C[66].name;for(let C=0;C{m=null}),ue());const M={};O[0]&64&&(M.class="form-field "+(C[6]?"":"readonly")),O[0]&72|O[2]&384&&(M.$$scope={dirty:O,ctx:C}),s.$set(M),(D=C[0])!=null&&D.isAuth?_?(_.p(C,O),O[0]&1&&A(_,1)):(_=_m(C),_.c(),A(_,1),_.m(t,o)):_&&(ae(),P(_,1,1,()=>{_=null}),ue()),O[0]&57&&(g=((I=C[0])==null?void 0:I.schema)||[],ae(),r=$t(r,O,b,1,C,g,a,t,Qt,bm,null,pm),ue()),(!f||O[0]&4096)&&x(t,"active",C[12]===os),C[0].$isAuth&&!C[6]?k?(k.p(C,O),O[0]&65&&A(k,1)):(k=vm(C),k.c(),A(k,1),k.m(e,null)):k&&(ae(),P(k,1,1,()=>{k=null}),ue())},i(C){if(!f){A(m),A(s.$$.fragment,C),A(_);for(let O=0;O - Send verification email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[30]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function wm(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Send password reset email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function aO(n){let e,t,i,s,l,o,r,a=n[0].$isAuth&&!n[2].verified&&n[2].email&&km(n),u=n[0].$isAuth&&n[2].email&&wm(n);return{c(){a&&a.c(),e=E(),u&&u.c(),t=E(),i=y("button"),i.innerHTML=` +Updated: ${o[3].updated}`,position:"left"})},d(o){o&&w(e),s=!1,l()}}}function Z5(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g=!n[6]&&_m(n);return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",l=E(),o=y("span"),a=E(),g&&g.c(),u=E(),f=y("input"),h(t,"class",wi(H.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),h(s,"class","txt"),h(o,"class","flex-fill"),h(e,"for",r=n[69]),h(f,"type","text"),h(f,"id",d=n[69]),h(f,"placeholder","Leave empty to auto generate..."),h(f,"minlength","15"),f.readOnly=p=!n[6]},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),S(b,a,k),g&&g.m(b,k),S(b,u,k),S(b,f,k),fe(f,n[3].id),m||(_=J(f,"input",n[38]),m=!0)},p(b,k){k[2]&128&&r!==(r=b[69])&&h(e,"for",r),b[6]?g&&(g.d(1),g=null):g?g.p(b,k):(g=_m(b),g.c(),g.m(u.parentNode,u)),k[2]&128&&d!==(d=b[69])&&h(f,"id",d),k[0]&64&&p!==(p=!b[6])&&(f.readOnly=p),k[0]&8&&f.value!==b[3].id&&fe(f,b[3].id)},d(b){b&&w(e),b&&w(a),g&&g.d(b),b&&w(u),b&&w(f),m=!1,_()}}}function gm(n){var u,f;let e,t,i,s,l;function o(d){n[39](d)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new $M({props:r}),se.push(()=>he(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&bm();return{c(){U(e.$$.fragment),i=E(),a&&a.c(),s=$e()},m(d,p){z(e,d,p),S(d,i,p),a&&a.m(d,p),S(d,s,p),l=!0},p(d,p){var _,g;const m={};p[0]&64&&(m.isNew=d[6]),p[0]&1&&(m.collection=d[0]),!t&&p[0]&8&&(t=!0,m.record=d[3],ke(()=>t=!1)),e.$set(m),(g=(_=d[0])==null?void 0:_.schema)!=null&&g.length?a||(a=bm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(d){l||(A(e.$$.fragment,d),l=!0)},o(d){P(e.$$.fragment,d),l=!1},d(d){B(e,d),d&&w(i),a&&a.d(d),d&&w(s)}}}function bm(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function G5(n){let e,t,i;function s(o){n[52](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new t5({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function X5(n){let e,t,i,s,l;function o(f){n[49](f,n[66])}function r(f){n[50](f,n[66])}function a(f){n[51](f,n[66])}let u={field:n[66],record:n[3]};return n[3][n[66].name]!==void 0&&(u.value=n[3][n[66].name]),n[4][n[66].name]!==void 0&&(u.uploadedFiles=n[4][n[66].name]),n[5][n[66].name]!==void 0&&(u.deletedFileIndexes=n[5][n[66].name]),e=new A6({props:u}),se.push(()=>he(e,"value",o)),se.push(()=>he(e,"uploadedFiles",r)),se.push(()=>he(e,"deletedFileIndexes",a)),{c(){U(e.$$.fragment)},m(f,d){z(e,f,d),l=!0},p(f,d){n=f;const p={};d[0]&1&&(p.field=n[66]),d[0]&8&&(p.record=n[3]),!t&&d[0]&9&&(t=!0,p.value=n[3][n[66].name],ke(()=>t=!1)),!i&&d[0]&17&&(i=!0,p.uploadedFiles=n[4][n[66].name],ke(()=>i=!1)),!s&&d[0]&33&&(s=!0,p.deletedFileIndexes=n[5][n[66].name],ke(()=>s=!1)),e.$set(p)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){B(e,f)}}}function Q5(n){let e,t,i;function s(o){n[48](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new l6({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function x5(n){let e,t,i;function s(o){n[47](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new t6({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function eO(n){let e,t,i;function s(o){n[46](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new XM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function tO(n){let e,t,i;function s(o){n[45](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new p5({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function nO(n){let e,t,i;function s(o){n[44](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new KM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function iO(n){let e,t,i;function s(o){n[43](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new BM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function sO(n){let e,t,i;function s(o){n[42](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new jM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function lO(n){let e,t,i;function s(o){n[41](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new NM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function oO(n){let e,t,i;function s(o){n[40](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new AM({props:l}),se.push(()=>he(e,"value",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function vm(n,e){let t,i,s,l,o;const r=[oO,lO,sO,iO,nO,tO,eO,x5,Q5,X5,G5],a=[];function u(f,d){return f[66].type==="text"?0:f[66].type==="number"?1:f[66].type==="bool"?2:f[66].type==="email"?3:f[66].type==="url"?4:f[66].type==="editor"?5:f[66].type==="date"?6:f[66].type==="select"?7:f[66].type==="json"?8:f[66].type==="file"?9:f[66].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=$e(),s&&s.c(),l=$e(),this.first=t},m(f,d){S(f,t,d),~i&&a[i].m(f,d),S(f,l,d),o=!0},p(f,d){e=f;let p=i;i=u(e),i===p?~i&&a[i].p(e,d):(s&&(ae(),P(a[p],1,1,()=>{a[p]=null}),ue()),~i?(s=a[i],s?s.p(e,d):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function ym(n){let e,t,i;return t=new J5({props:{record:n[3]}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[12]===Sl)},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&x(e,"active",s[12]===Sl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function rO(n){var $,T;let e,t,i,s,l,o,r=[],a=new Map,u,f,d,p,m=!n[7]&&n[9]&&hm(n);s=new de({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[Z5,({uniqueId:C})=>({69:C}),({uniqueId:C})=>[0,0,C?128:0]]},$$scope:{ctx:n}}});let _=(($=n[0])==null?void 0:$.isAuth)&&gm(n),g=((T=n[0])==null?void 0:T.schema)||[];const b=C=>C[66].name;for(let C=0;C{m=null}),ue());const M={};D[0]&64&&(M.class="form-field "+(C[6]?"":"readonly")),D[0]&72|D[2]&384&&(M.$$scope={dirty:D,ctx:C}),s.$set(M),(O=C[0])!=null&&O.isAuth?_?(_.p(C,D),D[0]&1&&A(_,1)):(_=gm(C),_.c(),A(_,1),_.m(t,o)):_&&(ae(),P(_,1,1,()=>{_=null}),ue()),D[0]&57&&(g=((I=C[0])==null?void 0:I.schema)||[],ae(),r=vt(r,D,b,1,C,g,a,t,Kt,vm,null,mm),ue()),(!f||D[0]&4096)&&x(t,"active",C[12]===os),C[0].$isAuth&&!C[6]?k?(k.p(C,D),D[0]&65&&A(k,1)):(k=ym(C),k.c(),A(k,1),k.m(e,null)):k&&(ae(),P(k,1,1,()=>{k=null}),ue())},i(C){if(!f){A(m),A(s.$$.fragment,C),A(_);for(let D=0;D + Send verification email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[30]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Sm(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Send password reset email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function aO(n){let e,t,i,s,l,o,r,a=n[0].$isAuth&&!n[2].verified&&n[2].email&&wm(n),u=n[0].$isAuth&&n[2].email&&Sm(n);return{c(){a&&a.c(),e=E(),u&&u.c(),t=E(),i=y("button"),i.innerHTML=` Duplicate`,s=E(),l=y("button"),l.innerHTML=` - Delete`,h(i,"type","button"),h(i,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item txt-danger closable")},m(f,d){a&&a.m(f,d),S(f,e,d),u&&u.m(f,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),o||(r=[J(i,"click",n[32]),J(l,"click",An(at(n[33])))],o=!0)},p(f,d){f[0].$isAuth&&!f[2].verified&&f[2].email?a?a.p(f,d):(a=km(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].$isAuth&&f[2].email?u?u.p(f,d):(u=wm(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Ee(r)}}}function Sm(n){let e,t,i,s,l,o;return{c(){e=y("div"),t=y("button"),t.textContent="Account",i=E(),s=y("button"),s.textContent="Authorized providers",h(t,"type","button"),h(t,"class","tab-item"),x(t,"active",n[12]===os),h(s,"type","button"),h(s,"class","tab-item"),x(s,"active",n[12]===Sl),h(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),l||(o=[J(t,"click",n[34]),J(s,"click",n[35])],l=!0)},p(r,a){a[0]&4096&&x(t,"active",r[12]===os),a[0]&4096&&x(s,"active",r[12]===Sl)},d(r){r&&w(e),l=!1,Ee(o)}}}function uO(n){var g;let e,t=n[6]?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,d,p,m=!n[6]&&ym(n),_=n[0].$isAuth&&!n[6]&&Sm(n);return{c(){e=y("h4"),i=W(t),s=E(),l=y("strong"),r=W(o),a=W(" record"),u=E(),m&&m.c(),f=E(),_&&_.c(),d=$e(),h(e,"class","panel-title svelte-qc5ngu")},m(b,k){S(b,e,k),v(e,i),v(e,s),v(e,l),v(l,r),v(e,a),S(b,u,k),m&&m.m(b,k),S(b,f,k),_&&_.m(b,k),S(b,d,k),p=!0},p(b,k){var $;(!p||k[0]&64)&&t!==(t=b[6]?"New":"Edit")&&oe(i,t),(!p||k[0]&1)&&o!==(o=(($=b[0])==null?void 0:$.name)+"")&&oe(r,o),b[6]?m&&(ae(),P(m,1,1,()=>{m=null}),ue()):m?(m.p(b,k),k[0]&64&&A(m,1)):(m=ym(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].$isAuth&&!b[6]?_?_.p(b,k):(_=Sm(b),_.c(),_.m(d.parentNode,d)):_&&(_.d(1),_=null)},i(b){p||(A(m),p=!0)},o(b){P(m),p=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),_&&_.d(b),b&&w(d)}}}function fO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=W(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[10],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[15]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[13]||n[10],x(s,"btn-loading",n[10])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=J(e,"click",n[29]),u=!0)},p(d,p){p[0]&1024&&(e.disabled=d[10]),p[0]&64&&o!==(o=d[6]?"Create":"Save changes")&&oe(r,o),p[0]&9216&&a!==(a=!d[13]||d[10])&&(s.disabled=a),p[0]&1024&&x(s,"btn-loading",d[10])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function cO(n){var s;let e,t,i={class:` + Delete`,h(i,"type","button"),h(i,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item txt-danger closable")},m(f,d){a&&a.m(f,d),S(f,e,d),u&&u.m(f,d),S(f,t,d),S(f,i,d),S(f,s,d),S(f,l,d),o||(r=[J(i,"click",n[32]),J(l,"click",An(at(n[33])))],o=!0)},p(f,d){f[0].$isAuth&&!f[2].verified&&f[2].email?a?a.p(f,d):(a=wm(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].$isAuth&&f[2].email?u?u.p(f,d):(u=Sm(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&w(e),u&&u.d(f),f&&w(t),f&&w(i),f&&w(s),f&&w(l),o=!1,Ee(r)}}}function $m(n){let e,t,i,s,l,o;return{c(){e=y("div"),t=y("button"),t.textContent="Account",i=E(),s=y("button"),s.textContent="Authorized providers",h(t,"type","button"),h(t,"class","tab-item"),x(t,"active",n[12]===os),h(s,"type","button"),h(s,"class","tab-item"),x(s,"active",n[12]===Sl),h(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),l||(o=[J(t,"click",n[34]),J(s,"click",n[35])],l=!0)},p(r,a){a[0]&4096&&x(t,"active",r[12]===os),a[0]&4096&&x(s,"active",r[12]===Sl)},d(r){r&&w(e),l=!1,Ee(o)}}}function uO(n){var g;let e,t=n[6]?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,d,p,m=!n[6]&&km(n),_=n[0].$isAuth&&!n[6]&&$m(n);return{c(){e=y("h4"),i=W(t),s=E(),l=y("strong"),r=W(o),a=W(" record"),u=E(),m&&m.c(),f=E(),_&&_.c(),d=$e(),h(e,"class","panel-title svelte-qc5ngu")},m(b,k){S(b,e,k),v(e,i),v(e,s),v(e,l),v(l,r),v(e,a),S(b,u,k),m&&m.m(b,k),S(b,f,k),_&&_.m(b,k),S(b,d,k),p=!0},p(b,k){var $;(!p||k[0]&64)&&t!==(t=b[6]?"New":"Edit")&&oe(i,t),(!p||k[0]&1)&&o!==(o=(($=b[0])==null?void 0:$.name)+"")&&oe(r,o),b[6]?m&&(ae(),P(m,1,1,()=>{m=null}),ue()):m?(m.p(b,k),k[0]&64&&A(m,1)):(m=km(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].$isAuth&&!b[6]?_?_.p(b,k):(_=$m(b),_.c(),_.m(d.parentNode,d)):_&&(_.d(1),_=null)},i(b){p||(A(m),p=!0)},o(b){P(m),p=!1},d(b){b&&w(e),b&&w(u),m&&m.d(b),b&&w(f),_&&_.d(b),b&&w(d)}}}function fO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=W(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[10],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[15]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[13]||n[10],x(s,"btn-loading",n[10])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=J(e,"click",n[29]),u=!0)},p(d,p){p[0]&1024&&(e.disabled=d[10]),p[0]&64&&o!==(o=d[6]?"Create":"Save changes")&&oe(r,o),p[0]&9216&&a!==(a=!d[13]||d[10])&&(s.disabled=a),p[0]&1024&&x(s,"btn-loading",d[10])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function cO(n){var s;let e,t,i={class:` record-panel `+(n[14]?"overlay-panel-xl":"overlay-panel-lg")+` `+((s=n[0])!=null&&s.$isAuth&&!n[6]?"colored-header":"")+` @@ -143,28 +143,28 @@ Updated: ${o[3].updated}`,position:"left"})},d(o){o&&w(e),s=!1,l()}}}function Z6 record-panel `+(l[14]?"overlay-panel-xl":"overlay-panel-lg")+` `+((a=l[0])!=null&&a.$isAuth&&!l[6]?"colored-header":"")+` - `),o[0]&2176&&(r.beforeHide=l[53]),o[0]&14077|o[2]&256&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[54](null),B(e,l)}}}const os="form",Sl="providers";function dO(n,e,t){let i,s,l,o;const r=Tt(),a="record_"+H.randomString(5);let{collection:u}=e,f,d=null,p=null,m=null,_=!1,g=!1,b={},k={},$=JSON.stringify(null),T=$,C=os,O=!0,M=!1;function D(ye){return L(ye),t(11,g=!0),t(12,C=os),f==null?void 0:f.show()}function I(){return f==null?void 0:f.hide()}async function L(ye){t(27,M=!1),mn({}),t(2,d=ye||new ki),t(3,p=d.$clone()),t(4,b={}),t(5,k={}),await pn(),t(9,m=N()),!m||V(p,m)?t(9,m=null):(delete m.password,delete m.passwordConfirm),t(25,$=JSON.stringify(p)),t(27,M=!0)}function F(ye){var Fe,Xe;t(2,d=ye||new ki),t(4,b={}),t(5,k={});const Ae=((Xe=(Fe=u==null?void 0:u.schema)==null?void 0:Fe.filter(Ot=>Ot.type!="file"))==null?void 0:Xe.map(Ot=>Ot.name))||[];for(let Ot in ye.$export())Ae.includes(Ot)||t(3,p[Ot]=ye[Ot],p);t(25,$=JSON.stringify(p)),K()}function q(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function N(ye){try{const Ae=window.localStorage.getItem(q());if(Ae)return new ki(JSON.parse(Ae))}catch{}return ye}function R(ye){window.localStorage.setItem(q(),ye)}function j(){m&&(t(3,p=m),t(9,m=null))}function V(ye,Ae){var $n;const Fe=ye==null?void 0:ye.$clone(),Xe=Ae==null?void 0:Ae.$clone(),Ot=($n=u==null?void 0:u.schema)==null?void 0:$n.filter(Fn=>Fn.type==="file");for(let Fn of Ot)Fe==null||delete Fe[Fn.name],Xe==null||delete Xe[Fn.name];return Fe==null||delete Fe.password,Fe==null||delete Fe.passwordConfirm,Xe==null||delete Xe.password,Xe==null||delete Xe.passwordConfirm,JSON.stringify(Fe)==JSON.stringify(Xe)}function K(){t(9,m=null),window.localStorage.removeItem(q())}function ee(ye=!0){if(_||!o||!(u!=null&&u.id))return;t(10,_=!0);const Ae=G();let Fe;O?Fe=pe.collection(u.id).create(Ae):Fe=pe.collection(u.id).update(p.id,Ae),Fe.then(Xe=>{Xt(O?"Successfully created record.":"Successfully updated record."),K(),ye?(t(11,g=!1),I()):F(Xe),r("save",Xe)}).catch(Xe=>{pe.errorResponseHandler(Xe)}).finally(()=>{t(10,_=!1)})}function te(){d!=null&&d.id&&vn("Do you really want to delete the selected record?",()=>pe.collection(d.collectionId).delete(d.id).then(()=>{I(),Xt("Successfully deleted record."),r("delete",d)}).catch(ye=>{pe.errorResponseHandler(ye)}))}function G(){const ye=(p==null?void 0:p.$export())||{},Ae=new FormData,Fe={id:ye.id};for(const Xe of(u==null?void 0:u.schema)||[])Fe[Xe.name]=!0;u!=null&&u.isAuth&&(Fe.username=!0,Fe.email=!0,Fe.emailVisibility=!0,Fe.password=!0,Fe.passwordConfirm=!0,Fe.verified=!0);for(const Xe in ye)Fe[Xe]&&(typeof ye[Xe]>"u"&&(ye[Xe]=null),H.addValueToFormData(Ae,Xe,ye[Xe]));for(const Xe in b){const Ot=H.toArray(b[Xe]);for(const $n of Ot)Ae.append(Xe,$n)}for(const Xe in k){const Ot=H.toArray(k[Xe]);for(const $n of Ot)Ae.append(Xe+"."+$n,"")}return Ae}function ce(){!(u!=null&&u.id)||!(d!=null&&d.email)||vn(`Do you really want to sent verification email to ${d.email}?`,()=>pe.collection(u.id).requestVerification(d.email).then(()=>{Xt(`Successfully sent verification email to ${d.email}.`)}).catch(ye=>{pe.errorResponseHandler(ye)}))}function X(){!(u!=null&&u.id)||!(d!=null&&d.email)||vn(`Do you really want to sent password reset email to ${d.email}?`,()=>pe.collection(u.id).requestPasswordReset(d.email).then(()=>{Xt(`Successfully sent password reset email to ${d.email}.`)}).catch(ye=>{pe.errorResponseHandler(ye)}))}function le(){l?vn("You have unsaved changes. Do you really want to discard them?",()=>{ve()}):ve()}async function ve(){const ye=d==null?void 0:d.$clone();if(ye){ye.id="",ye.created="",ye.updated="";const Ae=(u==null?void 0:u.schema)||[];for(const Fe of Ae)Fe.type==="file"&&delete ye[Fe.name]}K(),D(ye),await pn(),t(25,$="")}function Se(ye){ye.ctrlKey&&ye.code=="KeyS"&&(ye.preventDefault(),ye.stopPropagation(),ee(!1))}const Ve=()=>I(),ze=()=>ce(),we=()=>X(),Me=()=>le(),Ze=()=>te(),mt=()=>t(12,C=os),Ge=()=>t(12,C=Sl),Ye=()=>j(),ne=()=>K();function qe(){p.id=this.value,t(3,p)}function xe(ye){p=ye,t(3,p)}function en(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Ne(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Ce(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function tt(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Et(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Rt(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Ht(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Ln(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function ti(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function Sn(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}function ht(ye,Ae){n.$$.not_equal(b[Ae.name],ye)&&(b[Ae.name]=ye,t(4,b))}function Nn(ye,Ae){n.$$.not_equal(k[Ae.name],ye)&&(k[Ae.name]=ye,t(5,k))}function ds(ye,Ae){n.$$.not_equal(p[Ae.name],ye)&&(p[Ae.name]=ye,t(3,p))}const ni=()=>l&&g?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,g=!1),I()}),!1):(mn({}),K(),!0);function Mi(ye){se[ye?"unshift":"push"](()=>{f=ye,t(8,f)})}function ps(ye){me.call(this,n,ye)}function pi(ye){me.call(this,n,ye)}return n.$$set=ye=>{"collection"in ye&&t(0,u=ye.collection)},n.$$.update=()=>{var ye;n.$$.dirty[0]&1&&t(14,i=!!((ye=u==null?void 0:u.schema)!=null&&ye.find(Ae=>Ae.type==="editor"))),n.$$.dirty[0]&48&&t(28,s=H.hasNonEmptyProps(b)||H.hasNonEmptyProps(k)),n.$$.dirty[0]&8&&t(26,T=JSON.stringify(p)),n.$$.dirty[0]&369098752&&t(7,l=s||$!=T),n.$$.dirty[0]&4&&t(6,O=!d||d.isNew),n.$$.dirty[0]&192&&t(13,o=O||l),n.$$.dirty[0]&201326592&&M&&R(T)},[u,I,d,p,b,k,O,l,f,m,_,g,C,o,i,a,j,K,ee,te,ce,X,le,Se,D,$,T,M,s,Ve,ze,we,Me,Ze,mt,Ge,Ye,ne,qe,xe,en,Ne,Ce,tt,Et,Rt,Ht,Ln,ti,Sn,ht,Nn,ds,ni,Mi,ps,pi]}class pb extends be{constructor(e){super(),ge(this,e,dO,cO,_e,{collection:0,show:24,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[1]}}function pO(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[De(i=We.call(null,e,n[2]?"":"Copy")),J(e,"click",An(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&h(e,"class",t),i&&Vt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:Q,o:Q,d(o){o&&w(e),s=!1,Ee(l)}}}function mO(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(H.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return xt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class tr extends be{constructor(e){super(),ge(this,e,mO,pO,_e,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function $m(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Cm(n,e,t){const i=n.slice();return i[13]=e[t],i}function Tm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Mm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function hO(n){const e=n.slice(),t=H.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function _O(n){const e=n.slice(),t=H.toArray(e[3]);e[9]=t;const i=H.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function gO(n){const e=n.slice(),t=H.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function bO(n){let e,t;return{c(){e=y("div"),t=W(n[3]),h(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&oe(t,i[3])},i:Q,o:Q,d(i){i&&w(e)}}}function vO(n){let e,t=H.truncate(n[3])+"",i,s;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=H.truncate(n[3]))},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&8&&t!==(t=H.truncate(l[3])+"")&&oe(i,t),o&8&&s!==(s=H.truncate(l[3]))&&h(e,"title",s)},i:Q,o:Q,d(l){l&&w(e)}}}function yO(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=u=>u[8]+u[18];for(let u=0;un[17]&&Dm();return{c(){e=y("div");for(let u=0;uu[17]?a||(a=Dm(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Im();return{c(){e=y("div"),i.c(),s=E(),u&&u.c(),h(e,"class","inline-flex")},m(f,d){S(f,e,d),r[t].m(e,null),v(e,s),u&&u.m(e,null),l=!0},p(f,d){let p=t;t=a(f),t===p?r[t].p(f,d):(ae(),P(r[p],1,1,()=>{r[p]=null}),ue(),i=r[t],i?i.p(f,d):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Im(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function wO(n){let e,t=[],i=new Map,s=H.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function CO(n){let e,t=H.truncate(n[3])+"",i,s,l;return{c(){e=y("a"),i=W(t),h(e,"class","txt-ellipsis"),h(e,"href",n[3]),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(o,r){S(o,e,r),v(e,i),s||(l=[De(We.call(null,e,"Open in new tab")),J(e,"click",An(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=H.truncate(o[3])+"")&&oe(i,t),r&8&&h(e,"href",o[3])},i:Q,o:Q,d(o){o&&w(e),s=!1,Ee(l)}}}function TO(n){let e,t;return{c(){e=y("span"),t=W(n[3]),h(e,"class","txt")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&oe(t,i[3])},i:Q,o:Q,d(i){i&&w(e)}}}function MO(n){let e,t=n[3]?"True":"False",i;return{c(){e=y("span"),i=W(t),h(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&oe(i,t)},i:Q,o:Q,d(s){s&&w(e)}}}function OO(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function DO(n){let e,t,i,s;const l=[NO,LO],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Om(n,e){let t,i,s;return i=new uu({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),B(i,l)}}}function Dm(n){let e;return{c(){e=W("...")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function EO(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Lm(n);return{c(){e=y("span"),i=W(t),s=E(),r&&r.c(),l=$e(),h(e,"class","txt")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=H.truncate(a[5],500,!0)+"")&&oe(i,t),a[5].length>500?r?(r.p(a,u),u&8&&A(r,1)):(r=Lm(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(ae(),P(r,1,1,()=>{r=null}),ue())},i(a){o||(A(r),o=!0)},o(a){P(r),o=!1},d(a){a&&w(e),a&&w(s),r&&r.d(a),a&&w(l)}}}function NO(n){let e,t=H.truncate(n[5])+"",i;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=H.truncate(s[5])+"")&&oe(i,t)},i:Q,o:Q,d(s){s&&w(e)}}}function Lm(n){let e,t;return e=new tr({props:{value:JSON.stringify(n[3],null,2)}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function FO(n){let e,t,i,s,l;const o=[DO,OO,MO,TO,CO,$O,SO,wO,kO,yO,vO,bO],r=[];function a(f,d){return d&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!H.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,d){return d===0?gO(f):d===8?_O(f):d===9?hO(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=$e()},m(f,d){r[t].m(f,d),S(f,s,d),l=!0},p(f,[d]){let p=t;t=a(f,d),t===p?r[t].p(u(f,t),d):(ae(),P(r[p],1,1,()=>{r[p]=null}),ue(),i=r[t],i?i.p(u(f,t),d):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){r[t].d(f),f&&w(s)}}}function RO(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){me.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class mb extends be{constructor(e){super(),ge(this,e,RO,FO,_e,{record:0,field:1,short:2})}}function Nm(n,e,t){const i=n.slice();return i[10]=e[t],i}function Fm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new mb({props:{field:n[10],record:n[3]}}),{c(){e=y("tr"),t=y("td"),s=W(i),l=E(),o=y("td"),U(r.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(o,"class","col-field svelte-1nt58f7")},m(u,f){S(u,e,f),v(e,t),v(t,s),v(e,l),v(e,o),z(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&oe(s,i);const d={};f&1&&(d.field=u[10]),f&8&&(d.record=u[3]),r.$set(d)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){P(r.$$.fragment,u),a=!1},d(u){u&&w(e),B(r)}}}function Rm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].created}}),{c(){e=y("tr"),t=y("td"),t.textContent="created",i=E(),s=y("td"),U(l.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(l)}}}function qm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].updated}}),{c(){e=y("tr"),t=y("td"),t.textContent="updated",i=E(),s=y("td"),U(l.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(l)}}}function qO(n){var M;let e,t,i,s,l,o,r,a,u,f,d=n[3].id+"",p,m,_,g,b;a=new tr({props:{value:n[3].id}});let k=(M=n[0])==null?void 0:M.schema,$=[];for(let D=0;DP($[D],1,1,()=>{$[D]=null});let C=n[3].created&&Rm(n),O=n[3].updated&&qm(n);return{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="id",l=E(),o=y("td"),r=y("div"),U(a.$$.fragment),u=E(),f=y("span"),p=W(d),m=E();for(let D=0;D<$.length;D+=1)$[D].c();_=E(),C&&C.c(),g=E(),O&&O.c(),h(s,"class","min-width txt-hint txt-bold"),h(f,"class","txt"),h(r,"class","label"),h(o,"class","col-field svelte-1nt58f7"),h(e,"class","table-border preview-table")},m(D,I){S(D,e,I),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,r),z(a,r,null),v(r,u),v(r,f),v(f,p),v(t,m);for(let L=0;L<$.length;L+=1)$[L]&&$[L].m(t,null);v(t,_),C&&C.m(t,null),v(t,g),O&&O.m(t,null),b=!0},p(D,I){var F;const L={};if(I&8&&(L.value=D[3].id),a.$set(L),(!b||I&8)&&d!==(d=D[3].id+"")&&oe(p,d),I&9){k=(F=D[0])==null?void 0:F.schema;let q;for(q=0;q{C=null}),ue()),D[3].updated?O?(O.p(D,I),I&8&&A(O,1)):(O=qm(D),O.c(),A(O,1),O.m(t,null)):O&&(ae(),P(O,1,1,()=>{O=null}),ue())},i(D){if(!b){A(a.$$.fragment,D);for(let I=0;IClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[6]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function HO(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[VO],header:[jO],default:[qO]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function zO(n,e,t){let i,{collection:s}=e,l,o=new ki;function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(m){se[m?"unshift":"push"](()=>{l=m,t(2,l)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(_=>_.type==="editor")))},[s,a,l,o,i,r,u,f,d,p]}class BO extends be{constructor(e){super(),ge(this,e,zO,HO,_e,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function jm(n,e,t){const i=n.slice();return i[55]=e[t],i}function Vm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Hm(n,e,t){const i=n.slice();return i[58]=e[t],i}function zm(n,e,t){const i=n.slice();return i[51]=e[t],i}function Bm(n){let e;function t(l,o){return l[12]?WO:UO}let i=t(n),s=i(n);return{c(){e=y("th"),s.c(),h(e,"class","bulk-select-col min-width")},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 UO(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("input"),s=E(),l=y("label"),h(t,"type","checkbox"),h(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],h(l,"for","checkbox_0"),h(e,"class","form-field")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),o||(r=J(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&w(e),o=!1,r()}}}function WO(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Um(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[YO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function YO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="id",h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Wm(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Ym(n),r=i&&Km(n);return{c(){o&&o.c(),t=E(),r&&r.c(),s=$e()},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&&A(o,1)):(o=Ym(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(ae(),P(o,1,1,()=>{o=null}),ue()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Km(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(ae(),P(r,1,1,()=>{r=null}),ue())},i(a){l||(A(o),A(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 Ym(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[KO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function KO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="username",h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Km(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[JO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function JO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="email",h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function ZO(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=y("div"),t=y("i"),s=E(),l=y("span"),r=W(o),h(t,"class",i=H.getFieldTypeIcon(n[58].type)),h(l,"class","txt"),h(e,"class","col-header-content")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),v(l,r)},p(a,u){u[0]&262144&&i!==(i=H.getFieldTypeIcon(a[58].type))&&h(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&oe(r,o)},d(a){a&&w(e)}}}function Jm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[ZO]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new ln({props:r}),se.push(()=>he(i,"sort",o)),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),z(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ke(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),B(i,a)}}}function Zm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[GO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function GO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Gm(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[XO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function XO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="updated",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Xm(n){let e;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Toggle columns"),h(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){S(t,e,i),n[35](e)},p:Q,d(t){t&&w(e),n[35](null)}}}function Qm(n){let e;function t(l,o){return l[12]?xO:QO}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 QO(n){let e,t,i,s,l;function o(u,f){var d,p;if((d=u[1])!=null&&d.length)return tD;if(!((p=u[2])!=null&&p.$isView))return eD}let r=o(n),a=r&&r(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No records found.",s=E(),a&&a.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),v(e,t),v(t,i),v(t,s),a&&a.m(t,null),v(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a&&a.d()}}}function xO(n){let e;return{c(){e=y("tr"),e.innerHTML=` + `),o[0]&2176&&(r.beforeHide=l[53]),o[0]&14077|o[2]&256&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[54](null),B(e,l)}}}const os="form",Sl="providers";function dO(n,e,t){let i,s,l,o;const r=Tt(),a="record_"+H.randomString(5);let{collection:u}=e,f,d=null,p=null,m=null,_=!1,g=!1,b={},k={},$=JSON.stringify(null),T=$,C=os,D=!0,M=!1;function O(ge){return L(ge),t(11,g=!0),t(12,C=os),f==null?void 0:f.show()}function I(){return f==null?void 0:f.hide()}async function L(ge){t(27,M=!1),un({}),t(2,d=ge||new ki),t(3,p=d.$clone()),t(4,b={}),t(5,k={}),await an(),t(9,m=N()),!m||V(p,m)?t(9,m=null):(delete m.password,delete m.passwordConfirm),t(25,$=JSON.stringify(p)),t(27,M=!0)}async function F(ge){var Fe,Xe;un({}),t(2,d=ge||new ki),t(4,b={}),t(5,k={});const Ae=((Xe=(Fe=u==null?void 0:u.schema)==null?void 0:Fe.filter(Ot=>Ot.type!="file"))==null?void 0:Xe.map(Ot=>Ot.name))||[];for(let Ot in ge.$export())Ae.includes(Ot)||t(3,p[Ot]=ge[Ot],p);await an(),t(25,$=JSON.stringify(p)),K()}function q(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((d==null?void 0:d.id)||"")}function N(ge){try{const Ae=window.localStorage.getItem(q());if(Ae)return new ki(JSON.parse(Ae))}catch{}return ge}function R(ge){window.localStorage.setItem(q(),ge)}function j(){m&&(t(3,p=m),t(9,m=null))}function V(ge,Ae){var $n;const Fe=ge==null?void 0:ge.$clone(),Xe=Ae==null?void 0:Ae.$clone(),Ot=($n=u==null?void 0:u.schema)==null?void 0:$n.filter(Fn=>Fn.type==="file");for(let Fn of Ot)Fe==null||delete Fe[Fn.name],Xe==null||delete Xe[Fn.name];return Fe==null||delete Fe.password,Fe==null||delete Fe.passwordConfirm,Xe==null||delete Xe.password,Xe==null||delete Xe.passwordConfirm,JSON.stringify(Fe)==JSON.stringify(Xe)}function K(){t(9,m=null),window.localStorage.removeItem(q())}function ee(ge=!0){if(_||!o||!(u!=null&&u.id))return;t(10,_=!0);const Ae=G();let Fe;D?Fe=pe.collection(u.id).create(Ae):Fe=pe.collection(u.id).update(p.id,Ae),Fe.then(Xe=>{Qt(D?"Successfully created record.":"Successfully updated record."),K(),ge?(t(11,g=!1),I()):F(Xe),r("save",Xe)}).catch(Xe=>{pe.errorResponseHandler(Xe)}).finally(()=>{t(10,_=!1)})}function te(){d!=null&&d.id&&vn("Do you really want to delete the selected record?",()=>pe.collection(d.collectionId).delete(d.id).then(()=>{I(),Qt("Successfully deleted record."),r("delete",d)}).catch(ge=>{pe.errorResponseHandler(ge)}))}function G(){const ge=(p==null?void 0:p.$export())||{},Ae=new FormData,Fe={id:ge.id};for(const Xe of(u==null?void 0:u.schema)||[])Fe[Xe.name]=!0;u!=null&&u.isAuth&&(Fe.username=!0,Fe.email=!0,Fe.emailVisibility=!0,Fe.password=!0,Fe.passwordConfirm=!0,Fe.verified=!0);for(const Xe in ge)Fe[Xe]&&(typeof ge[Xe]>"u"&&(ge[Xe]=null),H.addValueToFormData(Ae,Xe,ge[Xe]));for(const Xe in b){const Ot=H.toArray(b[Xe]);for(const $n of Ot)Ae.append(Xe,$n)}for(const Xe in k){const Ot=H.toArray(k[Xe]);for(const $n of Ot)Ae.append(Xe+"."+$n,"")}return Ae}function ce(){!(u!=null&&u.id)||!(d!=null&&d.email)||vn(`Do you really want to sent verification email to ${d.email}?`,()=>pe.collection(u.id).requestVerification(d.email).then(()=>{Qt(`Successfully sent verification email to ${d.email}.`)}).catch(ge=>{pe.errorResponseHandler(ge)}))}function X(){!(u!=null&&u.id)||!(d!=null&&d.email)||vn(`Do you really want to sent password reset email to ${d.email}?`,()=>pe.collection(u.id).requestPasswordReset(d.email).then(()=>{Qt(`Successfully sent password reset email to ${d.email}.`)}).catch(ge=>{pe.errorResponseHandler(ge)}))}function le(){l?vn("You have unsaved changes. Do you really want to discard them?",()=>{ye()}):ye()}async function ye(){const ge=d==null?void 0:d.$clone();if(ge){ge.id="",ge.created="",ge.updated="";const Ae=(u==null?void 0:u.schema)||[];for(const Fe of Ae)Fe.type==="file"&&delete ge[Fe.name]}K(),O(ge),await an(),t(25,$="")}function Se(ge){(ge.ctrlKey||ge.metaKey)&&ge.code=="KeyS"&&(ge.preventDefault(),ge.stopPropagation(),ee(!1))}const Ve=()=>I(),ze=()=>ce(),we=()=>X(),Me=()=>le(),Ze=()=>te(),mt=()=>t(12,C=os),Ge=()=>t(12,C=Sl),Ye=()=>j(),ne=()=>K();function qe(){p.id=this.value,t(3,p)}function xe(ge){p=ge,t(3,p)}function en(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Ne(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Ce(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function tt(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Et(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Rt(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Ht(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Ln(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function ti(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function Sn(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}function ht(ge,Ae){n.$$.not_equal(b[Ae.name],ge)&&(b[Ae.name]=ge,t(4,b))}function Nn(ge,Ae){n.$$.not_equal(k[Ae.name],ge)&&(k[Ae.name]=ge,t(5,k))}function ds(ge,Ae){n.$$.not_equal(p[Ae.name],ge)&&(p[Ae.name]=ge,t(3,p))}const ni=()=>l&&g?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,g=!1),I()}),!1):(un({}),K(),!0);function Mi(ge){se[ge?"unshift":"push"](()=>{f=ge,t(8,f)})}function ps(ge){me.call(this,n,ge)}function pi(ge){me.call(this,n,ge)}return n.$$set=ge=>{"collection"in ge&&t(0,u=ge.collection)},n.$$.update=()=>{var ge;n.$$.dirty[0]&1&&t(14,i=!!((ge=u==null?void 0:u.schema)!=null&&ge.find(Ae=>Ae.type==="editor"))),n.$$.dirty[0]&48&&t(28,s=H.hasNonEmptyProps(b)||H.hasNonEmptyProps(k)),n.$$.dirty[0]&8&&t(26,T=JSON.stringify(p)),n.$$.dirty[0]&369098752&&t(7,l=s||$!=T),n.$$.dirty[0]&4&&t(6,D=!d||d.isNew),n.$$.dirty[0]&192&&t(13,o=D||l),n.$$.dirty[0]&201326592&&M&&R(T)},[u,I,d,p,b,k,D,l,f,m,_,g,C,o,i,a,j,K,ee,te,ce,X,le,Se,O,$,T,M,s,Ve,ze,we,Me,Ze,mt,Ge,Ye,ne,qe,xe,en,Ne,Ce,tt,Et,Rt,Ht,Ln,ti,Sn,ht,Nn,ds,ni,Mi,ps,pi]}class mb extends ve{constructor(e){super(),be(this,e,dO,cO,_e,{collection:0,show:24,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[1]}}function pO(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class",t=n[2]?n[1]:n[0])},m(o,r){S(o,e,r),s||(l=[De(i=We.call(null,e,n[2]?"":"Copy")),J(e,"click",An(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&h(e,"class",t),i&&Vt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:Q,o:Q,d(o){o&&w(e),s=!1,Ee(l)}}}function mO(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(H.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return xt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class er extends ve{constructor(e){super(),be(this,e,mO,pO,_e,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Cm(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Tm(n,e,t){const i=n.slice();return i[13]=e[t],i}function Mm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Om(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function hO(n){const e=n.slice(),t=H.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function _O(n){const e=n.slice(),t=H.toArray(e[3]);e[9]=t;const i=H.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function gO(n){const e=n.slice(),t=H.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function bO(n){let e,t;return{c(){e=y("div"),t=W(n[3]),h(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&oe(t,i[3])},i:Q,o:Q,d(i){i&&w(e)}}}function vO(n){let e,t=H.truncate(n[3])+"",i,s;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=H.truncate(n[3]))},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&8&&t!==(t=H.truncate(l[3])+"")&&oe(i,t),o&8&&s!==(s=H.truncate(l[3]))&&h(e,"title",s)},i:Q,o:Q,d(l){l&&w(e)}}}function yO(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=u=>u[8]+u[18];for(let u=0;un[17]&&Em();return{c(){e=y("div");for(let u=0;uu[17]?a||(a=Em(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Pm();return{c(){e=y("div"),i.c(),s=E(),u&&u.c(),h(e,"class","inline-flex")},m(f,d){S(f,e,d),r[t].m(e,null),v(e,s),u&&u.m(e,null),l=!0},p(f,d){let p=t;t=a(f),t===p?r[t].p(f,d):(ae(),P(r[p],1,1,()=>{r[p]=null}),ue(),i=r[t],i?i.p(f,d):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Pm(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){f&&w(e),r[t].d(),u&&u.d()}}}function wO(n){let e,t=[],i=new Map,s=H.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function CO(n){let e,t=H.truncate(n[3])+"",i,s,l;return{c(){e=y("a"),i=W(t),h(e,"class","txt-ellipsis"),h(e,"href",n[3]),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(o,r){S(o,e,r),v(e,i),s||(l=[De(We.call(null,e,"Open in new tab")),J(e,"click",An(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=H.truncate(o[3])+"")&&oe(i,t),r&8&&h(e,"href",o[3])},i:Q,o:Q,d(o){o&&w(e),s=!1,Ee(l)}}}function TO(n){let e,t;return{c(){e=y("span"),t=W(n[3]),h(e,"class","txt")},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&8&&oe(t,i[3])},i:Q,o:Q,d(i){i&&w(e)}}}function MO(n){let e,t=n[3]?"True":"False",i;return{c(){e=y("span"),i=W(t),h(e,"class","txt")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&oe(i,t)},i:Q,o:Q,d(s){s&&w(e)}}}function OO(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function DO(n){let e,t,i,s;const l=[NO,LO],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Dm(n,e){let t,i,s;return i=new fu({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),B(i,l)}}}function Em(n){let e;return{c(){e=W("...")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function EO(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Nm(n);return{c(){e=y("span"),i=W(t),s=E(),r&&r.c(),l=$e(),h(e,"class","txt")},m(a,u){S(a,e,u),v(e,i),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=H.truncate(a[5],500,!0)+"")&&oe(i,t),a[5].length>500?r?(r.p(a,u),u&8&&A(r,1)):(r=Nm(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(ae(),P(r,1,1,()=>{r=null}),ue())},i(a){o||(A(r),o=!0)},o(a){P(r),o=!1},d(a){a&&w(e),a&&w(s),r&&r.d(a),a&&w(l)}}}function NO(n){let e,t=H.truncate(n[5])+"",i;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis")},m(s,l){S(s,e,l),v(e,i)},p(s,l){l&8&&t!==(t=H.truncate(s[5])+"")&&oe(i,t)},i:Q,o:Q,d(s){s&&w(e)}}}function Nm(n){let e,t;return e=new er({props:{value:JSON.stringify(n[3],null,2)}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function FO(n){let e,t,i,s,l;const o=[DO,OO,MO,TO,CO,$O,SO,wO,kO,yO,vO,bO],r=[];function a(f,d){return d&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!H.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,d){return d===0?gO(f):d===8?_O(f):d===9?hO(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=$e()},m(f,d){r[t].m(f,d),S(f,s,d),l=!0},p(f,[d]){let p=t;t=a(f,d),t===p?r[t].p(u(f,t),d):(ae(),P(r[p],1,1,()=>{r[p]=null}),ue(),i=r[t],i?i.p(u(f,t),d):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){P(i),l=!1},d(f){r[t].d(f),f&&w(s)}}}function RO(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){me.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class hb extends ve{constructor(e){super(),be(this,e,RO,FO,_e,{record:0,field:1,short:2})}}function Fm(n,e,t){const i=n.slice();return i[10]=e[t],i}function Rm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new hb({props:{field:n[10],record:n[3]}}),{c(){e=y("tr"),t=y("td"),s=W(i),l=E(),o=y("td"),U(r.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(o,"class","col-field svelte-1nt58f7")},m(u,f){S(u,e,f),v(e,t),v(t,s),v(e,l),v(e,o),z(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&oe(s,i);const d={};f&1&&(d.field=u[10]),f&8&&(d.record=u[3]),r.$set(d)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){P(r.$$.fragment,u),a=!1},d(u){u&&w(e),B(r)}}}function qm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].created}}),{c(){e=y("tr"),t=y("td"),t.textContent="created",i=E(),s=y("td"),U(l.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(l)}}}function jm(n){let e,t,i,s,l,o;return l=new $i({props:{date:n[3].updated}}),{c(){e=y("tr"),t=y("td"),t.textContent="updated",i=E(),s=y("td"),U(l.$$.fragment),h(t,"class","min-width txt-hint txt-bold"),h(s,"class","col-field svelte-1nt58f7")},m(r,a){S(r,e,a),v(e,t),v(e,i),v(e,s),z(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){P(l.$$.fragment,r),o=!1},d(r){r&&w(e),B(l)}}}function qO(n){var M;let e,t,i,s,l,o,r,a,u,f,d=n[3].id+"",p,m,_,g,b;a=new er({props:{value:n[3].id}});let k=(M=n[0])==null?void 0:M.schema,$=[];for(let O=0;OP($[O],1,1,()=>{$[O]=null});let C=n[3].created&&qm(n),D=n[3].updated&&jm(n);return{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="id",l=E(),o=y("td"),r=y("div"),U(a.$$.fragment),u=E(),f=y("span"),p=W(d),m=E();for(let O=0;O<$.length;O+=1)$[O].c();_=E(),C&&C.c(),g=E(),D&&D.c(),h(s,"class","min-width txt-hint txt-bold"),h(f,"class","txt"),h(r,"class","label"),h(o,"class","col-field svelte-1nt58f7"),h(e,"class","table-border preview-table")},m(O,I){S(O,e,I),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,r),z(a,r,null),v(r,u),v(r,f),v(f,p),v(t,m);for(let L=0;L<$.length;L+=1)$[L]&&$[L].m(t,null);v(t,_),C&&C.m(t,null),v(t,g),D&&D.m(t,null),b=!0},p(O,I){var F;const L={};if(I&8&&(L.value=O[3].id),a.$set(L),(!b||I&8)&&d!==(d=O[3].id+"")&&oe(p,d),I&9){k=(F=O[0])==null?void 0:F.schema;let q;for(q=0;q{C=null}),ue()),O[3].updated?D?(D.p(O,I),I&8&&A(D,1)):(D=jm(O),D.c(),A(D,1),D.m(t,null)):D&&(ae(),P(D,1,1,()=>{D=null}),ue())},i(O){if(!b){A(a.$$.fragment,O);for(let I=0;IClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[6]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function HO(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[VO],header:[jO],default:[qO]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function zO(n,e,t){let i,{collection:s}=e,l,o=new ki;function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(m){se[m?"unshift":"push"](()=>{l=m,t(2,l)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(_=>_.type==="editor")))},[s,a,l,o,i,r,u,f,d,p]}class BO extends ve{constructor(e){super(),be(this,e,zO,HO,_e,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function Vm(n,e,t){const i=n.slice();return i[55]=e[t],i}function Hm(n,e,t){const i=n.slice();return i[58]=e[t],i}function zm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Bm(n,e,t){const i=n.slice();return i[51]=e[t],i}function Um(n){let e;function t(l,o){return l[12]?WO:UO}let i=t(n),s=i(n);return{c(){e=y("th"),s.c(),h(e,"class","bulk-select-col min-width")},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 UO(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("input"),s=E(),l=y("label"),h(t,"type","checkbox"),h(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],h(l,"for","checkbox_0"),h(e,"class","form-field")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),o||(r=J(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&w(e),o=!1,r()}}}function WO(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Wm(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[YO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function YO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="id",h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Ym(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Km(n),r=i&&Jm(n);return{c(){o&&o.c(),t=E(),r&&r.c(),s=$e()},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&&A(o,1)):(o=Km(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(ae(),P(o,1,1,()=>{o=null}),ue()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Jm(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(ae(),P(r,1,1,()=>{r=null}),ue())},i(a){l||(A(o),A(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 Km(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[KO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function KO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="username",h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Jm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[JO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function JO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="email",h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function ZO(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=y("div"),t=y("i"),s=E(),l=y("span"),r=W(o),h(t,"class",i=H.getFieldTypeIcon(n[58].type)),h(l,"class","txt"),h(e,"class","col-header-content")},m(a,u){S(a,e,u),v(e,t),v(e,s),v(e,l),v(l,r)},p(a,u){u[0]&262144&&i!==(i=H.getFieldTypeIcon(a[58].type))&&h(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&oe(r,o)},d(a){a&&w(e)}}}function Zm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[ZO]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new ln({props:r}),se.push(()=>he(i,"sort",o)),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),z(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ke(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),B(i,a)}}}function Gm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[GO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function GO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Xm(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[XO]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new ln({props:l}),se.push(()=>he(e,"sort",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function XO(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="updated",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Qm(n){let e;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Toggle columns"),h(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){S(t,e,i),n[35](e)},p:Q,d(t){t&&w(e),n[35](null)}}}function xm(n){let e;function t(l,o){return l[12]?xO:QO}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 QO(n){let e,t,i,s,l;function o(u,f){var d,p;if((d=u[1])!=null&&d.length)return tD;if(!((p=u[2])!=null&&p.$isView))return eD}let r=o(n),a=r&&r(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No records found.",s=E(),a&&a.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(u,f){S(u,e,f),v(e,t),v(t,i),v(t,s),a&&a.m(t,null),v(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&w(e),a&&a.d()}}}function xO(n){let e;return{c(){e=y("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function eD(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - New record`,h(e,"type","button"),h(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[40]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function tD(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[39]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function xm(n){let e,t,i,s,l,o,r,a,u,f;function d(){return n[36](n[55])}return{c(){e=y("td"),t=y("div"),i=y("input"),o=E(),r=y("label"),h(i,"type","checkbox"),h(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],h(r,"for",a="checkbox_"+n[55].id),h(t,"class","form-field"),h(e,"class","bulk-select-col min-width")},m(p,m){S(p,e,m),v(e,t),v(t,i),v(t,o),v(t,r),u||(f=[J(i,"change",d),J(t,"click",An(n[26]))],u=!0)},p(p,m){n=p,m[0]&16&&s!==(s="checkbox_"+n[55].id)&&h(i,"id",s),m[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),m[0]&16&&a!==(a="checkbox_"+n[55].id)&&h(r,"for",a)},d(p){p&&w(e),u=!1,Ee(f)}}}function eh(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new tr({props:{value:n[55].id}});let d=n[2].$isAuth&&th(n);return{c(){e=y("td"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),a=W(r),u=E(),d&&d.c(),h(o,"class","txt"),h(i,"class","label"),h(t,"class","flex flex-gap-5"),h(e,"class","col-type-text col-field-id")},m(p,m){S(p,e,m),v(e,t),v(t,i),z(s,i,null),v(i,l),v(i,o),v(o,a),v(t,u),d&&d.m(t,null),f=!0},p(p,m){const _={};m[0]&16&&(_.value=p[55].id),s.$set(_),(!f||m[0]&16)&&r!==(r=p[55].id+"")&&oe(a,r),p[2].$isAuth?d?d.p(p,m):(d=th(p),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},i(p){f||(A(s.$$.fragment,p),f=!0)},o(p){P(s.$$.fragment,p),f=!1},d(p){p&&w(e),B(s),d&&d.d()}}}function th(n){let e;function t(l,o){return l[55].verified?iD:nD}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 nD(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=De(We.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function iD(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=De(We.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function nh(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&ih(n),o=i&&sh(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=$e()},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=ih(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=sh(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 ih(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!H.isEmpty(o[55].username)),t?lD:sD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),h(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 sD(n){let e,t=n[55].username+"",i,s;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=n[55].username)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&oe(i,t),o[0]&16&&s!==(s=l[55].username)&&h(e,"title",s)},d(l){l&&w(e)}}}function lD(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function sh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!H.isEmpty(o[55].email)),t?rD:oD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),h(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 oD(n){let e,t=n[55].email+"",i,s;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=n[55].email)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&oe(i,t),o[0]&16&&s!==(s=l[55].email)&&h(e,"title",s)},d(l){l&&w(e)}}}function rD(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function lh(n,e){let t,i,s,l;return i=new mb({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=y("td"),U(i.$$.fragment),h(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){S(o,t,r),z(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&h(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&w(t),B(i)}}}function oh(n){let e,t,i;return t=new $i({props:{date:n[55].created}}),{c(){e=y("td"),U(t.$$.fragment),h(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function rh(n){let e,t,i;return t=new $i({props:{date:n[55].updated}}),{c(){e=y("td"),U(t.$$.fragment),h(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function ah(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),d,p=e[9]&&!e[7].includes("@updated"),m,_,g,b,k,$,T=!e[2].$isView&&xm(e),C=s&&eh(e),O=e[2].$isAuth&&nh(e),M=e[18];const D=N=>N[58].name;for(let N=0;N',g=E(),h(_,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(N,R){S(N,t,R),T&&T.m(t,null),v(t,i),C&&C.m(t,null),v(t,l),O&&O.m(t,null),v(t,o);for(let j=0;j{C=null}),ue()),e[2].$isAuth?O?O.p(e,R):(O=nh(e),O.c(),O.m(t,o)):O&&(O.d(1),O=null),R[0]&262160&&(M=e[18],ae(),r=$t(r,R,D,1,e,M,a,t,Qt,lh,u,Vm),ue()),R[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?I?(I.p(e,R),R[0]&1152&&A(I,1)):(I=oh(e),I.c(),A(I,1),I.m(t,d)):I&&(ae(),P(I,1,1,()=>{I=null}),ue()),R[0]&640&&(p=e[9]&&!e[7].includes("@updated")),p?L?(L.p(e,R),R[0]&640&&A(L,1)):(L=rh(e),L.c(),A(L,1),L.m(t,m)):L&&(ae(),P(L,1,1,()=>{L=null}),ue())},i(N){if(!b){A(C);for(let R=0;RK[58].name;for(let K=0;KK[2].$isView?K[55]:K[55].id;for(let K=0;K{M=null}),ue()),K[2].$isAuth?D?(D.p(K,ee),ee[0]&4&&A(D,1)):(D=Wm(K),D.c(),A(D,1),D.m(i,r)):D&&(ae(),P(D,1,1,()=>{D=null}),ue()),ee[0]&262145&&(I=K[18],ae(),a=$t(a,ee,L,1,K,I,u,i,Qt,Jm,f,Hm),ue()),ee[0]&1152&&(d=K[10]&&!K[7].includes("@created")),d?F?(F.p(K,ee),ee[0]&1152&&A(F,1)):(F=Zm(K),F.c(),A(F,1),F.m(i,p)):F&&(ae(),P(F,1,1,()=>{F=null}),ue()),ee[0]&640&&(m=K[9]&&!K[7].includes("@updated")),m?q?(q.p(K,ee),ee[0]&640&&A(q,1)):(q=Gm(K),q.c(),A(q,1),q.m(i,_)):q&&(ae(),P(q,1,1,()=>{q=null}),ue()),K[15].length?N?N.p(K,ee):(N=Xm(K),N.c(),N.m(g,null)):N&&(N.d(1),N=null),ee[0]&4986582&&(R=K[4],ae(),$=$t($,ee,j,1,K,R,T,k,Qt,ah,null,jm),ue(),!R.length&&V?V.p(K,ee):R.length?V&&(V.d(1),V=null):(V=Qm(K),V.c(),V.m(k,null))),(!C||ee[0]&4096)&&x(e,"table-loading",K[12])},i(K){if(!C){A(M),A(D);for(let ee=0;ee({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),B(i,l)}}}function fD(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function ch(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=y("small"),t=W("Showing "),s=W(i),l=W(" of "),o=W(n[5]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){S(r,e,a),v(e,t),v(e,s),v(e,l),v(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&oe(s,i),a[0]&32&&oe(o,r[5])},d(r){r&&w(e)}}}function dh(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=y("div"),t=y("button"),i=y("span"),s=W("Load more ("),o=W(l),r=W(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),x(t,"btn-loading",n[12]),x(t,"btn-disabled",n[12]),h(e,"class","block txt-center m-t-xs")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(i,s),v(i,o),v(i,r),a||(u=J(t,"click",n[41]),a=!0)},p(f,d){d[0]&48&&l!==(l=f[5]-f[4].length+"")&&oe(o,l),d[0]&4096&&x(t,"btn-loading",f[12]),d[0]&4096&&x(t,"btn-disabled",f[12])},d(f){f&&w(e),a=!1,u()}}}function ph(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,d,p,m,_,g,b,k,$;return{c(){e=y("div"),t=y("div"),i=W("Selected "),s=y("strong"),l=W(n[8]),o=E(),a=W(r),u=E(),f=y("button"),f.innerHTML='Reset',d=E(),p=y("div"),m=E(),_=y("button"),_.innerHTML='Delete selected',h(t,"class","txt"),h(f,"type","button"),h(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),x(f,"btn-disabled",n[13]),h(p,"class","flex-fill"),h(_,"type","button"),h(_,"class","btn btn-sm btn-transparent btn-danger"),x(_,"btn-loading",n[13]),x(_,"btn-disabled",n[13]),h(e,"class","bulkbar")},m(T,C){S(T,e,C),v(e,t),v(t,i),v(t,s),v(s,l),v(t,o),v(t,a),v(e,u),v(e,f),v(e,d),v(e,p),v(e,m),v(e,_),b=!0,k||($=[J(f,"click",n[42]),J(_,"click",n[43])],k=!0)},p(T,C){(!b||C[0]&256)&&oe(l,T[8]),(!b||C[0]&256)&&r!==(r=T[8]===1?"record":"records")&&oe(a,r),(!b||C[0]&8192)&&x(f,"btn-disabled",T[13]),(!b||C[0]&8192)&&x(_,"btn-loading",T[13]),(!b||C[0]&8192)&&x(_,"btn-disabled",T[13])},i(T){b||(T&&nt(()=>{b&&(g||(g=He(e,fi,{duration:150,y:5},!0)),g.run(1))}),b=!0)},o(T){T&&(g||(g=He(e,fi,{duration:150,y:5},!1)),g.run(0)),b=!1},d(T){T&&w(e),T&&g&&g.end(),k=!1,Ee($)}}}function dD(n){let e,t,i,s,l,o;e=new Fa({props:{class:"table-wrapper",$$slots:{before:[cD],default:[aD]},$$scope:{ctx:n}}});let r=n[4].length&&ch(n),a=n[4].length&&n[17]&&dh(n),u=n[8]&&ph(n);return{c(){U(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=E(),u&&u.c(),l=$e()},m(f,d){z(e,f,d),S(f,t,d),r&&r.m(f,d),S(f,i,d),a&&a.m(f,d),S(f,s,d),u&&u.m(f,d),S(f,l,d),o=!0},p(f,d){const p={};d[0]&382679|d[2]&2&&(p.$$scope={dirty:d,ctx:f}),e.$set(p),f[4].length?r?r.p(f,d):(r=ch(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,d):(a=dh(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,d),d[0]&256&&A(u,1)):(u=ph(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(ae(),P(u,1,1,()=>{u=null}),ue())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){B(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)}}}const pD=/^([\+\-])?(\w+)$/;function mD(n,e,t){let i,s,l,o,r,a,u,f;const d=Tt();let{collection:p}=e,{sort:m=""}=e,{filter:_=""}=e,g=[],b=1,k=0,$={},T=!0,C=!1,O=0,M,D=[],I=[];function L(){p!=null&&p.id&&localStorage.setItem((p==null?void 0:p.id)+"@hiddenCollumns",JSON.stringify(D))}function F(){if(t(7,D=[]),!!(p!=null&&p.id))try{const Ce=localStorage.getItem(p.id+"@hiddenCollumns");Ce&&t(7,D=JSON.parse(Ce)||[])}catch{}}async function q(){const Ce=b;for(let tt=1;tt<=Ce;tt++)(tt===1||o)&&await N(tt,!1)}async function N(Ce=1,tt=!0){var ti,Sn;if(!(p!=null&&p.id))return;t(12,T=!0);let Et=m;const Rt=Et.match(pD),Ht=Rt?s.find(ht=>ht.name===Rt[2]):null;if(Rt&&((Sn=(ti=Ht==null?void 0:Ht.options)==null?void 0:ti.displayFields)==null?void 0:Sn.length)>0){const ht=[];for(const Nn of Ht.options.displayFields)ht.push((Rt[1]||"")+Rt[2]+"."+Nn);Et=ht.join(",")}const Ln=H.getAllCollectionIdentifiers(p);return pe.collection(p.id).getList(Ce,30,{sort:Et,filter:H.normalizeSearchFilter(_,Ln),expand:s.map(ht=>ht.name).join(","),$cancelKey:"records_list"}).then(async ht=>{if(Ce<=1&&R(),t(12,T=!1),t(11,b=ht.page),t(5,k=ht.totalItems),d("load",g.concat(ht.items)),tt){const Nn=++O;for(;ht.items.length&&O==Nn;)t(4,g=g.concat(ht.items.splice(0,15))),await H.yieldToMain()}else t(4,g=g.concat(ht.items))}).catch(ht=>{ht!=null&&ht.isAbort||(t(12,T=!1),console.warn(ht),R(),pe.errorResponseHandler(ht,!1))})}function R(){t(4,g=[]),t(11,b=1),t(5,k=0),t(6,$={})}function j(){a?V():K()}function V(){t(6,$={})}function K(){for(const Ce of g)t(6,$[Ce.id]=Ce,$);t(6,$)}function ee(Ce){$[Ce.id]?delete $[Ce.id]:t(6,$[Ce.id]=Ce,$),t(6,$)}function te(){vn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,G)}async function G(){if(C||!r||!(p!=null&&p.id))return;let Ce=[];for(const tt of Object.keys($))Ce.push(pe.collection(p.id).delete(tt));return t(13,C=!0),Promise.all(Ce).then(()=>{Xt(`Successfully deleted the selected ${r===1?"record":"records"}.`),V()}).catch(tt=>{pe.errorResponseHandler(tt)}).finally(()=>(t(13,C=!1),q()))}function ce(Ce){me.call(this,n,Ce)}const X=(Ce,tt)=>{tt.target.checked?H.removeByValue(D,Ce.id):H.pushUnique(D,Ce.id),t(7,D)},le=()=>j();function ve(Ce){m=Ce,t(0,m)}function Se(Ce){m=Ce,t(0,m)}function Ve(Ce){m=Ce,t(0,m)}function ze(Ce){m=Ce,t(0,m)}function we(Ce){m=Ce,t(0,m)}function Me(Ce){m=Ce,t(0,m)}function Ze(Ce){se[Ce?"unshift":"push"](()=>{M=Ce,t(14,M)})}const mt=Ce=>ee(Ce),Ge=Ce=>d("select",Ce),Ye=(Ce,tt)=>{tt.code==="Enter"&&(tt.preventDefault(),d("select",Ce))},ne=()=>t(1,_=""),qe=()=>d("new"),xe=()=>N(b+1),en=()=>V(),Ne=()=>te();return n.$$set=Ce=>{"collection"in Ce&&t(2,p=Ce.collection),"sort"in Ce&&t(0,m=Ce.sort),"filter"in Ce&&t(1,_=Ce.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&p!=null&&p.id&&(F(),R()),n.$$.dirty[0]&4&&t(25,i=(p==null?void 0:p.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter(Ce=>Ce.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter(Ce=>!D.includes(Ce.id))),n.$$.dirty[0]&7&&p!=null&&p.id&&m!==-1&&_!==-1&&N(1),n.$$.dirty[0]&48&&t(17,o=k>g.length),n.$$.dirty[0]&64&&t(8,r=Object.keys($).length),n.$$.dirty[0]&272&&t(16,a=g.length&&r===g.length),n.$$.dirty[0]&128&&D!==-1&&L(),n.$$.dirty[0]&20&&t(10,u=!(p!=null&&p.$isView)||g.length>0&&g[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(p!=null&&p.$isView)||g.length>0&&g[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,I=[].concat(p.$isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Ce=>({id:Ce.id,name:Ce.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[m,_,p,N,g,k,$,D,r,f,u,b,T,C,M,I,a,o,l,d,j,V,ee,te,q,i,ce,X,le,ve,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye,ne,qe,xe,en,Ne]}class hD extends be{constructor(e){super(),ge(this,e,mD,dD,_e,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function _D(n){let e,t,i,s;return e=new rM({}),i=new Pn({props:{$$slots:{default:[vD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&8&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function gD(n){let e,t;return e=new Pn({props:{center:!0,$$slots:{default:[wD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bD(n){let e,t;return e=new Pn({props:{center:!0,$$slots:{default:[SD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function mh(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Edit collection"),h(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,{text:"Edit collection",position:"right"})),J(e,"click",n[15])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function hh(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - New record`,h(e,"type","button"),h(e,"class","btn btn-expanded")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function vD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L,F,q=!n[10]&&mh(n);d=new Na({}),d.$on("refresh",n[16]);let N=!n[2].$isView&&hh(n);k=new Ko({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[19]);function R(K){n[21](K)}function j(K){n[22](K)}let V={collection:n[2]};return n[0]!==void 0&&(V.filter=n[0]),n[1]!==void 0&&(V.sort=n[1]),O=new hD({props:V}),n[20](O),se.push(()=>he(O,"filter",R)),se.push(()=>he(O,"sort",j)),O.$on("select",n[23]),O.$on("new",n[24]),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Collections",s=E(),l=y("div"),r=W(o),a=E(),u=y("div"),q&&q.c(),f=E(),U(d.$$.fragment),p=E(),m=y("div"),_=y("button"),_.innerHTML=` - API Preview`,g=E(),N&&N.c(),b=E(),U(k.$$.fragment),$=E(),T=y("div"),C=E(),U(O.$$.fragment),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(u,"class","inline-flex gap-5"),h(_,"type","button"),h(_,"class","btn btn-outline"),h(m,"class","btns-group"),h(e,"class","page-header"),h(T,"class","clearfix m-b-base")},m(K,ee){S(K,e,ee),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),v(e,u),q&&q.m(u,null),v(u,f),z(d,u,null),v(e,p),v(e,m),v(m,_),v(m,g),N&&N.m(m,null),S(K,b,ee),z(k,K,ee),S(K,$,ee),S(K,T,ee),S(K,C,ee),z(O,K,ee),I=!0,L||(F=J(_,"click",n[17]),L=!0)},p(K,ee){(!I||ee[0]&4)&&o!==(o=K[2].name+"")&&oe(r,o),K[10]?q&&(q.d(1),q=null):q?q.p(K,ee):(q=mh(K),q.c(),q.m(u,f)),K[2].$isView?N&&(N.d(1),N=null):N?N.p(K,ee):(N=hh(K),N.c(),N.m(m,null));const te={};ee[0]&1&&(te.value=K[0]),ee[0]&4&&(te.autocompleteCollection=K[2]),k.$set(te);const G={};ee[0]&4&&(G.collection=K[2]),!M&&ee[0]&1&&(M=!0,G.filter=K[0],ke(()=>M=!1)),!D&&ee[0]&2&&(D=!0,G.sort=K[1],ke(()=>D=!1)),O.$set(G)},i(K){I||(A(d.$$.fragment,K),A(k.$$.fragment,K),A(O.$$.fragment,K),I=!0)},o(K){P(d.$$.fragment,K),P(k.$$.fragment,K),P(O.$$.fragment,K),I=!1},d(K){K&&w(e),q&&q.d(),B(d),N&&N.d(),K&&w(b),B(k,K),K&&w($),K&&w(T),K&&w(C),n[20](null),B(O,K),L=!1,F()}}}function yD(n){let e,t,i,s,l;return{c(){e=y("h1"),e.textContent="Create your first collection to add records!",t=E(),i=y("button"),i.innerHTML=` + New record`,h(e,"type","button"),h(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[40]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function tD(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[39]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function eh(n){let e,t,i,s,l,o,r,a,u,f;function d(){return n[36](n[55])}return{c(){e=y("td"),t=y("div"),i=y("input"),o=E(),r=y("label"),h(i,"type","checkbox"),h(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],h(r,"for",a="checkbox_"+n[55].id),h(t,"class","form-field"),h(e,"class","bulk-select-col min-width")},m(p,m){S(p,e,m),v(e,t),v(t,i),v(t,o),v(t,r),u||(f=[J(i,"change",d),J(t,"click",An(n[26]))],u=!0)},p(p,m){n=p,m[0]&16&&s!==(s="checkbox_"+n[55].id)&&h(i,"id",s),m[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),m[0]&16&&a!==(a="checkbox_"+n[55].id)&&h(r,"for",a)},d(p){p&&w(e),u=!1,Ee(f)}}}function th(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new er({props:{value:n[55].id}});let d=n[2].$isAuth&&nh(n);return{c(){e=y("td"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),a=W(r),u=E(),d&&d.c(),h(o,"class","txt"),h(i,"class","label"),h(t,"class","flex flex-gap-5"),h(e,"class","col-type-text col-field-id")},m(p,m){S(p,e,m),v(e,t),v(t,i),z(s,i,null),v(i,l),v(i,o),v(o,a),v(t,u),d&&d.m(t,null),f=!0},p(p,m){const _={};m[0]&16&&(_.value=p[55].id),s.$set(_),(!f||m[0]&16)&&r!==(r=p[55].id+"")&&oe(a,r),p[2].$isAuth?d?d.p(p,m):(d=nh(p),d.c(),d.m(t,null)):d&&(d.d(1),d=null)},i(p){f||(A(s.$$.fragment,p),f=!0)},o(p){P(s.$$.fragment,p),f=!1},d(p){p&&w(e),B(s),d&&d.d()}}}function nh(n){let e;function t(l,o){return l[55].verified?iD:nD}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 nD(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=De(We.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function iD(n){let e,t,i;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=De(We.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function ih(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&sh(n),o=i&&lh(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=$e()},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=sh(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=lh(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 sh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!H.isEmpty(o[55].username)),t?lD:sD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),h(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 sD(n){let e,t=n[55].username+"",i,s;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=n[55].username)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&oe(i,t),o[0]&16&&s!==(s=l[55].username)&&h(e,"title",s)},d(l){l&&w(e)}}}function lD(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function lh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!H.isEmpty(o[55].email)),t?rD:oD}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=y("td"),l.c(),h(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 oD(n){let e,t=n[55].email+"",i,s;return{c(){e=y("span"),i=W(t),h(e,"class","txt txt-ellipsis"),h(e,"title",s=n[55].email)},m(l,o){S(l,e,o),v(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&oe(i,t),o[0]&16&&s!==(s=l[55].email)&&h(e,"title",s)},d(l){l&&w(e)}}}function rD(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function oh(n,e){let t,i,s,l;return i=new hb({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=y("td"),U(i.$$.fragment),h(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){S(o,t,r),z(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&h(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&w(t),B(i)}}}function rh(n){let e,t,i;return t=new $i({props:{date:n[55].created}}),{c(){e=y("td"),U(t.$$.fragment),h(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function ah(n){let e,t,i;return t=new $i({props:{date:n[55].updated}}),{c(){e=y("td"),U(t.$$.fragment),h(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function uh(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),d,p=e[9]&&!e[7].includes("@updated"),m,_,g,b,k,$,T=!e[2].$isView&&eh(e),C=s&&th(e),D=e[2].$isAuth&&ih(e),M=e[18];const O=N=>N[58].name;for(let N=0;N',g=E(),h(_,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(N,R){S(N,t,R),T&&T.m(t,null),v(t,i),C&&C.m(t,null),v(t,l),D&&D.m(t,null),v(t,o);for(let j=0;j{C=null}),ue()),e[2].$isAuth?D?D.p(e,R):(D=ih(e),D.c(),D.m(t,o)):D&&(D.d(1),D=null),R[0]&262160&&(M=e[18],ae(),r=vt(r,R,O,1,e,M,a,t,Kt,oh,u,Hm),ue()),R[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?I?(I.p(e,R),R[0]&1152&&A(I,1)):(I=rh(e),I.c(),A(I,1),I.m(t,d)):I&&(ae(),P(I,1,1,()=>{I=null}),ue()),R[0]&640&&(p=e[9]&&!e[7].includes("@updated")),p?L?(L.p(e,R),R[0]&640&&A(L,1)):(L=ah(e),L.c(),A(L,1),L.m(t,m)):L&&(ae(),P(L,1,1,()=>{L=null}),ue())},i(N){if(!b){A(C);for(let R=0;RK[58].name;for(let K=0;KK[2].$isView?K[55]:K[55].id;for(let K=0;K{M=null}),ue()),K[2].$isAuth?O?(O.p(K,ee),ee[0]&4&&A(O,1)):(O=Ym(K),O.c(),A(O,1),O.m(i,r)):O&&(ae(),P(O,1,1,()=>{O=null}),ue()),ee[0]&262145&&(I=K[18],ae(),a=vt(a,ee,L,1,K,I,u,i,Kt,Zm,f,zm),ue()),ee[0]&1152&&(d=K[10]&&!K[7].includes("@created")),d?F?(F.p(K,ee),ee[0]&1152&&A(F,1)):(F=Gm(K),F.c(),A(F,1),F.m(i,p)):F&&(ae(),P(F,1,1,()=>{F=null}),ue()),ee[0]&640&&(m=K[9]&&!K[7].includes("@updated")),m?q?(q.p(K,ee),ee[0]&640&&A(q,1)):(q=Xm(K),q.c(),A(q,1),q.m(i,_)):q&&(ae(),P(q,1,1,()=>{q=null}),ue()),K[15].length?N?N.p(K,ee):(N=Qm(K),N.c(),N.m(g,null)):N&&(N.d(1),N=null),ee[0]&4986582&&(R=K[4],ae(),$=vt($,ee,j,1,K,R,T,k,Kt,uh,null,Vm),ue(),!R.length&&V?V.p(K,ee):R.length?V&&(V.d(1),V=null):(V=xm(K),V.c(),V.m(k,null))),(!C||ee[0]&4096)&&x(e,"table-loading",K[12])},i(K){if(!C){A(M),A(O);for(let ee=0;ee({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),z(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),B(i,l)}}}function fD(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function dh(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=y("small"),t=W("Showing "),s=W(i),l=W(" of "),o=W(n[5]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){S(r,e,a),v(e,t),v(e,s),v(e,l),v(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&oe(s,i),a[0]&32&&oe(o,r[5])},d(r){r&&w(e)}}}function ph(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=y("div"),t=y("button"),i=y("span"),s=W("Load more ("),o=W(l),r=W(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),x(t,"btn-loading",n[12]),x(t,"btn-disabled",n[12]),h(e,"class","block txt-center m-t-xs")},m(f,d){S(f,e,d),v(e,t),v(t,i),v(i,s),v(i,o),v(i,r),a||(u=J(t,"click",n[41]),a=!0)},p(f,d){d[0]&48&&l!==(l=f[5]-f[4].length+"")&&oe(o,l),d[0]&4096&&x(t,"btn-loading",f[12]),d[0]&4096&&x(t,"btn-disabled",f[12])},d(f){f&&w(e),a=!1,u()}}}function mh(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,d,p,m,_,g,b,k,$;return{c(){e=y("div"),t=y("div"),i=W("Selected "),s=y("strong"),l=W(n[8]),o=E(),a=W(r),u=E(),f=y("button"),f.innerHTML='Reset',d=E(),p=y("div"),m=E(),_=y("button"),_.innerHTML='Delete selected',h(t,"class","txt"),h(f,"type","button"),h(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),x(f,"btn-disabled",n[13]),h(p,"class","flex-fill"),h(_,"type","button"),h(_,"class","btn btn-sm btn-transparent btn-danger"),x(_,"btn-loading",n[13]),x(_,"btn-disabled",n[13]),h(e,"class","bulkbar")},m(T,C){S(T,e,C),v(e,t),v(t,i),v(t,s),v(s,l),v(t,o),v(t,a),v(e,u),v(e,f),v(e,d),v(e,p),v(e,m),v(e,_),b=!0,k||($=[J(f,"click",n[42]),J(_,"click",n[43])],k=!0)},p(T,C){(!b||C[0]&256)&&oe(l,T[8]),(!b||C[0]&256)&&r!==(r=T[8]===1?"record":"records")&&oe(a,r),(!b||C[0]&8192)&&x(f,"btn-disabled",T[13]),(!b||C[0]&8192)&&x(_,"btn-loading",T[13]),(!b||C[0]&8192)&&x(_,"btn-disabled",T[13])},i(T){b||(T&&nt(()=>{b&&(g||(g=He(e,fi,{duration:150,y:5},!0)),g.run(1))}),b=!0)},o(T){T&&(g||(g=He(e,fi,{duration:150,y:5},!1)),g.run(0)),b=!1},d(T){T&&w(e),T&&g&&g.end(),k=!1,Ee($)}}}function dD(n){let e,t,i,s,l,o;e=new Ra({props:{class:"table-wrapper",$$slots:{before:[cD],default:[aD]},$$scope:{ctx:n}}});let r=n[4].length&&dh(n),a=n[4].length&&n[17]&&ph(n),u=n[8]&&mh(n);return{c(){U(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=E(),u&&u.c(),l=$e()},m(f,d){z(e,f,d),S(f,t,d),r&&r.m(f,d),S(f,i,d),a&&a.m(f,d),S(f,s,d),u&&u.m(f,d),S(f,l,d),o=!0},p(f,d){const p={};d[0]&382679|d[2]&2&&(p.$$scope={dirty:d,ctx:f}),e.$set(p),f[4].length?r?r.p(f,d):(r=dh(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,d):(a=ph(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,d),d[0]&256&&A(u,1)):(u=mh(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(ae(),P(u,1,1,()=>{u=null}),ue())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){B(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)}}}const pD=/^([\+\-])?(\w+)$/;function mD(n,e,t){let i,s,l,o,r,a,u,f;const d=Tt();let{collection:p}=e,{sort:m=""}=e,{filter:_=""}=e,g=[],b=1,k=0,$={},T=!0,C=!1,D=0,M,O=[],I=[];function L(){p!=null&&p.id&&localStorage.setItem((p==null?void 0:p.id)+"@hiddenCollumns",JSON.stringify(O))}function F(){if(t(7,O=[]),!!(p!=null&&p.id))try{const Ce=localStorage.getItem(p.id+"@hiddenCollumns");Ce&&t(7,O=JSON.parse(Ce)||[])}catch{}}async function q(){const Ce=b;for(let tt=1;tt<=Ce;tt++)(tt===1||o)&&await N(tt,!1)}async function N(Ce=1,tt=!0){var ti,Sn;if(!(p!=null&&p.id))return;t(12,T=!0);let Et=m;const Rt=Et.match(pD),Ht=Rt?s.find(ht=>ht.name===Rt[2]):null;if(Rt&&((Sn=(ti=Ht==null?void 0:Ht.options)==null?void 0:ti.displayFields)==null?void 0:Sn.length)>0){const ht=[];for(const Nn of Ht.options.displayFields)ht.push((Rt[1]||"")+Rt[2]+"."+Nn);Et=ht.join(",")}const Ln=H.getAllCollectionIdentifiers(p);return pe.collection(p.id).getList(Ce,30,{sort:Et,filter:H.normalizeSearchFilter(_,Ln),expand:s.map(ht=>ht.name).join(","),$cancelKey:"records_list"}).then(async ht=>{if(Ce<=1&&R(),t(12,T=!1),t(11,b=ht.page),t(5,k=ht.totalItems),d("load",g.concat(ht.items)),tt){const Nn=++D;for(;ht.items.length&&D==Nn;)t(4,g=g.concat(ht.items.splice(0,15))),await H.yieldToMain()}else t(4,g=g.concat(ht.items))}).catch(ht=>{ht!=null&&ht.isAbort||(t(12,T=!1),console.warn(ht),R(),pe.errorResponseHandler(ht,!1))})}function R(){t(4,g=[]),t(11,b=1),t(5,k=0),t(6,$={})}function j(){a?V():K()}function V(){t(6,$={})}function K(){for(const Ce of g)t(6,$[Ce.id]=Ce,$);t(6,$)}function ee(Ce){$[Ce.id]?delete $[Ce.id]:t(6,$[Ce.id]=Ce,$),t(6,$)}function te(){vn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,G)}async function G(){if(C||!r||!(p!=null&&p.id))return;let Ce=[];for(const tt of Object.keys($))Ce.push(pe.collection(p.id).delete(tt));return t(13,C=!0),Promise.all(Ce).then(()=>{Qt(`Successfully deleted the selected ${r===1?"record":"records"}.`),V()}).catch(tt=>{pe.errorResponseHandler(tt)}).finally(()=>(t(13,C=!1),q()))}function ce(Ce){me.call(this,n,Ce)}const X=(Ce,tt)=>{tt.target.checked?H.removeByValue(O,Ce.id):H.pushUnique(O,Ce.id),t(7,O)},le=()=>j();function ye(Ce){m=Ce,t(0,m)}function Se(Ce){m=Ce,t(0,m)}function Ve(Ce){m=Ce,t(0,m)}function ze(Ce){m=Ce,t(0,m)}function we(Ce){m=Ce,t(0,m)}function Me(Ce){m=Ce,t(0,m)}function Ze(Ce){se[Ce?"unshift":"push"](()=>{M=Ce,t(14,M)})}const mt=Ce=>ee(Ce),Ge=Ce=>d("select",Ce),Ye=(Ce,tt)=>{tt.code==="Enter"&&(tt.preventDefault(),d("select",Ce))},ne=()=>t(1,_=""),qe=()=>d("new"),xe=()=>N(b+1),en=()=>V(),Ne=()=>te();return n.$$set=Ce=>{"collection"in Ce&&t(2,p=Ce.collection),"sort"in Ce&&t(0,m=Ce.sort),"filter"in Ce&&t(1,_=Ce.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&p!=null&&p.id&&(F(),R()),n.$$.dirty[0]&4&&t(25,i=(p==null?void 0:p.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter(Ce=>Ce.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter(Ce=>!O.includes(Ce.id))),n.$$.dirty[0]&7&&p!=null&&p.id&&m!==-1&&_!==-1&&N(1),n.$$.dirty[0]&48&&t(17,o=k>g.length),n.$$.dirty[0]&64&&t(8,r=Object.keys($).length),n.$$.dirty[0]&272&&t(16,a=g.length&&r===g.length),n.$$.dirty[0]&128&&O!==-1&&L(),n.$$.dirty[0]&20&&t(10,u=!(p!=null&&p.$isView)||g.length>0&&g[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(p!=null&&p.$isView)||g.length>0&&g[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,I=[].concat(p.$isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map(Ce=>({id:Ce.id,name:Ce.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[m,_,p,N,g,k,$,O,r,f,u,b,T,C,M,I,a,o,l,d,j,V,ee,te,q,i,ce,X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye,ne,qe,xe,en,Ne]}class hD extends ve{constructor(e){super(),be(this,e,mD,dD,_e,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function _D(n){let e,t,i,s;return e=new rM({}),i=new Pn({props:{$$slots:{default:[vD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&8&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function gD(n){let e,t;return e=new Pn({props:{center:!0,$$slots:{default:[wD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bD(n){let e,t;return e=new Pn({props:{center:!0,$$slots:{default:[SD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function hh(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Edit collection"),h(e,"class","btn btn-transparent btn-circle")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,{text:"Edit collection",position:"right"})),J(e,"click",n[15])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function _h(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + New record`,h(e,"type","button"),h(e,"class","btn btn-expanded")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function vD(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L,F,q=!n[10]&&hh(n);d=new Fa({}),d.$on("refresh",n[16]);let N=!n[2].$isView&&_h(n);k=new Yo({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[19]);function R(K){n[21](K)}function j(K){n[22](K)}let V={collection:n[2]};return n[0]!==void 0&&(V.filter=n[0]),n[1]!==void 0&&(V.sort=n[1]),D=new hD({props:V}),n[20](D),se.push(()=>he(D,"filter",R)),se.push(()=>he(D,"sort",j)),D.$on("select",n[23]),D.$on("new",n[24]),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Collections",s=E(),l=y("div"),r=W(o),a=E(),u=y("div"),q&&q.c(),f=E(),U(d.$$.fragment),p=E(),m=y("div"),_=y("button"),_.innerHTML=` + API Preview`,g=E(),N&&N.c(),b=E(),U(k.$$.fragment),$=E(),T=y("div"),C=E(),U(D.$$.fragment),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(u,"class","inline-flex gap-5"),h(_,"type","button"),h(_,"class","btn btn-outline"),h(m,"class","btns-group"),h(e,"class","page-header"),h(T,"class","clearfix m-b-base")},m(K,ee){S(K,e,ee),v(e,t),v(t,i),v(t,s),v(t,l),v(l,r),v(e,a),v(e,u),q&&q.m(u,null),v(u,f),z(d,u,null),v(e,p),v(e,m),v(m,_),v(m,g),N&&N.m(m,null),S(K,b,ee),z(k,K,ee),S(K,$,ee),S(K,T,ee),S(K,C,ee),z(D,K,ee),I=!0,L||(F=J(_,"click",n[17]),L=!0)},p(K,ee){(!I||ee[0]&4)&&o!==(o=K[2].name+"")&&oe(r,o),K[10]?q&&(q.d(1),q=null):q?q.p(K,ee):(q=hh(K),q.c(),q.m(u,f)),K[2].$isView?N&&(N.d(1),N=null):N?N.p(K,ee):(N=_h(K),N.c(),N.m(m,null));const te={};ee[0]&1&&(te.value=K[0]),ee[0]&4&&(te.autocompleteCollection=K[2]),k.$set(te);const G={};ee[0]&4&&(G.collection=K[2]),!M&&ee[0]&1&&(M=!0,G.filter=K[0],ke(()=>M=!1)),!O&&ee[0]&2&&(O=!0,G.sort=K[1],ke(()=>O=!1)),D.$set(G)},i(K){I||(A(d.$$.fragment,K),A(k.$$.fragment,K),A(D.$$.fragment,K),I=!0)},o(K){P(d.$$.fragment,K),P(k.$$.fragment,K),P(D.$$.fragment,K),I=!1},d(K){K&&w(e),q&&q.d(),B(d),N&&N.d(),K&&w(b),B(k,K),K&&w($),K&&w(T),K&&w(C),n[20](null),B(D,K),L=!1,F()}}}function yD(n){let e,t,i,s,l;return{c(){e=y("h1"),e.textContent="Create your first collection to add records!",t=E(),i=y("button"),i.innerHTML=` Create new collection`,h(e,"class","m-b-10"),h(i,"type","button"),h(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=J(i,"click",n[14]),s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function kD(n){let e;return{c(){e=y("h1"),e.textContent="You don't have any collections yet.",h(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function wD(n){let e,t,i;function s(r,a){return r[10]?kD:yD}let l=s(n),o=l(n);return{c(){e=y("div"),t=y("div"),t.innerHTML='',i=E(),o.c(),h(t,"class","icon"),h(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),v(e,t),v(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 SD(n){let e;return{c(){e=y("div"),e.innerHTML=` -

    Loading collections...

    `,h(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function $D(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[bD,gD,_D],m=[];function _(T,C){return T[3]&&!T[9].length?0:T[9].length?2:1}e=_(n),t=m[e]=p[e](n);let g={};s=new au({props:g}),n[25](s);let b={};o=new hM({props:b}),n[26](o);let k={collection:n[2]};a=new pb({props:k}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let $={collection:n[2]};return f=new BO({props:$}),n[30](f),{c(){t.c(),i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment)},m(T,C){m[e].m(T,C),S(T,i,C),z(s,T,C),S(T,l,C),z(o,T,C),S(T,r,C),z(a,T,C),S(T,u,C),z(f,T,C),d=!0},p(T,C){let O=e;e=_(T),e===O?m[e].p(T,C):(ae(),P(m[O],1,1,()=>{m[O]=null}),ue(),t=m[e],t?t.p(T,C):(t=m[e]=p[e](T),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const D={};o.$set(D);const I={};C[0]&4&&(I.collection=T[2]),a.$set(I);const L={};C[0]&4&&(L.collection=T[2]),f.$set(L)},i(T){d||(A(t),A(s.$$.fragment,T),A(o.$$.fragment,T),A(a.$$.fragment,T),A(f.$$.fragment,T),d=!0)},o(T){P(t),P(s.$$.fragment,T),P(o.$$.fragment,T),P(a.$$.fragment,T),P(f.$$.fragment,T),d=!1},d(T){m[e].d(T),T&&w(i),n[25](null),B(s,T),T&&w(l),n[26](null),B(o,T),T&&w(r),n[27](null),B(a,T),T&&w(u),n[30](null),B(f,T)}}}function CD(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,X=>t(2,s=X)),Je(n,Nt,X=>t(31,l=X)),Je(n,yo,X=>t(3,o=X)),Je(n,ka,X=>t(13,r=X)),Je(n,ci,X=>t(9,a=X)),Je(n,Es,X=>t(10,u=X));const f=new URLSearchParams(r);let d,p,m,_,g,b=f.get("filter")||"",k=f.get("sort")||"",$=f.get("collectionId")||(s==null?void 0:s.id);function T(){t(11,$=s==null?void 0:s.id),t(0,b=""),t(1,k="-created"),s!=null&&s.$isView&&!H.extractColumnsFromQuery(s.options.query).includes("created")&&t(1,k="")}vy($);const C=()=>d==null?void 0:d.show(),O=()=>d==null?void 0:d.show(s),M=()=>g==null?void 0:g.load(),D=()=>p==null?void 0:p.show(s),I=()=>m==null?void 0:m.show(),L=X=>t(0,b=X.detail);function F(X){se[X?"unshift":"push"](()=>{g=X,t(8,g)})}function q(X){b=X,t(0,b)}function N(X){k=X,t(1,k)}const R=X=>{s.$isView?_.show(X==null?void 0:X.detail):m==null||m.show(X==null?void 0:X.detail)},j=()=>m==null?void 0:m.show();function V(X){se[X?"unshift":"push"](()=>{d=X,t(4,d)})}function K(X){se[X?"unshift":"push"](()=>{p=X,t(5,p)})}function ee(X){se[X?"unshift":"push"](()=>{m=X,t(6,m)})}const te=()=>g==null?void 0:g.reloadLoadedPages(),G=()=>g==null?void 0:g.reloadLoadedPages();function ce(X){se[X?"unshift":"push"](()=>{_=X,t(7,_)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=$&&_y(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&$!=s.id&&T(),n.$$.dirty[0]&7&&(k||b||s!=null&&s.id)){const X=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:k}).toString();Vi("/collections?"+X)}n.$$.dirty[0]&4&&rn(Nt,l=(s==null?void 0:s.name)||"Collections",l)},[b,k,s,o,d,p,m,_,g,a,u,$,i,r,C,O,M,D,I,L,F,q,N,R,j,V,K,ee,te,G,ce]}class TD extends be{constructor(e){super(),ge(this,e,CD,$D,_e,{},null,[-1,-1])}}function MD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L;return{c(){e=y("aside"),t=y("div"),i=y("div"),i.textContent="System",s=E(),l=y("a"),l.innerHTML=` +

    Loading collections...

    `,h(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function $D(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[bD,gD,_D],m=[];function _(T,C){return T[3]&&!T[9].length?0:T[9].length?2:1}e=_(n),t=m[e]=p[e](n);let g={};s=new uu({props:g}),n[25](s);let b={};o=new hM({props:b}),n[26](o);let k={collection:n[2]};a=new mb({props:k}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let $={collection:n[2]};return f=new BO({props:$}),n[30](f),{c(){t.c(),i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment)},m(T,C){m[e].m(T,C),S(T,i,C),z(s,T,C),S(T,l,C),z(o,T,C),S(T,r,C),z(a,T,C),S(T,u,C),z(f,T,C),d=!0},p(T,C){let D=e;e=_(T),e===D?m[e].p(T,C):(ae(),P(m[D],1,1,()=>{m[D]=null}),ue(),t=m[e],t?t.p(T,C):(t=m[e]=p[e](T),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const I={};C[0]&4&&(I.collection=T[2]),a.$set(I);const L={};C[0]&4&&(L.collection=T[2]),f.$set(L)},i(T){d||(A(t),A(s.$$.fragment,T),A(o.$$.fragment,T),A(a.$$.fragment,T),A(f.$$.fragment,T),d=!0)},o(T){P(t),P(s.$$.fragment,T),P(o.$$.fragment,T),P(a.$$.fragment,T),P(f.$$.fragment,T),d=!1},d(T){m[e].d(T),T&&w(i),n[25](null),B(s,T),T&&w(l),n[26](null),B(o,T),T&&w(r),n[27](null),B(a,T),T&&w(u),n[30](null),B(f,T)}}}function CD(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,X=>t(2,s=X)),Je(n,Nt,X=>t(31,l=X)),Je(n,yo,X=>t(3,o=X)),Je(n,wa,X=>t(13,r=X)),Je(n,ci,X=>t(9,a=X)),Je(n,Es,X=>t(10,u=X));const f=new URLSearchParams(r);let d,p,m,_,g,b=f.get("filter")||"",k=f.get("sort")||"",$=f.get("collectionId")||(s==null?void 0:s.id);function T(){t(11,$=s==null?void 0:s.id),t(0,b=""),t(1,k="-created"),s!=null&&s.$isView&&!H.extractColumnsFromQuery(s.options.query).includes("created")&&t(1,k="")}vy($);const C=()=>d==null?void 0:d.show(),D=()=>d==null?void 0:d.show(s),M=()=>g==null?void 0:g.load(),O=()=>p==null?void 0:p.show(s),I=()=>m==null?void 0:m.show(),L=X=>t(0,b=X.detail);function F(X){se[X?"unshift":"push"](()=>{g=X,t(8,g)})}function q(X){b=X,t(0,b)}function N(X){k=X,t(1,k)}const R=X=>{s.$isView?_.show(X==null?void 0:X.detail):m==null||m.show(X==null?void 0:X.detail)},j=()=>m==null?void 0:m.show();function V(X){se[X?"unshift":"push"](()=>{d=X,t(4,d)})}function K(X){se[X?"unshift":"push"](()=>{p=X,t(5,p)})}function ee(X){se[X?"unshift":"push"](()=>{m=X,t(6,m)})}const te=()=>g==null?void 0:g.reloadLoadedPages(),G=()=>g==null?void 0:g.reloadLoadedPages();function ce(X){se[X?"unshift":"push"](()=>{_=X,t(7,_)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=$&&_y(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&$!=s.id&&T(),n.$$.dirty[0]&7&&(k||b||s!=null&&s.id)){const X=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:k}).toString();Vi("/collections?"+X)}n.$$.dirty[0]&4&&rn(Nt,l=(s==null?void 0:s.name)||"Collections",l)},[b,k,s,o,d,p,m,_,g,a,u,$,i,r,C,D,M,O,I,L,F,q,N,R,j,V,K,ee,te,G,ce]}class TD extends ve{constructor(e){super(),be(this,e,CD,$D,_e,{},null,[-1,-1])}}function MD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L;return{c(){e=y("aside"),t=y("div"),i=y("div"),i.textContent="System",s=E(),l=y("a"),l.innerHTML=` Application`,o=E(),r=y("a"),r.innerHTML=` Mail settings`,a=E(),u=y("a"),u.innerHTML=` Files storage`,f=E(),d=y("div"),d.innerHTML='Sync',p=E(),m=y("a"),m.innerHTML=` Export collections`,_=E(),g=y("a"),g.innerHTML=` Import collections`,b=E(),k=y("div"),k.textContent="Authentication",$=E(),T=y("a"),T.innerHTML=` - Auth providers`,C=E(),O=y("a"),O.innerHTML=` - Token options`,M=E(),D=y("a"),D.innerHTML=` - Admins`,h(i,"class","sidebar-title"),h(l,"href","/settings"),h(l,"class","sidebar-list-item"),h(r,"href","/settings/mail"),h(r,"class","sidebar-list-item"),h(u,"href","/settings/storage"),h(u,"class","sidebar-list-item"),h(d,"class","sidebar-title"),h(m,"href","/settings/export-collections"),h(m,"class","sidebar-list-item"),h(g,"href","/settings/import-collections"),h(g,"class","sidebar-list-item"),h(k,"class","sidebar-title"),h(T,"href","/settings/auth-providers"),h(T,"class","sidebar-list-item"),h(O,"href","/settings/tokens"),h(O,"class","sidebar-list-item"),h(D,"href","/settings/admins"),h(D,"class","sidebar-list-item"),h(t,"class","sidebar-content"),h(e,"class","page-sidebar settings-sidebar")},m(F,q){S(F,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(t,o),v(t,r),v(t,a),v(t,u),v(t,f),v(t,d),v(t,p),v(t,m),v(t,_),v(t,g),v(t,b),v(t,k),v(t,$),v(t,T),v(t,C),v(t,O),v(t,M),v(t,D),I||(L=[De(Gn.call(null,l,{path:"/settings"})),De(fn.call(null,l)),De(Gn.call(null,r,{path:"/settings/mail/?.*"})),De(fn.call(null,r)),De(Gn.call(null,u,{path:"/settings/storage/?.*"})),De(fn.call(null,u)),De(Gn.call(null,m,{path:"/settings/export-collections/?.*"})),De(fn.call(null,m)),De(Gn.call(null,g,{path:"/settings/import-collections/?.*"})),De(fn.call(null,g)),De(Gn.call(null,T,{path:"/settings/auth-providers/?.*"})),De(fn.call(null,T)),De(Gn.call(null,O,{path:"/settings/tokens/?.*"})),De(fn.call(null,O)),De(Gn.call(null,D,{path:"/settings/admins/?.*"})),De(fn.call(null,D))],I=!0)},p:Q,i:Q,o:Q,d(F){F&&w(e),I=!1,Ee(L)}}}class Ui extends be{constructor(e){super(),ge(this,e,null,MD,_e,{})}}function _h(n,e,t){const i=n.slice();return i[30]=e[t],i}function gh(n){let e,t;return e=new de({props:{class:"form-field readonly",name:"id",$$slots:{default:[OD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function OD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",o=E(),r=y("div"),a=y("i"),f=E(),d=y("input"),h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[29]),h(a,"class","ri-calendar-event-line txt-disabled"),h(r,"class","form-field-addon"),h(d,"type","text"),h(d,"id",p=n[29]),d.value=m=n[1].id,d.readOnly=!0},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),S(b,r,k),v(r,a),S(b,f,k),S(b,d,k),_||(g=De(u=We.call(null,a,{text:`Created: ${n[1].created} + Auth providers`,C=E(),D=y("a"),D.innerHTML=` + Token options`,M=E(),O=y("a"),O.innerHTML=` + Admins`,h(i,"class","sidebar-title"),h(l,"href","/settings"),h(l,"class","sidebar-list-item"),h(r,"href","/settings/mail"),h(r,"class","sidebar-list-item"),h(u,"href","/settings/storage"),h(u,"class","sidebar-list-item"),h(d,"class","sidebar-title"),h(m,"href","/settings/export-collections"),h(m,"class","sidebar-list-item"),h(g,"href","/settings/import-collections"),h(g,"class","sidebar-list-item"),h(k,"class","sidebar-title"),h(T,"href","/settings/auth-providers"),h(T,"class","sidebar-list-item"),h(D,"href","/settings/tokens"),h(D,"class","sidebar-list-item"),h(O,"href","/settings/admins"),h(O,"class","sidebar-list-item"),h(t,"class","sidebar-content"),h(e,"class","page-sidebar settings-sidebar")},m(F,q){S(F,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(t,o),v(t,r),v(t,a),v(t,u),v(t,f),v(t,d),v(t,p),v(t,m),v(t,_),v(t,g),v(t,b),v(t,k),v(t,$),v(t,T),v(t,C),v(t,D),v(t,M),v(t,O),I||(L=[De(Gn.call(null,l,{path:"/settings"})),De(dn.call(null,l)),De(Gn.call(null,r,{path:"/settings/mail/?.*"})),De(dn.call(null,r)),De(Gn.call(null,u,{path:"/settings/storage/?.*"})),De(dn.call(null,u)),De(Gn.call(null,m,{path:"/settings/export-collections/?.*"})),De(dn.call(null,m)),De(Gn.call(null,g,{path:"/settings/import-collections/?.*"})),De(dn.call(null,g)),De(Gn.call(null,T,{path:"/settings/auth-providers/?.*"})),De(dn.call(null,T)),De(Gn.call(null,D,{path:"/settings/tokens/?.*"})),De(dn.call(null,D)),De(Gn.call(null,O,{path:"/settings/admins/?.*"})),De(dn.call(null,O))],I=!0)},p:Q,i:Q,o:Q,d(F){F&&w(e),I=!1,Ee(L)}}}class Ui extends ve{constructor(e){super(),be(this,e,null,MD,_e,{})}}function gh(n,e,t){const i=n.slice();return i[30]=e[t],i}function bh(n){let e,t;return e=new de({props:{class:"form-field readonly",name:"id",$$slots:{default:[OD,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function OD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",o=E(),r=y("div"),a=y("i"),f=E(),d=y("input"),h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[29]),h(a,"class","ri-calendar-event-line txt-disabled"),h(r,"class","form-field-addon"),h(d,"type","text"),h(d,"id",p=n[29]),d.value=m=n[1].id,d.readOnly=!0},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),S(b,r,k),v(r,a),S(b,f,k),S(b,d,k),_||(g=De(u=We.call(null,a,{text:`Created: ${n[1].created} Updated: ${n[1].updated}`,position:"left"})),_=!0)},p(b,k){k[0]&536870912&&l!==(l=b[29])&&h(e,"for",l),u&&Vt(u.update)&&k[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} -Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d,"id",p),k[0]&2&&m!==(m=b[1].id)&&d.value!==m&&(d.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(d),_=!1,g()}}}function bh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=y("button"),t=y("img"),s=E(),dn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||h(t,"src",i),h(t,"alt","Avatar "+n[30]),h(e,"type","button"),h(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),v(e,t),v(e,s),o||(r=J(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"))&&h(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function DD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","email"),h(r,"autocomplete","off"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[3]),u||(f=J(r,"input",n[18]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&8&&r.value!==d[3]&&fe(r,d[3])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function vh(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[ED,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function ED(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[29]),h(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&h(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function yh(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[AD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ID,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),h(e,"class","col-12")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d[0]&536871168|d[1]&4&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d[0]&536871424|d[1]&4&&(m.$$scope={dirty:d,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{u&&(a||(a=He(t,Ct,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=He(t,Ct,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function AD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[8]),u||(f=J(r,"input",n[20]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&256&&r.value!==d[8]&&fe(r,d[8])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function ID(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[9]),u||(f=J(r,"input",n[21]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&512&&r.value!==d[9]&&fe(r,d[9])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_=!n[1].$isNew&&gh(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=bh(_h(n,g,T));a=new de({props:{class:"form-field required",name:"email",$$slots:{default:[DD,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let k=!n[1].$isNew&&vh(n),$=(n[1].$isNew||n[4])&&yh(n);return{c(){e=y("form"),_&&_.c(),t=E(),i=y("div"),s=y("p"),s.textContent="Avatar",l=E(),o=y("div");for(let T=0;T<10;T+=1)b[T].c();r=E(),U(a.$$.fragment),u=E(),k&&k.c(),f=E(),$&&$.c(),h(s,"class","section-title"),h(o,"class","flex flex-gap-xs flex-wrap"),h(i,"class","content"),h(e,"id",n[11]),h(e,"class","grid"),h(e,"autocomplete","off")},m(T,C){S(T,e,C),_&&_.m(e,null),v(e,t),v(e,i),v(i,s),v(i,l),v(i,o);for(let O=0;O<10;O+=1)b[O]&&b[O].m(o,null);v(e,r),z(a,e,null),v(e,u),k&&k.m(e,null),v(e,f),$&&$.m(e,null),d=!0,p||(m=J(e,"submit",at(n[12])),p=!0)},p(T,C){if(T[1].$isNew?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(T,C),C[0]&2&&A(_,1)):(_=gh(T),_.c(),A(_,1),_.m(e,t)),C[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const D=_h(T,g,M);b[M]?b[M].p(D,C):(b[M]=bh(D),b[M].c(),b[M].m(o,null))}for(;M<10;M+=1)b[M].d(1)}const O={};C[0]&536870920|C[1]&4&&(O.$$scope={dirty:C,ctx:T}),a.$set(O),T[1].$isNew?k&&(ae(),P(k,1,1,()=>{k=null}),ue()):k?(k.p(T,C),C[0]&2&&A(k,1)):(k=vh(T),k.c(),A(k,1),k.m(e,f)),T[1].$isNew||T[4]?$?($.p(T,C),C[0]&18&&A($,1)):($=yh(T),$.c(),A($,1),$.m(e,null)):$&&(ae(),P($,1,1,()=>{$=null}),ue())},i(T){d||(A(_),A(a.$$.fragment,T),A(k),A($),d=!0)},o(T){P(_),P(a.$$.fragment,T),P(k),P($),d=!1},d(T){T&&w(e),_&&_.d(),dt(b,T),B(a),k&&k.d(),$&&$.d(),p=!1,m()}}}function LD(n){let e,t=n[1].$isNew?"New admin":"Edit admin",i;return{c(){e=y("h4"),i=W(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].$isNew?"New admin":"Edit admin")&&oe(i,t)},d(s){s&&w(e)}}}function kh(n){let e,t,i,s,l,o,r,a,u;return o=new Kn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[ND]},$$scope:{ctx:n}}}),{c(){e=y("button"),t=y("span"),i=E(),s=y("i"),l=E(),U(o.$$.fragment),r=E(),a=y("div"),h(s,"class","ri-more-line"),h(e,"type","button"),h(e,"aria-label","More"),h(e,"class","btn btn-sm btn-circle btn-transparent"),h(a,"class","flex-fill")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(e,l),z(o,e,null),S(f,r,d),S(f,a,d),u=!0},p(f,d){const p={};d[1]&4&&(p.$$scope={dirty:d,ctx:f}),o.$set(p)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),B(o),f&&w(r),f&&w(a)}}}function ND(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Delete`,h(e,"type","button"),h(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function FD(n){let e,t,i,s,l,o,r=n[1].$isNew?"Create":"Save changes",a,u,f,d,p,m=!n[1].$isNew&&kh(n);return{c(){m&&m.c(),e=E(),t=y("button"),i=y("span"),i.textContent="Cancel",s=E(),l=y("button"),o=y("span"),a=W(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-transparent"),t.disabled=n[6],h(o,"class","txt"),h(l,"type","submit"),h(l,"form",n[11]),h(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],x(l,"btn-loading",n[6])},m(_,g){m&&m.m(_,g),S(_,e,g),S(_,t,g),v(t,i),S(_,s,g),S(_,l,g),v(l,o),v(o,a),f=!0,d||(p=J(t,"click",n[16]),d=!0)},p(_,g){_[1].$isNew?m&&(ae(),P(m,1,1,()=>{m=null}),ue()):m?(m.p(_,g),g[0]&2&&A(m,1)):(m=kh(_),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=_[6]),(!f||g[0]&2)&&r!==(r=_[1].$isNew?"Create":"Save changes")&&oe(a,r),(!f||g[0]&1088&&u!==(u=!_[10]||_[6]))&&(l.disabled=u),(!f||g[0]&64)&&x(l,"btn-loading",_[6])},i(_){f||(A(m),f=!0)},o(_){P(m),f=!1},d(_){m&&m.d(_),_&&w(e),_&&w(t),_&&w(s),_&&w(l),d=!1,p()}}}function RD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[FD],header:[LD],default:[PD]},$$scope:{ctx:n}};return e=new hn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){U(e.$$.fragment)},m(s,l){z(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),B(e,s)}}}function qD(n,e,t){let i;const s=Tt(),l="admin_"+H.randomString(5);let o,r=new rs,a=!1,u=!1,f=0,d="",p="",m="",_=!1;function g(K){return k(K),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function k(K){t(1,r=K!=null&&K.$clone?K.$clone():new rs),$()}function $(){t(4,_=!1),t(3,d=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,p=""),t(9,m=""),mn({})}function T(){if(a||!i)return;t(6,a=!0);const K={email:d,avatar:f};(r.$isNew||_)&&(K.password=p,K.passwordConfirm=m);let ee;r.$isNew?ee=pe.admins.create(K):ee=pe.admins.update(r.id,K),ee.then(async te=>{var G;t(7,u=!1),b(),Xt(r.$isNew?"Successfully created admin.":"Successfully updated admin."),s("save",te),((G=pe.authStore.model)==null?void 0:G.id)===te.id&&pe.authStore.save(pe.authStore.token,te)}).catch(te=>{pe.errorResponseHandler(te)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&vn("Do you really want to delete the selected admin?",()=>pe.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Xt("Successfully deleted admin."),s("delete",r)}).catch(K=>{pe.errorResponseHandler(K)}))}const O=()=>C(),M=()=>b(),D=K=>t(2,f=K);function I(){d=this.value,t(3,d)}function L(){_=this.checked,t(4,_)}function F(){p=this.value,t(8,p)}function q(){m=this.value,t(9,m)}const N=()=>i&&u?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function R(K){se[K?"unshift":"push"](()=>{o=K,t(5,o)})}function j(K){me.call(this,n,K)}function V(K){me.call(this,n,K)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.$isNew&&d!=""||_||d!==r.email||f!==r.avatar)},[b,r,f,d,_,o,a,u,p,m,i,l,T,C,g,O,M,D,I,L,F,q,N,R,j,V]}class jD extends be{constructor(e){super(),ge(this,e,qD,RD,_e,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function wh(n,e,t){const i=n.slice();return i[24]=e[t],i}function VD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="id",h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function HD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="email",h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function zD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function BD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="updated",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Sh(n){let e;function t(l,o){return l[5]?WD:UD}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 UD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&$h(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=$h(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function WD(n){let e;return{c(){e=y("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function $h(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ch(n){let e;return{c(){e=y("span"),e.textContent="You",h(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Th(n,e){let t,i,s,l,o,r,a,u,f,d,p,m=e[24].id+"",_,g,b,k,$,T=e[24].email+"",C,O,M,D,I,L,F,q,N,R,j,V,K,ee;f=new tr({props:{value:e[24].id}});let te=e[24].id===e[7].id&&Ch();I=new $i({props:{date:e[24].created}}),q=new $i({props:{date:e[24].updated}});function G(){return e[15](e[24])}function ce(...X){return e[16](e[24],...X)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("figure"),l=y("img"),r=E(),a=y("td"),u=y("div"),U(f.$$.fragment),d=E(),p=y("span"),_=W(m),g=E(),te&&te.c(),b=E(),k=y("td"),$=y("span"),C=W(T),M=E(),D=y("td"),U(I.$$.fragment),L=E(),F=y("td"),U(q.$$.fragment),N=E(),R=y("td"),R.innerHTML='',j=E(),dn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||h(l,"src",o),h(l,"alt","Admin avatar"),h(s,"class","thumb thumb-sm thumb-circle"),h(i,"class","min-width"),h(p,"class","txt"),h(u,"class","label"),h(a,"class","col-type-text col-field-id"),h($,"class","txt txt-ellipsis"),h($,"title",O=e[24].email),h(k,"class","col-type-email col-field-email"),h(D,"class","col-type-date col-field-created"),h(F,"class","col-type-date col-field-updated"),h(R,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(X,le){S(X,t,le),v(t,i),v(i,s),v(s,l),v(t,r),v(t,a),v(a,u),z(f,u,null),v(u,d),v(u,p),v(p,_),v(a,g),te&&te.m(a,null),v(t,b),v(t,k),v(k,$),v($,C),v(t,M),v(t,D),z(I,D,null),v(t,L),v(t,F),z(q,F,null),v(t,N),v(t,R),v(t,j),V=!0,K||(ee=[J(t,"click",G),J(t,"keydown",ce)],K=!0)},p(X,le){e=X,(!V||le&16&&!dn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&h(l,"src",o);const ve={};le&16&&(ve.value=e[24].id),f.$set(ve),(!V||le&16)&&m!==(m=e[24].id+"")&&oe(_,m),e[24].id===e[7].id?te||(te=Ch(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!V||le&16)&&T!==(T=e[24].email+"")&&oe(C,T),(!V||le&16&&O!==(O=e[24].email))&&h($,"title",O);const Se={};le&16&&(Se.date=e[24].created),I.$set(Se);const Ve={};le&16&&(Ve.date=e[24].updated),q.$set(Ve)},i(X){V||(A(f.$$.fragment,X),A(I.$$.fragment,X),A(q.$$.fragment,X),V=!0)},o(X){P(f.$$.fragment,X),P(I.$$.fragment,X),P(q.$$.fragment,X),V=!1},d(X){X&&w(t),B(f),te&&te.d(),B(I),B(q),K=!1,Ee(ee)}}}function YD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O=[],M=new Map,D;function I(G){n[11](G)}let L={class:"col-type-text",name:"id",$$slots:{default:[VD]},$$scope:{ctx:n}};n[2]!==void 0&&(L.sort=n[2]),o=new ln({props:L}),se.push(()=>he(o,"sort",I));function F(G){n[12](G)}let q={class:"col-type-email col-field-email",name:"email",$$slots:{default:[HD]},$$scope:{ctx:n}};n[2]!==void 0&&(q.sort=n[2]),u=new ln({props:q}),se.push(()=>he(u,"sort",F));function N(G){n[13](G)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[zD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),p=new ln({props:R}),se.push(()=>he(p,"sort",N));function j(G){n[14](G)}let V={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[BD]},$$scope:{ctx:n}};n[2]!==void 0&&(V.sort=n[2]),g=new ln({props:V}),se.push(()=>he(g,"sort",j));let K=n[4];const ee=G=>G[24].id;for(let G=0;Gr=!1)),o.$set(X);const le={};ce&134217728&&(le.$$scope={dirty:ce,ctx:G}),!f&&ce&4&&(f=!0,le.sort=G[2],ke(()=>f=!1)),u.$set(le);const ve={};ce&134217728&&(ve.$$scope={dirty:ce,ctx:G}),!m&&ce&4&&(m=!0,ve.sort=G[2],ke(()=>m=!1)),p.$set(ve);const Se={};ce&134217728&&(Se.$$scope={dirty:ce,ctx:G}),!b&&ce&4&&(b=!0,Se.sort=G[2],ke(()=>b=!1)),g.$set(Se),ce&186&&(K=G[4],ae(),O=$t(O,ce,ee,1,G,K,M,C,Qt,Th,null,wh),ue(),!K.length&&te?te.p(G,ce):K.length?te&&(te.d(1),te=null):(te=Sh(G),te.c(),te.m(C,null))),(!D||ce&32)&&x(e,"table-loading",G[5])},i(G){if(!D){A(o.$$.fragment,G),A(u.$$.fragment,G),A(p.$$.fragment,G),A(g.$$.fragment,G);for(let ce=0;ce - New admin`,m=E(),U(_.$$.fragment),g=E(),b=y("div"),k=E(),U($.$$.fragment),T=E(),I&&I.c(),C=$e(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(f,"class","flex-fill"),h(p,"type","button"),h(p,"class","btn btn-expanded"),h(e,"class","page-header"),h(b,"class","clearfix m-b-base")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(e,r),z(a,e,null),v(e,u),v(e,f),v(e,d),v(e,p),S(L,m,F),z(_,L,F),S(L,g,F),S(L,b,F),S(L,k,F),z($,L,F),S(L,T,F),I&&I.m(L,F),S(L,C,F),O=!0,M||(D=J(p,"click",n[9]),M=!0)},p(L,F){(!O||F&64)&&oe(o,L[6]);const q={};F&2&&(q.value=L[1]),_.$set(q);const N={};F&134217918&&(N.$$scope={dirty:F,ctx:L}),$.$set(N),L[4].length?I?I.p(L,F):(I=Mh(L),I.c(),I.m(C.parentNode,C)):I&&(I.d(1),I=null)},i(L){O||(A(a.$$.fragment,L),A(_.$$.fragment,L),A($.$$.fragment,L),O=!0)},o(L){P(a.$$.fragment,L),P(_.$$.fragment,L),P($.$$.fragment,L),O=!1},d(L){L&&w(e),B(a),L&&w(m),B(_,L),L&&w(g),L&&w(b),L&&w(k),B($,L),L&&w(T),I&&I.d(L),L&&w(C),M=!1,D()}}}function JD(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[KD]},$$scope:{ctx:n}}});let r={};return l=new jD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[18](null),B(l,a)}}}function ZD(n,e,t){let i,s,l;Je(n,ka,q=>t(21,i=q)),Je(n,Nt,q=>t(6,s=q)),Je(n,Pa,q=>t(7,l=q)),rn(Nt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",d=o.get("sort")||"-created";function p(){t(5,u=!0),t(4,a=[]);const q=H.normalizeSearchFilter(f,["id","email","created","updated"]);return pe.admins.getFullList(100,{sort:d||"-created",filter:q}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),pe.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const _=()=>p(),g=()=>r==null?void 0:r.show(),b=q=>t(1,f=q.detail);function k(q){d=q,t(2,d)}function $(q){d=q,t(2,d)}function T(q){d=q,t(2,d)}function C(q){d=q,t(2,d)}const O=q=>r==null?void 0:r.show(q),M=(q,N)=>{(N.code==="Enter"||N.code==="Space")&&(N.preventDefault(),r==null||r.show(q))},D=()=>t(1,f="");function I(q){se[q?"unshift":"push"](()=>{r=q,t(3,r)})}const L=()=>p(),F=()=>p();return n.$$.update=()=>{if(n.$$.dirty&6&&d!==-1&&f!==-1){const q=new URLSearchParams({filter:f,sort:d}).toString();Vi("/settings/admins?"+q),p()}},[p,f,d,r,a,u,s,l,_,g,b,k,$,T,C,O,M,D,I,L,F]}class GD extends be{constructor(e){super(),ge(this,e,ZD,JD,_e,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function XD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Email"),s=E(),l=y("input"),h(e,"for",i=n[8]),h(l,"type","email"),h(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&h(e,"for",i),f&256&&o!==(o=u[8])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QD(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Password"),s=E(),l=y("input"),r=E(),a=y("div"),u=y("a"),u.textContent="Forgotten password?",h(e,"for",i=n[8]),h(l,"type","password"),h(l,"id",o=n[8]),l.required=!0,h(u,"href","/request-password-reset"),h(u,"class","link-hint"),h(a,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[1]),S(p,r,m),S(p,a,m),v(a,u),f||(d=[J(l,"input",n[5]),De(fn.call(null,u))],f=!0)},p(p,m){m&256&&i!==(i=p[8])&&h(e,"for",i),m&256&&o!==(o=p[8])&&h(l,"id",o),m&2&&l.value!==p[1]&&fe(l,p[1])},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),p&&w(a),f=!1,Ee(d)}}}function xD(n){let e,t,i,s,l,o,r,a,u,f,d;return s=new de({props:{class:"form-field required",name:"identity",$$slots:{default:[XD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[QD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

    Admin sign in

    ",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),a=y("button"),a.innerHTML=`Login - `,h(t,"class","content txt-center m-b-base"),h(a,"type","submit"),h(a,"class","btn btn-lg btn-block btn-next"),x(a,"btn-disabled",n[2]),x(a,"btn-loading",n[2]),h(e,"class","block")},m(p,m){S(p,e,m),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),v(e,a),u=!0,f||(d=J(e,"submit",at(n[3])),f=!0)},p(p,m){const _={};m&769&&(_.$$scope={dirty:m,ctx:p}),s.$set(_);const g={};m&770&&(g.$$scope={dirty:m,ctx:p}),o.$set(g),(!u||m&4)&&x(a,"btn-disabled",p[2]),(!u||m&4)&&x(a,"btn-loading",p[2])},i(p){u||(A(s.$$.fragment,p),A(o.$$.fragment,p),u=!0)},o(p){P(s.$$.fragment,p),P(o.$$.fragment,p),u=!1},d(p){p&&w(e),B(s),B(o),f=!1,d()}}}function eE(n){let e,t;return e=new r1({props:{$$slots:{default:[xD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function tE(n,e,t){let i;Je(n,ka,d=>t(6,i=d));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),pe.admins.authWithPassword(l,o).then(()=>{Aa(),Vi("/")}).catch(()=>{hl("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 nE extends be{constructor(e){super(),ge(this,e,tE,eE,_e,{})}}function iE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O;i=new de({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[lE,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[oE,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[rE,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[aE,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Oh(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),p=y("div"),m=y("div"),_=E(),M&&M.c(),g=E(),b=y("button"),k=y("span"),k.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(m,"class","flex-fill"),h(k,"class","txt"),h(b,"type","submit"),h(b,"class","btn btn-expanded"),b.disabled=$=!n[3]||n[2],x(b,"btn-loading",n[2]),h(p,"class","col-lg-12 flex"),h(e,"class","grid")},m(D,I){S(D,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),z(a,e,null),v(e,u),z(f,e,null),v(e,d),v(e,p),v(p,m),v(p,_),M&&M.m(p,null),v(p,g),v(p,b),v(b,k),T=!0,C||(O=J(b,"click",n[13]),C=!0)},p(D,I){const L={};I&1572865&&(L.$$scope={dirty:I,ctx:D}),i.$set(L);const F={};I&1572865&&(F.$$scope={dirty:I,ctx:D}),o.$set(F);const q={};I&1572865&&(q.$$scope={dirty:I,ctx:D}),a.$set(q);const N={};I&1572865&&(N.$$scope={dirty:I,ctx:D}),f.$set(N),D[3]?M?M.p(D,I):(M=Oh(D),M.c(),M.m(p,g)):M&&(M.d(1),M=null),(!T||I&12&&$!==($=!D[3]||D[2]))&&(b.disabled=$),(!T||I&4)&&x(b,"btn-loading",D[2])},i(D){T||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(a.$$.fragment,D),A(f.$$.fragment,D),T=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(a.$$.fragment,D),P(f.$$.fragment,D),T=!1},d(D){D&&w(e),B(i),B(o),B(a),B(f),M&&M.d(),C=!1,O()}}}function sE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function lE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Application name"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.appName),r||(a=J(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appName&&fe(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function oE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Application url"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.appUrl),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&fe(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Logs max days retention"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","number"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].logs.maxDays),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&>(l.value)!==u[0].logs.maxDays&&fe(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Hide collection create and edit controls",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[19]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[19])},m(d,p){S(d,e,p),e.checked=n[0].meta.hideControls,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),De(We.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(d,p){p&524288&&t!==(t=d[19])&&h(e,"id",t),p&1&&(e.checked=d[0].meta.hideControls),p&524288&&a!==(a=d[19])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Oh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function uE(n){let e,t,i,s,l,o,r,a,u;const f=[sE,iE],d=[];function p(m,_){return m[1]?0:1}return l=p(n),o=d[l]=f[l](n),{c(){e=y("header"),e.innerHTML=``,t=E(),i=y("div"),s=y("form"),o.c(),h(e,"class","page-header"),h(s,"class","panel"),h(s,"autocomplete","off"),h(i,"class","wrapper")},m(m,_){S(m,e,_),S(m,t,_),S(m,i,_),v(i,s),d[l].m(s,null),r=!0,a||(u=J(s,"submit",at(n[4])),a=!0)},p(m,_){let g=l;l=p(m),l===g?d[l].p(m,_):(ae(),P(d[g],1,1,()=>{d[g]=null}),ue(),o=d[l],o?o.p(m,_):(o=d[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),d[l].d(),a=!1,u()}}}function fE(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[uE]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function cE(n,e,t){let i,s,l,o;Je(n,Es,M=>t(14,s=M)),Je(n,So,M=>t(15,l=M)),Je(n,Nt,M=>t(16,o=M)),rn(Nt,o="Application settings",o);let r={},a={},u=!1,f=!1,d="";p();async function p(){t(1,u=!0);try{const M=await pe.settings.getAll()||{};_(M)}catch(M){pe.errorResponseHandler(M)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const M=await pe.settings.update(H.filterRedactedProps(a));_(M),Xt("Successfully saved application settings.")}catch(M){pe.errorResponseHandler(M)}t(2,f=!1)}}function _(M={}){var D,I;rn(So,l=(D=M==null?void 0:M.meta)==null?void 0:D.appName,l),rn(Es,s=!!((I=M==null?void 0:M.meta)!=null&&I.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.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 k(){a.meta.appUrl=this.value,t(0,a)}function $(){a.logs.maxDays=gt(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),O=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,d=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=d!=JSON.stringify(a))},[a,u,f,i,m,g,r,d,b,k,$,T,C,O]}class dE extends be{constructor(e){super(),ge(this,e,cE,fE,_e,{})}}function pE(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=E(),s=y("input"),h(t,"type","button"),h(t,"class","btn btn-transparent btn-circle"),h(e,"class","form-field-addon"),ai(s,a)},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[De(We.call(null,t,{position:"left",text:"Set new value"})),J(t,"click",n[6])],l=!0)},p(u,f){ai(s,a=Mt(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,Ee(o)}}}function hE(n){let e;function t(l,o){return l[3]?mE:pE}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function _E(n,e,t){const i=["value","mask"];let s=Qe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await pn(),r==null||r.focus()}const f=()=>u();function d(m){se[m?"unshift":"push"](()=>{r=m,t(2,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Kt(m)),t(5,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,d,p]}class cu extends be{constructor(e){super(),ge(this,e,_E,hE,_e,{value:0,mask:1})}}function gE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;return{c(){e=y("label"),t=W("Subject"),s=E(),l=y("input"),r=E(),a=y("div"),u=W(`Available placeholder parameters: +Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d,"id",p),k[0]&2&&m!==(m=b[1].id)&&d.value!==m&&(d.value=m)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(d),_=!1,g()}}}function vh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=y("button"),t=y("img"),s=E(),mn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||h(t,"src",i),h(t,"alt","Avatar "+n[30]),h(e,"type","button"),h(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),v(e,t),v(e,s),o||(r=J(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"))&&h(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function DD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","email"),h(r,"autocomplete","off"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[3]),u||(f=J(r,"input",n[18]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&8&&r.value!==d[3]&&fe(r,d[3])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function yh(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[ED,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function ED(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[29]),h(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&h(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function kh(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[AD,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ID,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),h(e,"class","col-12")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d[0]&536871168|d[1]&4&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d[0]&536871424|d[1]&4&&(m.$$scope={dirty:d,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{u&&(a||(a=He(t,yt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=He(t,yt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function AD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[8]),u||(f=J(r,"input",n[20]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&256&&r.value!==d[8]&&fe(r,d[8])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function ID(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[29]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[29]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[9]),u||(f=J(r,"input",n[21]),u=!0)},p(d,p){p[0]&536870912&&l!==(l=d[29])&&h(e,"for",l),p[0]&536870912&&a!==(a=d[29])&&h(r,"id",a),p[0]&512&&r.value!==d[9]&&fe(r,d[9])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_=!n[1].$isNew&&bh(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let T=0;T<10;T+=1)b[T]=vh(gh(n,g,T));a=new de({props:{class:"form-field required",name:"email",$$slots:{default:[DD,({uniqueId:T})=>({29:T}),({uniqueId:T})=>[T?536870912:0]]},$$scope:{ctx:n}}});let k=!n[1].$isNew&&yh(n),$=(n[1].$isNew||n[4])&&kh(n);return{c(){e=y("form"),_&&_.c(),t=E(),i=y("div"),s=y("p"),s.textContent="Avatar",l=E(),o=y("div");for(let T=0;T<10;T+=1)b[T].c();r=E(),U(a.$$.fragment),u=E(),k&&k.c(),f=E(),$&&$.c(),h(s,"class","section-title"),h(o,"class","flex flex-gap-xs flex-wrap"),h(i,"class","content"),h(e,"id",n[11]),h(e,"class","grid"),h(e,"autocomplete","off")},m(T,C){S(T,e,C),_&&_.m(e,null),v(e,t),v(e,i),v(i,s),v(i,l),v(i,o);for(let D=0;D<10;D+=1)b[D]&&b[D].m(o,null);v(e,r),z(a,e,null),v(e,u),k&&k.m(e,null),v(e,f),$&&$.m(e,null),d=!0,p||(m=J(e,"submit",at(n[12])),p=!0)},p(T,C){if(T[1].$isNew?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(T,C),C[0]&2&&A(_,1)):(_=bh(T),_.c(),A(_,1),_.m(e,t)),C[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const O=gh(T,g,M);b[M]?b[M].p(O,C):(b[M]=vh(O),b[M].c(),b[M].m(o,null))}for(;M<10;M+=1)b[M].d(1)}const D={};C[0]&536870920|C[1]&4&&(D.$$scope={dirty:C,ctx:T}),a.$set(D),T[1].$isNew?k&&(ae(),P(k,1,1,()=>{k=null}),ue()):k?(k.p(T,C),C[0]&2&&A(k,1)):(k=yh(T),k.c(),A(k,1),k.m(e,f)),T[1].$isNew||T[4]?$?($.p(T,C),C[0]&18&&A($,1)):($=kh(T),$.c(),A($,1),$.m(e,null)):$&&(ae(),P($,1,1,()=>{$=null}),ue())},i(T){d||(A(_),A(a.$$.fragment,T),A(k),A($),d=!0)},o(T){P(_),P(a.$$.fragment,T),P(k),P($),d=!1},d(T){T&&w(e),_&&_.d(),pt(b,T),B(a),k&&k.d(),$&&$.d(),p=!1,m()}}}function LD(n){let e,t=n[1].$isNew?"New admin":"Edit admin",i;return{c(){e=y("h4"),i=W(t)},m(s,l){S(s,e,l),v(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].$isNew?"New admin":"Edit admin")&&oe(i,t)},d(s){s&&w(e)}}}function wh(n){let e,t,i,s,l,o,r,a,u;return o=new Kn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[ND]},$$scope:{ctx:n}}}),{c(){e=y("button"),t=y("span"),i=E(),s=y("i"),l=E(),U(o.$$.fragment),r=E(),a=y("div"),h(s,"class","ri-more-line"),h(e,"type","button"),h(e,"aria-label","More"),h(e,"class","btn btn-sm btn-circle btn-transparent"),h(a,"class","flex-fill")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(e,l),z(o,e,null),S(f,r,d),S(f,a,d),u=!0},p(f,d){const p={};d[1]&4&&(p.$$scope={dirty:d,ctx:f}),o.$set(p)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),B(o),f&&w(r),f&&w(a)}}}function ND(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Delete`,h(e,"type","button"),h(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function FD(n){let e,t,i,s,l,o,r=n[1].$isNew?"Create":"Save changes",a,u,f,d,p,m=!n[1].$isNew&&wh(n);return{c(){m&&m.c(),e=E(),t=y("button"),i=y("span"),i.textContent="Cancel",s=E(),l=y("button"),o=y("span"),a=W(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-transparent"),t.disabled=n[6],h(o,"class","txt"),h(l,"type","submit"),h(l,"form",n[11]),h(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],x(l,"btn-loading",n[6])},m(_,g){m&&m.m(_,g),S(_,e,g),S(_,t,g),v(t,i),S(_,s,g),S(_,l,g),v(l,o),v(o,a),f=!0,d||(p=J(t,"click",n[16]),d=!0)},p(_,g){_[1].$isNew?m&&(ae(),P(m,1,1,()=>{m=null}),ue()):m?(m.p(_,g),g[0]&2&&A(m,1)):(m=wh(_),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=_[6]),(!f||g[0]&2)&&r!==(r=_[1].$isNew?"Create":"Save changes")&&oe(a,r),(!f||g[0]&1088&&u!==(u=!_[10]||_[6]))&&(l.disabled=u),(!f||g[0]&64)&&x(l,"btn-loading",_[6])},i(_){f||(A(m),f=!0)},o(_){P(m),f=!1},d(_){m&&m.d(_),_&&w(e),_&&w(t),_&&w(s),_&&w(l),d=!1,p()}}}function RD(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[FD],header:[LD],default:[PD]},$$scope:{ctx:n}};return e=new hn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){U(e.$$.fragment)},m(s,l){z(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),B(e,s)}}}function qD(n,e,t){let i;const s=Tt(),l="admin_"+H.randomString(5);let o,r=new rs,a=!1,u=!1,f=0,d="",p="",m="",_=!1;function g(K){return k(K),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function k(K){t(1,r=K!=null&&K.$clone?K.$clone():new rs),$()}function $(){t(4,_=!1),t(3,d=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,p=""),t(9,m=""),un({})}function T(){if(a||!i)return;t(6,a=!0);const K={email:d,avatar:f};(r.$isNew||_)&&(K.password=p,K.passwordConfirm=m);let ee;r.$isNew?ee=pe.admins.create(K):ee=pe.admins.update(r.id,K),ee.then(async te=>{var G;t(7,u=!1),b(),Qt(r.$isNew?"Successfully created admin.":"Successfully updated admin."),s("save",te),((G=pe.authStore.model)==null?void 0:G.id)===te.id&&pe.authStore.save(pe.authStore.token,te)}).catch(te=>{pe.errorResponseHandler(te)}).finally(()=>{t(6,a=!1)})}function C(){r!=null&&r.id&&vn("Do you really want to delete the selected admin?",()=>pe.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Qt("Successfully deleted admin."),s("delete",r)}).catch(K=>{pe.errorResponseHandler(K)}))}const D=()=>C(),M=()=>b(),O=K=>t(2,f=K);function I(){d=this.value,t(3,d)}function L(){_=this.checked,t(4,_)}function F(){p=this.value,t(8,p)}function q(){m=this.value,t(9,m)}const N=()=>i&&u?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function R(K){se[K?"unshift":"push"](()=>{o=K,t(5,o)})}function j(K){me.call(this,n,K)}function V(K){me.call(this,n,K)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.$isNew&&d!=""||_||d!==r.email||f!==r.avatar)},[b,r,f,d,_,o,a,u,p,m,i,l,T,C,g,D,M,O,I,L,F,q,N,R,j,V]}class jD extends ve{constructor(e){super(),be(this,e,qD,RD,_e,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function Sh(n,e,t){const i=n.slice();return i[24]=e[t],i}function VD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="id",h(t,"class",H.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function HD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="email",h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function zD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function BD(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="updated",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function $h(n){let e;function t(l,o){return l[5]?WD:UD}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 UD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Ch(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Ch(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function WD(n){let e;return{c(){e=y("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Ch(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Th(n){let e;return{c(){e=y("span"),e.textContent="You",h(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Mh(n,e){let t,i,s,l,o,r,a,u,f,d,p,m=e[24].id+"",_,g,b,k,$,T=e[24].email+"",C,D,M,O,I,L,F,q,N,R,j,V,K,ee;f=new er({props:{value:e[24].id}});let te=e[24].id===e[7].id&&Th();I=new $i({props:{date:e[24].created}}),q=new $i({props:{date:e[24].updated}});function G(){return e[15](e[24])}function ce(...X){return e[16](e[24],...X)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("figure"),l=y("img"),r=E(),a=y("td"),u=y("div"),U(f.$$.fragment),d=E(),p=y("span"),_=W(m),g=E(),te&&te.c(),b=E(),k=y("td"),$=y("span"),C=W(T),M=E(),O=y("td"),U(I.$$.fragment),L=E(),F=y("td"),U(q.$$.fragment),N=E(),R=y("td"),R.innerHTML='',j=E(),mn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||h(l,"src",o),h(l,"alt","Admin avatar"),h(s,"class","thumb thumb-sm thumb-circle"),h(i,"class","min-width"),h(p,"class","txt"),h(u,"class","label"),h(a,"class","col-type-text col-field-id"),h($,"class","txt txt-ellipsis"),h($,"title",D=e[24].email),h(k,"class","col-type-email col-field-email"),h(O,"class","col-type-date col-field-created"),h(F,"class","col-type-date col-field-updated"),h(R,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(X,le){S(X,t,le),v(t,i),v(i,s),v(s,l),v(t,r),v(t,a),v(a,u),z(f,u,null),v(u,d),v(u,p),v(p,_),v(a,g),te&&te.m(a,null),v(t,b),v(t,k),v(k,$),v($,C),v(t,M),v(t,O),z(I,O,null),v(t,L),v(t,F),z(q,F,null),v(t,N),v(t,R),v(t,j),V=!0,K||(ee=[J(t,"click",G),J(t,"keydown",ce)],K=!0)},p(X,le){e=X,(!V||le&16&&!mn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&h(l,"src",o);const ye={};le&16&&(ye.value=e[24].id),f.$set(ye),(!V||le&16)&&m!==(m=e[24].id+"")&&oe(_,m),e[24].id===e[7].id?te||(te=Th(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!V||le&16)&&T!==(T=e[24].email+"")&&oe(C,T),(!V||le&16&&D!==(D=e[24].email))&&h($,"title",D);const Se={};le&16&&(Se.date=e[24].created),I.$set(Se);const Ve={};le&16&&(Ve.date=e[24].updated),q.$set(Ve)},i(X){V||(A(f.$$.fragment,X),A(I.$$.fragment,X),A(q.$$.fragment,X),V=!0)},o(X){P(f.$$.fragment,X),P(I.$$.fragment,X),P(q.$$.fragment,X),V=!1},d(X){X&&w(t),B(f),te&&te.d(),B(I),B(q),K=!1,Ee(ee)}}}function YD(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D=[],M=new Map,O;function I(G){n[11](G)}let L={class:"col-type-text",name:"id",$$slots:{default:[VD]},$$scope:{ctx:n}};n[2]!==void 0&&(L.sort=n[2]),o=new ln({props:L}),se.push(()=>he(o,"sort",I));function F(G){n[12](G)}let q={class:"col-type-email col-field-email",name:"email",$$slots:{default:[HD]},$$scope:{ctx:n}};n[2]!==void 0&&(q.sort=n[2]),u=new ln({props:q}),se.push(()=>he(u,"sort",F));function N(G){n[13](G)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[zD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),p=new ln({props:R}),se.push(()=>he(p,"sort",N));function j(G){n[14](G)}let V={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[BD]},$$scope:{ctx:n}};n[2]!==void 0&&(V.sort=n[2]),g=new ln({props:V}),se.push(()=>he(g,"sort",j));let K=n[4];const ee=G=>G[24].id;for(let G=0;Gr=!1)),o.$set(X);const le={};ce&134217728&&(le.$$scope={dirty:ce,ctx:G}),!f&&ce&4&&(f=!0,le.sort=G[2],ke(()=>f=!1)),u.$set(le);const ye={};ce&134217728&&(ye.$$scope={dirty:ce,ctx:G}),!m&&ce&4&&(m=!0,ye.sort=G[2],ke(()=>m=!1)),p.$set(ye);const Se={};ce&134217728&&(Se.$$scope={dirty:ce,ctx:G}),!b&&ce&4&&(b=!0,Se.sort=G[2],ke(()=>b=!1)),g.$set(Se),ce&186&&(K=G[4],ae(),D=vt(D,ce,ee,1,G,K,M,C,Kt,Mh,null,Sh),ue(),!K.length&&te?te.p(G,ce):K.length?te&&(te.d(1),te=null):(te=$h(G),te.c(),te.m(C,null))),(!O||ce&32)&&x(e,"table-loading",G[5])},i(G){if(!O){A(o.$$.fragment,G),A(u.$$.fragment,G),A(p.$$.fragment,G),A(g.$$.fragment,G);for(let ce=0;ce + New admin`,m=E(),U(_.$$.fragment),g=E(),b=y("div"),k=E(),U($.$$.fragment),T=E(),I&&I.c(),C=$e(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(f,"class","flex-fill"),h(p,"type","button"),h(p,"class","btn btn-expanded"),h(e,"class","page-header"),h(b,"class","clearfix m-b-base")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(e,r),z(a,e,null),v(e,u),v(e,f),v(e,d),v(e,p),S(L,m,F),z(_,L,F),S(L,g,F),S(L,b,F),S(L,k,F),z($,L,F),S(L,T,F),I&&I.m(L,F),S(L,C,F),D=!0,M||(O=J(p,"click",n[9]),M=!0)},p(L,F){(!D||F&64)&&oe(o,L[6]);const q={};F&2&&(q.value=L[1]),_.$set(q);const N={};F&134217918&&(N.$$scope={dirty:F,ctx:L}),$.$set(N),L[4].length?I?I.p(L,F):(I=Oh(L),I.c(),I.m(C.parentNode,C)):I&&(I.d(1),I=null)},i(L){D||(A(a.$$.fragment,L),A(_.$$.fragment,L),A($.$$.fragment,L),D=!0)},o(L){P(a.$$.fragment,L),P(_.$$.fragment,L),P($.$$.fragment,L),D=!1},d(L){L&&w(e),B(a),L&&w(m),B(_,L),L&&w(g),L&&w(b),L&&w(k),B($,L),L&&w(T),I&&I.d(L),L&&w(C),M=!1,O()}}}function JD(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[KD]},$$scope:{ctx:n}}});let r={};return l=new jD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[18](null),B(l,a)}}}function ZD(n,e,t){let i,s,l;Je(n,wa,q=>t(21,i=q)),Je(n,Nt,q=>t(6,s=q)),Je(n,La,q=>t(7,l=q)),rn(Nt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",d=o.get("sort")||"-created";function p(){t(5,u=!0),t(4,a=[]);const q=H.normalizeSearchFilter(f,["id","email","created","updated"]);return pe.admins.getFullList(100,{sort:d||"-created",filter:q}).then(N=>{t(4,a=N),t(5,u=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,u=!1),console.warn(N),m(),pe.errorResponseHandler(N,!1))})}function m(){t(4,a=[])}const _=()=>p(),g=()=>r==null?void 0:r.show(),b=q=>t(1,f=q.detail);function k(q){d=q,t(2,d)}function $(q){d=q,t(2,d)}function T(q){d=q,t(2,d)}function C(q){d=q,t(2,d)}const D=q=>r==null?void 0:r.show(q),M=(q,N)=>{(N.code==="Enter"||N.code==="Space")&&(N.preventDefault(),r==null||r.show(q))},O=()=>t(1,f="");function I(q){se[q?"unshift":"push"](()=>{r=q,t(3,r)})}const L=()=>p(),F=()=>p();return n.$$.update=()=>{if(n.$$.dirty&6&&d!==-1&&f!==-1){const q=new URLSearchParams({filter:f,sort:d}).toString();Vi("/settings/admins?"+q),p()}},[p,f,d,r,a,u,s,l,_,g,b,k,$,T,C,D,M,O,I,L,F]}class GD extends ve{constructor(e){super(),be(this,e,ZD,JD,_e,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function XD(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Email"),s=E(),l=y("input"),h(e,"for",i=n[8]),h(l,"type","email"),h(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&h(e,"for",i),f&256&&o!==(o=u[8])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QD(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=W("Password"),s=E(),l=y("input"),r=E(),a=y("div"),u=y("a"),u.textContent="Forgotten password?",h(e,"for",i=n[8]),h(l,"type","password"),h(l,"id",o=n[8]),l.required=!0,h(u,"href","/request-password-reset"),h(u,"class","link-hint"),h(a,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[1]),S(p,r,m),S(p,a,m),v(a,u),f||(d=[J(l,"input",n[5]),De(dn.call(null,u))],f=!0)},p(p,m){m&256&&i!==(i=p[8])&&h(e,"for",i),m&256&&o!==(o=p[8])&&h(l,"id",o),m&2&&l.value!==p[1]&&fe(l,p[1])},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),p&&w(a),f=!1,Ee(d)}}}function xD(n){let e,t,i,s,l,o,r,a,u,f,d;return s=new de({props:{class:"form-field required",name:"identity",$$slots:{default:[XD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[QD,({uniqueId:p})=>({8:p}),({uniqueId:p})=>p?256:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

    Admin sign in

    ",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),a=y("button"),a.innerHTML=`Login + `,h(t,"class","content txt-center m-b-base"),h(a,"type","submit"),h(a,"class","btn btn-lg btn-block btn-next"),x(a,"btn-disabled",n[2]),x(a,"btn-loading",n[2]),h(e,"class","block")},m(p,m){S(p,e,m),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),v(e,a),u=!0,f||(d=J(e,"submit",at(n[3])),f=!0)},p(p,m){const _={};m&769&&(_.$$scope={dirty:m,ctx:p}),s.$set(_);const g={};m&770&&(g.$$scope={dirty:m,ctx:p}),o.$set(g),(!u||m&4)&&x(a,"btn-disabled",p[2]),(!u||m&4)&&x(a,"btn-loading",p[2])},i(p){u||(A(s.$$.fragment,p),A(o.$$.fragment,p),u=!0)},o(p){P(s.$$.fragment,p),P(o.$$.fragment,p),u=!1},d(p){p&&w(e),B(s),B(o),f=!1,d()}}}function eE(n){let e,t;return e=new a1({props:{$$slots:{default:[xD]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function tE(n,e,t){let i;Je(n,wa,d=>t(6,i=d));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),pe.admins.authWithPassword(l,o).then(()=>{Ia(),Vi("/")}).catch(()=>{hl("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 nE extends ve{constructor(e){super(),be(this,e,tE,eE,_e,{})}}function iE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D;i=new de({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[lE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[oE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[rE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[aE,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Dh(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),p=y("div"),m=y("div"),_=E(),M&&M.c(),g=E(),b=y("button"),k=y("span"),k.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(m,"class","flex-fill"),h(k,"class","txt"),h(b,"type","submit"),h(b,"class","btn btn-expanded"),b.disabled=$=!n[3]||n[2],x(b,"btn-loading",n[2]),h(p,"class","col-lg-12 flex"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),z(a,e,null),v(e,u),z(f,e,null),v(e,d),v(e,p),v(p,m),v(p,_),M&&M.m(p,null),v(p,g),v(p,b),v(b,k),T=!0,C||(D=J(b,"click",n[13]),C=!0)},p(O,I){const L={};I&1572865&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I&1572865&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I&1572865&&(q.$$scope={dirty:I,ctx:O}),a.$set(q);const N={};I&1572865&&(N.$$scope={dirty:I,ctx:O}),f.$set(N),O[3]?M?M.p(O,I):(M=Dh(O),M.c(),M.m(p,g)):M&&(M.d(1),M=null),(!T||I&12&&$!==($=!O[3]||O[2]))&&(b.disabled=$),(!T||I&4)&&x(b,"btn-loading",O[2])},i(O){T||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),T=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(a.$$.fragment,O),P(f.$$.fragment,O),T=!1},d(O){O&&w(e),B(i),B(o),B(a),B(f),M&&M.d(),C=!1,D()}}}function sE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function lE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Application name"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.appName),r||(a=J(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appName&&fe(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function oE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Application url"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.appUrl),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&fe(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Logs max days retention"),s=E(),l=y("input"),h(e,"for",i=n[19]),h(l,"type","number"),h(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].logs.maxDays),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&h(e,"for",i),f&524288&&o!==(o=u[19])&&h(l,"id",o),f&1&>(l.value)!==u[0].logs.maxDays&&fe(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Hide collection create and edit controls",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[19]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[19])},m(d,p){S(d,e,p),e.checked=n[0].meta.hideControls,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[11]),De(We.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(d,p){p&524288&&t!==(t=d[19])&&h(e,"id",t),p&1&&(e.checked=d[0].meta.hideControls),p&524288&&a!==(a=d[19])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Dh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function uE(n){let e,t,i,s,l,o,r,a,u;const f=[sE,iE],d=[];function p(m,_){return m[1]?0:1}return l=p(n),o=d[l]=f[l](n),{c(){e=y("header"),e.innerHTML=``,t=E(),i=y("div"),s=y("form"),o.c(),h(e,"class","page-header"),h(s,"class","panel"),h(s,"autocomplete","off"),h(i,"class","wrapper")},m(m,_){S(m,e,_),S(m,t,_),S(m,i,_),v(i,s),d[l].m(s,null),r=!0,a||(u=J(s,"submit",at(n[4])),a=!0)},p(m,_){let g=l;l=p(m),l===g?d[l].p(m,_):(ae(),P(d[g],1,1,()=>{d[g]=null}),ue(),o=d[l],o?o.p(m,_):(o=d[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){P(o),r=!1},d(m){m&&w(e),m&&w(t),m&&w(i),d[l].d(),a=!1,u()}}}function fE(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[uE]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function cE(n,e,t){let i,s,l,o;Je(n,Es,M=>t(14,s=M)),Je(n,wo,M=>t(15,l=M)),Je(n,Nt,M=>t(16,o=M)),rn(Nt,o="Application settings",o);let r={},a={},u=!1,f=!1,d="";p();async function p(){t(1,u=!0);try{const M=await pe.settings.getAll()||{};_(M)}catch(M){pe.errorResponseHandler(M)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const M=await pe.settings.update(H.filterRedactedProps(a));_(M),Qt("Successfully saved application settings.")}catch(M){pe.errorResponseHandler(M)}t(2,f=!1)}}function _(M={}){var O,I;rn(wo,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),rn(Es,s=!!((I=M==null?void 0:M.meta)!=null&&I.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.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 k(){a.meta.appUrl=this.value,t(0,a)}function $(){a.logs.maxDays=gt(this.value),t(0,a)}function T(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),D=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,d=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=d!=JSON.stringify(a))},[a,u,f,i,m,g,r,d,b,k,$,T,C,D]}class dE extends ve{constructor(e){super(),be(this,e,cE,fE,_e,{})}}function pE(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=E(),s=y("input"),h(t,"type","button"),h(t,"class","btn btn-transparent btn-circle"),h(e,"class","form-field-addon"),ai(s,a)},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[De(We.call(null,t,{position:"left",text:"Set new value"})),J(t,"click",n[6])],l=!0)},p(u,f){ai(s,a=Mt(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,Ee(o)}}}function hE(n){let e;function t(l,o){return l[3]?mE:pE}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function _E(n,e,t){const i=["value","mask"];let s=Qe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await an(),r==null||r.focus()}const f=()=>u();function d(m){se[m?"unshift":"push"](()=>{r=m,t(2,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Jt(m)),t(5,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,d,p]}class du extends ve{constructor(e){super(),be(this,e,_E,hE,_e,{value:0,mask:1})}}function gE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;return{c(){e=y("label"),t=W("Subject"),s=E(),l=y("input"),r=E(),a=y("div"),u=W(`Available placeholder parameters: `),f=y("button"),f.textContent=`{APP_NAME} `,d=W(`, `),p=y("button"),p.textContent=`{APP_URL} @@ -174,7 +174,7 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `),p=y("button"),p.textContent=`{APP_URL} `,m=W(`, `),_=y("button"),_.textContent=`{TOKEN} - `,g=W("."),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),h(l,"spellcheck","false"),l.required=!0,h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(_,"title","Required parameter"),h(a,"class","help-block")},m($,T){S($,e,T),v(e,t),S($,s,T),S($,l,T),fe(l,n[0].actionUrl),S($,r,T),S($,a,T),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),b||(k=[J(l,"input",n[16]),J(f,"click",n[17]),J(p,"click",n[18]),J(_,"click",n[19])],b=!0)},p($,T){T[1]&1&&i!==(i=$[31])&&h(e,"for",i),T[1]&1&&o!==(o=$[31])&&h(l,"id",o),T[0]&1&&l.value!==$[0].actionUrl&&fe(l,$[0].actionUrl)},d($){$&&w(e),$&&w(s),$&&w(l),$&&w(r),$&&w(a),b=!1,Ee(k)}}}function vE(n){let e,t,i,s;return{c(){e=y("textarea"),h(e,"id",t=n[31]),h(e,"class","txt-mono"),h(e,"spellcheck","false"),h(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),fe(e,n[0].body),i||(s=J(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&h(e,"id",t),o[0]&1&&fe(e,l[0].body)},i:Q,o:Q,d(l){l&&w(e),i=!1,s()}}}function yE(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=Lt(o,r(n)),se.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(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,ke(()=>t=!1)),u[0]&16&&o!==(o=a[4])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function kE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C;const O=[yE,vE],M=[];function D(I,L){return I[4]&&!I[5]?0:1}return l=D(n),o=M[l]=O[l](n),{c(){e=y("label"),t=W("Body (HTML)"),s=E(),o.c(),r=E(),a=y("div"),u=W(`Available placeholder parameters: + `,g=W("."),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),h(l,"spellcheck","false"),l.required=!0,h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(_,"title","Required parameter"),h(a,"class","help-block")},m($,T){S($,e,T),v(e,t),S($,s,T),S($,l,T),fe(l,n[0].actionUrl),S($,r,T),S($,a,T),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),b||(k=[J(l,"input",n[16]),J(f,"click",n[17]),J(p,"click",n[18]),J(_,"click",n[19])],b=!0)},p($,T){T[1]&1&&i!==(i=$[31])&&h(e,"for",i),T[1]&1&&o!==(o=$[31])&&h(l,"id",o),T[0]&1&&l.value!==$[0].actionUrl&&fe(l,$[0].actionUrl)},d($){$&&w(e),$&&w(s),$&&w(l),$&&w(r),$&&w(a),b=!1,Ee(k)}}}function vE(n){let e,t,i,s;return{c(){e=y("textarea"),h(e,"id",t=n[31]),h(e,"class","txt-mono"),h(e,"spellcheck","false"),h(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),fe(e,n[0].body),i||(s=J(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&h(e,"id",t),o[0]&1&&fe(e,l[0].body)},i:Q,o:Q,d(l){l&&w(e),i=!1,s()}}}function yE(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=Lt(o,r(n)),se.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(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,ke(()=>t=!1)),u[0]&16&&o!==(o=a[4])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function kE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C;const D=[yE,vE],M=[];function O(I,L){return I[4]&&!I[5]?0:1}return l=O(n),o=M[l]=D[l](n),{c(){e=y("label"),t=W("Body (HTML)"),s=E(),o.c(),r=E(),a=y("div"),u=W(`Available placeholder parameters: `),f=y("button"),f.textContent=`{APP_NAME} `,d=W(`, `),p=y("button"),p.textContent=`{APP_URL} @@ -182,8 +182,8 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `),_=y("button"),_.textContent=`{TOKEN} `,g=W(`, `),b=y("button"),b.textContent=`{ACTION_URL} - `,k=W("."),h(e,"for",i=n[31]),h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(b,"type","button"),h(b,"class","label label-sm link-primary txt-mono"),h(b,"title","Required parameter"),h(a,"class","help-block")},m(I,L){S(I,e,L),v(e,t),S(I,s,L),M[l].m(I,L),S(I,r,L),S(I,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),v(a,b),v(a,k),$=!0,T||(C=[J(f,"click",n[22]),J(p,"click",n[23]),J(_,"click",n[24]),J(b,"click",n[25])],T=!0)},p(I,L){(!$||L[1]&1&&i!==(i=I[31]))&&h(e,"for",i);let F=l;l=D(I),l===F?M[l].p(I,L):(ae(),P(M[F],1,1,()=>{M[F]=null}),ue(),o=M[l],o?o.p(I,L):(o=M[l]=O[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,Ee(C)}}}function wE(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[gE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[bE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[kE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),S(r,s,a),z(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 d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){B(e,r),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function Dh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function SE(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Dh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=W(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=$e(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&oe(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Dh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),P(f,1,1,()=>{f=null}),ue())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function $E(n){let e,t;const i=[n[8]];let s={$$slots:{header:[SE],default:[wE]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=Eh,p=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await rt(()=>import("./CodeEditor-65cf3b79.js"),["./CodeEditor-65cf3b79.js","./index-c4d2d831.js"],import.meta.url)).default),Eh=d,t(5,p=!1))}function k(G){H.copyToClipboard(G),s1(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function O(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),D=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function F(){u.body=this.value,t(0,u)}const q=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),R=()=>k("{TOKEN}"),j=()=>k("{ACTION_URL}");function V(G){se[G?"unshift":"push"](()=>{f=G,t(3,f)})}function K(G){me.call(this,n,G)}function ee(G){me.call(this,n,G)}function te(G){me.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),Kt(G)),t(8,l=Qe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!H.isEmpty(H.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ri(r))},[u,r,a,f,d,p,i,k,l,m,_,g,o,$,T,C,O,M,D,I,L,F,q,N,R,j,V,K,ee,te]}class Fr extends be{constructor(e){super(),ge(this,e,CE,$E,_e,{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[21]=e[t],i}function Ih(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=Ab(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=W(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(_,g){S(_,t,g),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(_,g){e=_,g&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(_){_&&w(t),d.r(),p=!1,m()}}}function TE(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[ME,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),U(t.$$.fragment),i=E(),U(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),z(t,e,null),v(e,i),z(s,e,null),l=!0,o||(r=J(e,"submit",at(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),B(t),B(s),o=!1,r()}}}function DE(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function EE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function AE(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[EE],header:[DE],default:[OE]},$$scope:{ctx:n}};return e=new hn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){U(e.$$.fragment)},m(s,l){z(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[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),B(e,s)}}}const Rr="last_email_test",Ph="email_test_request";function IE(n,e,t){let i;const s=Tt(),l="email_test_"+H.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(Rr),u=o[0].value,f=!1,d=null;function p(D="",I=""){t(1,a=D||localStorage.getItem(Rr)),t(2,u=I||o[0].value),mn({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Rr,a),clearTimeout(d),d=setTimeout(()=>{pe.cancelRequest(Ph),hl("Test email send timeout.")},3e4);try{await pe.settings.testEmail(a,u,{$cancelKey:Ph}),Xt("Successfully sent test email."),s("submit"),t(4,f=!1),await pn(),m()}catch(D){t(4,f=!1),pe.errorResponseHandler(D)}clearTimeout(d)}}const g=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>_(),T=()=>!f;function C(D){se[D?"unshift":"push"](()=>{r=D,t(3,r)})}function O(D){me.call(this,n,D)}function M(D){me.call(this,n,D)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,p,b,g,k,$,T,C,O,M]}class PE extends be{constructor(e){super(),ge(this,e,IE,AE,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function LE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[FE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[RE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});function q(X){n[14](X)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Fr({props:N}),se.push(()=>he(u,"config",q));function R(X){n[15](X)}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),p=new Fr({props:j}),se.push(()=>he(p,"config",R));function V(X){n[16](X)}let K={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(K.config=n[0].meta.confirmEmailChangeTemplate),g=new Fr({props:K}),se.push(()=>he(g,"config",V)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[qE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Lh(n);function te(X,le){return X[4]?YE:WE}let G=te(n),ce=G(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),d=E(),U(p.$$.fragment),_=E(),U(g.$$.fragment),k=E(),$=y("hr"),T=E(),U(C.$$.fragment),O=E(),ee&&ee.c(),M=E(),D=y("div"),I=y("div"),L=E(),ce.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(D,"class","flex")},m(X,le){S(X,e,le),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),S(X,r,le),S(X,a,le),z(u,a,null),v(a,d),z(p,a,null),v(a,_),z(g,a,null),S(X,k,le),S(X,$,le),S(X,T,le),z(C,X,le),S(X,O,le),ee&&ee.m(X,le),S(X,M,le),S(X,D,le),v(D,I),v(D,L),ce.m(D,null),F=!0},p(X,le){const ve={};le[0]&1|le[1]&3&&(ve.$$scope={dirty:le,ctx:X}),i.$set(ve);const Se={};le[0]&1|le[1]&3&&(Se.$$scope={dirty:le,ctx:X}),o.$set(Se);const Ve={};!f&&le[0]&1&&(f=!0,Ve.config=X[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Ve);const ze={};!m&&le[0]&1&&(m=!0,ze.config=X[0].meta.resetPasswordTemplate,ke(()=>m=!1)),p.$set(ze);const we={};!b&&le[0]&1&&(b=!0,we.config=X[0].meta.confirmEmailChangeTemplate,ke(()=>b=!1)),g.$set(we);const Me={};le[0]&1|le[1]&3&&(Me.$$scope={dirty:le,ctx:X}),C.$set(Me),X[0].smtp.enabled?ee?(ee.p(X,le),le[0]&1&&A(ee,1)):(ee=Lh(X),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(ae(),P(ee,1,1,()=>{ee=null}),ue()),G===(G=te(X))&&ce?ce.p(X,le):(ce.d(1),ce=G(X),ce&&(ce.c(),ce.m(D,null)))},i(X){F||(A(i.$$.fragment,X),A(o.$$.fragment,X),A(u.$$.fragment,X),A(p.$$.fragment,X),A(g.$$.fragment,X),A(C.$$.fragment,X),A(ee),F=!0)},o(X){P(i.$$.fragment,X),P(o.$$.fragment,X),P(u.$$.fragment,X),P(p.$$.fragment,X),P(g.$$.fragment,X),P(C.$$.fragment,X),P(ee),F=!1},d(X){X&&w(e),B(i),B(o),X&&w(r),X&&w(a),B(u),B(p),B(g),X&&w(k),X&&w($),X&&w(T),B(C,X),X&&w(O),ee&&ee.d(X),X&&w(M),X&&w(D),ce.d()}}}function NE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function FE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&fe(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function RE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&fe(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),De(We.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(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Lh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[jE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[VE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[HE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[zE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[BE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[UE,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),_=y("div"),U(g.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(_,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(D,I){S(D,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,_),z(g,_,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(D,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:D}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:D}),o.$set(F);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:D}),u.$set(q);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:D}),p.$set(N);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:D}),g.$set(R);const j={};I[0]&1|I[1]&3&&(j.$$scope={dirty:I,ctx:D}),$.$set(j)},i(D){M||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(p.$$.fragment,D),A(g.$$.fragment,D),A($.$$.fragment,D),D&&nt(()=>{M&&(O||(O=He(e,Ct,{duration:150},!0)),O.run(1))}),M=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(p.$$.fragment,D),P(g.$$.fragment,D),P($.$$.fragment,D),D&&(O||(O=He(e,Ct,{duration:150},!1)),O.run(0)),M=!1},d(D){D&&w(e),B(i),B(o),B(u),B(p),B(g),B($),D&&O&&O.end()}}}function jE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&fe(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&fe(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("TLS encryption"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function zE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("AUTH method"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function BE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&fe(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UE(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 cu({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Password"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function WE(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` - Send test email`,h(e,"type","button"),h(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function YE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],h(l,"class","txt"),h(s,"type","submit"),h(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"click",n[24]),J(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&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function KE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[NE,LE],$=[];function T(C,O){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[5]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[27])),g=!0)},p(C,O){(!_||O[0]&32)&&oe(o,C[5]);let M=p;p=T(C),p===M?$[p].p(C,O):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function JE(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[KE]},$$scope:{ctx:n}}});let r={};return l=new PE({props:r}),n[28](l),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[28](null),B(l,a)}}}function ZE(n,e,t){let i,s,l;Je(n,Nt,te=>t(5,l=te));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];rn(Nt,l="Mail settings",l);let a,u={},f={},d=!1,p=!1;m();async function m(){t(2,d=!0);try{const te=await pe.settings.getAll()||{};g(te)}catch(te){pe.errorResponseHandler(te)}t(2,d=!1)}async function _(){if(!(p||!s)){t(3,p=!0);try{const te=await pe.settings.update(H.filterRedactedProps(f));g(te),mn({}),Xt("Successfully saved mail settings.")}catch(te){pe.errorResponseHandler(te)}t(3,p=!1)}}function g(te={}){t(0,f={meta:(te==null?void 0:te.meta)||{},smtp:(te==null?void 0:te.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 k(){f.meta.senderName=this.value,t(0,f)}function $(){f.meta.senderAddress=this.value,t(0,f)}function T(te){n.$$.not_equal(f.meta.verificationTemplate,te)&&(f.meta.verificationTemplate=te,t(0,f))}function C(te){n.$$.not_equal(f.meta.resetPasswordTemplate,te)&&(f.meta.resetPasswordTemplate=te,t(0,f))}function O(te){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,te)&&(f.meta.confirmEmailChangeTemplate=te,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=gt(this.value),t(0,f)}function L(te){n.$$.not_equal(f.smtp.tls,te)&&(f.smtp.tls=te,t(0,f))}function F(te){n.$$.not_equal(f.smtp.authMethod,te)&&(f.smtp.authMethod=te,t(0,f))}function q(){f.smtp.username=this.value,t(0,f)}function N(te){n.$$.not_equal(f.smtp.password,te)&&(f.smtp.password=te,t(0,f))}const R=()=>b(),j=()=>_(),V=()=>a==null?void 0:a.show(),K=()=>_();function ee(te){se[te?"unshift":"push"](()=>{a=te,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,d,p,s,l,o,r,_,b,u,i,k,$,T,C,O,M,D,I,L,F,q,N,R,j,V,K,ee]}class GE extends be{constructor(e){super(),ge(this,e,ZE,JE,_e,{},null,[-1,-1])}}function XE(n){var C,O;let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[xE,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Nh(n),k=n[1].s3.enabled&&Fh(n),$=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&Rh(n),T=n[6]&&qh(n);return{c(){U(e.$$.fragment),t=E(),b&&b.c(),i=E(),k&&k.c(),s=E(),l=y("div"),o=y("div"),r=E(),$&&$.c(),a=E(),T&&T.c(),u=E(),f=y("button"),d=y("span"),d.textContent="Save changes",h(o,"class","flex-fill"),h(d,"class","txt"),h(f,"type","submit"),h(f,"class","btn btn-expanded"),f.disabled=p=!n[6]||n[3],x(f,"btn-loading",n[3]),h(l,"class","flex")},m(M,D){z(e,M,D),S(M,t,D),b&&b.m(M,D),S(M,i,D),k&&k.m(M,D),S(M,s,D),S(M,l,D),v(l,o),v(l,r),$&&$.m(l,null),v(l,a),T&&T.m(l,null),v(l,u),v(l,f),v(f,d),m=!0,_||(g=J(f,"click",n[19]),_=!0)},p(M,D){var L,F;const I={};D&100663298&&(I.$$scope={dirty:D,ctx:M}),e.$set(I),((L=M[0].s3)==null?void 0:L.enabled)!=M[1].s3.enabled?b?(b.p(M,D),D&3&&A(b,1)):(b=Nh(M),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(ae(),P(b,1,1,()=>{b=null}),ue()),M[1].s3.enabled?k?(k.p(M,D),D&2&&A(k,1)):(k=Fh(M),k.c(),A(k,1),k.m(s.parentNode,s)):k&&(ae(),P(k,1,1,()=>{k=null}),ue()),(F=M[1].s3)!=null&&F.enabled&&!M[6]&&!M[3]?$?$.p(M,D):($=Rh(M),$.c(),$.m(l,a)):$&&($.d(1),$=null),M[6]?T?T.p(M,D):(T=qh(M),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||D&72&&p!==(p=!M[6]||M[3]))&&(f.disabled=p),(!m||D&8)&&x(f,"btn-loading",M[3])},i(M){m||(A(e.$$.fragment,M),A(b),A(k),m=!0)},o(M){P(e.$$.fragment,M),P(b),P(k),m=!1},d(M){B(e,M),M&&w(t),b&&b.d(M),M&&w(i),k&&k.d(M),M&&w(s),M&&w(l),$&&$.d(),T&&T.d(),_=!1,g()}}}function QE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function xE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Use S3 storage"),h(e,"type","checkbox"),h(e,"id",t=n[25]),e.required=!0,h(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),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&h(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Nh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,d,p=n[1].s3.enabled?"S3 storage":"local file system",m,_,g,b,k,$,T,C,O,M,D,I;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=W(`If you have existing uploaded files, you'll have to migrate them manually from + `,k=W("."),h(e,"for",i=n[31]),h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(b,"type","button"),h(b,"class","label label-sm link-primary txt-mono"),h(b,"title","Required parameter"),h(a,"class","help-block")},m(I,L){S(I,e,L),v(e,t),S(I,s,L),M[l].m(I,L),S(I,r,L),S(I,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),v(a,b),v(a,k),$=!0,T||(C=[J(f,"click",n[22]),J(p,"click",n[23]),J(_,"click",n[24]),J(b,"click",n[25])],T=!0)},p(I,L){(!$||L[1]&1&&i!==(i=I[31]))&&h(e,"for",i);let F=l;l=O(I),l===F?M[l].p(I,L):(ae(),P(M[F],1,1,()=>{M[F]=null}),ue(),o=M[l],o?o.p(I,L):(o=M[l]=D[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,Ee(C)}}}function wE(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[gE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[bE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[kE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),S(r,s,a),z(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 d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){B(e,r),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function Eh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function SE(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Eh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=W(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=$e(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&oe(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Eh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),P(f,1,1,()=>{f=null}),ue())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function $E(n){let e,t;const i=[n[8]];let s={$$slots:{header:[SE],default:[wE]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=Ah,p=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await rt(()=>import("./CodeEditor-ed3b6d0c.js"),["./CodeEditor-ed3b6d0c.js","./index-c4d2d831.js"],import.meta.url)).default),Ah=d,t(5,p=!1))}function k(G){H.copyToClipboard(G),l1(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function D(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),O=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function F(){u.body=this.value,t(0,u)}const q=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),R=()=>k("{TOKEN}"),j=()=>k("{ACTION_URL}");function V(G){se[G?"unshift":"push"](()=>{f=G,t(3,f)})}function K(G){me.call(this,n,G)}function ee(G){me.call(this,n,G)}function te(G){me.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),Jt(G)),t(8,l=Qe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!H.isEmpty(H.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ri(r))},[u,r,a,f,d,p,i,k,l,m,_,g,o,$,T,C,D,M,O,I,L,F,q,N,R,j,V,K,ee,te]}class Nr extends ve{constructor(e){super(),be(this,e,CE,$E,_e,{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 Ih(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ph(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=Ib(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=W(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(_,g){S(_,t,g),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(_,g){e=_,g&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(_){_&&w(t),d.r(),p=!1,m()}}}function TE(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[ME,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),U(t.$$.fragment),i=E(),U(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),z(t,e,null),v(e,i),z(s,e,null),l=!0,o||(r=J(e,"submit",at(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),B(t),B(s),o=!1,r()}}}function DE(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function EE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function AE(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[EE],header:[DE],default:[OE]},$$scope:{ctx:n}};return e=new hn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){U(e.$$.fragment)},m(s,l){z(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[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),B(e,s)}}}const Fr="last_email_test",Lh="email_test_request";function IE(n,e,t){let i;const s=Tt(),l="email_test_"+H.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(Fr),u=o[0].value,f=!1,d=null;function p(O="",I=""){t(1,a=O||localStorage.getItem(Fr)),t(2,u=I||o[0].value),un({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Fr,a),clearTimeout(d),d=setTimeout(()=>{pe.cancelRequest(Lh),hl("Test email send timeout.")},3e4);try{await pe.settings.testEmail(a,u,{$cancelKey:Lh}),Qt("Successfully sent test email."),s("submit"),t(4,f=!1),await an(),m()}catch(O){t(4,f=!1),pe.errorResponseHandler(O)}clearTimeout(d)}}const g=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>_(),T=()=>!f;function C(O){se[O?"unshift":"push"](()=>{r=O,t(3,r)})}function D(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,p,b,g,k,$,T,C,D,M]}class PE extends ve{constructor(e){super(),be(this,e,IE,AE,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function LE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[FE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[RE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});function q(X){n[14](X)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Nr({props:N}),se.push(()=>he(u,"config",q));function R(X){n[15](X)}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),p=new Nr({props:j}),se.push(()=>he(p,"config",R));function V(X){n[16](X)}let K={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(K.config=n[0].meta.confirmEmailChangeTemplate),g=new Nr({props:K}),se.push(()=>he(g,"config",V)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[qE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Nh(n);function te(X,le){return X[4]?YE:WE}let G=te(n),ce=G(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),d=E(),U(p.$$.fragment),_=E(),U(g.$$.fragment),k=E(),$=y("hr"),T=E(),U(C.$$.fragment),D=E(),ee&&ee.c(),M=E(),O=y("div"),I=y("div"),L=E(),ce.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(O,"class","flex")},m(X,le){S(X,e,le),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),S(X,r,le),S(X,a,le),z(u,a,null),v(a,d),z(p,a,null),v(a,_),z(g,a,null),S(X,k,le),S(X,$,le),S(X,T,le),z(C,X,le),S(X,D,le),ee&&ee.m(X,le),S(X,M,le),S(X,O,le),v(O,I),v(O,L),ce.m(O,null),F=!0},p(X,le){const ye={};le[0]&1|le[1]&3&&(ye.$$scope={dirty:le,ctx:X}),i.$set(ye);const Se={};le[0]&1|le[1]&3&&(Se.$$scope={dirty:le,ctx:X}),o.$set(Se);const Ve={};!f&&le[0]&1&&(f=!0,Ve.config=X[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Ve);const ze={};!m&&le[0]&1&&(m=!0,ze.config=X[0].meta.resetPasswordTemplate,ke(()=>m=!1)),p.$set(ze);const we={};!b&&le[0]&1&&(b=!0,we.config=X[0].meta.confirmEmailChangeTemplate,ke(()=>b=!1)),g.$set(we);const Me={};le[0]&1|le[1]&3&&(Me.$$scope={dirty:le,ctx:X}),C.$set(Me),X[0].smtp.enabled?ee?(ee.p(X,le),le[0]&1&&A(ee,1)):(ee=Nh(X),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(ae(),P(ee,1,1,()=>{ee=null}),ue()),G===(G=te(X))&&ce?ce.p(X,le):(ce.d(1),ce=G(X),ce&&(ce.c(),ce.m(O,null)))},i(X){F||(A(i.$$.fragment,X),A(o.$$.fragment,X),A(u.$$.fragment,X),A(p.$$.fragment,X),A(g.$$.fragment,X),A(C.$$.fragment,X),A(ee),F=!0)},o(X){P(i.$$.fragment,X),P(o.$$.fragment,X),P(u.$$.fragment,X),P(p.$$.fragment,X),P(g.$$.fragment,X),P(C.$$.fragment,X),P(ee),F=!1},d(X){X&&w(e),B(i),B(o),X&&w(r),X&&w(a),B(u),B(p),B(g),X&&w(k),X&&w($),X&&w(T),B(C,X),X&&w(D),ee&&ee.d(X),X&&w(M),X&&w(O),ce.d()}}}function NE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function FE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&fe(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function RE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&fe(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),De(We.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(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[jE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[VE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[HE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[zE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[BE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[UE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),_=y("div"),U(g.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(_,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,_),z(g,_,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(O,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:O}),u.$set(q);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:O}),p.$set(N);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:O}),g.$set(R);const j={};I[0]&1|I[1]&3&&(j.$$scope={dirty:I,ctx:O}),$.$set(j)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(p.$$.fragment,O),A(g.$$.fragment,O),A($.$$.fragment,O),O&&nt(()=>{M&&(D||(D=He(e,yt,{duration:150},!0)),D.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(g.$$.fragment,O),P($.$$.fragment,O),O&&(D||(D=He(e,yt,{duration:150},!1)),D.run(0)),M=!1},d(O){O&&w(e),B(i),B(o),B(u),B(p),B(g),B($),O&&D&&D.end()}}}function jE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&fe(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&fe(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("TLS encryption"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function zE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("AUTH method"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function BE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&fe(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UE(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 du({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Password"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function WE(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + Send test email`,h(e,"type","button"),h(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function YE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],h(l,"class","txt"),h(s,"type","submit"),h(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"click",n[24]),J(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&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function KE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[NE,LE],$=[];function T(C,D){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[5]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[27])),g=!0)},p(C,D){(!_||D[0]&32)&&oe(o,C[5]);let M=p;p=T(C),p===M?$[p].p(C,D):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function JE(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[KE]},$$scope:{ctx:n}}});let r={};return l=new PE({props:r}),n[28](l),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[28](null),B(l,a)}}}function ZE(n,e,t){let i,s,l;Je(n,Nt,te=>t(5,l=te));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];rn(Nt,l="Mail settings",l);let a,u={},f={},d=!1,p=!1;m();async function m(){t(2,d=!0);try{const te=await pe.settings.getAll()||{};g(te)}catch(te){pe.errorResponseHandler(te)}t(2,d=!1)}async function _(){if(!(p||!s)){t(3,p=!0);try{const te=await pe.settings.update(H.filterRedactedProps(f));g(te),un({}),Qt("Successfully saved mail settings.")}catch(te){pe.errorResponseHandler(te)}t(3,p=!1)}}function g(te={}){t(0,f={meta:(te==null?void 0:te.meta)||{},smtp:(te==null?void 0:te.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 k(){f.meta.senderName=this.value,t(0,f)}function $(){f.meta.senderAddress=this.value,t(0,f)}function T(te){n.$$.not_equal(f.meta.verificationTemplate,te)&&(f.meta.verificationTemplate=te,t(0,f))}function C(te){n.$$.not_equal(f.meta.resetPasswordTemplate,te)&&(f.meta.resetPasswordTemplate=te,t(0,f))}function D(te){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,te)&&(f.meta.confirmEmailChangeTemplate=te,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=gt(this.value),t(0,f)}function L(te){n.$$.not_equal(f.smtp.tls,te)&&(f.smtp.tls=te,t(0,f))}function F(te){n.$$.not_equal(f.smtp.authMethod,te)&&(f.smtp.authMethod=te,t(0,f))}function q(){f.smtp.username=this.value,t(0,f)}function N(te){n.$$.not_equal(f.smtp.password,te)&&(f.smtp.password=te,t(0,f))}const R=()=>b(),j=()=>_(),V=()=>a==null?void 0:a.show(),K=()=>_();function ee(te){se[te?"unshift":"push"](()=>{a=te,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,d,p,s,l,o,r,_,b,u,i,k,$,T,C,D,M,O,I,L,F,q,N,R,j,V,K,ee]}class GE extends ve{constructor(e){super(),be(this,e,ZE,JE,_e,{},null,[-1,-1])}}function XE(n){var C,D;let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[xE,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Fh(n),k=n[1].s3.enabled&&Rh(n),$=((D=n[1].s3)==null?void 0:D.enabled)&&!n[6]&&!n[3]&&qh(n),T=n[6]&&jh(n);return{c(){U(e.$$.fragment),t=E(),b&&b.c(),i=E(),k&&k.c(),s=E(),l=y("div"),o=y("div"),r=E(),$&&$.c(),a=E(),T&&T.c(),u=E(),f=y("button"),d=y("span"),d.textContent="Save changes",h(o,"class","flex-fill"),h(d,"class","txt"),h(f,"type","submit"),h(f,"class","btn btn-expanded"),f.disabled=p=!n[6]||n[3],x(f,"btn-loading",n[3]),h(l,"class","flex")},m(M,O){z(e,M,O),S(M,t,O),b&&b.m(M,O),S(M,i,O),k&&k.m(M,O),S(M,s,O),S(M,l,O),v(l,o),v(l,r),$&&$.m(l,null),v(l,a),T&&T.m(l,null),v(l,u),v(l,f),v(f,d),m=!0,_||(g=J(f,"click",n[19]),_=!0)},p(M,O){var L,F;const I={};O&100663298&&(I.$$scope={dirty:O,ctx:M}),e.$set(I),((L=M[0].s3)==null?void 0:L.enabled)!=M[1].s3.enabled?b?(b.p(M,O),O&3&&A(b,1)):(b=Fh(M),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(ae(),P(b,1,1,()=>{b=null}),ue()),M[1].s3.enabled?k?(k.p(M,O),O&2&&A(k,1)):(k=Rh(M),k.c(),A(k,1),k.m(s.parentNode,s)):k&&(ae(),P(k,1,1,()=>{k=null}),ue()),(F=M[1].s3)!=null&&F.enabled&&!M[6]&&!M[3]?$?$.p(M,O):($=qh(M),$.c(),$.m(l,a)):$&&($.d(1),$=null),M[6]?T?T.p(M,O):(T=jh(M),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||O&72&&p!==(p=!M[6]||M[3]))&&(f.disabled=p),(!m||O&8)&&x(f,"btn-loading",M[3])},i(M){m||(A(e.$$.fragment,M),A(b),A(k),m=!0)},o(M){P(e.$$.fragment,M),P(b),P(k),m=!1},d(M){B(e,M),M&&w(t),b&&b.d(M),M&&w(i),k&&k.d(M),M&&w(s),M&&w(l),$&&$.d(),T&&T.d(),_=!1,g()}}}function QE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function xE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Use S3 storage"),h(e,"type","checkbox"),h(e,"id",t=n[25]),e.required=!0,h(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),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&h(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Fh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,d,p=n[1].s3.enabled?"S3 storage":"local file system",m,_,g,b,k,$,T,C,D,M,O,I;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=W(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=y("strong"),u=W(a),f=W(` to the @@ -193,19 +193,19 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `),k=y("a"),k.textContent=`rclone `,$=W(`, `),T=y("a"),T.textContent=`s5cmd - `,C=W(", etc."),O=E(),M=y("div"),h(i,"class","icon"),h(k,"href","https://github.com/rclone/rclone"),h(k,"target","_blank"),h(k,"rel","noopener noreferrer"),h(k,"class","txt-bold"),h(T,"href","https://github.com/peak/s5cmd"),h(T,"target","_blank"),h(T,"rel","noopener noreferrer"),h(T,"class","txt-bold"),h(l,"class","content"),h(t,"class","alert alert-warning m-0"),h(M,"class","clearfix m-t-base")},m(F,q){S(F,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(r,u),v(l,f),v(l,d),v(d,m),v(l,_),v(l,g),v(l,b),v(l,k),v(l,$),v(l,T),v(l,C),v(e,O),v(e,M),I=!0},p(F,q){var N;(!I||q&1)&&a!==(a=(N=F[0].s3)!=null&&N.enabled?"S3 storage":"local file system")&&oe(u,a),(!I||q&2)&&p!==(p=F[1].s3.enabled?"S3 storage":"local file system")&&oe(m,p)},i(F){I||(F&&nt(()=>{I&&(D||(D=He(e,Ct,{duration:150},!0)),D.run(1))}),I=!0)},o(F){F&&(D||(D=He(e,Ct,{duration:150},!1)),D.run(0)),I=!1},d(F){F&&w(e),F&&D&&D.end()}}}function Fh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M;return i=new de({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[eA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[tA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"s3.region",$$slots:{default:[nA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[iA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[sA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[lA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),_=y("div"),U(g.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-6"),h(l,"class","col-lg-3"),h(a,"class","col-lg-3"),h(d,"class","col-lg-6"),h(_,"class","col-lg-6"),h(k,"class","col-lg-12"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(D,I){S(D,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,_),z(g,_,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(D,I){const L={};I&100663298&&(L.$$scope={dirty:I,ctx:D}),i.$set(L);const F={};I&100663298&&(F.$$scope={dirty:I,ctx:D}),o.$set(F);const q={};I&100663298&&(q.$$scope={dirty:I,ctx:D}),u.$set(q);const N={};I&100663298&&(N.$$scope={dirty:I,ctx:D}),p.$set(N);const R={};I&100663298&&(R.$$scope={dirty:I,ctx:D}),g.$set(R);const j={};I&100663298&&(j.$$scope={dirty:I,ctx:D}),$.$set(j)},i(D){M||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(p.$$.fragment,D),A(g.$$.fragment,D),A($.$$.fragment,D),D&&nt(()=>{M&&(O||(O=He(e,Ct,{duration:150},!0)),O.run(1))}),M=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(p.$$.fragment,D),P(g.$$.fragment,D),P($.$$.fragment,D),D&&(O||(O=He(e,Ct,{duration:150},!1)),O.run(0)),M=!1},d(D){D&&w(e),B(i),B(o),B(u),B(p),B(g),B($),D&&O&&O.end()}}}function eA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Endpoint"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.endpoint),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&fe(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function tA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Bucket"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.bucket),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&fe(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function nA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Region"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.region),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.region&&fe(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function iA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Access key"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.accessKey),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&fe(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function sA(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 cu({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Secret"),s=E(),U(l.$$.fragment),h(e,"for",i=n[25])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&33554432&&i!==(i=f[25]))&&h(e,"for",i);const p={};d&33554432&&(p.id=f[25]),!o&&d&2&&(o=!0,p.value=f[1].s3.secret,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function lA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Force path-style addressing",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[25])},m(d,p){S(d,e,p),e.checked=n[1].s3.forcePathStyle,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),De(We.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(d,p){p&33554432&&t!==(t=d[25])&&h(e,"id",t),p&2&&(e.checked=d[1].s3.forcePathStyle),p&33554432&&a!==(a=d[25])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Rh(n){let e;function t(l,o){return l[4]?aA:l[5]?rA:oA}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 oA(n){let e;return{c(){e=y("div"),e.innerHTML=` + `,C=W(", etc."),D=E(),M=y("div"),h(i,"class","icon"),h(k,"href","https://github.com/rclone/rclone"),h(k,"target","_blank"),h(k,"rel","noopener noreferrer"),h(k,"class","txt-bold"),h(T,"href","https://github.com/peak/s5cmd"),h(T,"target","_blank"),h(T,"rel","noopener noreferrer"),h(T,"class","txt-bold"),h(l,"class","content"),h(t,"class","alert alert-warning m-0"),h(M,"class","clearfix m-t-base")},m(F,q){S(F,e,q),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(r,u),v(l,f),v(l,d),v(d,m),v(l,_),v(l,g),v(l,b),v(l,k),v(l,$),v(l,T),v(l,C),v(e,D),v(e,M),I=!0},p(F,q){var N;(!I||q&1)&&a!==(a=(N=F[0].s3)!=null&&N.enabled?"S3 storage":"local file system")&&oe(u,a),(!I||q&2)&&p!==(p=F[1].s3.enabled?"S3 storage":"local file system")&&oe(m,p)},i(F){I||(F&&nt(()=>{I&&(O||(O=He(e,yt,{duration:150},!0)),O.run(1))}),I=!0)},o(F){F&&(O||(O=He(e,yt,{duration:150},!1)),O.run(0)),I=!1},d(F){F&&w(e),F&&O&&O.end()}}}function Rh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M;return i=new de({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[eA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[tA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"s3.region",$$slots:{default:[nA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[iA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[sA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[lA,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),_=y("div"),U(g.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-6"),h(l,"class","col-lg-3"),h(a,"class","col-lg-3"),h(d,"class","col-lg-6"),h(_,"class","col-lg-6"),h(k,"class","col-lg-12"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,_),z(g,_,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(O,I){const L={};I&100663298&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I&100663298&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I&100663298&&(q.$$scope={dirty:I,ctx:O}),u.$set(q);const N={};I&100663298&&(N.$$scope={dirty:I,ctx:O}),p.$set(N);const R={};I&100663298&&(R.$$scope={dirty:I,ctx:O}),g.$set(R);const j={};I&100663298&&(j.$$scope={dirty:I,ctx:O}),$.$set(j)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(p.$$.fragment,O),A(g.$$.fragment,O),A($.$$.fragment,O),O&&nt(()=>{M&&(D||(D=He(e,yt,{duration:150},!0)),D.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(g.$$.fragment,O),P($.$$.fragment,O),O&&(D||(D=He(e,yt,{duration:150},!1)),D.run(0)),M=!1},d(O){O&&w(e),B(i),B(o),B(u),B(p),B(g),B($),O&&D&&D.end()}}}function eA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Endpoint"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.endpoint),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&fe(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function tA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Bucket"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.bucket),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&fe(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function nA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Region"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.region),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.region&&fe(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function iA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Access key"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[1].s3.accessKey),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&fe(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function sA(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 du({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Secret"),s=E(),U(l.$$.fragment),h(e,"for",i=n[25])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&33554432&&i!==(i=f[25]))&&h(e,"for",i);const p={};d&33554432&&(p.id=f[25]),!o&&d&2&&(o=!0,p.value=f[1].s3.secret,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function lA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Force path-style addressing",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[25])},m(d,p){S(d,e,p),e.checked=n[1].s3.forcePathStyle,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),De(We.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(d,p){p&33554432&&t!==(t=d[25])&&h(e,"id",t),p&2&&(e.checked=d[1].s3.forcePathStyle),p&33554432&&a!==(a=d[25])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function qh(n){let e;function t(l,o){return l[4]?aA:l[5]?rA:oA}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 oA(n){let e;return{c(){e=y("div"),e.innerHTML=` S3 connected successfully`,h(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function rA(n){let e,t,i,s;return{c(){e=y("div"),e.innerHTML=` - Failed to establish S3 connection`,h(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=De(t=We.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Vt(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 aA(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function qh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function uA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[QE,XE],$=[];function T(C,O){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[7]),r=E(),a=y("div"),u=y("form"),f=y("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.

    `,d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[20])),g=!0)},p(C,O){(!_||O&128)&&oe(o,C[7]);let M=p;p=T(C),p===M?$[p].p(C,O):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function fA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[uA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}const lo="s3_test_request";function cA(n,e,t){let i,s,l;Je(n,Nt,N=>t(7,l=N)),rn(Nt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,d=null,p=null;m();async function m(){t(2,a=!0);try{const N=await pe.settings.getAll()||{};g(N)}catch(N){pe.errorResponseHandler(N)}t(2,a=!1)}async function _(){if(!(u||!s)){t(3,u=!0);try{pe.cancelRequest(lo);const N=await pe.settings.update(H.filterRedactedProps(r));mn({}),await g(N),Aa(),d?hy("Successfully saved but failed to establish S3 connection."):Xt("Successfully saved files storage settings.")}catch(N){pe.errorResponseHandler(N)}t(3,u=!1)}}async function g(N={}){t(1,r={s3:(N==null?void 0:N.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await k()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await k()}async function k(){if(t(5,d=null),!!r.s3.enabled){pe.cancelRequest(lo),clearTimeout(p),p=setTimeout(()=>{pe.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await pe.settings.testS3({$cancelKey:lo})}catch(N){t(5,d=N)}t(4,f=!1),clearTimeout(p)}}xt(()=>()=>{clearTimeout(p)});function $(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function O(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function D(N){n.$$.not_equal(r.s3.secret,N)&&(r.s3.secret=N,t(1,r))}function I(){r.s3.forcePathStyle=this.checked,t(1,r)}const L=()=>b(),F=()=>_(),q=()=>_();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,d,s,l,_,b,i,$,T,C,O,M,D,I,L,F,q]}class dA extends be{constructor(e){super(),ge(this,e,cA,fA,_e,{})}}function pA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[20]),h(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[1].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&h(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function mA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[20]),h(l,"type","text"),h(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,d){d&1048576&&i!==(i=f[20])&&h(e,"for",i),d&1048576&&o!==(o=f[20])&&h(l,"id",o),d&2&&r!==(r=f[1].enabled)&&(l.required=r),d&2&&l.value!==f[1].clientId&&fe(l,f[1].clientId)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function hA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new cu({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Client secret"),s=E(),U(l.$$.fragment),h(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&h(e,"for",i);const p={};d&1048576&&(p.id=f[20]),d&2&&(p.required=f[1].enabled),!o&&d&2&&(o=!0,p.value=f[1].clientSecret,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function jh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Lt(o,r(n)),se.push(()=>he(t,"config",l))),{c(){e=y("div"),t&&U(t.$$.fragment),h(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&z(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],ke(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){ae();const d=t;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(t=Lt(o,r(a)),se.push(()=>he(t,"config",l)),U(t.$$.fragment),A(t.$$.fragment,1),z(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&B(t)}}}function _A(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[pA,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[mA,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[hA,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&jh(n);return{c(){e=y("form"),t=y("div"),U(i.$$.fragment),s=E(),l=y("button"),l.innerHTML='Clear all fields',o=E(),U(r.$$.fragment),a=E(),U(u.$$.fragment),f=E(),_&&_.c(),h(l,"type","button"),h(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),h(t,"class","flex m-b-base"),h(e,"id",n[6]),h(e,"autocomplete","off")},m(g,b){S(g,e,b),v(e,t),z(i,t,null),v(t,s),v(t,l),v(e,o),z(r,e,null),v(e,a),z(u,e,null),v(e,f),_&&_.m(e,null),d=!0,p||(m=[J(l,"click",n[8]),J(e,"submit",at(n[15]))],p=!0)},p(g,b){const k={};b&8&&(k.name=g[3].key+".enabled"),b&3145730&&(k.$$scope={dirty:b,ctx:g}),i.$set(k);const $={};b&2&&($.class="form-field "+(g[1].enabled?"required":"")),b&8&&($.name=g[3].key+".clientId"),b&3145730&&($.$$scope={dirty:b,ctx:g}),r.$set($);const T={};b&2&&(T.class="form-field "+(g[1].enabled?"required":"")),b&8&&(T.name=g[3].key+".clientSecret"),b&3145730&&(T.$$scope={dirty:b,ctx:g}),u.$set(T),g[3].optionsComponent?_?(_.p(g,b),b&8&&A(_,1)):(_=jh(g),_.c(),A(_,1),_.m(e,null)):_&&(ae(),P(_,1,1,()=>{_=null}),ue())},i(g){d||(A(i.$$.fragment,g),A(r.$$.fragment,g),A(u.$$.fragment,g),A(_),d=!0)},o(g){P(i.$$.fragment,g),P(r.$$.fragment,g),P(u.$$.fragment,g),P(_),d=!1},d(g){g&&w(e),B(i),B(r),B(u),_&&_.d(),p=!1,Ee(m)}}}function gA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=y("h4"),i=W(t),s=W(" provider"),h(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&oe(i,t)},d(l){l&&w(e)}}}function bA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function vA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[bA],header:[gA],default:[_A]},$$scope:{ctx:n}};return e=new hn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),B(e,s)}}}function yA(n,e,t){let i;const s=Tt(),l="provider_popup_"+H.randomString(5);let o,r={},a={},u=!1,f="";function d(D,I){mn({}),t(3,r=Object.assign({},D)),t(1,a=Object.assign({enabled:!0},I)),t(10,f=JSON.stringify(a)),o==null||o.show()}function p(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const D={};D[r.key]=H.filterRedactedProps(a);const I=await pe.settings.update(D);mn({}),Xt("Successfully updated provider settings."),s("submit",I),p()}catch(D){pe.errorResponseHandler(D)}t(4,u=!1)}function _(){for(let D in a)t(1,a[D]="",a);t(1,a.enabled=!1,a)}function g(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function k(D){n.$$.not_equal(a.clientSecret,D)&&(a.clientSecret=D,t(1,a))}function $(D){a=D,t(1,a)}const T=()=>m();function C(D){se[D?"unshift":"push"](()=>{o=D,t(2,o)})}function O(D){me.call(this,n,D)}function M(D){me.call(this,n,D)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[p,a,o,r,u,i,l,m,_,d,f,g,b,k,$,T,C,O,M]}class kA extends be{constructor(e){super(),ge(this,e,yA,vA,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Vh(n){let e,t,i;return{c(){e=y("img"),dn(e.src,t="./images/oauth2/"+n[1].logo)||h(e,"src",t),h(e,"alt",i=n[1].title+" logo")},m(s,l){S(s,e,l)},p(s,l){l&2&&!dn(e.src,t="./images/oauth2/"+s[1].logo)&&h(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&h(e,"alt",i)},d(s){s&&w(e)}}}function Hh(n){let e;return{c(){e=y("div"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wA(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",d,p,m,_,g,b,k,$,T,C,O=n[1].logo&&Vh(n),M=n[0].enabled&&Hh(),D={};return k=new kA({props:D}),n[4](k),k.$on("submit",n[5]),{c(){e=y("div"),t=y("figure"),O&&O.c(),i=E(),s=y("div"),o=W(l),r=E(),a=y("em"),u=W("("),d=W(f),p=W(")"),m=E(),M&&M.c(),_=E(),g=y("button"),g.innerHTML='',b=E(),U(k.$$.fragment),h(t,"class","provider-logo"),h(s,"class","title"),h(a,"class","txt-hint txt-sm m-r-auto"),h(g,"type","button"),h(g,"class","btn btn-circle btn-hint btn-transparent"),h(g,"aria-label","Provider settings"),h(e,"class","provider-card")},m(I,L){S(I,e,L),v(e,t),O&&O.m(t,null),v(e,i),v(e,s),v(s,o),v(e,r),v(e,a),v(a,u),v(a,d),v(a,p),v(e,m),M&&M.m(e,null),v(e,_),v(e,g),S(I,b,L),z(k,I,L),$=!0,T||(C=J(g,"click",n[3]),T=!0)},p(I,[L]){I[1].logo?O?O.p(I,L):(O=Vh(I),O.c(),O.m(t,null)):O&&(O.d(1),O=null),(!$||L&2)&&l!==(l=I[1].title+"")&&oe(o,l),(!$||L&2)&&f!==(f=I[1].key.slice(0,-4)+"")&&oe(d,f),I[0].enabled?M||(M=Hh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const F={};k.$set(F)},i(I){$||(A(k.$$.fragment,I),$=!0)},o(I){P(k.$$.fragment,I),$=!1},d(I){I&&w(e),O&&O.d(),M&&M.d(),I&&w(b),n[4](null),B(k,I),T=!1,C()}}}function SA(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class hb extends be{constructor(e){super(),ge(this,e,SA,wA,_e,{provider:1,config:0})}}function zh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Bh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function $A(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const d=g=>g[9].key;for(let g=0;g0&&n[2].length>0&&Wh(),m=n[2];const _=g=>g[9].key;for(let g=0;g0&&g[2].length>0?p||(p=Wh(),p.c(),p.m(l.parentNode,l)):p&&(p.d(1),p=null),b&5&&(m=g[2],ae(),r=$t(r,b,_,1,g,m,a,o,Qt,Yh,null,zh),ue())},i(g){if(!u){for(let b=0;bhe(i,"config",r)),{key:n,first:null,c(){t=y("div"),U(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&8&&(d.provider=e[9]),!s&&f&9&&(s=!0,d.config=e[0][e[9].key],ke(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),B(i)}}}function Wh(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new hb({props:a}),se.push(()=>he(i,"config",r)),{key:n,first:null,c(){t=y("div"),U(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&4&&(d.provider=e[9]),!s&&f&5&&(s=!0,d.config=e[0][e[9].key],ke(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),B(i)}}}function TA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;const g=[CA,$A],b=[];function k($,T){return $[1]?0:1}return p=k(n),m=b[p]=g[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[4]),r=E(),a=y("div"),u=y("div"),f=y("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","m-b-base"),h(u,"class","panel"),h(a,"class","wrapper")},m($,T){S($,e,T),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S($,r,T),S($,a,T),v(a,u),v(u,f),v(u,d),b[p].m(u,null),_=!0},p($,T){(!_||T&16)&&oe(o,$[4]);let C=p;p=k($),p===C?b[p].p($,T):(ae(),P(b[C],1,1,()=>{b[C]=null}),ue(),m=b[p],m?m.p($,T):(m=b[p]=g[p]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){P(m),_=!1},d($){$&&w(e),$&&w(r),$&&w(a),b[p].d()}}}function MA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[TA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function OA(n,e,t){let i,s,l;Je(n,Nt,p=>t(4,l=p)),rn(Nt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const p=await pe.settings.getAll()||{};u(p)}catch(p){pe.errorResponseHandler(p)}t(1,o=!1)}function u(p){p=p||{},t(0,r={});for(const m of mo)t(0,r[m.key]=Object.assign({enabled:!1},p[m.key]),r)}function f(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}function d(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=mo.filter(p=>{var m;return(m=r[p.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=mo.filter(p=>{var m;return!((m=r[p.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,d]}class DA extends be{constructor(e){super(),ge(this,e,OA,MA,_e,{})}}function EA(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=W(n[3]),i=W(" duration (in seconds)"),l=E(),o=y("input"),a=E(),u=y("div"),f=y("span"),f.textContent="Invalidate all previously issued tokens",h(e,"for",s=n[6]),h(o,"type","number"),h(o,"id",r=n[6]),o.required=!0,h(f,"class","link-primary"),x(f,"txt-success",!!n[1]),h(u,"class","help-block")},m(m,_){S(m,e,_),v(e,t),v(e,i),S(m,l,_),S(m,o,_),fe(o,n[0]),S(m,a,_),S(m,u,_),v(u,f),d||(p=[J(o,"input",n[4]),J(f,"click",n[5])],d=!0)},p(m,_){_&8&&oe(t,m[3]),_&64&&s!==(s=m[6])&&h(e,"for",s),_&64&&r!==(r=m[6])&&h(o,"id",r),_&1&>(o.value)!==m[0]&&fe(o,m[0]),_&2&&x(f,"txt-success",!!m[1])},d(m){m&&w(e),m&&w(l),m&&w(o),m&&w(a),m&&w(u),d=!1,Ee(p)}}}function AA(n){let e,t;return e=new de({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[EA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function IA(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=gt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=H.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class _b extends be{constructor(e){super(),ge(this,e,IA,AA,_e,{key:2,label:3,duration:0,secret:1})}}function Kh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Jh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function PA(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],d=new Map,p,m,_,g,b,k,$,T,C,O,M,D=n[5];const I=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nhe(i,"duration",r)),se.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&33&&(s=!0,p.duration=e[0][e[19].key].duration,ke(()=>s=!1)),!l&&d&33&&(l=!0,p.secret=e[0][e[19].key].secret,ke(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),B(i,f)}}}function Gh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new _b({props:u}),se.push(()=>he(i,"duration",r)),se.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&65&&(s=!0,p.duration=e[0][e[19].key].duration,ke(()=>s=!1)),!l&&d&65&&(l=!0,p.secret=e[0][e[19].key].secret,ke(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),B(i,f)}}}function Xh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function NA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[LA,PA],$=[];function T(C,O){return C[1]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[4]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Adjust common token options.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content m-b-sm txt-xl"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[7])),g=!0)},p(C,O){(!_||O&16)&&oe(o,C[4]);let M=p;p=T(C),p===M?$[p].p(C,O):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function FA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[NA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function RA(n,e,t){let i,s,l;Je(n,Nt,M=>t(4,l=M));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:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];rn(Nt,l="Token options",l);let a={},u={},f=!1,d=!1;p();async function p(){t(1,f=!0);try{const M=await pe.settings.getAll()||{};_(M)}catch(M){pe.errorResponseHandler(M)}t(1,f=!1)}async function m(){if(!(d||!s)){t(2,d=!0);try{const M=await pe.settings.update(H.filterRedactedProps(u));_(M),Xt("Successfully saved tokens options.")}catch(M){pe.errorResponseHandler(M)}t(2,d=!1)}}function _(M){var I;M=M||{},t(0,u={});const D=o.concat(r);for(const L of D)t(0,u[L.key]={duration:((I=M[L.key])==null?void 0:I.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function g(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,D){n.$$.not_equal(u[D.key].duration,M)&&(u[D.key].duration=M,t(0,u))}function k(M,D){n.$$.not_equal(u[D.key].secret,M)&&(u[D.key].secret=M,t(0,u))}function $(M,D){n.$$.not_equal(u[D.key].duration,M)&&(u[D.key].duration=M,t(0,u))}function T(M,D){n.$$.not_equal(u[D.key].secret,M)&&(u[D.key].secret=M,t(0,u))}const C=()=>g(),O=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,d,s,l,o,r,m,g,a,i,b,k,$,T,C,O]}class qA extends be{constructor(e){super(),ge(this,e,RA,FA,_e,{})}}function jA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;return o=new ob({props:{content:n[2]}}),{c(){e=y("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in + Failed to establish S3 connection`,h(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=De(t=We.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Vt(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 aA(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function jh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function uA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[QE,XE],$=[];function T(C,D){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[7]),r=E(),a=y("div"),u=y("form"),f=y("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.

    `,d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[20])),g=!0)},p(C,D){(!_||D&128)&&oe(o,C[7]);let M=p;p=T(C),p===M?$[p].p(C,D):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function fA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[uA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}const lo="s3_test_request";function cA(n,e,t){let i,s,l;Je(n,Nt,N=>t(7,l=N)),rn(Nt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,d=null,p=null;m();async function m(){t(2,a=!0);try{const N=await pe.settings.getAll()||{};g(N)}catch(N){pe.errorResponseHandler(N)}t(2,a=!1)}async function _(){if(!(u||!s)){t(3,u=!0);try{pe.cancelRequest(lo);const N=await pe.settings.update(H.filterRedactedProps(r));un({}),await g(N),Ia(),d?hy("Successfully saved but failed to establish S3 connection."):Qt("Successfully saved files storage settings.")}catch(N){pe.errorResponseHandler(N)}t(3,u=!1)}}async function g(N={}){t(1,r={s3:(N==null?void 0:N.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await k()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await k()}async function k(){if(t(5,d=null),!!r.s3.enabled){pe.cancelRequest(lo),clearTimeout(p),p=setTimeout(()=>{pe.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await pe.settings.testS3({$cancelKey:lo})}catch(N){t(5,d=N)}t(4,f=!1),clearTimeout(p)}}xt(()=>()=>{clearTimeout(p)});function $(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function D(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function O(N){n.$$.not_equal(r.s3.secret,N)&&(r.s3.secret=N,t(1,r))}function I(){r.s3.forcePathStyle=this.checked,t(1,r)}const L=()=>b(),F=()=>_(),q=()=>_();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,d,s,l,_,b,i,$,T,C,D,M,O,I,L,F,q]}class dA extends ve{constructor(e){super(),be(this,e,cA,fA,_e,{})}}function pA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[20]),h(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[1].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&h(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function mA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[20]),h(l,"type","text"),h(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,d){d&1048576&&i!==(i=f[20])&&h(e,"for",i),d&1048576&&o!==(o=f[20])&&h(l,"id",o),d&2&&r!==(r=f[1].enabled)&&(l.required=r),d&2&&l.value!==f[1].clientId&&fe(l,f[1].clientId)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function hA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new du({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Client secret"),s=E(),U(l.$$.fragment),h(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&h(e,"for",i);const p={};d&1048576&&(p.id=f[20]),d&2&&(p.required=f[1].enabled),!o&&d&2&&(o=!0,p.value=f[1].clientSecret,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function Vh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Lt(o,r(n)),se.push(()=>he(t,"config",l))),{c(){e=y("div"),t&&U(t.$$.fragment),h(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&z(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],ke(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){ae();const d=t;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(t=Lt(o,r(a)),se.push(()=>he(t,"config",l)),U(t.$$.fragment),A(t.$$.fragment,1),z(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&B(t)}}}function _A(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[pA,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[mA,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[hA,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&Vh(n);return{c(){e=y("form"),t=y("div"),U(i.$$.fragment),s=E(),l=y("button"),l.innerHTML='Clear all fields',o=E(),U(r.$$.fragment),a=E(),U(u.$$.fragment),f=E(),_&&_.c(),h(l,"type","button"),h(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),h(t,"class","flex m-b-base"),h(e,"id",n[6]),h(e,"autocomplete","off")},m(g,b){S(g,e,b),v(e,t),z(i,t,null),v(t,s),v(t,l),v(e,o),z(r,e,null),v(e,a),z(u,e,null),v(e,f),_&&_.m(e,null),d=!0,p||(m=[J(l,"click",n[8]),J(e,"submit",at(n[15]))],p=!0)},p(g,b){const k={};b&8&&(k.name=g[3].key+".enabled"),b&3145730&&(k.$$scope={dirty:b,ctx:g}),i.$set(k);const $={};b&2&&($.class="form-field "+(g[1].enabled?"required":"")),b&8&&($.name=g[3].key+".clientId"),b&3145730&&($.$$scope={dirty:b,ctx:g}),r.$set($);const T={};b&2&&(T.class="form-field "+(g[1].enabled?"required":"")),b&8&&(T.name=g[3].key+".clientSecret"),b&3145730&&(T.$$scope={dirty:b,ctx:g}),u.$set(T),g[3].optionsComponent?_?(_.p(g,b),b&8&&A(_,1)):(_=Vh(g),_.c(),A(_,1),_.m(e,null)):_&&(ae(),P(_,1,1,()=>{_=null}),ue())},i(g){d||(A(i.$$.fragment,g),A(r.$$.fragment,g),A(u.$$.fragment,g),A(_),d=!0)},o(g){P(i.$$.fragment,g),P(r.$$.fragment,g),P(u.$$.fragment,g),P(_),d=!1},d(g){g&&w(e),B(i),B(r),B(u),_&&_.d(),p=!1,Ee(m)}}}function gA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=y("h4"),i=W(t),s=W(" provider"),h(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&oe(i,t)},d(l){l&&w(e)}}}function bA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function vA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[bA],header:[gA],default:[_A]},$$scope:{ctx:n}};return e=new hn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),B(e,s)}}}function yA(n,e,t){let i;const s=Tt(),l="provider_popup_"+H.randomString(5);let o,r={},a={},u=!1,f="";function d(O,I){un({}),t(3,r=Object.assign({},O)),t(1,a=Object.assign({enabled:!0},I)),t(10,f=JSON.stringify(a)),o==null||o.show()}function p(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const O={};O[r.key]=H.filterRedactedProps(a);const I=await pe.settings.update(O);un({}),Qt("Successfully updated provider settings."),s("submit",I),p()}catch(O){pe.errorResponseHandler(O)}t(4,u=!1)}function _(){for(let O in a)t(1,a[O]="",a);t(1,a.enabled=!1,a)}function g(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function k(O){n.$$.not_equal(a.clientSecret,O)&&(a.clientSecret=O,t(1,a))}function $(O){a=O,t(1,a)}const T=()=>m();function C(O){se[O?"unshift":"push"](()=>{o=O,t(2,o)})}function D(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[p,a,o,r,u,i,l,m,_,d,f,g,b,k,$,T,C,D,M]}class kA extends ve{constructor(e){super(),be(this,e,yA,vA,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Hh(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t="./images/oauth2/"+n[1].logo)||h(e,"src",t),h(e,"alt",i=n[1].title+" logo")},m(s,l){S(s,e,l)},p(s,l){l&2&&!mn(e.src,t="./images/oauth2/"+s[1].logo)&&h(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&h(e,"alt",i)},d(s){s&&w(e)}}}function zh(n){let e;return{c(){e=y("div"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function wA(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",d,p,m,_,g,b,k,$,T,C,D=n[1].logo&&Hh(n),M=n[0].enabled&&zh(),O={};return k=new kA({props:O}),n[4](k),k.$on("submit",n[5]),{c(){e=y("div"),t=y("figure"),D&&D.c(),i=E(),s=y("div"),o=W(l),r=E(),a=y("em"),u=W("("),d=W(f),p=W(")"),m=E(),M&&M.c(),_=E(),g=y("button"),g.innerHTML='',b=E(),U(k.$$.fragment),h(t,"class","provider-logo"),h(s,"class","title"),h(a,"class","txt-hint txt-sm m-r-auto"),h(g,"type","button"),h(g,"class","btn btn-circle btn-hint btn-transparent"),h(g,"aria-label","Provider settings"),h(e,"class","provider-card")},m(I,L){S(I,e,L),v(e,t),D&&D.m(t,null),v(e,i),v(e,s),v(s,o),v(e,r),v(e,a),v(a,u),v(a,d),v(a,p),v(e,m),M&&M.m(e,null),v(e,_),v(e,g),S(I,b,L),z(k,I,L),$=!0,T||(C=J(g,"click",n[3]),T=!0)},p(I,[L]){I[1].logo?D?D.p(I,L):(D=Hh(I),D.c(),D.m(t,null)):D&&(D.d(1),D=null),(!$||L&2)&&l!==(l=I[1].title+"")&&oe(o,l),(!$||L&2)&&f!==(f=I[1].key.slice(0,-4)+"")&&oe(d,f),I[0].enabled?M||(M=zh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const F={};k.$set(F)},i(I){$||(A(k.$$.fragment,I),$=!0)},o(I){P(k.$$.fragment,I),$=!1},d(I){I&&w(e),D&&D.d(),M&&M.d(),I&&w(b),n[4](null),B(k,I),T=!1,C()}}}function SA(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class _b extends ve{constructor(e){super(),be(this,e,SA,wA,_e,{provider:1,config:0})}}function Bh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Uh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function $A(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const d=g=>g[9].key;for(let g=0;g0&&n[2].length>0&&Yh(),m=n[2];const _=g=>g[9].key;for(let g=0;g0&&g[2].length>0?p||(p=Yh(),p.c(),p.m(l.parentNode,l)):p&&(p.d(1),p=null),b&5&&(m=g[2],ae(),r=vt(r,b,_,1,g,m,a,o,Kt,Kh,null,Bh),ue())},i(g){if(!u){for(let b=0;bhe(i,"config",r)),{key:n,first:null,c(){t=y("div"),U(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&8&&(d.provider=e[9]),!s&&f&9&&(s=!0,d.config=e[0][e[9].key],ke(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),B(i)}}}function Yh(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new _b({props:a}),se.push(()=>he(i,"config",r)),{key:n,first:null,c(){t=y("div"),U(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),z(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&4&&(d.provider=e[9]),!s&&f&5&&(s=!0,d.config=e[0][e[9].key],ke(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),B(i)}}}function TA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;const g=[CA,$A],b=[];function k($,T){return $[1]?0:1}return p=k(n),m=b[p]=g[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[4]),r=E(),a=y("div"),u=y("div"),f=y("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","m-b-base"),h(u,"class","panel"),h(a,"class","wrapper")},m($,T){S($,e,T),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S($,r,T),S($,a,T),v(a,u),v(u,f),v(u,d),b[p].m(u,null),_=!0},p($,T){(!_||T&16)&&oe(o,$[4]);let C=p;p=k($),p===C?b[p].p($,T):(ae(),P(b[C],1,1,()=>{b[C]=null}),ue(),m=b[p],m?m.p($,T):(m=b[p]=g[p]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){P(m),_=!1},d($){$&&w(e),$&&w(r),$&&w(a),b[p].d()}}}function MA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[TA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function OA(n,e,t){let i,s,l;Je(n,Nt,p=>t(4,l=p)),rn(Nt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const p=await pe.settings.getAll()||{};u(p)}catch(p){pe.errorResponseHandler(p)}t(1,o=!1)}function u(p){p=p||{},t(0,r={});for(const m of mo)t(0,r[m.key]=Object.assign({enabled:!1},p[m.key]),r)}function f(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}function d(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=mo.filter(p=>{var m;return(m=r[p.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=mo.filter(p=>{var m;return!((m=r[p.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,d]}class DA extends ve{constructor(e){super(),be(this,e,OA,MA,_e,{})}}function EA(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=W(n[3]),i=W(" duration (in seconds)"),l=E(),o=y("input"),a=E(),u=y("div"),f=y("span"),f.textContent="Invalidate all previously issued tokens",h(e,"for",s=n[6]),h(o,"type","number"),h(o,"id",r=n[6]),o.required=!0,h(f,"class","link-primary"),x(f,"txt-success",!!n[1]),h(u,"class","help-block")},m(m,_){S(m,e,_),v(e,t),v(e,i),S(m,l,_),S(m,o,_),fe(o,n[0]),S(m,a,_),S(m,u,_),v(u,f),d||(p=[J(o,"input",n[4]),J(f,"click",n[5])],d=!0)},p(m,_){_&8&&oe(t,m[3]),_&64&&s!==(s=m[6])&&h(e,"for",s),_&64&&r!==(r=m[6])&&h(o,"id",r),_&1&>(o.value)!==m[0]&&fe(o,m[0]),_&2&&x(f,"txt-success",!!m[1])},d(m){m&&w(e),m&&w(l),m&&w(o),m&&w(a),m&&w(u),d=!1,Ee(p)}}}function AA(n){let e,t;return e=new de({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[EA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function IA(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=gt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=H.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class gb extends ve{constructor(e){super(),be(this,e,IA,AA,_e,{key:2,label:3,duration:0,secret:1})}}function Jh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Zh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function PA(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],d=new Map,p,m,_,g,b,k,$,T,C,D,M,O=n[5];const I=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nhe(i,"duration",r)),se.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&33&&(s=!0,p.duration=e[0][e[19].key].duration,ke(()=>s=!1)),!l&&d&33&&(l=!0,p.secret=e[0][e[19].key].secret,ke(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),B(i,f)}}}function Xh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new gb({props:u}),se.push(()=>he(i,"duration",r)),se.push(()=>he(i,"secret",a)),{key:n,first:null,c(){t=$e(),U(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),z(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&65&&(s=!0,p.duration=e[0][e[19].key].duration,ke(()=>s=!1)),!l&&d&65&&(l=!0,p.secret=e[0][e[19].key].secret,ke(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),B(i,f)}}}function Qh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function NA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[LA,PA],$=[];function T(C,D){return C[1]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[4]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Adjust common token options.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content m-b-sm txt-xl"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[7])),g=!0)},p(C,D){(!_||D&16)&&oe(o,C[4]);let M=p;p=T(C),p===M?$[p].p(C,D):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function FA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[NA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function RA(n,e,t){let i,s,l;Je(n,Nt,M=>t(4,l=M));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:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];rn(Nt,l="Token options",l);let a={},u={},f=!1,d=!1;p();async function p(){t(1,f=!0);try{const M=await pe.settings.getAll()||{};_(M)}catch(M){pe.errorResponseHandler(M)}t(1,f=!1)}async function m(){if(!(d||!s)){t(2,d=!0);try{const M=await pe.settings.update(H.filterRedactedProps(u));_(M),Qt("Successfully saved tokens options.")}catch(M){pe.errorResponseHandler(M)}t(2,d=!1)}}function _(M){var I;M=M||{},t(0,u={});const O=o.concat(r);for(const L of O)t(0,u[L.key]={duration:((I=M[L.key])==null?void 0:I.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function g(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function k(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}function $(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function T(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}const C=()=>g(),D=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,d,s,l,o,r,m,g,a,i,b,k,$,T,C,D]}class qA extends ve{constructor(e){super(),be(this,e,RA,FA,_e,{})}}function jA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;return o=new rb({props:{content:n[2]}}),{c(){e=y("div"),e.innerHTML=`

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

    `,t=E(),i=y("div"),s=y("button"),s.innerHTML='Copy',l=E(),U(o.$$.fragment),r=E(),a=y("div"),u=y("div"),f=E(),d=y("button"),d.innerHTML=` - Download as JSON`,h(e,"class","content txt-xl m-b-base"),h(s,"type","button"),h(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),h(i,"tabindex","0"),h(i,"class","export-preview svelte-jm5c4z"),h(u,"class","flex-fill"),h(d,"type","button"),h(d,"class","btn btn-expanded"),h(a,"class","flex m-t-base")},m(g,b){S(g,e,b),S(g,t,b),S(g,i,b),v(i,s),v(i,l),z(o,i,null),n[8](i),S(g,r,b),S(g,a,b),v(a,u),v(a,f),v(a,d),p=!0,m||(_=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(d,"click",n[10])],m=!0)},p(g,b){const k={};b&4&&(k.content=g[2]),o.$set(k)},i(g){p||(A(o.$$.fragment,g),p=!0)},o(g){P(o.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(t),g&&w(i),B(o),n[8](null),g&&w(r),g&&w(a),m=!1,Ee(_)}}}function VA(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function HA(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[VA,jA],_=[];function g(b,k){return b[1]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[3]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k&8)&&oe(o,b[3]);let $=f;f=g(b),f===$?_[f].p(b,k):(ae(),P(_[$],1,1,()=>{_[$]=null}),ue(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function zA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[HA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function BA(n,e,t){let i,s;Je(n,Nt,b=>t(3,s=b)),rn(Nt,s="Export collections",s);const l="export_"+H.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await pe.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){pe.errorResponseHandler(b)}t(1,a=!1)}function f(){H.downloadJson(r,"pb_schema")}function d(){H.copyToClipboard(i),s1("The configuration was copied to your clipboard!",3e3)}const p=()=>d();function m(b){se[b?"unshift":"push"](()=>{o=b,t(0,o)})}const _=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const k=window.getSelection(),$=document.createRange();$.selectNodeContents(o),k.removeAllRanges(),k.addRange($)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,d,r,p,m,_,g]}class UA extends be{constructor(e){super(),ge(this,e,BA,zA,_e,{})}}function Qh(n,e,t){const i=n.slice();return i[14]=e[t],i}function xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function e_(n,e,t){const i=n.slice();return i[14]=e[t],i}function t_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function n_(n,e,t){const i=n.slice();return i[14]=e[t],i}function i_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function s_(n,e,t){const i=n.slice();return i[30]=e[t],i}function WA(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&l_(),a=n[0].name!==n[1].name&&o_(n);return{c(){e=y("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=y("strong"),o=W(l),h(s,"class","txt"),h(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),v(e,t),a&&a.m(e,null),v(e,i),v(e,s),v(s,o)},p(u,f){u[9]?r||(r=l_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=o_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&oe(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function YA(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Deleted",t=E(),i=y("strong"),l=W(s),h(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&oe(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function KA(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Added",t=E(),i=y("strong"),l=W(s),h(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&oe(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function l_(n){let e;return{c(){e=y("span"),e.textContent="Changed",h(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function o_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=y("strong"),i=W(t),s=E(),l=y("i"),h(e,"class","txt-strikethrough txt-hint"),h(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),v(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&oe(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function r_(n){var b,k;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,d,p,m,_=n[12]((k=n[1])==null?void 0:k[n[30]])+"",g;return{c(){var $,T,C,O,M,D;e=y("tr"),t=y("td"),i=y("span"),l=W(s),o=E(),r=y("td"),a=y("pre"),f=W(u),d=E(),p=y("td"),m=y("pre"),g=W(_),h(t,"class","min-width svelte-lmkr38"),h(a,"class","txt"),h(r,"class","svelte-lmkr38"),x(r,"changed-old-col",!n[10]&&gn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),x(r,"changed-none-col",n[10]),h(m,"class","txt"),h(p,"class","svelte-lmkr38"),x(p,"changed-new-col",!n[5]&&gn((C=n[0])==null?void 0:C[n[30]],(O=n[1])==null?void 0:O[n[30]])),x(p,"changed-none-col",n[5]),h(e,"class","svelte-lmkr38"),x(e,"txt-primary",gn((M=n[0])==null?void 0:M[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m($,T){S($,e,T),v(e,t),v(t,i),v(i,l),v(e,o),v(e,r),v(r,a),v(a,f),v(e,d),v(e,p),v(p,m),v(m,g)},p($,T){var C,O,M,D,I,L,F,q;T[0]&1&&u!==(u=$[12]((C=$[0])==null?void 0:C[$[30]])+"")&&oe(f,u),T[0]&3075&&x(r,"changed-old-col",!$[10]&&gn((O=$[0])==null?void 0:O[$[30]],(M=$[1])==null?void 0:M[$[30]])),T[0]&1024&&x(r,"changed-none-col",$[10]),T[0]&2&&_!==(_=$[12]((D=$[1])==null?void 0:D[$[30]])+"")&&oe(g,_),T[0]&2083&&x(p,"changed-new-col",!$[5]&&gn((I=$[0])==null?void 0:I[$[30]],(L=$[1])==null?void 0:L[$[30]])),T[0]&32&&x(p,"changed-none-col",$[5]),T[0]&2051&&x(e,"txt-primary",gn((F=$[0])==null?void 0:F[$[30]],(q=$[1])==null?void 0:q[$[30]]))},d($){$&&w(e)}}}function a_(n){let e,t=n[6],i=[];for(let s=0;sProps + Download as JSON`,h(e,"class","content txt-xl m-b-base"),h(s,"type","button"),h(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),h(i,"tabindex","0"),h(i,"class","export-preview svelte-jm5c4z"),h(u,"class","flex-fill"),h(d,"type","button"),h(d,"class","btn btn-expanded"),h(a,"class","flex m-t-base")},m(g,b){S(g,e,b),S(g,t,b),S(g,i,b),v(i,s),v(i,l),z(o,i,null),n[8](i),S(g,r,b),S(g,a,b),v(a,u),v(a,f),v(a,d),p=!0,m||(_=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(d,"click",n[10])],m=!0)},p(g,b){const k={};b&4&&(k.content=g[2]),o.$set(k)},i(g){p||(A(o.$$.fragment,g),p=!0)},o(g){P(o.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(t),g&&w(i),B(o),n[8](null),g&&w(r),g&&w(a),m=!1,Ee(_)}}}function VA(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function HA(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[VA,jA],_=[];function g(b,k){return b[1]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[3]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k&8)&&oe(o,b[3]);let $=f;f=g(b),f===$?_[f].p(b,k):(ae(),P(_[$],1,1,()=>{_[$]=null}),ue(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function zA(n){let e,t,i,s;return e=new Ui({}),i=new Pn({props:{$$slots:{default:[HA]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(l,o){z(e,l,o),S(l,t,o),z(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){B(e,l),l&&w(t),B(i,l)}}}function BA(n,e,t){let i,s;Je(n,Nt,b=>t(3,s=b)),rn(Nt,s="Export collections",s);const l="export_"+H.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await pe.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){pe.errorResponseHandler(b)}t(1,a=!1)}function f(){H.downloadJson(r,"pb_schema")}function d(){H.copyToClipboard(i),l1("The configuration was copied to your clipboard!",3e3)}const p=()=>d();function m(b){se[b?"unshift":"push"](()=>{o=b,t(0,o)})}const _=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const k=window.getSelection(),$=document.createRange();$.selectNodeContents(o),k.removeAllRanges(),k.addRange($)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,d,r,p,m,_,g]}class UA extends ve{constructor(e){super(),be(this,e,BA,zA,_e,{})}}function xh(n,e,t){const i=n.slice();return i[14]=e[t],i}function e_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function t_(n,e,t){const i=n.slice();return i[14]=e[t],i}function n_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function i_(n,e,t){const i=n.slice();return i[14]=e[t],i}function s_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function l_(n,e,t){const i=n.slice();return i[30]=e[t],i}function WA(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&o_(),a=n[0].name!==n[1].name&&r_(n);return{c(){e=y("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=y("strong"),o=W(l),h(s,"class","txt"),h(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),v(e,t),a&&a.m(e,null),v(e,i),v(e,s),v(s,o)},p(u,f){u[9]?r||(r=o_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=r_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&oe(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function YA(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Deleted",t=E(),i=y("strong"),l=W(s),h(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&oe(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function KA(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Added",t=E(),i=y("strong"),l=W(s),h(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&oe(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function o_(n){let e;return{c(){e=y("span"),e.textContent="Changed",h(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function r_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=y("strong"),i=W(t),s=E(),l=y("i"),h(e,"class","txt-strikethrough txt-hint"),h(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),v(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&oe(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function a_(n){var b,k;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,d,p,m,_=n[12]((k=n[1])==null?void 0:k[n[30]])+"",g;return{c(){var $,T,C,D,M,O;e=y("tr"),t=y("td"),i=y("span"),l=W(s),o=E(),r=y("td"),a=y("pre"),f=W(u),d=E(),p=y("td"),m=y("pre"),g=W(_),h(t,"class","min-width svelte-lmkr38"),h(a,"class","txt"),h(r,"class","svelte-lmkr38"),x(r,"changed-old-col",!n[10]&&gn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),x(r,"changed-none-col",n[10]),h(m,"class","txt"),h(p,"class","svelte-lmkr38"),x(p,"changed-new-col",!n[5]&&gn((C=n[0])==null?void 0:C[n[30]],(D=n[1])==null?void 0:D[n[30]])),x(p,"changed-none-col",n[5]),h(e,"class","svelte-lmkr38"),x(e,"txt-primary",gn((M=n[0])==null?void 0:M[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m($,T){S($,e,T),v(e,t),v(t,i),v(i,l),v(e,o),v(e,r),v(r,a),v(a,f),v(e,d),v(e,p),v(p,m),v(m,g)},p($,T){var C,D,M,O,I,L,F,q;T[0]&1&&u!==(u=$[12]((C=$[0])==null?void 0:C[$[30]])+"")&&oe(f,u),T[0]&3075&&x(r,"changed-old-col",!$[10]&&gn((D=$[0])==null?void 0:D[$[30]],(M=$[1])==null?void 0:M[$[30]])),T[0]&1024&&x(r,"changed-none-col",$[10]),T[0]&2&&_!==(_=$[12]((O=$[1])==null?void 0:O[$[30]])+"")&&oe(g,_),T[0]&2083&&x(p,"changed-new-col",!$[5]&&gn((I=$[0])==null?void 0:I[$[30]],(L=$[1])==null?void 0:L[$[30]])),T[0]&32&&x(p,"changed-none-col",$[5]),T[0]&2051&&x(e,"txt-primary",gn((F=$[0])==null?void 0:F[$[30]],(q=$[1])==null?void 0:q[$[30]]))},d($){$&&w(e)}}}function u_(n){let e,t=n[6],i=[];for(let s=0;sProps Old - New`,l=E(),o=y("tbody");for(let C=0;C<_.length;C+=1)_[C].c();r=E(),g&&g.c(),a=E();for(let C=0;C!["schema","created","updated"].includes(k));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(k=>!f.find($=>k.id==$.id))))}function b(k){return typeof k>"u"?"":H.isObject(k)?JSON.stringify(k,null,4):k}return n.$$set=k=>{"collectionA"in k&&t(0,o=k.collectionA),"collectionB"in k&&t(1,r=k.collectionB),"deleteMissing"in k&&t(2,a=k.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,d=u.filter(k=>!f.find($=>k.id==$.id))),n.$$.dirty[0]&24&&t(7,p=f.filter(k=>u.find($=>$.id==k.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(k=>!u.find($=>$.id==k.id))),n.$$.dirty[0]&7&&t(9,l=H.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,d,p,m,l,s,_,b]}class GA extends be{constructor(e){super(),ge(this,e,ZA,JA,_e,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function __(n,e,t){const i=n.slice();return i[17]=e[t],i}function g_(n){let e,t;return e=new GA({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function XA(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=E(),o=y("tbody");for(let C=0;C<_.length;C+=1)_[C].c();r=E(),g&&g.c(),a=E();for(let C=0;C!["schema","created","updated"].includes(k));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(k=>!f.find($=>k.id==$.id))))}function b(k){return typeof k>"u"?"":H.isObject(k)?JSON.stringify(k,null,4):k}return n.$$set=k=>{"collectionA"in k&&t(0,o=k.collectionA),"collectionB"in k&&t(1,r=k.collectionB),"deleteMissing"in k&&t(2,a=k.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,d=u.filter(k=>!f.find($=>k.id==$.id))),n.$$.dirty[0]&24&&t(7,p=f.filter(k=>u.find($=>$.id==k.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(k=>!u.find($=>$.id==k.id))),n.$$.dirty[0]&7&&t(9,l=H.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,d,p,m,l,s,_,b]}class GA extends ve{constructor(e){super(),be(this,e,ZA,JA,_e,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function g_(n,e,t){const i=n.slice();return i[17]=e[t],i}function b_(n){let e,t;return e=new GA({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function XA(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{_()}):_()}async function _(){if(!u){t(4,u=!0);try{await pe.collections.import(o,a),Xt("Successfully imported collections configuration."),i("submit")}catch(C){pe.errorResponseHandler(C)}t(4,u=!1),d()}}const g=()=>m(),b=()=>!u;function k(C){se[C?"unshift":"push"](()=>{s=C,t(1,s)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&p()},[d,s,r,a,u,m,f,l,o,g,b,k,$,T]}class nI extends be{constructor(e){super(),ge(this,e,tI,eI,_e,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function b_(n,e,t){const i=n.slice();return i[32]=e[t],i}function v_(n,e,t){const i=n.slice();return i[35]=e[t],i}function y_(n,e,t){const i=n.slice();return i[32]=e[t],i}function iI(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D;a=new de({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[lI,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let I=!1,L=n[6]&&n[1].length&&!n[7]&&w_(),F=n[6]&&n[1].length&&n[7]&&S_(n),q=n[13].length&&L_(n),N=!!n[0]&&N_(n);return{c(){e=y("input"),t=E(),i=y("div"),s=y("p"),l=W(`Paste below the collections configuration you want to import or - `),o=y("button"),o.innerHTML='Load from JSON file',r=E(),U(a.$$.fragment),u=E(),f=E(),L&&L.c(),d=E(),F&&F.c(),p=E(),q&&q.c(),m=E(),_=y("div"),N&&N.c(),g=E(),b=y("div"),k=E(),$=y("button"),T=y("span"),T.textContent="Review",h(e,"type","file"),h(e,"class","hidden"),h(e,"accept",".json"),h(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),h(i,"class","content txt-xl m-b-base"),h(b,"class","flex-fill"),h(T,"class","txt"),h($,"type","button"),h($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=C=!n[14],h(_,"class","flex m-t-base")},m(R,j){S(R,e,j),n[19](e),S(R,t,j),S(R,i,j),v(i,s),v(s,l),v(s,o),S(R,r,j),z(a,R,j),S(R,u,j),S(R,f,j),L&&L.m(R,j),S(R,d,j),F&&F.m(R,j),S(R,p,j),q&&q.m(R,j),S(R,m,j),S(R,_,j),N&&N.m(_,null),v(_,g),v(_,b),v(_,k),v(_,$),v($,T),O=!0,M||(D=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(R,j){(!O||j[0]&4096)&&x(o,"btn-loading",R[12]);const V={};j[0]&64&&(V.class="form-field "+(R[6]?"":"field-error")),j[0]&65|j[1]&1536&&(V.$$scope={dirty:j,ctx:R}),a.$set(V),R[6]&&R[1].length&&!R[7]?L||(L=w_(),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?F?F.p(R,j):(F=S_(R),F.c(),F.m(p.parentNode,p)):F&&(F.d(1),F=null),R[13].length?q?q.p(R,j):(q=L_(R),q.c(),q.m(m.parentNode,m)):q&&(q.d(1),q=null),R[0]?N?N.p(R,j):(N=N_(R),N.c(),N.m(_,g)):N&&(N.d(1),N=null),(!O||j[0]&16384&&C!==(C=!R[14]))&&($.disabled=C)},i(R){O||(A(a.$$.fragment,R),A(I),O=!0)},o(R){P(a.$$.fragment,R),P(I),O=!1},d(R){R&&w(e),n[19](null),R&&w(t),R&&w(i),R&&w(r),B(a,R),R&&w(u),R&&w(f),L&&L.d(R),R&&w(d),F&&F.d(R),R&&w(p),q&&q.d(R),R&&w(m),R&&w(_),N&&N.d(),M=!1,Ee(D)}}}function sI(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function k_(n){let e;return{c(){e=y("div"),e.textContent="Invalid collections configuration.",h(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function lI(n){let e,t,i,s,l,o,r,a,u,f,d=!!n[0]&&!n[6]&&k_();return{c(){e=y("label"),t=W("Collections"),s=E(),l=y("textarea"),r=E(),d&&d.c(),a=$e(),h(e,"for",i=n[40]),h(e,"class","p-b-10"),h(l,"id",o=n[40]),h(l,"class","code"),h(l,"spellcheck","false"),h(l,"rows","15"),l.required=!0},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0]),S(p,r,m),d&&d.m(p,m),S(p,a,m),u||(f=J(l,"input",n[22]),u=!0)},p(p,m){m[1]&512&&i!==(i=p[40])&&h(e,"for",i),m[1]&512&&o!==(o=p[40])&&h(l,"id",o),m[0]&1&&fe(l,p[0]),p[0]&&!p[6]?d||(d=k_(),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),d&&d.d(p),p&&w(a),u=!1,f()}}}function w_(n){let e;return{c(){e=y("div"),e.innerHTML=`
    -
    Your collections configuration is already up-to-date!
    `,h(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function S_(n){let e,t,i,s,l,o=n[9].length&&$_(n),r=n[4].length&&M_(n),a=n[8].length&&A_(n);return{c(){e=y("h5"),e.textContent="Detected changes",t=E(),i=y("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),h(e,"class","section-title"),h(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),v(i,s),r&&r.m(i,null),v(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=$_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=M_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=A_(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 $_(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=E(),s=y("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are +- `)}`,()=>{_()}):_()}async function _(){if(!u){t(4,u=!0);try{await pe.collections.import(o,a),Qt("Successfully imported collections configuration."),i("submit")}catch(C){pe.errorResponseHandler(C)}t(4,u=!1),d()}}const g=()=>m(),b=()=>!u;function k(C){se[C?"unshift":"push"](()=>{s=C,t(1,s)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&p()},[d,s,r,a,u,m,f,l,o,g,b,k,$,T]}class nI extends ve{constructor(e){super(),be(this,e,tI,eI,_e,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function v_(n,e,t){const i=n.slice();return i[32]=e[t],i}function y_(n,e,t){const i=n.slice();return i[35]=e[t],i}function k_(n,e,t){const i=n.slice();return i[32]=e[t],i}function iI(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O;a=new de({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[lI,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let I=!1,L=n[6]&&n[1].length&&!n[7]&&S_(),F=n[6]&&n[1].length&&n[7]&&$_(n),q=n[13].length&&N_(n),N=!!n[0]&&F_(n);return{c(){e=y("input"),t=E(),i=y("div"),s=y("p"),l=W(`Paste below the collections configuration you want to import or + `),o=y("button"),o.innerHTML='Load from JSON file',r=E(),U(a.$$.fragment),u=E(),f=E(),L&&L.c(),d=E(),F&&F.c(),p=E(),q&&q.c(),m=E(),_=y("div"),N&&N.c(),g=E(),b=y("div"),k=E(),$=y("button"),T=y("span"),T.textContent="Review",h(e,"type","file"),h(e,"class","hidden"),h(e,"accept",".json"),h(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),h(i,"class","content txt-xl m-b-base"),h(b,"class","flex-fill"),h(T,"class","txt"),h($,"type","button"),h($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=C=!n[14],h(_,"class","flex m-t-base")},m(R,j){S(R,e,j),n[19](e),S(R,t,j),S(R,i,j),v(i,s),v(s,l),v(s,o),S(R,r,j),z(a,R,j),S(R,u,j),S(R,f,j),L&&L.m(R,j),S(R,d,j),F&&F.m(R,j),S(R,p,j),q&&q.m(R,j),S(R,m,j),S(R,_,j),N&&N.m(_,null),v(_,g),v(_,b),v(_,k),v(_,$),v($,T),D=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(R,j){(!D||j[0]&4096)&&x(o,"btn-loading",R[12]);const V={};j[0]&64&&(V.class="form-field "+(R[6]?"":"field-error")),j[0]&65|j[1]&1536&&(V.$$scope={dirty:j,ctx:R}),a.$set(V),R[6]&&R[1].length&&!R[7]?L||(L=S_(),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?F?F.p(R,j):(F=$_(R),F.c(),F.m(p.parentNode,p)):F&&(F.d(1),F=null),R[13].length?q?q.p(R,j):(q=N_(R),q.c(),q.m(m.parentNode,m)):q&&(q.d(1),q=null),R[0]?N?N.p(R,j):(N=F_(R),N.c(),N.m(_,g)):N&&(N.d(1),N=null),(!D||j[0]&16384&&C!==(C=!R[14]))&&($.disabled=C)},i(R){D||(A(a.$$.fragment,R),A(I),D=!0)},o(R){P(a.$$.fragment,R),P(I),D=!1},d(R){R&&w(e),n[19](null),R&&w(t),R&&w(i),R&&w(r),B(a,R),R&&w(u),R&&w(f),L&&L.d(R),R&&w(d),F&&F.d(R),R&&w(p),q&&q.d(R),R&&w(m),R&&w(_),N&&N.d(),M=!1,Ee(O)}}}function sI(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function w_(n){let e;return{c(){e=y("div"),e.textContent="Invalid collections configuration.",h(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function lI(n){let e,t,i,s,l,o,r,a,u,f,d=!!n[0]&&!n[6]&&w_();return{c(){e=y("label"),t=W("Collections"),s=E(),l=y("textarea"),r=E(),d&&d.c(),a=$e(),h(e,"for",i=n[40]),h(e,"class","p-b-10"),h(l,"id",o=n[40]),h(l,"class","code"),h(l,"spellcheck","false"),h(l,"rows","15"),l.required=!0},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0]),S(p,r,m),d&&d.m(p,m),S(p,a,m),u||(f=J(l,"input",n[22]),u=!0)},p(p,m){m[1]&512&&i!==(i=p[40])&&h(e,"for",i),m[1]&512&&o!==(o=p[40])&&h(l,"id",o),m[0]&1&&fe(l,p[0]),p[0]&&!p[6]?d||(d=w_(),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),d&&d.d(p),p&&w(a),u=!1,f()}}}function S_(n){let e;return{c(){e=y("div"),e.innerHTML=`
    +
    Your collections configuration is already up-to-date!
    `,h(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $_(n){let e,t,i,s,l,o=n[9].length&&C_(n),r=n[4].length&&O_(n),a=n[8].length&&I_(n);return{c(){e=y("h5"),e.textContent="Detected changes",t=E(),i=y("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),h(e,"class","section-title"),h(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),v(i,s),r&&r.m(i,null),v(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=C_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=O_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=I_(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 C_(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=E(),s=y("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:Q,d(u){u&&w(e),r=!1,a()}}}function N_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function oI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[sI,iI],_=[];function g(b,k){return b[5]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&oe(o,b[15]);let $=f;f=g(b),f===$?_[f].p(b,k):(ae(),P(_[$],1,1,()=>{_[$]=null}),ue(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function rI(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[oI]},$$scope:{ctx:n}}});let r={};return l=new nI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[27](null),B(l,a)}}}function aI(n,e,t){let i,s,l,o,r,a,u;Je(n,Nt,G=>t(15,u=G)),rn(Nt,u="Import collections",u);let f,d,p="",m=!1,_=[],g=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,g=await pe.collections.getFullList(200));for(let G of g)delete G.created,delete G.updated}catch(G){pe.errorResponseHandler(G)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let G of _){const ce=H.findByKey(g,"id",G.id);!(ce!=null&&ce.id)||!H.hasCollectionChanges(ce,G,b)||k.push({new:G,old:ce})}}function O(){t(1,_=[]);try{t(1,_=JSON.parse(p))}catch{}Array.isArray(_)?t(1,_=H.filterDuplicatesByKey(_)):t(1,_=[]);for(let G of _)delete G.created,delete G.updated,G.schema=H.filterDuplicatesByKey(G.schema)}function M(){var G,ce;for(let X of _){const le=H.findByKey(g,"name",X.name)||H.findByKey(g,"id",X.id);if(!le)continue;const ve=X.id,Se=le.id;X.id=Se;const Ve=Array.isArray(le.schema)?le.schema:[],ze=Array.isArray(X.schema)?X.schema:[];for(const we of ze){const Me=H.findByKey(Ve,"name",we.name);Me&&Me.id&&(we.id=Me.id)}for(let we of _)if(Array.isArray(we.schema))for(let Me of we.schema)(G=Me.options)!=null&&G.collectionId&&((ce=Me.options)==null?void 0:ce.collectionId)===ve&&(Me.options.collectionId=Se)}t(0,p=JSON.stringify(_,null,4))}function D(G){t(12,m=!0);const ce=new FileReader;ce.onload=async X=>{t(12,m=!1),t(10,f.value="",f),t(0,p=X.target.result),await pn(),_.length||(hl("Invalid collections configuration."),I())},ce.onerror=X=>{console.warn(X),hl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},ce.readAsText(G)}function I(){t(0,p=""),t(10,f.value="",f),mn({})}function L(G){se[G?"unshift":"push"](()=>{f=G,t(10,f)})}const F=()=>{f.files.length&&D(f.files[0])},q=()=>{f.click()};function N(){p=this.value,t(0,p)}function R(){b=this.checked,t(3,b)}const j=()=>M(),V=()=>I(),K=()=>d==null?void 0:d.show(g,_,b);function ee(G){se[G?"unshift":"push"](()=>{d=G,t(11,d)})}const te=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&O(),n.$$.dirty[0]&3&&t(6,i=!!p&&_.length&&_.length===_.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(G=>i&&b&&!H.findByKey(_,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(G=>i&&!H.findByKey(g,"id",G.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(G=>{let ce=H.findByKey(g,"name",G.name)||H.findByKey(g,"id",G.id);if(!ce)return!1;if(ce.id!=G.id)return!0;const X=Array.isArray(ce.schema)?ce.schema:[],le=Array.isArray(G.schema)?G.schema:[];for(const ve of le){if(H.findByKey(X,"id",ve.id))continue;const Ve=H.findByKey(X,"name",ve.name);if(Ve&&ve.id!=Ve.id)return!0}return!1}))},[p,_,g,b,k,$,i,o,l,s,f,d,m,a,r,u,M,D,I,L,F,q,N,R,j,V,K,ee,te]}class uI extends be{constructor(e){super(),ge(this,e,aI,rI,_e,{},null,[-1,-1])}}const zt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Vi("/"):!0}],fI={"/login":qt({component:nE,conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":qt({asyncComponent:()=>rt(()=>import("./PageAdminRequestPasswordReset-49abd701.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageAdminConfirmPasswordReset-4c97638f.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":qt({component:TD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":qt({component:v$,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":qt({component:dE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":qt({component:GD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":qt({component:GE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":qt({component:dA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":qt({component:DA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":qt({component:qA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":qt({component:UA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":qt({component:uI,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-08b4a443.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-08b4a443.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-9a8dcf69.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-9a8dcf69.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-8b633175.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-8b633175.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":qt({asyncComponent:()=>rt(()=>import("./PageOAuth2Redirect-19f0a31c.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"*":qt({component:Hy,userData:{showAppSidebar:!1}})};function cI(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:d=m=>Math.sqrt(m)*120,easing:p=Yo}=i;return{delay:f,duration:Vt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,_)=>{const g=_*a,b=_*u,k=m+_*e.width/t.width,$=m+_*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${$});`}}}function F_(n,e,t){const i=n.slice();return i[2]=e[t],i}function dI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function mI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hI(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function R_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m=Q,_,g,b;function k(O,M){return O[2].type==="info"?hI:O[2].type==="success"?mI:O[2].type==="warning"?pI:dI}let $=k(e),T=$(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),T.c(),s=E(),l=y("div"),r=W(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(O,M){S(O,t,M),v(t,i),T.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),_=!0,g||(b=J(u,"click",at(C)),g=!0)},p(O,M){e=O,$!==($=k(e))&&(T.d(1),T=$(e),T&&(T.c(),T.m(i,null))),(!_||M&1)&&o!==(o=e[2].message+"")&&oe(r,o),(!_||M&1)&&x(t,"alert-info",e[2].type=="info"),(!_||M&1)&&x(t,"alert-success",e[2].type=="success"),(!_||M&1)&&x(t,"alert-danger",e[2].type=="error"),(!_||M&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){p=t.getBoundingClientRect()},f(){Rb(t),m(),Y_(t,p)},a(){m(),m=Fb(t,p,cI,{duration:150})},i(O){_||(nt(()=>{_&&(d||(d=He(t,ko,{duration:150},!0)),d.run(1))}),_=!0)},o(O){d||(d=He(t,ko,{duration:150},!1)),d.run(0),_=!1},d(O){O&&w(t),T.d(),O&&d&&d.end(),g=!1,b()}}}function _I(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=>l1(l)]}class bI extends be{constructor(e){super(),ge(this,e,gI,_I,_e,{})}}function vI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=W(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&oe(i,t)},d(l){l&&w(e)}}}function yI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Ee(r)}}}function kI(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:[yI],header:[vI]},$$scope:{ctx:n}};return e=new hn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),B(e,s)}}}function wI(n,e,t){let i;Je(n,lu,d=>t(1,i=d));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(d){se[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await pn(),t(3,o=!1),ab()};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 SI extends be{constructor(e){super(),ge(this,e,wI,kI,_e,{})}}function q_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return g=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[$I]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),_=E(),U(g.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),dn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,_),z(g,d,null),b=!0,k||($=[De(fn.call(null,t)),De(fn.call(null,l)),De(Gn.call(null,l,{path:"/collections/?.*",className:"current-route"})),De(We.call(null,l,{text:"Collections",position:"right"})),De(fn.call(null,r)),De(Gn.call(null,r,{path:"/logs/?.*",className:"current-route"})),De(We.call(null,r,{text:"Logs",position:"right"})),De(fn.call(null,u)),De(Gn.call(null,u,{path:"/settings/?.*",className:"current-route"})),De(We.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!dn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const O={};C&4096&&(O.$$scope={dirty:C,ctx:T}),g.$set(O)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),B(g),k=!1,Ee($)}}}function $I(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` + to.
    `,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:Q,d(u){u&&w(e),r=!1,a()}}}function F_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function oI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[sI,iI],_=[];function g(b,k){return b[5]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&oe(o,b[15]);let $=f;f=g(b),f===$?_[f].p(b,k):(ae(),P(_[$],1,1,()=>{_[$]=null}),ue(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function rI(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[oI]},$$scope:{ctx:n}}});let r={};return l=new nI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[27](null),B(l,a)}}}function aI(n,e,t){let i,s,l,o,r,a,u;Je(n,Nt,G=>t(15,u=G)),rn(Nt,u="Import collections",u);let f,d,p="",m=!1,_=[],g=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,g=await pe.collections.getFullList(200));for(let G of g)delete G.created,delete G.updated}catch(G){pe.errorResponseHandler(G)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let G of _){const ce=H.findByKey(g,"id",G.id);!(ce!=null&&ce.id)||!H.hasCollectionChanges(ce,G,b)||k.push({new:G,old:ce})}}function D(){t(1,_=[]);try{t(1,_=JSON.parse(p))}catch{}Array.isArray(_)?t(1,_=H.filterDuplicatesByKey(_)):t(1,_=[]);for(let G of _)delete G.created,delete G.updated,G.schema=H.filterDuplicatesByKey(G.schema)}function M(){var G,ce;for(let X of _){const le=H.findByKey(g,"name",X.name)||H.findByKey(g,"id",X.id);if(!le)continue;const ye=X.id,Se=le.id;X.id=Se;const Ve=Array.isArray(le.schema)?le.schema:[],ze=Array.isArray(X.schema)?X.schema:[];for(const we of ze){const Me=H.findByKey(Ve,"name",we.name);Me&&Me.id&&(we.id=Me.id)}for(let we of _)if(Array.isArray(we.schema))for(let Me of we.schema)(G=Me.options)!=null&&G.collectionId&&((ce=Me.options)==null?void 0:ce.collectionId)===ye&&(Me.options.collectionId=Se)}t(0,p=JSON.stringify(_,null,4))}function O(G){t(12,m=!0);const ce=new FileReader;ce.onload=async X=>{t(12,m=!1),t(10,f.value="",f),t(0,p=X.target.result),await an(),_.length||(hl("Invalid collections configuration."),I())},ce.onerror=X=>{console.warn(X),hl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},ce.readAsText(G)}function I(){t(0,p=""),t(10,f.value="",f),un({})}function L(G){se[G?"unshift":"push"](()=>{f=G,t(10,f)})}const F=()=>{f.files.length&&O(f.files[0])},q=()=>{f.click()};function N(){p=this.value,t(0,p)}function R(){b=this.checked,t(3,b)}const j=()=>M(),V=()=>I(),K=()=>d==null?void 0:d.show(g,_,b);function ee(G){se[G?"unshift":"push"](()=>{d=G,t(11,d)})}const te=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&D(),n.$$.dirty[0]&3&&t(6,i=!!p&&_.length&&_.length===_.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(G=>i&&b&&!H.findByKey(_,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(G=>i&&!H.findByKey(g,"id",G.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(G=>{let ce=H.findByKey(g,"name",G.name)||H.findByKey(g,"id",G.id);if(!ce)return!1;if(ce.id!=G.id)return!0;const X=Array.isArray(ce.schema)?ce.schema:[],le=Array.isArray(G.schema)?G.schema:[];for(const ye of le){if(H.findByKey(X,"id",ye.id))continue;const Ve=H.findByKey(X,"name",ye.name);if(Ve&&ye.id!=Ve.id)return!0}return!1}))},[p,_,g,b,k,$,i,o,l,s,f,d,m,a,r,u,M,O,I,L,F,q,N,R,j,V,K,ee,te]}class uI extends ve{constructor(e){super(),be(this,e,aI,rI,_e,{},null,[-1,-1])}}const zt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Vi("/"):!0}],fI={"/login":qt({component:nE,conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":qt({asyncComponent:()=>rt(()=>import("./PageAdminRequestPasswordReset-f2d951d5.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageAdminConfirmPasswordReset-638f988c.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":qt({component:TD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":qt({component:v$,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":qt({component:dE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":qt({component:GD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":qt({component:GE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":qt({component:dA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":qt({component:DA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":qt({component:qA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":qt({component:UA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":qt({component:uI,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-2d9b57c3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-2d9b57c3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-19275fb7.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-19275fb7.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-5246a39b.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-5246a39b.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":qt({asyncComponent:()=>rt(()=>import("./PageOAuth2Redirect-5f45cdfd.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"*":qt({component:Hy,userData:{showAppSidebar:!1}})};function cI(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:d=m=>Math.sqrt(m)*120,easing:p=Wo}=i;return{delay:f,duration:Vt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,_)=>{const g=_*a,b=_*u,k=m+_*e.width/t.width,$=m+_*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${$});`}}}function R_(n,e,t){const i=n.slice();return i[2]=e[t],i}function dI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function mI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hI(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function q_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m,_=Q,g,b,k;function $(M,O){return M[2].type==="info"?hI:M[2].type==="success"?mI:M[2].type==="warning"?pI:dI}let T=$(e),C=T(e);function D(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),C.c(),s=E(),l=y("div"),r=W(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){S(M,t,O),v(t,i),C.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),g=!0,b||(k=J(u,"click",at(D)),b=!0)},p(M,O){e=M,T!==(T=$(e))&&(C.d(1),C=T(e),C&&(C.c(),C.m(i,null))),(!g||O&1)&&o!==(o=e[2].message+"")&&oe(r,o),(!g||O&1)&&x(t,"alert-info",e[2].type=="info"),(!g||O&1)&&x(t,"alert-success",e[2].type=="success"),(!g||O&1)&&x(t,"alert-danger",e[2].type=="error"),(!g||O&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){qb(t),_(),K_(t,m)},a(){_(),_=Rb(t,m,cI,{duration:150})},i(M){g||(nt(()=>{g&&(p&&p.end(1),d=X_(t,yt,{duration:150}),d.start())}),g=!0)},o(M){d&&d.invalidate(),p=ka(t,Xr,{duration:150}),g=!1},d(M){M&&w(t),C.d(),M&&p&&p.end(),b=!1,k()}}}function _I(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=>o1(l)]}class bI extends ve{constructor(e){super(),be(this,e,gI,_I,_e,{})}}function vI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=W(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&oe(i,t)},d(l){l&&w(e)}}}function yI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Ee(r)}}}function kI(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:[yI],header:[vI]},$$scope:{ctx:n}};return e=new hn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),B(e,s)}}}function wI(n,e,t){let i;Je(n,ou,d=>t(1,i=d));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(d){se[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await an(),t(3,o=!1),ub()};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 SI extends ve{constructor(e){super(),be(this,e,wI,kI,_e,{})}}function j_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return g=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[$I]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),_=E(),U(g.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),mn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,_),z(g,d,null),b=!0,k||($=[De(dn.call(null,t)),De(dn.call(null,l)),De(Gn.call(null,l,{path:"/collections/?.*",className:"current-route"})),De(We.call(null,l,{text:"Collections",position:"right"})),De(dn.call(null,r)),De(Gn.call(null,r,{path:"/logs/?.*",className:"current-route"})),De(We.call(null,r,{text:"Logs",position:"right"})),De(dn.call(null,u)),De(Gn.call(null,u,{path:"/settings/?.*",className:"current-route"})),De(We.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!mn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const D={};C&4096&&(D.$$scope={dirty:C,ctx:T}),g.$set(D)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),B(g),k=!1,Ee($)}}}function $I(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` Manage admins`,t=E(),i=y("hr"),s=E(),l=y("button"),l.innerHTML=` - Logout`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"type","button"),h(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=[De(fn.call(null,e)),J(l,"click",n[7])],o=!0)},p:Q,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Ee(r)}}}function j_(n){let e,t,i;return t=new fu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tinymce-preloader hidden")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p:Q,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function CI(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;document.title=e=H.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((b=n[0])==null?void 0:b.id)&&n[1]&&q_(n);o=new Xb({props:{routes:fI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new bI({}),f=new SI({});let g=n[1]&&!n[2]&&j_(n);return{c(){t=E(),i=y("div"),_&&_.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),g&&g.c(),p=$e(),h(l,"class","app-body"),h(i,"class","app-layout")},m(k,$){S(k,t,$),S(k,i,$),_&&_.m(i,null),v(i,s),v(i,l),z(o,l,null),v(l,r),z(a,l,null),S(k,u,$),z(f,k,$),S(k,d,$),g&&g.m(k,$),S(k,p,$),m=!0},p(k,[$]){var T;(!m||$&24)&&e!==(e=H.joinNonEmpty([k[4],k[3],"PocketBase"]," - "))&&(document.title=e),(T=k[0])!=null&&T.id&&k[1]?_?(_.p(k,$),$&3&&A(_,1)):(_=q_(k),_.c(),A(_,1),_.m(i,s)):_&&(ae(),P(_,1,1,()=>{_=null}),ue()),k[1]&&!k[2]?g?(g.p(k,$),$&6&&A(g,1)):(g=j_(k),g.c(),A(g,1),g.m(p.parentNode,p)):g&&(ae(),P(g,1,1,()=>{g=null}),ue())},i(k){m||(A(_),A(o.$$.fragment,k),A(a.$$.fragment,k),A(f.$$.fragment,k),A(g),m=!0)},o(k){P(_),P(o.$$.fragment,k),P(a.$$.fragment,k),P(f.$$.fragment,k),P(g),m=!1},d(k){k&&w(t),k&&w(i),_&&_.d(),B(o),B(a),k&&w(u),B(f,k),k&&w(d),g&&g.d(k),k&&w(p)}}}function TI(n,e,t){let i,s,l,o;Je(n,Es,g=>t(10,i=g)),Je(n,So,g=>t(3,s=g)),Je(n,Pa,g=>t(0,l=g)),Je(n,Nt,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var b,k,$,T;((b=g==null?void 0:g.detail)==null?void 0:b.location)!==r&&(t(1,a=!!(($=(k=g==null?void 0:g.detail)==null?void 0:k.userData)!=null&&$.showAppSidebar)),r=(T=g==null?void 0:g.detail)==null?void 0:T.location,rn(Nt,o="",o),mn({}),ab())}function d(){Vi("/")}async function p(){var g,b;if(l!=null&&l.id)try{const k=await pe.settings.getAll({$cancelKey:"initialAppSettings"});rn(So,s=((g=k==null?void 0:k.meta)==null?void 0:g.appName)||"",s),rn(Es,i=!!((b=k==null?void 0:k.meta)!=null&&b.hideControls),i)}catch(k){k!=null&&k.isAbort||console.warn("Failed to load app settings.",k)}}function m(){pe.logout()}const _=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&p()},[l,a,u,s,o,f,d,m,_]}class MI extends be{constructor(e){super(),ge(this,e,TI,CI,_e,{})}}new MI({target:document.getElementById("app")});export{Ee as A,Xt as B,H as C,Vi as D,$e as E,r1 as F,ig as G,xt as H,Je as I,ci as J,Tt as K,se as L,ob as M,$t as N,us as O,Qt as P,dt as Q,Vo as R,be as S,kn as T,qr as U,P as a,E as b,U as c,B as d,y as e,h as f,S as g,v as h,ge as i,De as j,ae as k,fn as l,z as m,ue as n,w as o,pe as p,de as q,x as r,_e as s,A as t,J as u,at as v,W as w,oe as x,Q as y,fe as z}; + Logout`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"type","button"),h(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=[De(dn.call(null,e)),J(l,"click",n[7])],o=!0)},p:Q,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Ee(r)}}}function V_(n){let e,t,i;return t=new cu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tinymce-preloader hidden")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p:Q,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function CI(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;document.title=e=H.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((b=n[0])==null?void 0:b.id)&&n[1]&&j_(n);o=new Xb({props:{routes:fI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new bI({}),f=new SI({});let g=n[1]&&!n[2]&&V_(n);return{c(){t=E(),i=y("div"),_&&_.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),g&&g.c(),p=$e(),h(l,"class","app-body"),h(i,"class","app-layout")},m(k,$){S(k,t,$),S(k,i,$),_&&_.m(i,null),v(i,s),v(i,l),z(o,l,null),v(l,r),z(a,l,null),S(k,u,$),z(f,k,$),S(k,d,$),g&&g.m(k,$),S(k,p,$),m=!0},p(k,[$]){var T;(!m||$&24)&&e!==(e=H.joinNonEmpty([k[4],k[3],"PocketBase"]," - "))&&(document.title=e),(T=k[0])!=null&&T.id&&k[1]?_?(_.p(k,$),$&3&&A(_,1)):(_=j_(k),_.c(),A(_,1),_.m(i,s)):_&&(ae(),P(_,1,1,()=>{_=null}),ue()),k[1]&&!k[2]?g?(g.p(k,$),$&6&&A(g,1)):(g=V_(k),g.c(),A(g,1),g.m(p.parentNode,p)):g&&(ae(),P(g,1,1,()=>{g=null}),ue())},i(k){m||(A(_),A(o.$$.fragment,k),A(a.$$.fragment,k),A(f.$$.fragment,k),A(g),m=!0)},o(k){P(_),P(o.$$.fragment,k),P(a.$$.fragment,k),P(f.$$.fragment,k),P(g),m=!1},d(k){k&&w(t),k&&w(i),_&&_.d(),B(o),B(a),k&&w(u),B(f,k),k&&w(d),g&&g.d(k),k&&w(p)}}}function TI(n,e,t){let i,s,l,o;Je(n,Es,g=>t(10,i=g)),Je(n,wo,g=>t(3,s=g)),Je(n,La,g=>t(0,l=g)),Je(n,Nt,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var b,k,$,T;((b=g==null?void 0:g.detail)==null?void 0:b.location)!==r&&(t(1,a=!!(($=(k=g==null?void 0:g.detail)==null?void 0:k.userData)!=null&&$.showAppSidebar)),r=(T=g==null?void 0:g.detail)==null?void 0:T.location,rn(Nt,o="",o),un({}),ub())}function d(){Vi("/")}async function p(){var g,b;if(l!=null&&l.id)try{const k=await pe.settings.getAll({$cancelKey:"initialAppSettings"});rn(wo,s=((g=k==null?void 0:k.meta)==null?void 0:g.appName)||"",s),rn(Es,i=!!((b=k==null?void 0:k.meta)!=null&&b.hideControls),i)}catch(k){k!=null&&k.isAbort||console.warn("Failed to load app settings.",k)}}function m(){pe.logout()}const _=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&p()},[l,a,u,s,o,f,d,m,_]}class MI extends ve{constructor(e){super(),be(this,e,TI,CI,_e,{})}}new MI({target:document.getElementById("app")});export{Ee as A,Qt as B,H as C,Vi as D,$e as E,a1 as F,sg as G,xt as H,Je as I,ci as J,Tt as K,se as L,rb as M,vt as N,us as O,Kt as P,pt as Q,jo as R,ve as S,kn as T,Rr as U,P as a,E as b,U as c,B as d,y as e,h as f,S as g,v as h,be as i,De as j,ae as k,dn as l,z as m,ue as n,w as o,pe as p,de as q,x as r,_e as s,A as t,J as u,at as v,W as w,oe as x,Q as y,fe as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 024f73be..04425f27 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -28,6 +28,7 @@ + @@ -44,7 +45,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/index.html b/ui/index.html index 782de991..64b7efc4 100644 --- a/ui/index.html +++ b/ui/index.html @@ -28,6 +28,7 @@ + diff --git a/ui/src/utils/CommonHelper.js b/ui/src/utils/CommonHelper.js index b57ae3fb..cf6e0391 100644 --- a/ui/src/utils/CommonHelper.js +++ b/ui/src/utils/CommonHelper.js @@ -1288,9 +1288,9 @@ export default class CommonHelper { "table", "code", "codesample", + "directionality", ], - toolbar: - "undo redo | styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample | code fullscreen", + toolbar: "styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen", file_picker_types: "image", // @see https://www.tiny.cloud/docs/tinymce/6/file-image-upload/#interactive-example file_picker_callback: (cb, value, meta) => { @@ -1332,7 +1332,46 @@ export default class CommonHelper { e.stopPropagation(); editor.formElement.dispatchEvent(new KeyboardEvent("keydown", e)); } - }) + }); + + const lastDirectionKey = "tinymce_last_direction"; + + // load last used text direction for blank editors + editor.on('init', () => { + const lastDirection = window?.localStorage?.getItem(lastDirectionKey); + if (!editor.isDirty() && editor.getContent() == "" && lastDirection == "rtl") { + editor.execCommand("mceDirectionRTL"); + } + }); + + // text direction dropdown + editor.ui.registry.addMenuButton("direction", { + icon: "visualchars", + fetch: (callback) => { + const items = [ + { + type: "menuitem", + text: "LTR content", + icon: "ltr", + onAction: () => { + window?.localStorage?.setItem(lastDirectionKey, "ltr"); + tinymce.activeEditor.execCommand("mceDirectionLTR"); + } + }, + { + type: "menuitem", + text: "RTR content", + icon: "rtl", + onAction: () => { + window?.localStorage?.setItem(lastDirectionKey, "rtl"); + tinymce.activeEditor.execCommand("mceDirectionRTL"); + } + } + ]; + + callback(items); + } + }); }, }; } From 8240addfabe6c6fe50b8a29985f96acae913cbbb Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 20 Apr 2023 15:36:42 +0300 Subject: [PATCH 4/4] fixed rtl editor menu item typo --- ...s-45c570e8.js => AuthMethodsDocs-e361f3fc.js} | 2 +- ...s-4103ee7c.js => AuthRefreshDocs-15565011.js} | 2 +- ...a3b1fde.js => AuthWithOAuth2Docs-7bef9a29.js} | 2 +- ...ca833.js => AuthWithPasswordDocs-b477ad64.js} | 2 +- ...Editor-ed3b6d0c.js => CodeEditor-d6b5e403.js} | 2 +- ...5b6.js => ConfirmEmailChangeDocs-794546bd.js} | 2 +- ...0.js => ConfirmPasswordResetDocs-4f5db084.js} | 2 +- ...dc.js => ConfirmVerificationDocs-66d14bec.js} | 2 +- ...ocs-6fd167db.js => CreateApiDocs-26edb809.js} | 2 +- ...ocs-c0d2fce4.js => DeleteApiDocs-d48d8ce5.js} | 2 +- ...ed.js => FilterAutocompleteInput-2cb65e7c.js} | 2 +- ...iDocs-7984933b.js => ListApiDocs-cdbbc796.js} | 2 +- ...e48d.js => ListExternalAuthsDocs-099b085b.js} | 2 +- ...=> PageAdminConfirmPasswordReset-19ab2844.js} | 2 +- ...=> PageAdminRequestPasswordReset-4f869a22.js} | 2 +- ...f45cdfd.js => PageOAuth2Redirect-f11dcc6f.js} | 2 +- ... => PageRecordConfirmEmailChange-b08cb6a3.js} | 2 +- ...> PageRecordConfirmPasswordReset-75950edb.js} | 2 +- ...=> PageRecordConfirmVerification-f05f93e2.js} | 2 +- ...s-eaba7ffc.js => RealtimeApiDocs-0f10005c.js} | 2 +- ...31c.js => RequestEmailChangeDocs-bffab216.js} | 2 +- ...8.js => RequestPasswordResetDocs-d38da1b2.js} | 2 +- ...07.js => RequestVerificationDocs-9ffa98c8.js} | 2 +- .../{SdkTabs-579eff6e.js => SdkTabs-bef23fdf.js} | 2 +- ...302.js => UnlinkExternalAuthDocs-8dff2352.js} | 2 +- ...ocs-992b265a.js => UpdateApiDocs-46a3fb31.js} | 2 +- ...iDocs-e1f1acb4.js => ViewApiDocs-faa823f0.js} | 2 +- .../{index-81d06e37.js => index-adcaa630.js} | 16 ++++++++-------- ui/dist/index.html | 2 +- ui/src/utils/CommonHelper.js | 2 +- 30 files changed, 37 insertions(+), 37 deletions(-) rename ui/dist/assets/{AuthMethodsDocs-45c570e8.js => AuthMethodsDocs-e361f3fc.js} (98%) rename ui/dist/assets/{AuthRefreshDocs-4103ee7c.js => AuthRefreshDocs-15565011.js} (98%) rename ui/dist/assets/{AuthWithOAuth2Docs-ea3b1fde.js => AuthWithOAuth2Docs-7bef9a29.js} (98%) rename ui/dist/assets/{AuthWithPasswordDocs-6b6ca833.js => AuthWithPasswordDocs-b477ad64.js} (98%) rename ui/dist/assets/{CodeEditor-ed3b6d0c.js => CodeEditor-d6b5e403.js} (99%) rename ui/dist/assets/{ConfirmEmailChangeDocs-727175b6.js => ConfirmEmailChangeDocs-794546bd.js} (97%) rename ui/dist/assets/{ConfirmPasswordResetDocs-0123ea90.js => ConfirmPasswordResetDocs-4f5db084.js} (98%) rename ui/dist/assets/{ConfirmVerificationDocs-d1d2a4dc.js => ConfirmVerificationDocs-66d14bec.js} (97%) rename ui/dist/assets/{CreateApiDocs-6fd167db.js => CreateApiDocs-26edb809.js} (99%) rename ui/dist/assets/{DeleteApiDocs-c0d2fce4.js => DeleteApiDocs-d48d8ce5.js} (97%) rename ui/dist/assets/{FilterAutocompleteInput-5ad2deed.js => FilterAutocompleteInput-2cb65e7c.js} (99%) rename ui/dist/assets/{ListApiDocs-7984933b.js => ListApiDocs-cdbbc796.js} (99%) rename ui/dist/assets/{ListExternalAuthsDocs-368be48d.js => ListExternalAuthsDocs-099b085b.js} (98%) rename ui/dist/assets/{PageAdminConfirmPasswordReset-638f988c.js => PageAdminConfirmPasswordReset-19ab2844.js} (98%) rename ui/dist/assets/{PageAdminRequestPasswordReset-f2d951d5.js => PageAdminRequestPasswordReset-4f869a22.js} (98%) rename ui/dist/assets/{PageOAuth2Redirect-5f45cdfd.js => PageOAuth2Redirect-f11dcc6f.js} (83%) rename ui/dist/assets/{PageRecordConfirmEmailChange-5246a39b.js => PageRecordConfirmEmailChange-b08cb6a3.js} (98%) rename ui/dist/assets/{PageRecordConfirmPasswordReset-2d9b57c3.js => PageRecordConfirmPasswordReset-75950edb.js} (98%) rename ui/dist/assets/{PageRecordConfirmVerification-19275fb7.js => PageRecordConfirmVerification-f05f93e2.js} (97%) rename ui/dist/assets/{RealtimeApiDocs-eaba7ffc.js => RealtimeApiDocs-0f10005c.js} (98%) rename ui/dist/assets/{RequestEmailChangeDocs-2a33c31c.js => RequestEmailChangeDocs-bffab216.js} (98%) rename ui/dist/assets/{RequestPasswordResetDocs-16e43168.js => RequestPasswordResetDocs-d38da1b2.js} (97%) rename ui/dist/assets/{RequestVerificationDocs-d948a007.js => RequestVerificationDocs-9ffa98c8.js} (97%) rename ui/dist/assets/{SdkTabs-579eff6e.js => SdkTabs-bef23fdf.js} (96%) rename ui/dist/assets/{UnlinkExternalAuthDocs-86559302.js => UnlinkExternalAuthDocs-8dff2352.js} (98%) rename ui/dist/assets/{UpdateApiDocs-992b265a.js => UpdateApiDocs-46a3fb31.js} (99%) rename ui/dist/assets/{ViewApiDocs-e1f1acb4.js => ViewApiDocs-faa823f0.js} (98%) rename ui/dist/assets/{index-81d06e37.js => index-adcaa630.js} (99%) diff --git a/ui/dist/assets/AuthMethodsDocs-45c570e8.js b/ui/dist/assets/AuthMethodsDocs-e361f3fc.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs-45c570e8.js rename to ui/dist/assets/AuthMethodsDocs-e361f3fc.js index 5b0b4b2d..9ee010bc 100644 --- a/ui/dist/assets/AuthMethodsDocs-45c570e8.js +++ b/ui/dist/assets/AuthMethodsDocs-e361f3fc.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as _e,f as k,g as h,h as n,m as me,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-81d06e37.js";import{S as Be}from"./SdkTabs-579eff6e.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=g(s),f=w(),k(o,"class","tab-item"),Q(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+"")&&H(m,s),C&6&&Q(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=w(),k(o,"class","tab-item"),Q(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)&&Q(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,X,q,P,D,j,W,M,K,R,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],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 g,b as w,c as _e,f as k,g as h,h as n,m as me,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as _,d as pe,T as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-adcaa630.js";import{S as Be}from"./SdkTabs-bef23fdf.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=g(s),f=w(),k(o,"class","tab-item"),Q(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+"")&&H(m,s),C&6&&Q(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=w(),k(o,"class","tab-item"),Q(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)&&Q(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,X,q,P,D,j,W,M,K,R,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],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-4103ee7c.js b/ui/dist/assets/AuthRefreshDocs-15565011.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs-4103ee7c.js rename to ui/dist/assets/AuthRefreshDocs-15565011.js index 9bf87140..8f8e5d3b 100644 --- a/ui/dist/assets/AuthRefreshDocs-4103ee7c.js +++ b/ui/dist/assets/AuthRefreshDocs-15565011.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,T as Qe,C as He,p as We,r as x,u as Ge}from"./index-81d06e37.js";import{S as Xe}from"./SdkTabs-579eff6e.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){d(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&&u(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){d(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&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,P,q,S=[],Te=new Map,Ce,H,y=[],Pe=new Map,M;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,T as Qe,C as He,p as We,r as x,u as Ge}from"./index-adcaa630.js";import{S as Xe}from"./SdkTabs-bef23fdf.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){d(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&&u(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){d(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&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,R,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,P,q,S=[],Te=new Map,Ce,H,y=[],Pe=new Map,M;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-ea3b1fde.js b/ui/dist/assets/AuthWithOAuth2Docs-7bef9a29.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-ea3b1fde.js rename to ui/dist/assets/AuthWithOAuth2Docs-7bef9a29.js index b74e3865..1c11e146 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-ea3b1fde.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-7bef9a29.js @@ -1,4 +1,4 @@ -import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,T as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-81d06e37.js";import{S as Qe}from"./SdkTabs-579eff6e.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:` +import{S as je,i as Fe,s as Ve,M as He,e as s,w as g,b as h,c as re,f as p,g as r,h as a,m as ce,x as ue,N as Pe,O as Le,k as Ee,P as Je,n as Ne,t as E,a as J,o as c,d as de,T as ze,C as Re,p as Ie,r as N,u as Ke}from"./index-adcaa630.js";import{S as Qe}from"./SdkTabs-bef23fdf.js";function xe(i,l,o){const n=i.slice();return n[5]=l[o],n}function We(i,l,o){const n=i.slice();return n[5]=l[o],n}function Ue(i,l){let o,n=l[5].code+"",m,k,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=g(n),k=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,k),u||(b=Ke(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&ue(m,n),A&6&&N(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function Be(i,l){let o,n,m,k;return n=new He({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),ce(n,o,null),a(o,m),k=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!k||b&6)&&N(o,"active",l[1]===l[5].code)},i(u){k||(E(n.$$.fragment,u),k=!0)},o(u){J(n.$$.fragment,u),k=!1},d(u){u&&c(o),de(n)}}}function Ge(i){let l,o,n=i[0].name+"",m,k,u,b,_,v,A,D,z,S,j,he,F,M,pe,I,V=i[0].name+"",K,be,Q,P,G,R,X,x,Y,y,Z,fe,ee,$,te,me,ae,ke,f,ge,C,_e,ve,we,le,Oe,oe,Ae,Se,ye,se,$e,ne,W,ie,T,U,O=[],Te=new Map,Ce,B,w=[],qe=new Map,q;v=new Qe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-6b6ca833.js b/ui/dist/assets/AuthWithPasswordDocs-b477ad64.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-6b6ca833.js rename to ui/dist/assets/AuthWithPasswordDocs-b477ad64.js index b94f8bee..98a75b48 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-6b6ca833.js +++ b/ui/dist/assets/AuthWithPasswordDocs-b477ad64.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,M 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 Tt,x as At,N as ce,O as ye,k as ge,P as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Oe}from"./index-81d06e37.js";import{S as Te}from"./SdkTabs-579eff6e.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 Ae(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(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(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&At(S,i),C&24&<(l,"active",e[3]===e[8].code)},d(R){R&&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),Tt(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),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,O,B,Ut,ot,A,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,K,T=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Ae}let q=le(n),$=q&&q(n);A=new Te({props:{js:` +import{S as Se,i as ve,s as we,M 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 Tt,x as At,N as ce,O as ye,k as ge,P as Pe,n as $e,t as tt,a as et,o as c,d as Mt,T as Re,C as de,p as Ce,r as lt,u as Oe}from"./index-adcaa630.js";import{S as Te}from"./SdkTabs-bef23fdf.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 Ae(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(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(R,C){r(R,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p(R,C){e=R,C&16&&i!==(i=e[8].code+"")&&At(S,i),C&24&<(l,"active",e[3]===e[8].code)},d(R){R&&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),Tt(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),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,R,C,O,B,Ut,ot,A,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,$t,Zt,Rt,J,Ct,L,K,T=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Ae}let q=le(n),$=q&&q(n);A=new Te({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor-ed3b6d0c.js b/ui/dist/assets/CodeEditor-d6b5e403.js similarity index 99% rename from ui/dist/assets/CodeEditor-ed3b6d0c.js rename to ui/dist/assets/CodeEditor-d6b5e403.js index 04f78c69..35552511 100644 --- a/ui/dist/assets/CodeEditor-ed3b6d0c.js +++ b/ui/dist/assets/CodeEditor-d6b5e403.js @@ -1,4 +1,4 @@ -import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,U as N,g as bt,y as RO,o as kt,I as xt,J as yt,K as wt,H as Yt,C as vt,L as Tt}from"./index-81d06e37.js";import{P as Ut,N as Wt,u as _t,D as Ct,v as wO,T as D,I as YO,w as rO,x as l,y as Vt,L as sO,z as nO,A as j,B as lO,F as ye,G as oO,H as C,J as we,K as Ye,M as ve,E as v,O as G,Q as qt,R as Rt,U as Te,V as X,W as zt,X as jt,a as V,h as Gt,b as At,c as It,d as Nt,e as Et,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ht,k as Ft,j as Kt,l as Oa,m as ea,n as ta,o as aa,p as ia,q as zO,C as E}from"./index-c4d2d831.js";class H{constructor(O,a,t,i,r,s,n,o,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let i=O.parser.context;return new H(O,[],a,t,t,0,[],0,i?new jO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,i=O&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(O,a,t,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(O,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)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]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(O,a,t){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(a,i),this.buffer.push(t,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,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),i=O.bufferBase+a;for(;O&&i==O.bufferBase;)O=O.parent;return new H(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-t*3;if(r<0||a.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 a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var GO;(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",e[e.MinBigReduction=2e3]="MinBigReduction"})(GO||(GO={}));class ra{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class F{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new F(O,a,a-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 F(this.stack,this.pos,this.index)}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new O(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new J;class sa{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,i=this.rangeIndex,r=this.pos+O;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=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,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,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&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,a)))}return t}}class W{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ue(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class XO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?z(O):O}token(O,a){let t=O.pos,i;for(;i=O.pos,Ue(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i-t))}}XO.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class b{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ue(e,O,a,t,i,r){let s=0,n=1<0){let p=e[h];if(o.allows(p)&&(O.token.value==-1||O.token.value==p||na(p,O.token.value,i,r))){O.acceptToken(p);break}}let u=O.next,c=0,f=e[s+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535&&e[Q+f*3-3]==65535){s=e[Q+f*3-1];continue O}for(;c>1,p=Q+h+(h<<1),$=e[p],g=e[p+1]||65536;if(u<$)f=h;else if(u>=g)c=h+1;else{s=e[p+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,i;(i=e[t])!=65535;t++)if(i==a)return t-O;return-1}function na(e,O,a,t){let i=IO(a,t,O);return i<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class la{constructor(O,a){this.fragments=O,this.nodeSet=a,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?EO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?EO(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 D){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[a]++,this.nextStart=s+r.length}}}class oa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new J)}getActions(O){let a=0,t=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new J,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=O;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(O,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,O),t),O.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,a,t,i){for(let r=0;rO.bufferLength*4?new la(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ha(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);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,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?r.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(wO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(c.type.id)})`),!0;if(!(c instanceof D)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof D&&c.positions[0]==0)c=h;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),Z&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!i||i.scoree;class We{constructor(O){this.start=O.start,this.shift=O.shift||uO,this.reduce=O.reduce||uO,this.reuse=O.reuse||uO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ut{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,o,n[Q++]);else{let c=n[Q+-u];for(let f=-u;f>0;f--)r(n[Q++],o,c);Q++}}}this.nodeSet=new Wt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ct;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new W(s,n):n),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,a,t){let i=new Qa(this,O,a,t);for(let r of this.wrappers)i=r(i,O,a,t);return i}getGoto(O,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let Q=r+(s>>1);r0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else return!1;if(a==k(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(r=>r.from==t);return i?i.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=O.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=JO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}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 a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let r of O.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const ua=54,fa=1,da=55,pa=2,Sa=56,$a=3,LO=4,ga=5,K=6,_e=7,Ce=8,Ve=9,qe=10,Pa=11,ma=12,Xa=13,fO=57,Za=14,MO=58,Re=20,ba=22,ze=23,ka=24,ZO=26,je=27,xa=28,ya=31,wa=34,Ya=36,va=37,Ta=0,Ua=1,Wa={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},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={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 Ca(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function bO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let i="";for(;Ca(t);)i+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=i?i.toLowerCase():t==Va||t==qa?void 0:null}const Ae=60,OO=62,vO=47,Va=63,qa=33,Ra=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(bO(t,1)||"",e):e},reduce(e,O){return O==Re&&e?e.parent:e},reuse(e,O,a,t){let i=O.type.id;return i==K||i==Ya?new ee(bO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ga=new b((e,O)=>{if(e.next!=Ae){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==vO;a&&e.advance();let t=bO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Za:K);let i=O.context?O.context.name:null;if(a){if(t==i)return e.acceptToken(Pa);if(i&&_a[i])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ta))return e.acceptToken(ma);for(let r=O.context;r;r=r.parent)if(r.name==t)return;e.acceptToken(Xa)}else{if(t=="script")return e.acceptToken(_e);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ve);if(Wa.hasOwnProperty(t))return e.acceptToken(qe);i&&HO[i]&&HO[i][t]?e.acceptToken(fO,-1):e.acceptToken(K)}},{contextual:!0}),Aa=new b(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ra)O++;else if(e.next==OO&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ia(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Na=new b((e,O)=>{if(e.next==vO&&e.peek(1)==OO){let a=O.dialectEnabled(Ua)||Ia(O.context);e.acceptToken(a?ga:LO,2)}else e.next==OO&&e.acceptToken(LO,1)});function TO(e,O,a){let t=2+e.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==Ae||r==1&&i.next==vO||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Ea=TO("script",ua,fa),Ba=TO("style",da,pa),Da=TO("textarea",Sa,$a),Ja=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!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:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!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+UYkWOX+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!_-ljhS`PkW!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[/echSkWOX+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+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!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!V3bchS`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&}!_5rjhSkWc!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!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[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!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ea,Ba,Da,Na,Ga,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Ie(e,O){let a=Object.create(null);for(let t of e.getChildren(ze)){let i=t.getChild(ka),r=t.getChild(ZO)||t.getChild(je);i&&(a[O.read(i.from,i.to)]=r?r.type.id==ZO?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return a}function te(e,O){let a=e.getChild(ba);return a?O.read(a.from,a.to):" "}function dO(e,O,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=Ie(e.node.parent.firstChild,O))))return{parser:i.parser};return null}function Ne(e=[],O=[]){let a=[],t=[],i=[],r=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let Q=n.type.id;if(Q==xa)return dO(n,o,a);if(Q==ya)return dO(n,o,t);if(Q==wa)return dO(n,o,i);if(Q==Re&&r.length){let u=n.node,c=u.firstChild,f=c&&te(c,o),h;if(f){for(let p of r)if(p.tag==f&&(!p.attrs||p.attrs(h||(h=Ie(u,o))))){let $=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:$.type.id==va?$.from:u.to}]}}}}if(s&&Q==ze){let u=n.node,c;if(c=u.firstChild){let f=s[o.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=te(u.parent,o))continue;let p=u.lastChild;if(p.type.id==ZO){let $=p.from+1,g=p.lastChild,w=p.to-(g&&g.isError?0:1);if(w>$)return{parser:h.parser,overlay:[{from:$,to:w}]}}else if(p.type.id==je)return{parser:h.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ma=94,ae=1,Ha=95,Fa=96,ie=2,Ee=[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],Ka=58,Oi=40,Be=95,ei=91,L=45,ti=46,ai=35,ii=37;function eO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ri(e){return e>=48&&e<=57}const si=new b((e,O)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=e;if(eO(r)||r==L||r==Be||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,e.advance();else{a&&e.acceptToken(r==Oi?Ha:t==2&&O.canShift(ie)?ie:Fa);break}}}),ni=new b(e=>{if(Ee.includes(e.peek(-1))){let{next:O}=e;(eO(O)||O==Be||O==ai||O==ti||O==ei||O==Ka||O==L)&&e.acceptToken(Ma)}}),li=new b(e=>{if(!Ee.includes(e.peek(-1))){let{next:O}=e;if(O==ii&&(e.advance(),e.acceptToken(ae)),eO(O)){do e.advance();while(eO(e.next));e.acceptToken(ae)}}}),oi=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__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},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hi={__proto__:null,not:128,only:128,from:158,to:160},ui=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<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#XPOy%^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:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>Qi[e]||-1},{term:56,get:e=>ci[e]||-1},{term:96,get:e=>hi[e]||-1}],tokenPrec:1123});let pO=null;function SO(){if(!pO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));pO=O.sort().map(t=>({type:"property",label:t}))}return pO||[]}const re=["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})),se=["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}))),fi=["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})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,di=/^-(-[\w-]*)?$/;function pi(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const ne=new we,Si=["Declaration"];function $i(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function De(e,O){if(O.to-O.from>4096){let a=ne.get(O);if(a)return a;let t=[],i=new Set,r=O.cursor(YO.IncludeAnonymous);if(r.firstChild())do for(let s of De(e,r.node))i.has(s.label)||(i.add(s.label),t.push(s));while(r.nextSibling());return ne.set(O,t),t}else{let a=[],t=new Set;return O.cursor().iterate(i=>{var r;if(i.name=="VariableName"&&i.matchContext(Si)&&((r=i.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let s=e.sliceString(i.from,i.to);t.has(s)||(t.add(s),a.push({label:s,type:"variable"}))}}),a}}const gi=e=>{let{state:O,pos:a}=e,t=C(O).resolveInner(a,-1),i=t.type.isError&&t.from==t.to-1&&O.doc.sliceString(t.from,t.to)=="-";if(t.name=="PropertyName"||(i||t.name=="TagName")&&/^(Block|Styles)$/.test(t.resolve(t.to).name))return{from:t.from,options:SO(),validFor:y};if(t.name=="ValueName")return{from:t.from,options:se,validFor:y};if(t.name=="PseudoClassName")return{from:t.from,options:re,validFor:y};if(t.name=="VariableName"||(e.explicit||i)&&pi(t,O.doc))return{from:t.name=="VariableName"?t.from:a,options:De(O.doc,$i(t)),validFor:di};if(t.name=="TagName"){for(let{parent:n}=t;n;n=n.parent)if(n.name=="Block")return{from:t.from,options:SO(),validFor:y};return{from:t.from,options:fi,validFor:y}}if(!e.explicit)return null;let r=t.resolve(a),s=r.childBefore(a);return s&&s.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:re,validFor:y}:s&&s.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:y}:r.name=="Block"||r.name=="Styles"?{from:a,options:SO(),validFor:y}:null},tO=sO.define({name:"css",parser:ui.configure({props:[nO.add({Declaration:j()}),lO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pi(){return new oO(tO,tO.data.of({autocomplete:gi}))}const le=302,oe=1,mi=2,Qe=303,Xi=305,Zi=306,bi=3,ki=4,xi=[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],Je=125,yi=59,ce=47,wi=42,Yi=43,vi=45,Ti=new We({start:!1,shift(e,O){return O==bi||O==ki||O==Xi?e:O==Zi},strict:!1}),Ui=new b((e,O)=>{let{next:a}=e;(a==Je||a==-1||O.context)&&O.canShift(Qe)&&e.acceptToken(Qe)},{contextual:!0,fallback:!0}),Wi=new b((e,O)=>{let{next:a}=e,t;xi.indexOf(a)>-1||a==ce&&((t=e.peek(1))==ce||t==wi)||a!=Je&&a!=yi&&a!=-1&&!O.context&&O.canShift(le)&&e.acceptToken(le)},{contextual:!0}),_i=new b((e,O)=>{let{next:a}=e;if((a==Yi||a==vi)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(oe);e.acceptToken(t?oe:mi)}},{contextual:!0}),Ci=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Vi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},qi={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Ri={__proto__:null,"<":137},zi=T.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#J}'#J}O8yQSO'#IPO9OQ(C[O'#IQOOQQ'#JP'#JPOOQQ'#IU'#IUQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HoO>VQ(C]O'#HuO%QQUO'#HwO>bQ(C]O'#HyO>mQ(C]O'#H{O9OQ(C[O'#H}O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOBUQWO'#E`OOQ(CW'#E_'#E_OB`Q(C`O'#E`OBzQWO'#ESOOQO'#Jj'#JjOC`QWO'#ESOCmQWO'#E`ODTQWO'#EfODWQWO'#E`ODqQWO'#E`OAQQWO'#E`OBzQWO'#E`PEbO?MpO'#C`POOO)CDn)CDnOOOO'#IV'#IVOEmOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOE{O!bO,59RO%QQUO'#D]OOOO'#IY'#IYOFZO07`O,59uOOQ(CY,59u,59uOFiQUO'#IZOF|QSO'#JeOIOQbO'#JeO+sQUO'#JeOIVQSO,59{OImQSO'#EiOIzQSO'#JrOJVQSO'#JqOJVQSO'#JqOJ_QSO,5;VOJdQSO'#JpOOQ(CY,5:W,5:WOJkQUO,5:WOLlQ(CjO,5:bOM]QSO,5:jOMbQSO'#JnON[Q(C[O'#JoO:vQSO'#JnONcQSO'#JnONkQSO,5;UONpQSO'#JnOOQ(CY'#Cf'#CfO%QQUO'#EOO! dQ`O,5:oOOQO'#Jk'#JkOOQO-E<^-E<^O9_QSO,5=VO! zQSO,5=VO!!PQUO,5;SO!$SQ,UO'#EdO!%gQSO,5;SO!'PQ,UO'#DpO!'WQUO'#DuO!'bQWO,5;]O!'jQWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!'xQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!){QSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!*TQ(C[O,5kOOQQ'#JX'#JXOOQQ,5>l,5>lOOQQ-EQQWO,5;yO!>VQSO,5=rO!>[QSO,5=rO!>aQSO,5=rO9OQ(C[O,5=rO!>oQSO'#EkO!?iQWO'#ElOOQ(CW'#Jp'#JpO!?pQ(C[O'#KOO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!?{QWO,5=^O!@TQ,UO,5=_O!@`QSO,5=aO!@eQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!@mQSO'#HPO9dQ,UO'#HSO!@rQSO'#HSOOQQ,5=g,5=gO!@wQSO'#HTO!APQSO'#ClO!AUQSO,58|O!A`QSO,58|O!ChQUO,58|OOQQ,58|,58|O!CuQ(C[O,58|O%QQUO,58|O!DQQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!DbQSO,5=tO`QUO,5=zO`QUO,5=|O!DgQSO,5>OO`QUO,5>QO!DlQSO,5>TO!DqQUO,5>ZOOQQ,5>a,5>aO%QQUO,5>aO9OQ(C[O,5>cOOQQ,5>e,5>eO!HxQSO,5>eOOQQ,5>g,5>gO!HxQSO,5>gOOQQ,5>i,5>iO!H}QWO'#DXO%QQUO'#JgO!IlQWO'#JgO!JZQWO'#DgO!JlQWO'#DgO!L}QUO'#DgO!MUQSO'#JfO!M^QSO,5:QO!McQSO'#EmO!MqQSO'#JsO!MyQSO,5;WO!NOQWO'#DgO!N]QWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!NdQSO,5:kO>QQSO,5;RO!uO+sQUO,5>uOOQO,5>{,5>{O#&oQUO'#IZOOQO-EUQ(CjO1G0xO#AUQ$IUO'#CfO#CSQ$IUO1G1ZO#EQQ$IUO'#JdO!*OQSO1G1aO#EeQ(CjO,5?QOOQ(CW-EQQSO'#HsOOQQ1G3u1G3uO$0}QUO1G3uO9OQ(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9OQ(C[O1G4PO9OQ(C[O1G4RO$5RQSO,5@RO!'xQUO,5;XO:vQSO,5;XO>QQSO,5:RO!'xQUO,5:RO!QQSO1G0mO!uO$:qQSO1G5kO$:yQSO1G5wO$;RQbO1G5xO:vQSO,5>{O$;]QSO1G5tO$;]QSO1G5tO:vQSO1G5tO$;eQ(CjO1G5uO%QQUO1G5uO$;uQ(C[O1G5uO$}O:vQSO,5>}OOQO,5>},5>}O$}OOQO-EQQWO,59pO%QQUO,59pO% mQSO1G2SO!%lQ,UO1G2ZO% rQ(CjO7+'gOOQ(CY7+'g7+'gO!!PQUO7+'gOOQ(CY7+%`7+%`O%!fQ`O'#J|O!NgQSO7+(]O%!pQbO7+(]O$<}QSO7+(]O%!wQ(ChO'#CfO%#[Q(ChO,5<{O%#|QSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!VOOQQ,5>V,5>VO%QQUO'#HlO%)^QSO'#HnOOQQ,5>],5>]O:vQSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%)cQWO1G5mO%)wQ$IUO1G0sO%*RQSO1G0sOOQO1G/m1G/mO%*^Q$IUO1G/mO>QQSO1G/mO!'xQUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!QQSO7+&XO!wOOQO-ExO%QQUO,5>xOOQO-E<[-E<[O%5iQSO1G5oOOQ(CY<}Q$IUO1G0xO%?UQ$IUO1G0xO%AYQ$IUO1G0xO%AaQ$IUO1G0xO%CXQ$IUO1G0xO%ClQ(CjO<WOOQQ,5>Y,5>YO&&aQSO1G3wO:vQSO7+&_O!'xQUO7+&_OOQO7+%X7+%XO&&fQ$IUO1G5xO>QQSO7+%XOOQ(CY<QQSO<[QWO,5=mO&>mQWO,5:zOOQQ<QQSO7+)cO&@ZQSO<zAN>zO%QQUOAN?WO!zO&@pQ(C[OAN?WO!zO&@{Q(C[OAN?WOBzQWOAN>zO&AZQ(C[OAN?WO&AoQ(C`OAN?WO&AyQWOAN>zOBzQWOAN?WOOQO<ROy)uO|)vO(h)xO(i)zO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#*rO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(a(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!1}O!V.bOd([X~P!.aOd.dO~O!V.eO!g(]X~P!4aO!g.hO~O!S.jO~OP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#.nO#g#|O~P#.nOP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#1`Ok$OO~P#1`OP$ZOk$OOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#4QOX$bO!e$QO#l$QO#m$QO#n$aO#o$QO~P#4QOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(a#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(h#fi~P#7RO(h#zO~P#7ROP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO(RVO(h#zO^#fi!V#fi#u#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#9sO(i#{O~P#9sOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO#u$VO(RVO(h#zO(i#{O~O^#fi!V#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#SOy)uO|)vO(h)xO(i)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(a#fi!V#fi!W#fi~P%D`O!f#uOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(a(QX(h(QX(i(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#A]O#y!ni!W!ni~P$$jO!W6|O~O!V'Ya!W'Ya~P#A]O!a#sO(a'fO!V'Za!g'Za~O!V/YO!g(ni~O!V/YO!a#sO!g(ni~Od$uq!V$uq#X$uq#y$uq~P!.aO!S']a!V']a~P#*rO!a7TO~O!V/bO!S(oi~P#*rO!V/bO!S(oi~O!S7XO~O!a#sO#o7^O~Ok7_O!a#sO(a'fO~O!S7aO~Od$wq!V$wq#X$wq#y$wq~P!.aO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!4aO!V4aO!X(pa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!4aOX7fO~O!V0bO!W(vi~O]7lO~O!a6PO~O(U(sO!V'bX!W'bX~O!V4xO!W(sa~O!h%[O'}%PO^(ZX!a(ZX!l(ZX#X(ZX'k(ZX(a(ZX~O't7uO~P._O!xg#>v#>|#?`#?f#?l#?z#@a#Aq#BP#BV#B]#Bc#Bi#Bs#By#CP#CZ#Cm#CsPPPPPPPPPP#CyPPPPPPP#Dm#I^P#J}#KU#K^PPPP$ h$$^$+P$+S$+V$-g$-j$-m$-tPP$-z$.O$.w$/w$/{$0aPP$0e$0k$0oP$0r$0v$0y$1o$2V$2[$2_$2b$2h$2k$2o$2sR!zRmpOXr!X#b%^&e&g&h&j,`,e1j1mU!pQ'R-QQ%dtQ%lwQ%szQ&]!TS&y!c,xQ'X!f^'^!m!r!s!t!u!v!wS*^$z*cQ+W%mQ+e%uQ,P&VQ-O'QQ-Y'YY-b'_'`'a'b'cQ/s*eQ1X,QW2e-d-f-g-hS5R0}5UU6a2h2j2kU8R5Y5Z5]S8x6d6fS9u8S8TQ:c8{Q:z9xRO>R>SQ%vzQ&w!cS&}%x,{Q+]%oS/Q)v/SQ0O*rQ0g+^Q0l+dQ1`,VQ1a,WQ4i0bQ4r0nQ5l1[Q5m1_Q7h4jQ7k4oQ8b5oQ9j7lR:R8_pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR,T&^&z`OPXYrstux!X!^!g!l#Q#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v'T'h'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!d%iw!f!o%k%l%m&x'W'X'Y']'k*]+V+W,u-X-Y-a-c/k0`2T2[2c2g4U6_6c8v8z:a;YQ+P%gQ+p&OQ+s&PQ+}&VQ.Y(fQ1R+zU1V,O,P,QQ2z.ZQ5c1SS5g1W1XS7t4|5QQ8^5hU9s7z8P8QU:x9t9v9wQ;e:yQ;u;f!z=y#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg=zO>R>ST)q$s)rV*o%TPR>O>Q'QkOPWXYZrstu!X!^!l#Q#U#X#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v&z'T'h'x'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>SQ*s%XQ/P)ug3eOQ*V$xS*`$z*cQ*t%YQ/o*a!z=h#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sf=iO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg3eO>R>SQ+q&PQ0v+sQ4v0uR7o4wT*b$z*cS*b$z*cT5T0}5US/m*_4}T4W/u8OQ+R%hQ/n*`Q0]+SQ1T+|Q5e1UQ8[5fQ9n7sQ:O8]Q:t9oQ;P:PQ;c:wQ;s;dQP>Q]=P3d6x9U:i:j;|p){$t(n*u/U/`/w/x3O3w4^6}7`:k=g=s=t!Y=Q(j)Z*P*X._.{/W/e0U0s0u2{2}3x3|4u4w6q6r7U7Y7b7d9`9d;_>P>Q_=R3d6x9U9V:i:j;|pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ&X!SR,[&bpmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR&X!SQ+u&QR0r+nqmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ1O+zS5`1R1SU8U5^5_5cS9z8W8XS:{9y9|Q;g:|R;v;hQ&`!TR,U&[R5l1[S%pz%uR0h+_Q&e!UR,`&fR,f&kT1k,e1mR,j&lQ,i&lR1t,jQ'o!yR-l'oQrOQ#bXT%ar#bQ!|TR'q!|Q#PUR's#PQ)r$sR.|)rQ#SVR'u#SQ#VWU'{#V'|-sQ'|#WR-s'}Q,y&{R2Q,yQ.c(nR3P.cQ.f(pS3S.f3TR3T.gQ-Q'RR2U-Qr_OXr!T!X#b%^&[&^&e&g&h&j,`,e1j1mU!mQ'R-QS#eZ%[Y#o_!m#e-}5OQ-}(_T5O0}5US#]W%wU(S#](T-tQ(T#^R-t(OQ,|'OR2S,|Q(`#hQ-w(XW.R(`-w2l6gQ2l-xR6g2mQ)d$iR.u)dQ$mhR)j$mQ$`cU)Y$`-oP>QQ/c*XU3{/c3}7VQ3}/eR7V3|Q*c$zR/q*cQ*l%OR/z*lQ4b0UR7c4bQ+l%zR0q+lQ4y0xS7q4y9lR9l7rQ+w&RR0{+wQ5U0}R7|5UQ1Z,RS5j1Z8`R8`5lQ0c+ZW4k0c4m7i9hQ4m0fQ7i4lR9h7jQ+`%pR0i+`Q1m,eR5z1mWqOXr#bQ&i!XQ*x%^Q,_&eQ,a&gQ,b&hQ,d&jQ1h,`S1k,e1mR5y1jQ%`oQ&m!]Q&p!_Q&r!`Q&t!aU'g!o5P5QQ+T%jQ+g%vQ+m%{Q,T&`Q,l&oY-]']'i'j'm8QQ-j'eQ/p*bQ0^+US1^,U,XQ1u,kQ1v,nQ1w,oQ2]-[[2_-_-`-c-i-k9wQ4d0_Q4p0lQ4t0sQ5d1TQ5n1`Q5x1iY6X2^2a2d2f2gQ6[2bQ7e4eQ7m4rQ7n4uQ7{5TQ8Z5eQ8a5mY8p6Y6^6`6b6cQ8r6]Q9i7kQ9m7sQ9}8[Q:S8bY:Z8q8u8w8y8zQ:]8tQ:q9jS:s9n9oQ;O:OW;S:[:`:b:dQ;U:_S;a:t:wQ;i;PU;j;T;X;ZQ;l;WS;r;c;dS;w;k;oQ;y;nS;};s;tQOQ>P>RR>Q>SloOXr!X#b%^&e&g&h&j,`,e1j1mQ!dPS#dZ#lQ&o!^U'Z!l4}8OQ't#QQ(w#yQ)h$kS,X&^&aQ,]&bQ,k&nQ,p&vQ-S'TQ.i(uQ.y)iQ0X+OQ0o+jQ1e,[Q2X-UQ2v.XQ3k.tQ4[/}Q5_1QQ5p1bQ5q1cQ5s1dQ5u1fQ5|1oQ6l2yQ6{3hQ8X5bQ8f5tQ8h5vQ8i5wQ9R6pQ9|8YR:U8g#UcOPXZr!X!^!l#b#l#y%^&^&a&b&e&g&h&j&n&v'T(u+O+j,[,`,e-U.X/}1Q1b1c1d1f1j1m1o2y4}5b5t5v5w6p8O8Y8gQ#WWQ#cYQ%bsQ%ctQ%euS'w#U'zQ'}#XQ(i#rQ(p#vQ(x#|Q(y#}Q(z$OQ({$PQ(|$QQ(}$RQ)O$SQ)P$TQ)Q$UQ)R$VQ)S$WQ)U$YQ)X$_Q)]$cW)g$k)i.t3hQ*{%dQ+a%qS,v&z2OQ-k'hS-p'x-rQ-u(QQ-z([Q.a(mQ.g(qQ.k TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare 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 SingleClassItem",maxTerm:363,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Ci],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(i%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Wi,_i,2,3,4,5,6,7,8,9,10,11,12,13,Ui,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new XO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Vi[e]||-1},{term:328,get:e=>qi[e]||-1},{term:67,get:e=>Ri[e]||-1}],tokenPrec:13551}),ji=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { +import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,U as N,g as bt,y as RO,o as kt,I as xt,J as yt,K as wt,H as Yt,C as vt,L as Tt}from"./index-adcaa630.js";import{P as Ut,N as Wt,u as _t,D as Ct,v as wO,T as D,I as YO,w as rO,x as l,y as Vt,L as sO,z as nO,A as j,B as lO,F as ye,G as oO,H as C,J as we,K as Ye,M as ve,E as v,O as G,Q as qt,R as Rt,U as Te,V as X,W as zt,X as jt,a as V,h as Gt,b as At,c as It,d as Nt,e as Et,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ht,k as Ft,j as Kt,l as Oa,m as ea,n as ta,o as aa,p as ia,q as zO,C as E}from"./index-c4d2d831.js";class H{constructor(O,a,t,i,r,s,n,o,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let i=O.parser.context;return new H(O,[],a,t,t,0,[],0,i?new jO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,i=O&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(O,a,t,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(O,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)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]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(O,a,t){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(a,i),this.buffer.push(t,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,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),i=O.bufferBase+a;for(;O&&i==O.bufferBase;)O=O.parent;return new H(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-t*3;if(r<0||a.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 a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var GO;(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",e[e.MinBigReduction=2e3]="MinBigReduction"})(GO||(GO={}));class ra{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class F{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new F(O,a,a-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 F(this.stack,this.pos,this.index)}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new O(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new J;class sa{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,i=this.rangeIndex,r=this.pos+O;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=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,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,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&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,a)))}return t}}class W{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ue(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class XO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?z(O):O}token(O,a){let t=O.pos,i;for(;i=O.pos,Ue(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i-t))}}XO.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class b{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ue(e,O,a,t,i,r){let s=0,n=1<0){let p=e[h];if(o.allows(p)&&(O.token.value==-1||O.token.value==p||na(p,O.token.value,i,r))){O.acceptToken(p);break}}let u=O.next,c=0,f=e[s+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535&&e[Q+f*3-3]==65535){s=e[Q+f*3-1];continue O}for(;c>1,p=Q+h+(h<<1),$=e[p],g=e[p+1]||65536;if(u<$)f=h;else if(u>=g)c=h+1;else{s=e[p+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,i;(i=e[t])!=65535;t++)if(i==a)return t-O;return-1}function na(e,O,a,t){let i=IO(a,t,O);return i<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class la{constructor(O,a){this.fragments=O,this.nodeSet=a,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?EO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?EO(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 D){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[a]++,this.nextStart=s+r.length}}}class oa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new J)}getActions(O){let a=0,t=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new J,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=O;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(O,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,O),t),O.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,a,t,i){for(let r=0;rO.bufferLength*4?new la(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ha(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);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,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?r.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(wO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(c.type.id)})`),!0;if(!(c instanceof D)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof D&&c.positions[0]==0)c=h;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),Z&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!i||i.scoree;class We{constructor(O){this.start=O.start,this.shift=O.shift||uO,this.reduce=O.reduce||uO,this.reuse=O.reuse||uO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ut{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,o,n[Q++]);else{let c=n[Q+-u];for(let f=-u;f>0;f--)r(n[Q++],o,c);Q++}}}this.nodeSet=new Wt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ct;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new W(s,n):n),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,a,t){let i=new Qa(this,O,a,t);for(let r of this.wrappers)i=r(i,O,a,t);return i}getGoto(O,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let Q=r+(s>>1);r0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else return!1;if(a==k(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(r=>r.from==t);return i?i.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=O.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=JO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}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 a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let r of O.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const ua=54,fa=1,da=55,pa=2,Sa=56,$a=3,LO=4,ga=5,K=6,_e=7,Ce=8,Ve=9,qe=10,Pa=11,ma=12,Xa=13,fO=57,Za=14,MO=58,Re=20,ba=22,ze=23,ka=24,ZO=26,je=27,xa=28,ya=31,wa=34,Ya=36,va=37,Ta=0,Ua=1,Wa={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},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={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 Ca(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function bO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let i="";for(;Ca(t);)i+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=i?i.toLowerCase():t==Va||t==qa?void 0:null}const Ae=60,OO=62,vO=47,Va=63,qa=33,Ra=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(bO(t,1)||"",e):e},reduce(e,O){return O==Re&&e?e.parent:e},reuse(e,O,a,t){let i=O.type.id;return i==K||i==Ya?new ee(bO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ga=new b((e,O)=>{if(e.next!=Ae){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==vO;a&&e.advance();let t=bO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Za:K);let i=O.context?O.context.name:null;if(a){if(t==i)return e.acceptToken(Pa);if(i&&_a[i])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ta))return e.acceptToken(ma);for(let r=O.context;r;r=r.parent)if(r.name==t)return;e.acceptToken(Xa)}else{if(t=="script")return e.acceptToken(_e);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ve);if(Wa.hasOwnProperty(t))return e.acceptToken(qe);i&&HO[i]&&HO[i][t]?e.acceptToken(fO,-1):e.acceptToken(K)}},{contextual:!0}),Aa=new b(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ra)O++;else if(e.next==OO&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ia(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Na=new b((e,O)=>{if(e.next==vO&&e.peek(1)==OO){let a=O.dialectEnabled(Ua)||Ia(O.context);e.acceptToken(a?ga:LO,2)}else e.next==OO&&e.acceptToken(LO,1)});function TO(e,O,a){let t=2+e.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==Ae||r==1&&i.next==vO||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Ea=TO("script",ua,fa),Ba=TO("style",da,pa),Da=TO("textarea",Sa,$a),Ja=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!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:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!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+UYkWOX+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!_-ljhS`PkW!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[/echSkWOX+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+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!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!V3bchS`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&}!_5rjhSkWc!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!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[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!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ea,Ba,Da,Na,Ga,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Ie(e,O){let a=Object.create(null);for(let t of e.getChildren(ze)){let i=t.getChild(ka),r=t.getChild(ZO)||t.getChild(je);i&&(a[O.read(i.from,i.to)]=r?r.type.id==ZO?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return a}function te(e,O){let a=e.getChild(ba);return a?O.read(a.from,a.to):" "}function dO(e,O,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=Ie(e.node.parent.firstChild,O))))return{parser:i.parser};return null}function Ne(e=[],O=[]){let a=[],t=[],i=[],r=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let Q=n.type.id;if(Q==xa)return dO(n,o,a);if(Q==ya)return dO(n,o,t);if(Q==wa)return dO(n,o,i);if(Q==Re&&r.length){let u=n.node,c=u.firstChild,f=c&&te(c,o),h;if(f){for(let p of r)if(p.tag==f&&(!p.attrs||p.attrs(h||(h=Ie(u,o))))){let $=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:$.type.id==va?$.from:u.to}]}}}}if(s&&Q==ze){let u=n.node,c;if(c=u.firstChild){let f=s[o.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=te(u.parent,o))continue;let p=u.lastChild;if(p.type.id==ZO){let $=p.from+1,g=p.lastChild,w=p.to-(g&&g.isError?0:1);if(w>$)return{parser:h.parser,overlay:[{from:$,to:w}]}}else if(p.type.id==je)return{parser:h.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ma=94,ae=1,Ha=95,Fa=96,ie=2,Ee=[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],Ka=58,Oi=40,Be=95,ei=91,L=45,ti=46,ai=35,ii=37;function eO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ri(e){return e>=48&&e<=57}const si=new b((e,O)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=e;if(eO(r)||r==L||r==Be||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,e.advance();else{a&&e.acceptToken(r==Oi?Ha:t==2&&O.canShift(ie)?ie:Fa);break}}}),ni=new b(e=>{if(Ee.includes(e.peek(-1))){let{next:O}=e;(eO(O)||O==Be||O==ai||O==ti||O==ei||O==Ka||O==L)&&e.acceptToken(Ma)}}),li=new b(e=>{if(!Ee.includes(e.peek(-1))){let{next:O}=e;if(O==ii&&(e.advance(),e.acceptToken(ae)),eO(O)){do e.advance();while(eO(e.next));e.acceptToken(ae)}}}),oi=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__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},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hi={__proto__:null,not:128,only:128,from:158,to:160},ui=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<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#XPOy%^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:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>Qi[e]||-1},{term:56,get:e=>ci[e]||-1},{term:96,get:e=>hi[e]||-1}],tokenPrec:1123});let pO=null;function SO(){if(!pO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));pO=O.sort().map(t=>({type:"property",label:t}))}return pO||[]}const re=["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})),se=["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}))),fi=["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})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,di=/^-(-[\w-]*)?$/;function pi(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const ne=new we,Si=["Declaration"];function $i(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function De(e,O){if(O.to-O.from>4096){let a=ne.get(O);if(a)return a;let t=[],i=new Set,r=O.cursor(YO.IncludeAnonymous);if(r.firstChild())do for(let s of De(e,r.node))i.has(s.label)||(i.add(s.label),t.push(s));while(r.nextSibling());return ne.set(O,t),t}else{let a=[],t=new Set;return O.cursor().iterate(i=>{var r;if(i.name=="VariableName"&&i.matchContext(Si)&&((r=i.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let s=e.sliceString(i.from,i.to);t.has(s)||(t.add(s),a.push({label:s,type:"variable"}))}}),a}}const gi=e=>{let{state:O,pos:a}=e,t=C(O).resolveInner(a,-1),i=t.type.isError&&t.from==t.to-1&&O.doc.sliceString(t.from,t.to)=="-";if(t.name=="PropertyName"||(i||t.name=="TagName")&&/^(Block|Styles)$/.test(t.resolve(t.to).name))return{from:t.from,options:SO(),validFor:y};if(t.name=="ValueName")return{from:t.from,options:se,validFor:y};if(t.name=="PseudoClassName")return{from:t.from,options:re,validFor:y};if(t.name=="VariableName"||(e.explicit||i)&&pi(t,O.doc))return{from:t.name=="VariableName"?t.from:a,options:De(O.doc,$i(t)),validFor:di};if(t.name=="TagName"){for(let{parent:n}=t;n;n=n.parent)if(n.name=="Block")return{from:t.from,options:SO(),validFor:y};return{from:t.from,options:fi,validFor:y}}if(!e.explicit)return null;let r=t.resolve(a),s=r.childBefore(a);return s&&s.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:re,validFor:y}:s&&s.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:y}:r.name=="Block"||r.name=="Styles"?{from:a,options:SO(),validFor:y}:null},tO=sO.define({name:"css",parser:ui.configure({props:[nO.add({Declaration:j()}),lO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pi(){return new oO(tO,tO.data.of({autocomplete:gi}))}const le=302,oe=1,mi=2,Qe=303,Xi=305,Zi=306,bi=3,ki=4,xi=[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],Je=125,yi=59,ce=47,wi=42,Yi=43,vi=45,Ti=new We({start:!1,shift(e,O){return O==bi||O==ki||O==Xi?e:O==Zi},strict:!1}),Ui=new b((e,O)=>{let{next:a}=e;(a==Je||a==-1||O.context)&&O.canShift(Qe)&&e.acceptToken(Qe)},{contextual:!0,fallback:!0}),Wi=new b((e,O)=>{let{next:a}=e,t;xi.indexOf(a)>-1||a==ce&&((t=e.peek(1))==ce||t==wi)||a!=Je&&a!=yi&&a!=-1&&!O.context&&O.canShift(le)&&e.acceptToken(le)},{contextual:!0}),_i=new b((e,O)=>{let{next:a}=e;if((a==Yi||a==vi)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(oe);e.acceptToken(t?oe:mi)}},{contextual:!0}),Ci=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Vi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},qi={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Ri={__proto__:null,"<":137},zi=T.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#J}'#J}O8yQSO'#IPO9OQ(C[O'#IQOOQQ'#JP'#JPOOQQ'#IU'#IUQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HoO>VQ(C]O'#HuO%QQUO'#HwO>bQ(C]O'#HyO>mQ(C]O'#H{O9OQ(C[O'#H}O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOBUQWO'#E`OOQ(CW'#E_'#E_OB`Q(C`O'#E`OBzQWO'#ESOOQO'#Jj'#JjOC`QWO'#ESOCmQWO'#E`ODTQWO'#EfODWQWO'#E`ODqQWO'#E`OAQQWO'#E`OBzQWO'#E`PEbO?MpO'#C`POOO)CDn)CDnOOOO'#IV'#IVOEmOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOE{O!bO,59RO%QQUO'#D]OOOO'#IY'#IYOFZO07`O,59uOOQ(CY,59u,59uOFiQUO'#IZOF|QSO'#JeOIOQbO'#JeO+sQUO'#JeOIVQSO,59{OImQSO'#EiOIzQSO'#JrOJVQSO'#JqOJVQSO'#JqOJ_QSO,5;VOJdQSO'#JpOOQ(CY,5:W,5:WOJkQUO,5:WOLlQ(CjO,5:bOM]QSO,5:jOMbQSO'#JnON[Q(C[O'#JoO:vQSO'#JnONcQSO'#JnONkQSO,5;UONpQSO'#JnOOQ(CY'#Cf'#CfO%QQUO'#EOO! dQ`O,5:oOOQO'#Jk'#JkOOQO-E<^-E<^O9_QSO,5=VO! zQSO,5=VO!!PQUO,5;SO!$SQ,UO'#EdO!%gQSO,5;SO!'PQ,UO'#DpO!'WQUO'#DuO!'bQWO,5;]O!'jQWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!'xQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!){QSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!*TQ(C[O,5kOOQQ'#JX'#JXOOQQ,5>l,5>lOOQQ-EQQWO,5;yO!>VQSO,5=rO!>[QSO,5=rO!>aQSO,5=rO9OQ(C[O,5=rO!>oQSO'#EkO!?iQWO'#ElOOQ(CW'#Jp'#JpO!?pQ(C[O'#KOO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!?{QWO,5=^O!@TQ,UO,5=_O!@`QSO,5=aO!@eQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!@mQSO'#HPO9dQ,UO'#HSO!@rQSO'#HSOOQQ,5=g,5=gO!@wQSO'#HTO!APQSO'#ClO!AUQSO,58|O!A`QSO,58|O!ChQUO,58|OOQQ,58|,58|O!CuQ(C[O,58|O%QQUO,58|O!DQQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!DbQSO,5=tO`QUO,5=zO`QUO,5=|O!DgQSO,5>OO`QUO,5>QO!DlQSO,5>TO!DqQUO,5>ZOOQQ,5>a,5>aO%QQUO,5>aO9OQ(C[O,5>cOOQQ,5>e,5>eO!HxQSO,5>eOOQQ,5>g,5>gO!HxQSO,5>gOOQQ,5>i,5>iO!H}QWO'#DXO%QQUO'#JgO!IlQWO'#JgO!JZQWO'#DgO!JlQWO'#DgO!L}QUO'#DgO!MUQSO'#JfO!M^QSO,5:QO!McQSO'#EmO!MqQSO'#JsO!MyQSO,5;WO!NOQWO'#DgO!N]QWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!NdQSO,5:kO>QQSO,5;RO!uO+sQUO,5>uOOQO,5>{,5>{O#&oQUO'#IZOOQO-EUQ(CjO1G0xO#AUQ$IUO'#CfO#CSQ$IUO1G1ZO#EQQ$IUO'#JdO!*OQSO1G1aO#EeQ(CjO,5?QOOQ(CW-EQQSO'#HsOOQQ1G3u1G3uO$0}QUO1G3uO9OQ(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9OQ(C[O1G4PO9OQ(C[O1G4RO$5RQSO,5@RO!'xQUO,5;XO:vQSO,5;XO>QQSO,5:RO!'xQUO,5:RO!QQSO1G0mO!uO$:qQSO1G5kO$:yQSO1G5wO$;RQbO1G5xO:vQSO,5>{O$;]QSO1G5tO$;]QSO1G5tO:vQSO1G5tO$;eQ(CjO1G5uO%QQUO1G5uO$;uQ(C[O1G5uO$}O:vQSO,5>}OOQO,5>},5>}O$}OOQO-EQQWO,59pO%QQUO,59pO% mQSO1G2SO!%lQ,UO1G2ZO% rQ(CjO7+'gOOQ(CY7+'g7+'gO!!PQUO7+'gOOQ(CY7+%`7+%`O%!fQ`O'#J|O!NgQSO7+(]O%!pQbO7+(]O$<}QSO7+(]O%!wQ(ChO'#CfO%#[Q(ChO,5<{O%#|QSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!VOOQQ,5>V,5>VO%QQUO'#HlO%)^QSO'#HnOOQQ,5>],5>]O:vQSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%)cQWO1G5mO%)wQ$IUO1G0sO%*RQSO1G0sOOQO1G/m1G/mO%*^Q$IUO1G/mO>QQSO1G/mO!'xQUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!QQSO7+&XO!wOOQO-ExO%QQUO,5>xOOQO-E<[-E<[O%5iQSO1G5oOOQ(CY<}Q$IUO1G0xO%?UQ$IUO1G0xO%AYQ$IUO1G0xO%AaQ$IUO1G0xO%CXQ$IUO1G0xO%ClQ(CjO<WOOQQ,5>Y,5>YO&&aQSO1G3wO:vQSO7+&_O!'xQUO7+&_OOQO7+%X7+%XO&&fQ$IUO1G5xO>QQSO7+%XOOQ(CY<QQSO<[QWO,5=mO&>mQWO,5:zOOQQ<QQSO7+)cO&@ZQSO<zAN>zO%QQUOAN?WO!zO&@pQ(C[OAN?WO!zO&@{Q(C[OAN?WOBzQWOAN>zO&AZQ(C[OAN?WO&AoQ(C`OAN?WO&AyQWOAN>zOBzQWOAN?WOOQO<ROy)uO|)vO(h)xO(i)zO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#*rO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(a(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!1}O!V.bOd([X~P!.aOd.dO~O!V.eO!g(]X~P!4aO!g.hO~O!S.jO~OP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#.nO#g#|O~P#.nOP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#1`Ok$OO~P#1`OP$ZOk$OOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#4QOX$bO!e$QO#l$QO#m$QO#n$aO#o$QO~P#4QOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(a#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(h#fi~P#7RO(h#zO~P#7ROP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO(RVO(h#zO^#fi!V#fi#u#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#9sO(i#{O~P#9sOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO#u$VO(RVO(h#zO(i#{O~O^#fi!V#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#SOy)uO|)vO(h)xO(i)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(a#fi!V#fi!W#fi~P%D`O!f#uOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(a(QX(h(QX(i(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#A]O#y!ni!W!ni~P$$jO!W6|O~O!V'Ya!W'Ya~P#A]O!a#sO(a'fO!V'Za!g'Za~O!V/YO!g(ni~O!V/YO!a#sO!g(ni~Od$uq!V$uq#X$uq#y$uq~P!.aO!S']a!V']a~P#*rO!a7TO~O!V/bO!S(oi~P#*rO!V/bO!S(oi~O!S7XO~O!a#sO#o7^O~Ok7_O!a#sO(a'fO~O!S7aO~Od$wq!V$wq#X$wq#y$wq~P!.aO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!4aO!V4aO!X(pa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!4aOX7fO~O!V0bO!W(vi~O]7lO~O!a6PO~O(U(sO!V'bX!W'bX~O!V4xO!W(sa~O!h%[O'}%PO^(ZX!a(ZX!l(ZX#X(ZX'k(ZX(a(ZX~O't7uO~P._O!xg#>v#>|#?`#?f#?l#?z#@a#Aq#BP#BV#B]#Bc#Bi#Bs#By#CP#CZ#Cm#CsPPPPPPPPPP#CyPPPPPPP#Dm#I^P#J}#KU#K^PPPP$ h$$^$+P$+S$+V$-g$-j$-m$-tPP$-z$.O$.w$/w$/{$0aPP$0e$0k$0oP$0r$0v$0y$1o$2V$2[$2_$2b$2h$2k$2o$2sR!zRmpOXr!X#b%^&e&g&h&j,`,e1j1mU!pQ'R-QQ%dtQ%lwQ%szQ&]!TS&y!c,xQ'X!f^'^!m!r!s!t!u!v!wS*^$z*cQ+W%mQ+e%uQ,P&VQ-O'QQ-Y'YY-b'_'`'a'b'cQ/s*eQ1X,QW2e-d-f-g-hS5R0}5UU6a2h2j2kU8R5Y5Z5]S8x6d6fS9u8S8TQ:c8{Q:z9xRO>R>SQ%vzQ&w!cS&}%x,{Q+]%oS/Q)v/SQ0O*rQ0g+^Q0l+dQ1`,VQ1a,WQ4i0bQ4r0nQ5l1[Q5m1_Q7h4jQ7k4oQ8b5oQ9j7lR:R8_pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR,T&^&z`OPXYrstux!X!^!g!l#Q#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v'T'h'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!d%iw!f!o%k%l%m&x'W'X'Y']'k*]+V+W,u-X-Y-a-c/k0`2T2[2c2g4U6_6c8v8z:a;YQ+P%gQ+p&OQ+s&PQ+}&VQ.Y(fQ1R+zU1V,O,P,QQ2z.ZQ5c1SS5g1W1XS7t4|5QQ8^5hU9s7z8P8QU:x9t9v9wQ;e:yQ;u;f!z=y#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg=zO>R>ST)q$s)rV*o%TPR>O>Q'QkOPWXYZrstu!X!^!l#Q#U#X#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v&z'T'h'x'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>SQ*s%XQ/P)ug3eOQ*V$xS*`$z*cQ*t%YQ/o*a!z=h#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sf=iO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg3eO>R>SQ+q&PQ0v+sQ4v0uR7o4wT*b$z*cS*b$z*cT5T0}5US/m*_4}T4W/u8OQ+R%hQ/n*`Q0]+SQ1T+|Q5e1UQ8[5fQ9n7sQ:O8]Q:t9oQ;P:PQ;c:wQ;s;dQP>Q]=P3d6x9U:i:j;|p){$t(n*u/U/`/w/x3O3w4^6}7`:k=g=s=t!Y=Q(j)Z*P*X._.{/W/e0U0s0u2{2}3x3|4u4w6q6r7U7Y7b7d9`9d;_>P>Q_=R3d6x9U9V:i:j;|pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ&X!SR,[&bpmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR&X!SQ+u&QR0r+nqmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ1O+zS5`1R1SU8U5^5_5cS9z8W8XS:{9y9|Q;g:|R;v;hQ&`!TR,U&[R5l1[S%pz%uR0h+_Q&e!UR,`&fR,f&kT1k,e1mR,j&lQ,i&lR1t,jQ'o!yR-l'oQrOQ#bXT%ar#bQ!|TR'q!|Q#PUR's#PQ)r$sR.|)rQ#SVR'u#SQ#VWU'{#V'|-sQ'|#WR-s'}Q,y&{R2Q,yQ.c(nR3P.cQ.f(pS3S.f3TR3T.gQ-Q'RR2U-Qr_OXr!T!X#b%^&[&^&e&g&h&j,`,e1j1mU!mQ'R-QS#eZ%[Y#o_!m#e-}5OQ-}(_T5O0}5US#]W%wU(S#](T-tQ(T#^R-t(OQ,|'OR2S,|Q(`#hQ-w(XW.R(`-w2l6gQ2l-xR6g2mQ)d$iR.u)dQ$mhR)j$mQ$`cU)Y$`-oP>QQ/c*XU3{/c3}7VQ3}/eR7V3|Q*c$zR/q*cQ*l%OR/z*lQ4b0UR7c4bQ+l%zR0q+lQ4y0xS7q4y9lR9l7rQ+w&RR0{+wQ5U0}R7|5UQ1Z,RS5j1Z8`R8`5lQ0c+ZW4k0c4m7i9hQ4m0fQ7i4lR9h7jQ+`%pR0i+`Q1m,eR5z1mWqOXr#bQ&i!XQ*x%^Q,_&eQ,a&gQ,b&hQ,d&jQ1h,`S1k,e1mR5y1jQ%`oQ&m!]Q&p!_Q&r!`Q&t!aU'g!o5P5QQ+T%jQ+g%vQ+m%{Q,T&`Q,l&oY-]']'i'j'm8QQ-j'eQ/p*bQ0^+US1^,U,XQ1u,kQ1v,nQ1w,oQ2]-[[2_-_-`-c-i-k9wQ4d0_Q4p0lQ4t0sQ5d1TQ5n1`Q5x1iY6X2^2a2d2f2gQ6[2bQ7e4eQ7m4rQ7n4uQ7{5TQ8Z5eQ8a5mY8p6Y6^6`6b6cQ8r6]Q9i7kQ9m7sQ9}8[Q:S8bY:Z8q8u8w8y8zQ:]8tQ:q9jS:s9n9oQ;O:OW;S:[:`:b:dQ;U:_S;a:t:wQ;i;PU;j;T;X;ZQ;l;WS;r;c;dS;w;k;oQ;y;nS;};s;tQOQ>P>RR>Q>SloOXr!X#b%^&e&g&h&j,`,e1j1mQ!dPS#dZ#lQ&o!^U'Z!l4}8OQ't#QQ(w#yQ)h$kS,X&^&aQ,]&bQ,k&nQ,p&vQ-S'TQ.i(uQ.y)iQ0X+OQ0o+jQ1e,[Q2X-UQ2v.XQ3k.tQ4[/}Q5_1QQ5p1bQ5q1cQ5s1dQ5u1fQ5|1oQ6l2yQ6{3hQ8X5bQ8f5tQ8h5vQ8i5wQ9R6pQ9|8YR:U8g#UcOPXZr!X!^!l#b#l#y%^&^&a&b&e&g&h&j&n&v'T(u+O+j,[,`,e-U.X/}1Q1b1c1d1f1j1m1o2y4}5b5t5v5w6p8O8Y8gQ#WWQ#cYQ%bsQ%ctQ%euS'w#U'zQ'}#XQ(i#rQ(p#vQ(x#|Q(y#}Q(z$OQ({$PQ(|$QQ(}$RQ)O$SQ)P$TQ)Q$UQ)R$VQ)S$WQ)U$YQ)X$_Q)]$cW)g$k)i.t3hQ*{%dQ+a%qS,v&z2OQ-k'hS-p'x-rQ-u(QQ-z([Q.a(mQ.g(qQ.k TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare 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 SingleClassItem",maxTerm:363,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Ci],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(i%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Wi,_i,2,3,4,5,6,7,8,9,10,11,12,13,Ui,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new XO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Vi[e]||-1},{term:328,get:e=>qi[e]||-1},{term:67,get:e=>Ri[e]||-1}],tokenPrec:13551}),ji=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-727175b6.js b/ui/dist/assets/ConfirmEmailChangeDocs-794546bd.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-727175b6.js rename to ui/dist/assets/ConfirmEmailChangeDocs-794546bd.js index aeba168d..f045f83f 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-727175b6.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-794546bd.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-81d06e37.js";import{S as Ae}from"./SdkTabs-579eff6e.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(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&&m(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=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(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,F,w,I,T,L,P,M,te,N,R,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],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 r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-adcaa630.js";import{S as Ae}from"./SdkTabs-bef23fdf.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(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&&m(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=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(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,F,w,I,T,L,P,M,te,N,R,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],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-0123ea90.js b/ui/dist/assets/ConfirmPasswordResetDocs-4f5db084.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-0123ea90.js rename to ui/dist/assets/ConfirmPasswordResetDocs-4f5db084.js index 2d10f4a0..59c3b3a9 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-0123ea90.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-4f5db084.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-81d06e37.js";import{S as De}from"./SdkTabs-579eff6e.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(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&&f(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=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],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 r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-adcaa630.js";import{S as De}from"./SdkTabs-bef23fdf.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(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&&f(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=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],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-d1d2a4dc.js b/ui/dist/assets/ConfirmVerificationDocs-66d14bec.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-d1d2a4dc.js rename to ui/dist/assets/ConfirmVerificationDocs-66d14bec.js index e9094410..99fc7d1b 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-d1d2a4dc.js +++ b/ui/dist/assets/ConfirmVerificationDocs-66d14bec.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Oe,p as Se,r as R,u as Ee,M as Me}from"./index-81d06e37.js";import{S as Ne}from"./SdkTabs-579eff6e.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=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(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+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(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)&&R(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&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,U,q,le,G,j=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` +import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as H,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,T as qe,C as Oe,p as Se,r as R,u as Ee,M as Me}from"./index-adcaa630.js";import{S as Ne}from"./SdkTabs-bef23fdf.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=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(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+"")&&H(_,o),C&6&&R(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),R(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(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)&&R(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&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,U,q,le,G,j=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-6fd167db.js b/ui/dist/assets/CreateApiDocs-26edb809.js similarity index 99% rename from ui/dist/assets/CreateApiDocs-6fd167db.js rename to ui/dist/assets/CreateApiDocs-26edb809.js index 9171752a..46addd05 100644 --- a/ui/dist/assets/CreateApiDocs-6fd167db.js +++ b/ui/dist/assets/CreateApiDocs-26edb809.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as z,M 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 Be,x,N as Le,O as ht,k as Bt,P as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-81d06e37.js";import{S as Nt}from"./SdkTabs-579eff6e.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,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(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 z,M 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 Be,x,N as Le,O as ht,k as Bt,P as Ft,n as Rt,t as fe,a as pe,o as d,d as Fe,T as gt,p as jt,r as ue,u as Dt,y as le}from"./index-adcaa630.js";import{S as Nt}from"./SdkTabs-bef23fdf.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,v,T,w,M,g,D,E,L,I,j,R,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(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-c0d2fce4.js b/ui/dist/assets/DeleteApiDocs-d48d8ce5.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-c0d2fce4.js rename to ui/dist/assets/DeleteApiDocs-d48d8ce5.js index 9d0131dd..b61e14bd 100644 --- a/ui/dist/assets/DeleteApiDocs-c0d2fce4.js +++ b/ui/dist/assets/DeleteApiDocs-d48d8ce5.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Te,P as Oe,n as Be,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-81d06e37.js";import{S as He}from"./SdkTabs-579eff6e.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){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&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&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,O,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Te,P as Oe,n as Be,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-adcaa630.js";import{S as He}from"./SdkTabs-bef23fdf.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){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&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&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,O,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],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-5ad2deed.js b/ui/dist/assets/FilterAutocompleteInput-2cb65e7c.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-5ad2deed.js rename to ui/dist/assets/FilterAutocompleteInput-2cb65e7c.js index b37ff4a3..0409a3c9 100644 --- a/ui/dist/assets/FilterAutocompleteInput-5ad2deed.js +++ b/ui/dist/assets/FilterAutocompleteInput-2cb65e7c.js @@ -1 +1 @@ -import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-81d06e37.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-c4d2d831.js";function Me(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],s=0;s2&&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:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":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.headers."),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 r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.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 r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.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&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.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:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),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,s=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,R=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,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),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,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{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}; +import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-adcaa630.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-c4d2d831.js";function Me(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],s=0;s2&&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:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":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.headers."),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 r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.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 r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.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&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.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:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),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,s=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,R=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,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),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,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{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/ListApiDocs-7984933b.js b/ui/dist/assets/ListApiDocs-cdbbc796.js similarity index 99% rename from ui/dist/assets/ListApiDocs-7984933b.js rename to ui/dist/assets/ListApiDocs-cdbbc796.js index a8be18dd..c700b149 100644 --- a/ui/dist/assets/ListApiDocs-7984933b.js +++ b/ui/dist/assets/ListApiDocs-cdbbc796.js @@ -1,4 +1,4 @@ -import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,T as nl,C as ge,p as ol,r as ke}from"./index-81d06e37.js";import{S as il}from"./SdkTabs-579eff6e.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,T as nl,C as ge,p as ol,r as ke}from"./index-adcaa630.js";import{S as il}from"./SdkTabs-bef23fdf.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,O,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Ot,oe,mt,ie,H,Rt,at,St,R,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs-368be48d.js b/ui/dist/assets/ListExternalAuthsDocs-099b085b.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs-368be48d.js rename to ui/dist/assets/ListExternalAuthsDocs-099b085b.js index fc528e18..859fc6c3 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-368be48d.js +++ b/ui/dist/assets/ListExternalAuthsDocs-099b085b.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-81d06e37.js";import{S as Ne}from"./SdkTabs-579eff6e.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 Te(a,l){let o,n=l[5].code+"",f,h,c,p;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){d(g,o,P),s(o,f),s(o,h),c||(p=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&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&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&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,W,ae,z,A,ne,Q,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as We,n as ze,t as te,a as le,o as u,d as Ie,T as De,C as He,p as Re,r as j,u as Ue,M as je}from"./index-adcaa630.js";import{S as Ne}from"./SdkTabs-bef23fdf.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 Te(a,l){let o,n=l[5].code+"",f,h,c,p;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){d(g,o,P),s(o,f),s(o,h),c||(p=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&&u(o),c=!1,p()}}}function Ce(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&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&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,W,ae,z,A,ne,Q,D=a[0].name+"",V,ie,X,ce,re,H,Y,E,Z,I,x,B,ee,T,q,w=[],de=new Map,ue,M,k=[],pe=new Map,C;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-638f988c.js b/ui/dist/assets/PageAdminConfirmPasswordReset-19ab2844.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-638f988c.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-19ab2844.js index 9e5ddfa3..1b62c8f1 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-638f988c.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-19ab2844.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-81d06e37.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-adcaa630.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-f2d951d5.js b/ui/dist/assets/PageAdminRequestPasswordReset-4f869a22.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-f2d951d5.js rename to ui/dist/assets/PageAdminRequestPasswordReset-4f869a22.js index 7eae1d78..2193c512 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-f2d951d5.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-4f869a22.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-81d06e37.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-adcaa630.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’ll 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/PageOAuth2Redirect-5f45cdfd.js b/ui/dist/assets/PageOAuth2Redirect-f11dcc6f.js similarity index 83% rename from ui/dist/assets/PageOAuth2Redirect-5f45cdfd.js rename to ui/dist/assets/PageOAuth2Redirect-f11dcc6f.js index 9576e0dd..bf83d16d 100644 --- a/ui/dist/assets/PageOAuth2Redirect-5f45cdfd.js +++ b/ui/dist/assets/PageOAuth2Redirect-f11dcc6f.js @@ -1 +1 @@ -import{S as o,i,s as r,e as c,f as l,g as u,y as n,o as d,H as f}from"./index-81d06e37.js";function m(s){let t;return{c(){t=c("div"),t.textContent="Loading...",l(t,"class","block txt-hint txt-center")},m(e,a){u(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function p(s){return f(()=>{window.close()}),[]}class g extends o{constructor(t){super(),i(this,t,p,m,r,{})}}export{g as default}; +import{S as o,i,s as r,e as c,f as l,g as u,y as n,o as d,H as f}from"./index-adcaa630.js";function m(s){let t;return{c(){t=c("div"),t.textContent="Loading...",l(t,"class","block txt-hint txt-center")},m(e,a){u(e,t,a)},p:n,i:n,o:n,d(e){e&&d(t)}}}function p(s){return f(()=>{window.close()}),[]}class g extends o{constructor(t){super(),i(this,t,p,m,r,{})}}export{g as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-5246a39b.js b/ui/dist/assets/PageRecordConfirmEmailChange-b08cb6a3.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange-5246a39b.js rename to ui/dist/assets/PageRecordConfirmEmailChange-b08cb6a3.js index 9a21962c..f16de6c2 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange-5246a39b.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange-b08cb6a3.js @@ -1,4 +1,4 @@ -import{S as z,i as G,s as I,F as J,c as R,m as S,t as v,a as y,d as L,C as M,E as N,g as _,k as W,n as Y,o as b,R as j,G as A,p as B,q as D,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-81d06e37.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(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"),l=m("h5"),s=C(`Type your password to confirm changing your email address +import{S as z,i as G,s as I,F as J,c as R,m as S,t as v,a as y,d as L,C as M,E as N,g as _,k as W,n as Y,o as b,R as j,G as A,p as B,q as D,e as m,w as C,b as h,f as d,r as T,h as k,u as P,v as K,y as E,x as O,z as F}from"./index-adcaa630.js";function Q(r){let e,t,l,s,n,o,c,a,i,u,g,$,p=r[3]&&H(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"),l=m("h5"),s=C(`Type your password to confirm changing your email address `),p&&p.c(),n=h(),R(o.$$.fragment),c=h(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],T(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,l),k(l,s),p&&p.m(l,null),k(e,n),S(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=P(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=H(f),p.c(),p.m(l,null)):p&&(p.d(1),p=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:f}),o.$set(q),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&T(a,"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(),L(o),g=!1,$()}}}function U(r){let e,t,l,s,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(),l=m("button"),l.textContent="Close",d(e,"class","alert alert-success"),d(l,"type","button"),d(l,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,l,c),s||(n=P(l,"click",r[6]),s=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(l),s=!1,n()}}}function H(r){let e,t,l;return{c(){e=C("to "),t=m("strong"),l=C(r[3]),d(t,"class","txt-nowrap")},m(s,n){_(s,e,n),_(s,t,n),k(t,l)},p(s,n){n&8&&O(l,s[3])},d(s){s&&b(e),s&&b(t)}}}function V(r){let e,t,l,s,n,o,c,a;return{c(){e=m("label"),t=C("Password"),s=h(),n=m("input"),d(e,"for",l=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(i,u){_(i,e,u),k(e,t),_(i,s,u),_(i,n,u),F(n,r[0]),n.focus(),c||(a=P(n,"input",r[7]),c=!0)},p(i,u){u&256&&l!==(l=i[8])&&d(e,"for",l),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&F(n,i[0])},d(i){i&&b(e),i&&b(s),i&&b(n),c=!1,a()}}}function X(r){let e,t,l,s;const n=[U,Q],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),l=N()},m(a,i){o[e].m(a,i),_(a,l,i),s=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(W(),y(o[u],1,1,()=>{o[u]=null}),Y(),t=o[e],t?t.p(a,i):(t=o[e]=n[e](a),t.c()),v(t,1),t.m(l.parentNode,l))},i(a){s||(v(t),s=!0)},o(a){y(t),s=!1},d(a){o[e].d(a),a&&b(l)}}}function Z(r){let e,t;return e=new J({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){R(e.$$.fragment)},m(l,s){S(e,l,s),t=!0},p(l,[s]){const n={};s&527&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){t||(v(e.$$.fragment,l),t=!0)},o(l){y(e.$$.fragment,l),t=!1},d(l){L(e,l)}}}function x(r,e,t){let l,{params:s}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{const $=A(s==null?void 0:s.token);await g.collection($.collectionId).confirmEmailChange(s==null?void 0:s.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const i=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,s=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,l=M.getJWTPayload(s==null?void 0:s.token).newEmail||"")},[n,o,c,l,a,s,i,u]}class te extends z{constructor(e){super(),G(this,e,x,Z,I,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset-2d9b57c3.js b/ui/dist/assets/PageRecordConfirmPasswordReset-75950edb.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmPasswordReset-2d9b57c3.js rename to ui/dist/assets/PageRecordConfirmPasswordReset-75950edb.js index 3bce49ab..5ad77a0f 100644 --- a/ui/dist/assets/PageRecordConfirmPasswordReset-2d9b57c3.js +++ b/ui/dist/assets/PageRecordConfirmPasswordReset-75950edb.js @@ -1,4 +1,4 @@ -import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,R as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-81d06e37.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({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=R(`Reset your user password +import{S as J,i as M,s as W,F as Y,c as H,m as N,t as y,a as q,d as T,C as j,E as A,g as _,k as B,n as D,o as m,R as K,G as O,p as Q,q as E,e as b,w as R,b as P,f as p,r as G,h as w,u as S,v as U,y as F,x as V,z as h}from"./index-adcaa630.js";function X(r){let e,l,s,n,t,o,c,a,i,u,v,k,g,C,d=r[4]&&I(r);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),a=new E({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=R(`Reset your user password `),d&&d.c(),t=P(),H(o.$$.fragment),c=P(),H(a.$$.fragment),i=P(),u=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(u,"type","submit"),p(u,"class","btn btn-lg btn-block"),u.disabled=r[2],G(u,"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(a,e,null),w(e,i),w(e,u),w(u,v),k=!0,g||(C=S(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=I(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const L={};$&3073&&(L.$$scope={dirty:$,ctx:f}),o.$set(L);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),a.$set(z),(!k||$&4)&&(u.disabled=f[2]),(!k||$&4)&&G(u,"btn-loading",f[2])},i(f){k||(y(o.$$.fragment,f),y(a.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),T(o),T(a),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=P(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-transparent btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=S(s,"click",r[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function I(r){let e,l,s;return{c(){e=R("for "),l=b("strong"),s=R(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,a;return{c(){e=b("label"),l=R("New password"),n=P(),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,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[0]),t.focus(),c||(a=S(t,"input",r[8]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&1&&t.value!==i[0]&&h(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function ee(r){let e,l,s,n,t,o,c,a;return{c(){e=b("label"),l=R("New password confirm"),n=P(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,u){_(i,e,u),w(e,l),_(i,n,u),_(i,t,u),h(t,r[1]),c||(a=S(t,"input",r[9]),c=!0)},p(i,u){u&1024&&s!==(s=i[10])&&p(e,"for",s),u&1024&&o!==(o=i[10])&&p(t,"id",o),u&2&&t.value!==i[1]&&h(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,a()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(a,i){return a[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=A()},m(a,i){o[e].m(a,i),_(a,s,i),n=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(B(),q(o[u],1,1,()=>{o[u]=null}),D(),l=o[e],l?l.p(a,i):(l=o[e]=t[e](a),l.c()),y(l,1),l.m(s.parentNode,s))},i(a){n||(y(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(s)}}}function se(r){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){H(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||(y(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){T(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,a=!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,a=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const u=()=>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=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,a,s,i,n,u,v,k]}class oe extends J{constructor(e){super(),M(this,e,le,se,W,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification-19275fb7.js b/ui/dist/assets/PageRecordConfirmVerification-f05f93e2.js similarity index 97% rename from ui/dist/assets/PageRecordConfirmVerification-19275fb7.js rename to ui/dist/assets/PageRecordConfirmVerification-f05f93e2.js index f3377e8d..467608cd 100644 --- a/ui/dist/assets/PageRecordConfirmVerification-19275fb7.js +++ b/ui/dist/assets/PageRecordConfirmVerification-f05f93e2.js @@ -1,3 +1,3 @@ -import{S as v,i as y,s as w,F as g,c as x,m as C,t as $,a as L,d as P,R as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-81d06e37.js";function S(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 g,c as x,m as C,t as $,a as L,d as P,R as T,G as H,E as M,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index-adcaa630.js";function S(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-transparent 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-transparent 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 R(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},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 V(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[R]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(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){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function q(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const m=H(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,q,V,w,{params:2})}}export{G as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-eaba7ffc.js b/ui/dist/assets/RealtimeApiDocs-0f10005c.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-eaba7ffc.js rename to ui/dist/assets/RealtimeApiDocs-0f10005c.js index 4cf4e3f1..cc5cd14b 100644 --- a/ui/dist/assets/RealtimeApiDocs-eaba7ffc.js +++ b/ui/dist/assets/RealtimeApiDocs-0f10005c.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,M 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,T as me,p as de}from"./index-81d06e37.js";import{S as fe}from"./SdkTabs-579eff6e.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;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,M 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,T as me,p as de}from"./index-adcaa630.js";import{S as fe}from"./SdkTabs-bef23fdf.js";function $e(o){var B,U,W,T,A,H,L,M,q,j,J,N;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-2a33c31c.js b/ui/dist/assets/RequestEmailChangeDocs-bffab216.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-2a33c31c.js rename to ui/dist/assets/RequestEmailChangeDocs-bffab216.js index d8b55530..816aba30 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-2a33c31c.js +++ b/ui/dist/assets/RequestEmailChangeDocs-bffab216.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-81d06e37.js";import{S as je}from"./SdkTabs-579eff6e.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,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+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(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=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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)&&N(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&&d(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+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-adcaa630.js";import{S as je}from"./SdkTabs-bef23fdf.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,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+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(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=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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)&&N(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&&d(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+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],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-16e43168.js b/ui/dist/assets/RequestPasswordResetDocs-d38da1b2.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-16e43168.js rename to ui/dist/assets/RequestPasswordResetDocs-d38da1b2.js index a7fdf272..710854b4 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-16e43168.js +++ b/ui/dist/assets/RequestPasswordResetDocs-d38da1b2.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as ue,O as ge,k as ye,P as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-81d06e37.js";import{S as Ue}from"./SdkTabs-579eff6e.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=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(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+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(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=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(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,z,q,G,B,J,g,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as ue,O as ge,k as ye,P as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-adcaa630.js";import{S as Ue}from"./SdkTabs-bef23fdf.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=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(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+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(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=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(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,z,q,G,B,J,g,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-d948a007.js b/ui/dist/assets/RequestVerificationDocs-9ffa98c8.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-d948a007.js rename to ui/dist/assets/RequestVerificationDocs-9ffa98c8.js index 560751b7..5f64cc2e 100644 --- a/ui/dist/assets/RequestVerificationDocs-d948a007.js +++ b/ui/dist/assets/RequestVerificationDocs-9ffa98c8.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as me,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as I,u as Ve,M as Re}from"./index-81d06e37.js";import{S as Ae}from"./SdkTabs-579eff6e.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=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(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+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(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)&&I(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&&u(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,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,V,Y,y,R,h=[],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 r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as me,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as I,u as Ve,M as Re}from"./index-adcaa630.js";import{S as Ae}from"./SdkTabs-bef23fdf.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=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(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+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(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)&&I(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&&u(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,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,V,Y,y,R,h=[],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-579eff6e.js b/ui/dist/assets/SdkTabs-bef23fdf.js similarity index 96% rename from ui/dist/assets/SdkTabs-579eff6e.js rename to ui/dist/assets/SdkTabs-bef23fdf.js index bc7b16e3..70e8e26b 100644 --- a/ui/dist/assets/SdkTabs-579eff6e.js +++ b/ui/dist/assets/SdkTabs-bef23fdf.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,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-81d06e37.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 M(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(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=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),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!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),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[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(I,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,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-adcaa630.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 M(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(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=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),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!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),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[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(I,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-86559302.js b/ui/dist/assets/UnlinkExternalAuthDocs-8dff2352.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-86559302.js rename to ui/dist/assets/UnlinkExternalAuthDocs-8dff2352.js index d7fd86e9..4009f9f6 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-86559302.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-8dff2352.js @@ -1,4 +1,4 @@ -import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-81d06e37.js";import{S as Ke}from"./SdkTabs-579eff6e.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,D=n[0].name+"",R,se,ae,K,F,y,G,E,J,w,W,ne,z,T,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` +import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-adcaa630.js";import{S as Ke}from"./SdkTabs-bef23fdf.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,D=n[0].name+"",R,se,ae,K,F,y,G,E,J,w,W,ne,z,T,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-992b265a.js b/ui/dist/assets/UpdateApiDocs-46a3fb31.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs-992b265a.js rename to ui/dist/assets/UpdateApiDocs-46a3fb31.js index 82baf42f..3356550c 100644 --- a/ui/dist/assets/UpdateApiDocs-992b265a.js +++ b/ui/dist/assets/UpdateApiDocs-46a3fb31.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as U,M 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 I,N as Pe,O as ut,k as Mt,P as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-81d06e37.js";import{S as Lt}from"./SdkTabs-579eff6e.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){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(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,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 U,M 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 I,N as Pe,O as ut,k as Mt,P as $t,n as qt,t as fe,a as pe,o,d as Fe,T as Dt,p as Ht,r as ce,u as Rt,y as G}from"./index-adcaa630.js";import{S as Lt}from"./SdkTabs-bef23fdf.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){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(f){let t,l,s,b,u,d,p,k,C,w,O,R,A,j,M,E,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-e1f1acb4.js b/ui/dist/assets/ViewApiDocs-faa823f0.js similarity index 98% rename from ui/dist/assets/ViewApiDocs-e1f1acb4.js rename to ui/dist/assets/ViewApiDocs-faa823f0.js index af29d974..5cc4ebcd 100644 --- a/ui/dist/assets/ViewApiDocs-e1f1acb4.js +++ b/ui/dist/assets/ViewApiDocs-faa823f0.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,T as it,C as Ge,p as at,r as K,u as rt}from"./index-81d06e37.js";import{S as dt}from"./SdkTabs-579eff6e.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(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+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,T as it,C as Ge,p as at,r as K,u as rt}from"./index-adcaa630.js";import{S as dt}from"./SdkTabs-bef23fdf.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(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+"",y,c,f,b;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,R){r(h,n,R),l(n,y),l(n,c),f||(b=rt(n,"click",F),f=!0)},p(h,R){s=h,R&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,F,h,R,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Fe,ae,T,re,Re,de,ge,k,Oe,S,Te,De,Pe,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,D,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,P;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index-81d06e37.js b/ui/dist/assets/index-adcaa630.js similarity index 99% rename from ui/dist/assets/index-81d06e37.js rename to ui/dist/assets/index-adcaa630.js index ee39c987..d31f117f 100644 --- a/ui/dist/assets/index-81d06e37.js +++ b/ui/dist/assets/index-adcaa630.js @@ -1,7 +1,7 @@ (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 Q(){}const $l=n=>n;function je(n,e){for(const t in e)n[t]=e[t];return n}function Mb(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function H_(n){return n()}function pu(){return Object.create(null)}function Ee(n){n.forEach(H_)}function Vt(n){return typeof n=="function"}function _e(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function mn(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function Ob(n){return Object.keys(n).length===0}function _a(n,...e){if(n==null)return Q;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Db(n){let e;return _a(n,t=>e=t)(),e}function Je(n,e,t){n.$$.on_destroy.push(_a(e,t))}function wt(n,e,t,i){if(n){const s=z_(n,e,t,i);return n[0](s)}}function z_(n,e,t,i){return n[1]&&i?je(t.ctx.slice(),n[1](i(e))):t.ctx}function St(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(),ga=B_?n=>requestAnimationFrame(n):Q;const ws=new Set;function U_(n){ws.forEach(e=>{e.c(n)||(ws.delete(e),e.f())}),ws.size!==0&&ga(U_)}function Ro(n){let e;return ws.size===0&&ga(U_),{promise:new Promise(t=>{ws.add(e={c:n,f:t})}),abort(){ws.delete(e)}}}function v(n,e){n.appendChild(e)}function W_(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Eb(n){const e=y("style");return Ab(W_(n),e),e.sheet}function Ab(n,e){return v(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 pt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function at(n){return function(e){return e.preventDefault(),n.call(this,e)}}function An(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ai(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]:h(n,i,e[i])}function Ib(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function gt(n){return n===""?null:+n}function Pb(n){return Array.from(n.childNodes)}function oe(n,e){e=""+e,n.data!==e&&(n.data=e)}function fe(n,e){n.value=e??""}function Rr(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function x(n,e,t){n.classList[t?"add":"remove"](e)}function Y_(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Lt(n,e){return new n(e)}const ho=new Map;let _o=0;function Lb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Nb(n,e){const t={stylesheet:Eb(e),rules:{}};return ho.set(n,t),t}function dl(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 k=e+(t-e)*l(b);u+=b*100+`%{${o(k,1-k)}} `}const f=u+`100% {${o(t,1-t)}} -}`,d=`__svelte_${Lb(f)}_${r}`,p=W_(n),{stylesheet:m,rules:_}=ho.get(p)||Nb(p,n);_[d]||(_[d]=!0,m.insertRule(`@keyframes ${d} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${d} ${i}ms linear ${s}ms 1 both`,_o+=1,d}function pl(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(", "),_o-=s,_o||Fb())}function Fb(){ga(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function Rb(n,e,t,i){if(!e)return Q;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return Q;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Fo()+l,end:u=a+o,tick:f=Q,css:d}=t(n,{from:e,to:s},i);let p=!0,m=!1,_;function g(){d&&(_=dl(n,0,1,o,l,r,d)),l||(m=!0)}function b(){d&&pl(n,_),p=!1}return Ro(k=>{if(!m&&k>=a&&(m=!0),m&&k>=u&&(f(1,0),b()),!p)return!1;if(m){const $=k-a,T=0+1*r($/o);f(T,1-T)}return!0}),g(),f(0,1),b}function qb(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,K_(n,s)}}function K_(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 ml;function bi(n){ml=n}function Cl(){if(!ml)throw new Error("Function called outside component initialization");return ml}function xt(n){Cl().$$.on_mount.push(n)}function jb(n){Cl().$$.after_update.push(n)}function J_(n){Cl().$$.on_destroy.push(n)}function Tt(){const n=Cl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Y_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function me(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],se=[];let Ss=[];const qr=[],Z_=Promise.resolve();let jr=!1;function G_(){jr||(jr=!0,Z_.then(ba))}function an(){return G_(),Z_}function nt(n){Ss.push(n)}function ke(n){qr.push(n)}const nr=new Set;let hs=0;function ba(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let zs;function va(){return zs||(zs=Promise.resolve(),zs.then(()=>{zs=null})),zs}function is(n,e,t){n.dispatchEvent(Y_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let li;function ae(){li={r:0,c:[],p:li}}function ue(){li.r||Ee(li.c),li=li.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),li.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ya={duration:0};function X_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:p=0,duration:m=300,easing:_=$l,tick:g=Q,css:b}=s||ya;b&&(o=dl(n,0,1,m,p,_,b,a++)),g(0,1);const k=Fo()+p,$=k+m;r&&r.abort(),l=!0,nt(()=>is(n,!0,"start")),r=Ro(T=>{if(l){if(T>=$)return g(1,0),is(n,!0,"end"),u(),l=!1;if(T>=k){const C=_((T-k)/m);g(C,1-C)}}return l})}let d=!1;return{start(){d||(d=!0,pl(n),Vt(s)?(s=s(i),va().then(f)):f())},invalidate(){d=!1},end(){l&&(u(),l=!1)}}}function ka(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=li;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:d=$l,tick:p=Q,css:m}=s||ya;m&&(o=dl(n,1,0,f,u,d,m));const _=Fo()+u,g=_+f;nt(()=>is(n,!1,"start")),Ro(b=>{if(l){if(b>=g)return p(0,1),is(n,!1,"end"),--r.r||Ee(r.c),!1;if(b>=_){const k=d((b-_)/f);p(1-k,k)}}return l})}return Vt(s)?va().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function He(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function d(m,_){const g=m.b-o;return _*=Math.abs(g),{a:o,b:m.b,d:g,duration:_,start:m.start,end:m.start+_,group:m.group}}function p(m){const{delay:_=0,duration:g=300,easing:b=$l,tick:k=Q,css:$}=l||ya,T={start:Fo()+_,b:m};m||(T.group=li,li.r+=1),r||a?a=T:($&&(f(),u=dl(n,o,m,g,_,b,$)),m&&k(0,1),r=d(T,g),nt(()=>is(n,m,"start")),Ro(C=>{if(a&&C>a.start&&(r=d(a,g),a=null,is(n,r.b,"start"),$&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)k(o=r.b,1-o),is(n,r.b,"end"),a||(r.b?f():--r.group.r||Ee(r.group.c)),r=null;else if(C>=r.start){const D=C-r.start;o=r.a+r.d*b(D/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(m){Vt(l)?va().then(()=>{l=l(s),p(m)}):p(m)},end(){f(),r=a=null}}}function hu(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((d,p)=>{p!==l&&d&&(ae(),P(d,1,1,()=>{e.blocks[p]===d&&(e.blocks[p]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ba()}if(Mb(n)){const s=Cl();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(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 zb(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 us(n,e){n.d(1),e.delete(n.key)}function Kt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Bb(n,e){n.f(),Kt(n,e)}function vt(n,e,t,i,s,l,o,r,a,u,f,d){let p=n.length,m=l.length,_=p;const g={};for(;_--;)g[n[_].key]=_;const b=[],k=new Map,$=new Map,T=[];for(_=m;_--;){const O=d(s,l,_),I=t(O);let L=o.get(I);L?i&&T.push(()=>L.p(O,e)):(L=u(I,O),L.c()),k.set(I,b[_]=L),I in g&&$.set(I,Math.abs(_-g[I]))}const C=new Set,D=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,m--}for(;p&&m;){const O=b[m-1],I=n[p-1],L=O.key,F=I.key;O===I?(f=O.first,p--,m--):k.has(F)?!o.has(L)||C.has(L)?M(O):D.has(F)?p--:$.get(L)>$.get(F)?(D.add(L),M(O)):(C.add(F),p--):(a(I,o),p--)}for(;p--;){const O=n[p];k.has(O.key)||a(O,o)}for(;m;)M(b[m-1]);return Ee(T),b}function Mt(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 Zt(n){return typeof n=="object"&&n!==null?n:{}}function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function U(n){n&&n.c()}function z(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||nt(()=>{const o=n.$$.on_mount.map(H_).filter(Vt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ee(o),n.$$.on_mount=[]}),l.forEach(nt)}function B(n,e){const t=n.$$;t.fragment!==null&&(Hb(t.after_update),Ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ub(n,e){n.$$.dirty[0]===-1&&(ks.push(n),G_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:p;return u.ctx&&s(u.ctx[d],u.ctx[d]=_)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](_),f&&Ub(n,d)),p}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const d=Pb(e.target);u.fragment&&u.fragment.l(d),d.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),z(n,e.target,e.anchor,e.customElement),ba()}bi(a)}class ve{$destroy(){B(this,1),this.$destroy=Q}$on(e,t){if(!Vt(t))return Q;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&&!Ob(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function qt(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(),t=null)}}return{set:s,update:l,subscribe:o}}function x_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Q_(t,o=>{let r=!1;const a=[];let u=0,f=Q;const d=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Vt(m)?m:Q},p=s.map((m,_)=>_a(m,g=>{a[_]=g,u&=~(1<<_),r&&d()},()=>{u|=1<<_}));return r=!0,d(),function(){Ee(p),f(),r=!1}})}function eg(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function Wb(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[7]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Yb(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{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Kb(n){let e,t,i,s;const l=[Yb,Wb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function _u(){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 qo=Q_(null,function(e){e(_u());const t=()=>{e(_u())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});x_(qo,n=>n.location);const wa=x_(qo,n=>n.querystring),gu=In(void 0);async function Vi(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await an();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 dn(n,e){if(e=vu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return bu(n,e),{update(t){t=vu(t),bu(n,t)}}}function Jb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function bu(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||Zb(i.currentTarget.getAttribute("href"))})}function vu(n){return n&&typeof n=="string"?{href:n}:n||{}}function Zb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function Gb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(D,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!D||typeof D=="string"&&(D.length<1||D.charAt(0)!="/"&&D.charAt(0)!="*")||typeof D=="object"&&!(D instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:I}=eg(D);this.path=D,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=I}match(D){if(s){if(typeof s=="string")if(D.startsWith(s))D=D.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=D.match(s);if(L&&L[0])D=D.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(D);if(M===null)return null;if(this._keys===!1)return M;const O={};let I=0;for(;I{r.push(new o(D,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const d=Tt();async function p(C,D){await an(),d(C,D)}let m=null,_=null;l&&(_=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",_),jb(()=>{Jb(m)}));let g=null,b=null;const k=qo.subscribe(async C=>{g=C;let D=0;for(;D{gu.set(u)});return}t(0,a=null),b=null,gu.set(void 0)});J_(()=>{k(),_&&window.removeEventListener("popstate",_)});function $(C){me.call(this,n,C)}function T(C){me.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,$,T]}class Xb extends ve{constructor(e){super(),be(this,e,Gb,Kb,_e,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let tg;function ng(n){const e=n.pattern.test(tg);yu(n,n.className,e),yu(n,n.inactiveClassName,!e)}function yu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}qo.subscribe(n=>{tg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(ng)});function Gn(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"?eg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),ng(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const Qb="modulepreload",xb=function(n,e){return new URL(n,e).href},ku={},rt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=xb(l,i),l in ku)return;ku[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===l&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":Qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Vr=function(n,e){return Vr=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])},Vr(n,e)};function nn(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}Vr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Hr=function(){return Hr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||d[0]!==6&&d[0]!==2)){o=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}ig=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Tl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(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 ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=wu(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?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},Sa=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},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 nn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return Gt(l,void 0,void 0,function(){return Xt(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var d=f,p=d.items,m=d.totalItems;return o=o.concat(p),p.length&&m>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;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new vi(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,d){return Gt(a,void 0,void 0,function(){var p,m,_,g,b=this;return Xt(this,function(k){switch(k.label){case 0:return k.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function($){return Gt(b,void 0,void 0,function(){var T,C,D;return Xt(this,function(M){switch(M.label){case 0:T=this.client.realtime.clientId,M.label=1;case 1:if(M.trys.push([1,3,,4]),p(),!$.state||T!==$.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,$.code,o.codeVerifier,r,s.createData)];case 2:return C=M.sent(),f(C),[3,4];case 3:return D=M.sent(),d(new vi(D)),[3,4];case 4:return[2]}})})})];case 1:return p=k.sent(),(m=new URL(o.authUrl+r)).searchParams.set("state",this.client.realtime.clientId),!((g=s.scopes)===null||g===void 0)&&g.length&&m.searchParams.set("scope",s.scopes.join(" ")),[4,s.urlCallback?s.urlCallback(m.toString()):this._defaultUrlCallback(m.toString())];case 2:return k.sent(),[3,4];case 3:return _=k.sent(),d(new vi(_)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o"u"||!(window!=null&&window.open))throw new vi(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(Sa),wn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},kn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=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 Gt(this,void 0,void 0,function(){return Xt(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 Gt(t,void 0,void 0,function(){var l;return Xt(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 vi({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new vi(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},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 ss(n){return typeof n=="number"}function Vo(n){return typeof n=="number"&&n%1===0}function g0(n){return typeof n=="string"}function b0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Og(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function v0(n){return Array.isArray(n)?n:[n]}function $u(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 y0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ds(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yi(n,e,t){return Vo(n)&&n>=e&&n<=t}function k0(n,e){return n-e*Math.floor(n/e)}function Bt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ei(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Yi(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function $a(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Ca(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Ml(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Ml(n)?366:365}function go(n,e){const t=k0(e-1,12)+1,i=n+(e-t)/12;return t===2?Ml(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ta(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 bo(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 Ur(n){return n>99?n:n>60?1900+n:2e3+n}function Dg(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 Eg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new zn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Ds(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Eg(s)}return t}function ll(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}${Bt(t,2)}:${Bt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Bt(t,2)}${Bt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function zo(n){return y0(n,["hour","minute","second","millisecond"])}const Ag=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,w0=["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"],S0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Pg(n){switch(n){case"narrow":return[...S0];case"short":return[...Ig];case"long":return[...w0];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"],Ng=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$0=["M","T","W","T","F","S","S"];function Fg(n){switch(n){case"narrow":return[...$0];case"short":return[...Ng];case"long":return[...Lg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Rg=["AM","PM"],C0=["Before Christ","Anno Domini"],T0=["BC","AD"],M0=["B","A"];function qg(n){switch(n){case"narrow":return[...M0];case"short":return[...T0];case"long":return[...C0];default:return null}}function O0(n){return Rg[n.hour<12?0:1]}function D0(n,e){return Fg(e)[n.weekday-1]}function E0(n,e){return Pg(e)[n.month-1]}function A0(n,e){return qg(e)[n.year<0?0:1]}function I0(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 d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${s[n][0]}`;case-1:return d?"yesterday":`last ${s[n][0]}`;case 0:return d?"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 Cu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const P0={D:Br,DD:ug,DDD:fg,DDDD:cg,t:dg,tt:pg,ttt:mg,tttt:hg,T:_g,TT:gg,TTT:bg,TTTT:vg,f:yg,ff:wg,fff:$g,ffff:Tg,F:kg,FF:Sg,FFF:Cg,FFFF:Mg};class yn{static create(e,t={}){return new yn(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 P0[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 Bt(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=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?O0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?E0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),u=(m,_)=>i?D0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const _=yn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},d=m=>i?A0(e,m):l({era:m},"era"),p=m=>{switch(m){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 d("short");case"GG":return d("long");case"GGGGG":return d("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(m)}};return Cu(yn.parseFormat(t),p)}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=yn.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 Cu(l,s(r))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ol{get type(){throw new Oi}get name(){throw new Oi}get ianaName(){return this.name}get isUniversal(){throw new Oi}offsetName(e,t){throw new Oi}formatOffset(e,t){throw new Oi}offset(e){throw new Oi}equals(e){throw new Oi}get isValid(){throw new Oi}}let ir=null;class Ma extends Ol{static get instance(){return ir===null&&(ir=new Ma),ir}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Dg(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function L0(n){return ao[n]||(ao[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"})),ao[n]}const N0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function F0(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 R0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let sr=null;class pn extends Ol{static get utcInstance(){return sr===null&&(sr=new pn(0)),sr}static instance(e){return e===0?pn.utcInstance:new pn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new pn(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${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(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 q0 extends Ol{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 Ai(n,e){if(it(n)||n===null)return e;if(n instanceof Ol)return n;if(g0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?pn.utcInstance:pn.parseSpecifier(t)||Si.create(n)}else return ss(n)?pn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new q0(n)}let Tu=()=>Date.now(),Mu="system",Ou=null,Du=null,Eu=null,Au;class Yt{static get now(){return Tu}static set now(e){Tu=e}static set defaultZone(e){Mu=e}static get defaultZone(){return Ai(Mu,Ma.instance)}static get defaultLocale(){return Ou}static set defaultLocale(e){Ou=e}static get defaultNumberingSystem(){return Du}static set defaultNumberingSystem(e){Du=e}static get defaultOutputCalendar(){return Eu}static set defaultOutputCalendar(e){Eu=e}static get throwOnInvalid(){return Au}static set throwOnInvalid(e){Au=e}static resetCaches(){Dt.resetCache(),Si.resetCache()}}let Iu={};function j0(n,e={}){const t=JSON.stringify([n,e]);let i=Iu[t];return i||(i=new Intl.ListFormat(n,e),Iu[t]=i),i}let Wr={};function Yr(n,e={}){const t=JSON.stringify([n,e]);let i=Wr[t];return i||(i=new Intl.DateTimeFormat(n,e),Wr[t]=i),i}let Kr={};function V0(n,e={}){const t=JSON.stringify([n,e]);let i=Kr[t];return i||(i=new Intl.NumberFormat(n,e),Kr[t]=i),i}let Jr={};function H0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Jr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Jr[s]=l),l}let tl=null;function z0(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function B0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Yr(n).resolvedOptions()}catch{t=Yr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function U0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function W0(n){const e=[];for(let t=1;t<=12;t++){const i=Be.utc(2016,t,1);e.push(n(i))}return e}function Y0(n){const e=[];for(let t=1;t<=7;t++){const i=Be.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 K0(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 J0{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=V0(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):Ca(e,3);return Bt(t,this.padTo)}}}class Z0{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:Be.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=Yr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class G0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Og()&&(this.rtf=H0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):I0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Dt{static fromOpts(e){return Dt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Yt.defaultLocale,o=l||(s?"en-US":z0()),r=t||Yt.defaultNumberingSystem,a=i||Yt.defaultOutputCalendar;return new Dt(o,r,a,l)}static resetCache(){tl=null,Wr={},Kr={},Jr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Dt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=B0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=U0(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=K0(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:Dt.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,Pg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=W0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Vl(this,e,i,Fg,()=>{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]=Y0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Vl(this,void 0,e,()=>Rg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Be.utc(2016,11,13,9),Be.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Vl(this,e,t,qg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Be.utc(-40,1,1),Be.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 J0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Z0(e,this.intl,t)}relFormatter(e={}){return new G0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return j0(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 Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...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 qs(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 jg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&f)?-m:m;return[{years:p(Yi(t)),months:p(Yi(i)),weeks:p(Yi(s)),days:p(Yi(l)),hours:p(Yi(o)),minutes:p(Yi(r)),seconds:p(Yi(a),a==="-0"),milliseconds:p($a(u),d)}]}const uv={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 Ea(n,e,t,i,s,l,o){const r={year:e.length===2?Ur(Ei(e)):Ei(e),month:Ig.indexOf(t)+1,day:Ei(i),hour:Ei(s),minute:Ei(l)};return o&&(r.second=Ei(o)),n&&(r.weekday=n.length>3?Lg.indexOf(n)+1:Ng.indexOf(n)+1),r}const fv=/^(?:(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 cv(n){const[,e,t,i,s,l,o,r,a,u,f,d]=n,p=Ea(e,s,i,t,l,o,r);let m;return a?m=uv[a]:u?m=0:m=Ho(f,d),[p,new pn(m)]}function dv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(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$/,mv=/^(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$/,hv=/^(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 Pu(n){const[,e,t,i,s,l,o,r]=n;return[Ea(e,s,i,t,l,o,r),pn.utcInstance]}function _v(n){const[,e,t,i,s,l,o,r]=n;return[Ea(e,r,t,i,s,l,o),pn.utcInstance]}const gv=Fs(Q0,Da),bv=Fs(x0,Da),vv=Fs(ev,Da),yv=Fs(Hg),Bg=Rs(lv,js,Dl,El),kv=Rs(tv,js,Dl,El),wv=Rs(nv,js,Dl,El),Sv=Rs(js,Dl,El);function $v(n){return qs(n,[gv,Bg],[bv,kv],[vv,wv],[yv,Sv])}function Cv(n){return qs(dv(n),[fv,cv])}function Tv(n){return qs(n,[pv,Pu],[mv,Pu],[hv,_v])}function Mv(n){return qs(n,[rv,av])}const Ov=Rs(js);function Dv(n){return qs(n,[ov,Ov])}const Ev=Fs(iv,sv),Av=Fs(zg),Iv=Rs(js,Dl,El);function Pv(n){return qs(n,[Ev,Bg],[Av,Iv])}const Lv="Invalid Duration",Ug={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}},Nv={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},...Ug},Rn=146097/400,gs=146097/4800,Fv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...Ug},Qi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Rv=Qi.slice(0).reverse();function Ki(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 ot(i)}function qv(n){return n<0?Math.floor(n):Math.ceil(n)}function Wg(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?qv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function jv(n,e){Rv.reduce((t,i)=>it(e[i])?t:(t&&Wg(n,e,t,e,i),i),null)}class ot{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Dt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Fv:Nv,this.isLuxonDuration=!0}static fromMillis(e,t){return ot.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new zn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ot({values:vo(e,ot.normalizeUnit),loc:Dt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ss(e))return ot.fromMillis(e);if(ot.isDuration(e))return e;if(typeof e=="object")return ot.fromObject(e);throw new zn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Mv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Dv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new m0(i);return new ot({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 ag(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?yn.create(this.loc,i).formatDurationFromString(this,e):Lv}toHuman(e={}){const t=Qi.map(i=>{const s=this.values[i];return it(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+=Ca(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=ot.fromDurationLike(e),i={};for(const s of Qi)(Ds(t.values,s)||Ds(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ki(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ot.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]=Eg(e(this.values[i],i));return Ki(this,{values:t},!0)}get(e){return this[ot.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,ot.normalizeUnit)};return Ki(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),Ki(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jv(this.matrix,e),Ki(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ot.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Qi)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;ss(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)Qi.indexOf(u)>Qi.indexOf(o)&&Wg(this.matrix,s,u,t,o)}else ss(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 Ki(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 Ki(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 Qi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function Vv(n,e){return!n||!n.isValid?At.invalid("missing or invalid start"):!e||!e.isValid?At.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?At.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(At.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ot.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(At.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:At.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return At.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(At.fromDateTimes(t,a.time)),t=null);return At.merge(s)}difference(...e){return At.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)}mapEndpoints(e){return At.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Yt.defaultZone){const t=Be.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 Ai(e,Yt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Dt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Dt.create(t,null,"gregory").eras(e)}static features(){return{relative:Og()}}}function Lu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ot.fromMillis(i).as("days"))}function Hv(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=Lu(r,a);return(u-u%7)/7}],["days",Lu]],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 zv(n,e,t,i){let[s,l,o,r]=Hv(n,e,t);const a=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?ot.fromMillis(a,i).shiftTo(...u).plus(f):f}const Aa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Nu={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]},Bv=Aa.hanidec.replace(/[\[|\]]/g,"").split("");function Uv(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 Jn({numberingSystem:n},e=""){return new RegExp(`${Aa[n||"latn"]}${e}`)}const Wv="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(Uv(t))}}const Yv=String.fromCharCode(160),Yg=`[ ${Yv}]`,Kg=new RegExp(Yg,"g");function Kv(n){return n.replace(/\./g,"\\.?").replace(Kg,Yg)}function Fu(n){return n.replace(/\./g,"").replace(Kg," ").toLowerCase()}function Zn(n,e){return n===null?null:{regex:RegExp(n.map(Kv).join("|")),deser:([t])=>n.findIndex(i=>Fu(t)===Fu(i))+e}}function Ru(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function lr(n){return{regex:n,deser:([e])=>e}}function Jv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zv(n,e){const t=Jn(e),i=Jn(e,"{2}"),s=Jn(e,"{3}"),l=Jn(e,"{4}"),o=Jn(e,"{6}"),r=Jn(e,"{1,2}"),a=Jn(e,"{1,3}"),u=Jn(e,"{1,6}"),f=Jn(e,"{1,9}"),d=Jn(e,"{2,4}"),p=Jn(e,"{4,6}"),m=b=>({regex:RegExp(Jv(b.val)),deser:([k])=>k,literal:!0}),g=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Zn(e.eras("short",!1),0);case"GG":return Zn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(d,Ur);case"yyyy":return ut(l);case"yyyyy":return ut(p);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Zn(e.months("short",!0,!1),1);case"MMMM":return Zn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Zn(e.months("short",!1,!1),1);case"LLLL":return Zn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return lr(f);case"uu":return lr(r);case"uuu":return ut(t);case"a":return Zn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(d,Ur);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Zn(e.weekdays("short",!1,!1),1);case"EEEE":return Zn(e.weekdays("long",!1,!1),1);case"ccc":return Zn(e.weekdays("short",!0,!1),1);case"cccc":return Zn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Ru(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Ru(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return lr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:Wv};return g.token=n,g}const Gv={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 Xv(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Gv[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Qv(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function xv(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ds(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 ey(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 it(n.z)||(t=Si.create(n.z)),it(n.Z)||(t||(t=new pn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(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),it(n.u)||(n.S=$a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let or=null;function ty(){return or||(or=Be.fromMillis(1555555555555)),or}function ny(n,e){if(n.literal)return n;const t=yn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=yn.create(e,t).formatDateTimeParts(ty()).map(o=>Xv(o,e,t));return l.includes(void 0)?n:l}function iy(n,e){return Array.prototype.concat(...n.map(t=>ny(t,e)))}function Jg(n,e,t){const i=iy(yn.parseFormat(t),n),s=i.map(o=>Zv(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Qv(s),a=RegExp(o,"i"),[u,f]=xv(e,a,r),[d,p,m]=f?ey(f):[null,null,void 0];if(Ds(f,"a")&&Ds(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:d,zone:p,specificOffset:m}}}function sy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Jg(n,e,t);return[i,s,l,o]}const Zg=[0,31,59,90,120,151,181,212,243,273,304,334],Gg=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Xg(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 Qg(n,e,t){return t+(Ml(n)?Gg:Zg)[e-1]}function xg(n,e){const t=Ml(n)?Gg:Zg,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...zo(n)}}function qu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Xg(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=xg(r,o);return{year:r,month:a,day:u,...zo(n)}}function rr(n){const{year:e,month:t,day:i}=n,s=Qg(e,t,i);return{year:e,ordinal:s,...zo(n)}}function ju(n){const{year:e,ordinal:t}=n,{month:i,day:s}=xg(e,t);return{year:e,month:i,day:s,...zo(n)}}function ly(n){const e=Vo(n.weekYear),t=yi(n.weekNumber,1,bo(n.weekYear)),i=yi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function oy(n){const e=Vo(n.year),t=yi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function e1(n){const e=Vo(n.year),t=yi(n.month,1,12),i=yi(n.day,1,go(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function t1(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=yi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=yi(t,0,59),r=yi(i,0,59),a=yi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const ar="Invalid DateTime",Vu=864e13;function zl(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function ur(n){return n.weekData===null&&(n.weekData=Zr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Be({...t,...e,old:t})}function n1(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 Hu(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 uo(n,e,t){return n1(Ta(n),e,t)}function zu(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=ot.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=Ta(l);let[a,u]=n1(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Be.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Be.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?yn.create(Dt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function fr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Bt(n.c.year,t?6:4),e?(i+="-",i+=Bt(n.c.month),i+="-",i+=Bt(n.c.day)):(i+=Bt(n.c.month),i+=Bt(n.c.day)),i}function Bu(n,e,t,i,s,l){let o=Bt(n.c.hour);return e?(o+=":",o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=Bt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Bt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Bt(Math.trunc(-n.o/60)),o+=":",o+=Bt(Math.trunc(-n.o%60))):(o+="+",o+=Bt(Math.trunc(n.o/60)),o+=":",o+=Bt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const i1={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ry={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ay={ordinal:1,hour:0,minute:0,second:0,millisecond:0},s1=["year","month","day","hour","minute","second","millisecond"],uy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fy=["year","ordinal","hour","minute","second","millisecond"];function Uu(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 ag(n);return e}function Wu(n,e){const t=Ai(e.zone,Yt.defaultZone),i=Dt.fromObject(e),s=Yt.now();let l,o;if(it(n.year))l=s;else{for(const u of s1)it(n[u])&&(n[u]=i1[u]);const r=e1(n)||t1(n);if(r)return Be.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new Be({ts:l,zone:t,loc:i,o})}function Yu(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=Ca(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 Ku(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 Be{constructor(e){const t=e.zone||Yt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=it(e.ts)?Yt.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=Hu(this.ts,r),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Dt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Be({})}static local(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return e.zone=pn.utcInstance,Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=b0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Be.invalid("invalid input");const s=Ai(t.zone,Yt.defaultZone);return s.isValid?new Be({ts:i,zone:s,loc:Dt.fromObject(t)}):Be.invalid(zl(s))}static fromMillis(e,t={}){if(ss(e))return e<-Vu||e>Vu?Be.invalid("Timestamp out of range"):new Be({ts:e,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ss(e))return new Be({ts:e*1e3,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ai(t.zone,Yt.defaultZone);if(!i.isValid)return Be.invalid(zl(i));const s=Yt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Uu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,d=o.weekYear||o.weekNumber,p=Dt.fromObject(t);if((f||r)&&d)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=d||o.weekday&&!f;let _,g,b=Hu(s,l);m?(_=uy,g=ry,b=Zr(b)):r?(_=fy,g=ay,b=rr(b)):(_=s1,g=i1);let k=!1;for(const I of _){const L=o[I];it(L)?k?o[I]=g[I]:o[I]=b[I]:k=!0}const $=m?ly(o):r?oy(o):e1(o),T=$||t1(o);if(T)return Be.invalid(T);const C=m?qu(o):r?ju(o):o,[D,M]=uo(C,l,i),O=new Be({ts:D,zone:i,o:M,loc:p});return o.weekday&&f&&e.weekday!==O.weekday?Be.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=$v(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Cv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Tv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new zn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=sy(o,e,t);return f?Be.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Be.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Pv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new d0(i);return new Be({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?ur(this).weekYear:NaN}get weekNumber(){return this.isValid?ur(this).weekNumber:NaN}get weekday(){return this.isValid?ur(this).weekday:NaN}get ordinal(){return this.isValid?rr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.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 Ml(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=yn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(pn.instance(e),t)}toLocal(){return this.setZone(Yt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ai(e,Yt.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]=uo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Be.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Uu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=qu({...Zr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=ju({...rr(this.c),...t});const[f,d]=uo(u,this.o,this.zone);return Us(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return Us(this,zu(this,t))}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e).negate();return Us(this,zu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ot.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?yn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ar}toLocaleString(e=Br,t={}){return this.isValid?yn.create(this.loc.clone(t),e).formatDateTime(this):ar}toLocaleParts(e={}){return this.isValid?yn.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=fr(this,o);return r+="T",r+=Bu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?fr(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":"")+Bu(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?fr(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():ar}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 ot.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=v0(t).map(ot.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=zv(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Be.now(),e,t)}until(e){return this.isValid?At.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||Be.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Be.isDateTime))throw new zn("max requires all arguments be DateTimes");return $u(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Jg(o,e,t)}static fromStringExplain(e,t,i={}){return Be.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Br}static get DATE_MED(){return ug}static get DATE_MED_WITH_WEEKDAY(){return h0}static get DATE_FULL(){return fg}static get DATE_HUGE(){return cg}static get TIME_SIMPLE(){return dg}static get TIME_WITH_SECONDS(){return pg}static get TIME_WITH_SHORT_OFFSET(){return mg}static get TIME_WITH_LONG_OFFSET(){return hg}static get TIME_24_SIMPLE(){return _g}static get TIME_24_WITH_SECONDS(){return gg}static get TIME_24_WITH_SHORT_OFFSET(){return bg}static get TIME_24_WITH_LONG_OFFSET(){return vg}static get DATETIME_SHORT(){return yg}static get DATETIME_SHORT_WITH_SECONDS(){return kg}static get DATETIME_MED(){return wg}static get DATETIME_MED_WITH_SECONDS(){return Sg}static get DATETIME_MED_WITH_WEEKDAY(){return _0}static get DATETIME_FULL(){return $g}static get DATETIME_FULL_WITH_SECONDS(){return Cg}static get DATETIME_HUGE(){return Tg}static get DATETIME_HUGE_WITH_SECONDS(){return Mg}}function Ys(n){if(Be.isDateTime(n))return n;if(n&&n.valueOf&&ss(n.valueOf()))return Be.fromJSDate(n);if(n&&typeof n=="object")return Be.fromObject(n);throw new zn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],dy=[".mp4",".avi",".mov",".3gp",".wmv"],py=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],my=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class H{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}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||H.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 H.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!H.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!H.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){H.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]=H.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(!H.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)(!H.isObject(l)&&!Array.isArray(l)||!H.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)(!H.isObject(s)&&!Array.isArray(s)||!H.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):H.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||H.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||H.isObject(e)&&Object.keys(e).length>0)&&H.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ssZ",24:"yyyy-MM-dd HH:mm:ss.SSSZ"},i=t[e.length]||t[19];return Be.fromFormat(e,i,{zone:"UTC"})}return Be.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{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!!cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!dy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!py.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!my.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return H.hasImageExtension(e)?"image":H.hasDocumentExtension(e)?"document":H.hasVideoExtension(e)?"video":H.hasAudioExtension(e)?"audio":"file"}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,d=r.height;return a.width=t,a.height=i,u.drawImage(r,f>d?(f-d)/2:0,0,f>d?d:f,f>d?d: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(H.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)H.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):H.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,d,p;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};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((d=m.options)==null?void 0:d.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((p=m.options)==null?void 0:p.maxSelect)!==1&&(_=[_])):_="test",i[m.name]=_}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"view":return"ri-table-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"editor":return"ri-edit-2-line";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":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["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)&&!H.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!H.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=H.isObject(u)&&H.findByKey(s,"id",u.id);if(!f)return!1;for(let d in f)if(JSON.stringify(u[d])!=JSON.stringify(f[d]))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==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],d=u.create(a,o,f);u.add(d),e(d.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTR content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(H.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?H.plainText(r):r,s.push(H.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!H.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of H.extractColumnsFromQuery(e.options.query))H.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)H.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,d,p;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s+\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!H.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const g=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((g==null?void 0:g.length)!=4)continue;const b=(d=(f=g[1])==null?void 0:f.trim())==null?void 0:d.replace(l,"");b&&t.columns.push({name:b,collate:g[2]||"",sort:((p=g[3])==null?void 0:p.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+H.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` +}`,d=`__svelte_${Lb(f)}_${r}`,p=W_(n),{stylesheet:m,rules:_}=ho.get(p)||Nb(p,n);_[d]||(_[d]=!0,m.insertRule(`@keyframes ${d} ${f}`,m.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${d} ${i}ms linear ${s}ms 1 both`,_o+=1,d}function pl(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(", "),_o-=s,_o||Fb())}function Fb(){ga(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function Rb(n,e,t,i){if(!e)return Q;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return Q;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Fo()+l,end:u=a+o,tick:f=Q,css:d}=t(n,{from:e,to:s},i);let p=!0,m=!1,_;function g(){d&&(_=dl(n,0,1,o,l,r,d)),l||(m=!0)}function b(){d&&pl(n,_),p=!1}return Ro(k=>{if(!m&&k>=a&&(m=!0),m&&k>=u&&(f(1,0),b()),!p)return!1;if(m){const $=k-a,T=0+1*r($/o);f(T,1-T)}return!0}),g(),f(0,1),b}function qb(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,K_(n,s)}}function K_(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 ml;function bi(n){ml=n}function Cl(){if(!ml)throw new Error("Function called outside component initialization");return ml}function xt(n){Cl().$$.on_mount.push(n)}function jb(n){Cl().$$.after_update.push(n)}function J_(n){Cl().$$.on_destroy.push(n)}function Tt(){const n=Cl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Y_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function me(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],se=[];let Ss=[];const qr=[],Z_=Promise.resolve();let jr=!1;function G_(){jr||(jr=!0,Z_.then(ba))}function an(){return G_(),Z_}function nt(n){Ss.push(n)}function ke(n){qr.push(n)}const nr=new Set;let hs=0;function ba(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let zs;function va(){return zs||(zs=Promise.resolve(),zs.then(()=>{zs=null})),zs}function is(n,e,t){n.dispatchEvent(Y_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let li;function ae(){li={r:0,c:[],p:li}}function ue(){li.r||Ee(li.c),li=li.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),li.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ya={duration:0};function X_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:p=0,duration:m=300,easing:_=$l,tick:g=Q,css:b}=s||ya;b&&(o=dl(n,0,1,m,p,_,b,a++)),g(0,1);const k=Fo()+p,$=k+m;r&&r.abort(),l=!0,nt(()=>is(n,!0,"start")),r=Ro(T=>{if(l){if(T>=$)return g(1,0),is(n,!0,"end"),u(),l=!1;if(T>=k){const C=_((T-k)/m);g(C,1-C)}}return l})}let d=!1;return{start(){d||(d=!0,pl(n),Vt(s)?(s=s(i),va().then(f)):f())},invalidate(){d=!1},end(){l&&(u(),l=!1)}}}function ka(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=li;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:d=$l,tick:p=Q,css:m}=s||ya;m&&(o=dl(n,1,0,f,u,d,m));const _=Fo()+u,g=_+f;nt(()=>is(n,!1,"start")),Ro(b=>{if(l){if(b>=g)return p(0,1),is(n,!1,"end"),--r.r||Ee(r.c),!1;if(b>=_){const k=d((b-_)/f);p(1-k,k)}}return l})}return Vt(s)?va().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function He(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function d(m,_){const g=m.b-o;return _*=Math.abs(g),{a:o,b:m.b,d:g,duration:_,start:m.start,end:m.start+_,group:m.group}}function p(m){const{delay:_=0,duration:g=300,easing:b=$l,tick:k=Q,css:$}=l||ya,T={start:Fo()+_,b:m};m||(T.group=li,li.r+=1),r||a?a=T:($&&(f(),u=dl(n,o,m,g,_,b,$)),m&&k(0,1),r=d(T,g),nt(()=>is(n,m,"start")),Ro(C=>{if(a&&C>a.start&&(r=d(a,g),a=null,is(n,r.b,"start"),$&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if(C>=r.end)k(o=r.b,1-o),is(n,r.b,"end"),a||(r.b?f():--r.group.r||Ee(r.group.c)),r=null;else if(C>=r.start){const D=C-r.start;o=r.a+r.d*b(D/r.duration),k(o,1-o)}}return!!(r||a)}))}return{run(m){Vt(l)?va().then(()=>{l=l(s),p(m)}):p(m)},end(){f(),r=a=null}}}function hu(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((d,p)=>{p!==l&&d&&(ae(),P(d,1,1,()=>{e.blocks[p]===d&&(e.blocks[p]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ba()}if(Mb(n)){const s=Cl();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(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 zb(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 us(n,e){n.d(1),e.delete(n.key)}function Kt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function Bb(n,e){n.f(),Kt(n,e)}function vt(n,e,t,i,s,l,o,r,a,u,f,d){let p=n.length,m=l.length,_=p;const g={};for(;_--;)g[n[_].key]=_;const b=[],k=new Map,$=new Map,T=[];for(_=m;_--;){const O=d(s,l,_),I=t(O);let L=o.get(I);L?i&&T.push(()=>L.p(O,e)):(L=u(I,O),L.c()),k.set(I,b[_]=L),I in g&&$.set(I,Math.abs(_-g[I]))}const C=new Set,D=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,m--}for(;p&&m;){const O=b[m-1],I=n[p-1],L=O.key,F=I.key;O===I?(f=O.first,p--,m--):k.has(F)?!o.has(L)||C.has(L)?M(O):D.has(F)?p--:$.get(L)>$.get(F)?(D.add(L),M(O)):(C.add(F),p--):(a(I,o),p--)}for(;p--;){const O=n[p];k.has(O.key)||a(O,o)}for(;m;)M(b[m-1]);return Ee(T),b}function Mt(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 Zt(n){return typeof n=="object"&&n!==null?n:{}}function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function U(n){n&&n.c()}function z(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||nt(()=>{const o=n.$$.on_mount.map(H_).filter(Vt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ee(o),n.$$.on_mount=[]}),l.forEach(nt)}function B(n,e){const t=n.$$;t.fragment!==null&&(Hb(t.after_update),Ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Ub(n,e){n.$$.dirty[0]===-1&&(ks.push(n),G_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:p;return u.ctx&&s(u.ctx[d],u.ctx[d]=_)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](_),f&&Ub(n,d)),p}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const d=Pb(e.target);u.fragment&&u.fragment.l(d),d.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),z(n,e.target,e.anchor,e.customElement),ba()}bi(a)}class ve{$destroy(){B(this,1),this.$destroy=Q}$on(e,t){if(!Vt(t))return Q;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&&!Ob(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function qt(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(),t=null)}}return{set:s,update:l,subscribe:o}}function x_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Q_(t,o=>{let r=!1;const a=[];let u=0,f=Q;const d=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=Vt(m)?m:Q},p=s.map((m,_)=>_a(m,g=>{a[_]=g,u&=~(1<<_),r&&d()},()=>{u|=1<<_}));return r=!0,d(),function(){Ee(p),f(),r=!1}})}function eg(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function Wb(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[7]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Yb(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{B(f,1)}),ue()}l?(e=Lt(l,o()),e.$on("routeEvent",r[6]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&B(e,r)}}}function Kb(n){let e,t,i,s;const l=[Yb,Wb],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function _u(){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 qo=Q_(null,function(e){e(_u());const t=()=>{e(_u())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});x_(qo,n=>n.location);const wa=x_(qo,n=>n.querystring),gu=In(void 0);async function Vi(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await an();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 dn(n,e){if(e=vu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return bu(n,e),{update(t){t=vu(t),bu(n,t)}}}function Jb(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function bu(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||Zb(i.currentTarget.getAttribute("href"))})}function vu(n){return n&&typeof n=="string"?{href:n}:n||{}}function Zb(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function Gb(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(D,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!D||typeof D=="string"&&(D.length<1||D.charAt(0)!="/"&&D.charAt(0)!="*")||typeof D=="object"&&!(D instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:I}=eg(D);this.path=D,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=I}match(D){if(s){if(typeof s=="string")if(D.startsWith(s))D=D.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=D.match(s);if(L&&L[0])D=D.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(D);if(M===null)return null;if(this._keys===!1)return M;const O={};let I=0;for(;I{r.push(new o(D,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const d=Tt();async function p(C,D){await an(),d(C,D)}let m=null,_=null;l&&(_=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?m=C.state:m=null},window.addEventListener("popstate",_),jb(()=>{Jb(m)}));let g=null,b=null;const k=qo.subscribe(async C=>{g=C;let D=0;for(;D{gu.set(u)});return}t(0,a=null),b=null,gu.set(void 0)});J_(()=>{k(),_&&window.removeEventListener("popstate",_)});function $(C){me.call(this,n,C)}function T(C){me.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,$,T]}class Xb extends ve{constructor(e){super(),be(this,e,Gb,Kb,_e,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let tg;function ng(n){const e=n.pattern.test(tg);yu(n,n.className,e),yu(n,n.inactiveClassName,!e)}function yu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}qo.subscribe(n=>{tg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(ng)});function Gn(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"?eg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),ng(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const Qb="modulepreload",xb=function(n,e){return new URL(n,e).href},ku={},rt=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=xb(l,i),l in ku)return;ku[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===l&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":Qb,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,d)=>{u.addEventListener("load",f),u.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Vr=function(n,e){return Vr=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])},Vr(n,e)};function nn(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}Vr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Hr=function(){return Hr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||d[0]!==6&&d[0]!==2)){o=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}ig=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Tl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(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 ki&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=wu(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?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},Sa=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},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 nn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return Gt(l,void 0,void 0,function(){return Xt(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var d=f,p=d.items,m=d.totalItems;return o=o.concat(p),p.length&&m>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;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new vi(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,d){return Gt(a,void 0,void 0,function(){var p,m,_,g,b=this;return Xt(this,function(k){switch(k.label){case 0:return k.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function($){return Gt(b,void 0,void 0,function(){var T,C,D;return Xt(this,function(M){switch(M.label){case 0:T=this.client.realtime.clientId,M.label=1;case 1:if(M.trys.push([1,3,,4]),p(),!$.state||T!==$.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,$.code,o.codeVerifier,r,s.createData)];case 2:return C=M.sent(),f(C),[3,4];case 3:return D=M.sent(),d(new vi(D)),[3,4];case 4:return[2]}})})})];case 1:return p=k.sent(),(m=new URL(o.authUrl+r)).searchParams.set("state",this.client.realtime.clientId),!((g=s.scopes)===null||g===void 0)&&g.length&&m.searchParams.set("scope",s.scopes.join(" ")),[4,s.urlCallback?s.urlCallback(m.toString()):this._defaultUrlCallback(m.toString())];case 2:return k.sent(),[3,4];case 3:return _=k.sent(),d(new vi(_)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o"u"||!(window!=null&&window.open))throw new vi(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(Sa),wn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},kn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return nn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=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 Gt(this,void 0,void 0,function(){return Xt(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 Gt(t,void 0,void 0,function(){var l;return Xt(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 vi({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new vi(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},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 ss(n){return typeof n=="number"}function Vo(n){return typeof n=="number"&&n%1===0}function g0(n){return typeof n=="string"}function b0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Og(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function v0(n){return Array.isArray(n)?n:[n]}function $u(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 y0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ds(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function yi(n,e,t){return Vo(n)&&n>=e&&n<=t}function k0(n,e){return n-e*Math.floor(n/e)}function Bt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ei(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Yi(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function $a(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Ca(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Ml(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Ml(n)?366:365}function go(n,e){const t=k0(e-1,12)+1,i=n+(e-t)/12;return t===2?Ml(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ta(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 bo(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 Ur(n){return n>99?n:n>60?1900+n:2e3+n}function Dg(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 Eg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new zn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Ds(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Eg(s)}return t}function ll(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}${Bt(t,2)}:${Bt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Bt(t,2)}${Bt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function zo(n){return y0(n,["hour","minute","second","millisecond"])}const Ag=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,w0=["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"],S0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Pg(n){switch(n){case"narrow":return[...S0];case"short":return[...Ig];case"long":return[...w0];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"],Ng=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$0=["M","T","W","T","F","S","S"];function Fg(n){switch(n){case"narrow":return[...$0];case"short":return[...Ng];case"long":return[...Lg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Rg=["AM","PM"],C0=["Before Christ","Anno Domini"],T0=["BC","AD"],M0=["B","A"];function qg(n){switch(n){case"narrow":return[...M0];case"short":return[...T0];case"long":return[...C0];default:return null}}function O0(n){return Rg[n.hour<12?0:1]}function D0(n,e){return Fg(e)[n.weekday-1]}function E0(n,e){return Pg(e)[n.month-1]}function A0(n,e){return qg(e)[n.year<0?0:1]}function I0(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 d=n==="days";switch(e){case 1:return d?"tomorrow":`next ${s[n][0]}`;case-1:return d?"yesterday":`last ${s[n][0]}`;case 0:return d?"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 Cu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const P0={D:Br,DD:ug,DDD:fg,DDDD:cg,t:dg,tt:pg,ttt:mg,tttt:hg,T:_g,TT:gg,TTT:bg,TTTT:vg,f:yg,ff:wg,fff:$g,ffff:Tg,F:kg,FF:Sg,FFF:Cg,FFFF:Mg};class yn{static create(e,t={}){return new yn(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 P0[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 Bt(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=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?O0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?E0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),u=(m,_)=>i?D0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const _=yn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},d=m=>i?A0(e,m):l({era:m},"era"),p=m=>{switch(m){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 d("short");case"GG":return d("long");case"GGGGG":return d("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(m)}};return Cu(yn.parseFormat(t),p)}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=yn.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 Cu(l,s(r))}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ol{get type(){throw new Oi}get name(){throw new Oi}get ianaName(){return this.name}get isUniversal(){throw new Oi}offsetName(e,t){throw new Oi}formatOffset(e,t){throw new Oi}offset(e){throw new Oi}equals(e){throw new Oi}get isValid(){throw new Oi}}let ir=null;class Ma extends Ol{static get instance(){return ir===null&&(ir=new Ma),ir}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Dg(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function L0(n){return ao[n]||(ao[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"})),ao[n]}const N0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function F0(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 R0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let sr=null;class pn extends Ol{static get utcInstance(){return sr===null&&(sr=new pn(0)),sr}static instance(e){return e===0?pn.utcInstance:new pn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new pn(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${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(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 q0 extends Ol{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 Ai(n,e){if(it(n)||n===null)return e;if(n instanceof Ol)return n;if(g0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?pn.utcInstance:pn.parseSpecifier(t)||Si.create(n)}else return ss(n)?pn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new q0(n)}let Tu=()=>Date.now(),Mu="system",Ou=null,Du=null,Eu=null,Au;class Yt{static get now(){return Tu}static set now(e){Tu=e}static set defaultZone(e){Mu=e}static get defaultZone(){return Ai(Mu,Ma.instance)}static get defaultLocale(){return Ou}static set defaultLocale(e){Ou=e}static get defaultNumberingSystem(){return Du}static set defaultNumberingSystem(e){Du=e}static get defaultOutputCalendar(){return Eu}static set defaultOutputCalendar(e){Eu=e}static get throwOnInvalid(){return Au}static set throwOnInvalid(e){Au=e}static resetCaches(){Dt.resetCache(),Si.resetCache()}}let Iu={};function j0(n,e={}){const t=JSON.stringify([n,e]);let i=Iu[t];return i||(i=new Intl.ListFormat(n,e),Iu[t]=i),i}let Wr={};function Yr(n,e={}){const t=JSON.stringify([n,e]);let i=Wr[t];return i||(i=new Intl.DateTimeFormat(n,e),Wr[t]=i),i}let Kr={};function V0(n,e={}){const t=JSON.stringify([n,e]);let i=Kr[t];return i||(i=new Intl.NumberFormat(n,e),Kr[t]=i),i}let Jr={};function H0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Jr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Jr[s]=l),l}let tl=null;function z0(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function B0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Yr(n).resolvedOptions()}catch{t=Yr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function U0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function W0(n){const e=[];for(let t=1;t<=12;t++){const i=Be.utc(2016,t,1);e.push(n(i))}return e}function Y0(n){const e=[];for(let t=1;t<=7;t++){const i=Be.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 K0(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 J0{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=V0(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):Ca(e,3);return Bt(t,this.padTo)}}}class Z0{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:Be.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=Yr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class G0{constructor(e,t,i){this.opts={style:"long",...i},!t&&Og()&&(this.rtf=H0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):I0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Dt{static fromOpts(e){return Dt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Yt.defaultLocale,o=l||(s?"en-US":z0()),r=t||Yt.defaultNumberingSystem,a=i||Yt.defaultOutputCalendar;return new Dt(o,r,a,l)}static resetCache(){tl=null,Wr={},Kr={},Jr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Dt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=B0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=U0(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=K0(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:Dt.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,Pg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=W0(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Vl(this,e,i,Fg,()=>{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]=Y0(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Vl(this,void 0,e,()=>Rg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Be.utc(2016,11,13,9),Be.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Vl(this,e,t,qg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Be.utc(-40,1,1),Be.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 J0(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Z0(e,this.intl,t)}relFormatter(e={}){return new G0(this.intl,this.isEnglish(),e)}listFormatter(e={}){return j0(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 Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...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 qs(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 jg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&f)?-m:m;return[{years:p(Yi(t)),months:p(Yi(i)),weeks:p(Yi(s)),days:p(Yi(l)),hours:p(Yi(o)),minutes:p(Yi(r)),seconds:p(Yi(a),a==="-0"),milliseconds:p($a(u),d)}]}const uv={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 Ea(n,e,t,i,s,l,o){const r={year:e.length===2?Ur(Ei(e)):Ei(e),month:Ig.indexOf(t)+1,day:Ei(i),hour:Ei(s),minute:Ei(l)};return o&&(r.second=Ei(o)),n&&(r.weekday=n.length>3?Lg.indexOf(n)+1:Ng.indexOf(n)+1),r}const fv=/^(?:(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 cv(n){const[,e,t,i,s,l,o,r,a,u,f,d]=n,p=Ea(e,s,i,t,l,o,r);let m;return a?m=uv[a]:u?m=0:m=Ho(f,d),[p,new pn(m)]}function dv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pv=/^(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$/,mv=/^(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$/,hv=/^(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 Pu(n){const[,e,t,i,s,l,o,r]=n;return[Ea(e,s,i,t,l,o,r),pn.utcInstance]}function _v(n){const[,e,t,i,s,l,o,r]=n;return[Ea(e,r,t,i,s,l,o),pn.utcInstance]}const gv=Fs(Q0,Da),bv=Fs(x0,Da),vv=Fs(ev,Da),yv=Fs(Hg),Bg=Rs(lv,js,Dl,El),kv=Rs(tv,js,Dl,El),wv=Rs(nv,js,Dl,El),Sv=Rs(js,Dl,El);function $v(n){return qs(n,[gv,Bg],[bv,kv],[vv,wv],[yv,Sv])}function Cv(n){return qs(dv(n),[fv,cv])}function Tv(n){return qs(n,[pv,Pu],[mv,Pu],[hv,_v])}function Mv(n){return qs(n,[rv,av])}const Ov=Rs(js);function Dv(n){return qs(n,[ov,Ov])}const Ev=Fs(iv,sv),Av=Fs(zg),Iv=Rs(js,Dl,El);function Pv(n){return qs(n,[Ev,Bg],[Av,Iv])}const Lv="Invalid Duration",Ug={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}},Nv={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},...Ug},Rn=146097/400,gs=146097/4800,Fv={years:{quarters:4,months:12,weeks:Rn/7,days:Rn,hours:Rn*24,minutes:Rn*24*60,seconds:Rn*24*60*60,milliseconds:Rn*24*60*60*1e3},quarters:{months:3,weeks:Rn/28,days:Rn/4,hours:Rn*24/4,minutes:Rn*24*60/4,seconds:Rn*24*60*60/4,milliseconds:Rn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...Ug},Qi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Rv=Qi.slice(0).reverse();function Ki(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 ot(i)}function qv(n){return n<0?Math.floor(n):Math.ceil(n)}function Wg(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?qv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function jv(n,e){Rv.reduce((t,i)=>it(e[i])?t:(t&&Wg(n,e,t,e,i),i),null)}class ot{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Dt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Fv:Nv,this.isLuxonDuration=!0}static fromMillis(e,t){return ot.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new zn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ot({values:vo(e,ot.normalizeUnit),loc:Dt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ss(e))return ot.fromMillis(e);if(ot.isDuration(e))return e;if(typeof e=="object")return ot.fromObject(e);throw new zn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Mv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Dv(e);return i?ot.fromObject(i,t):ot.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the Duration is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new m0(i);return new ot({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 ag(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?yn.create(this.loc,i).formatDurationFromString(this,e):Lv}toHuman(e={}){const t=Qi.map(i=>{const s=this.values[i];return it(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+=Ca(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=ot.fromDurationLike(e),i={};for(const s of Qi)(Ds(t.values,s)||Ds(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ki(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ot.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]=Eg(e(this.values[i],i));return Ki(this,{values:t},!0)}get(e){return this[ot.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,ot.normalizeUnit)};return Ki(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),Ki(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return jv(this.matrix,e),Ki(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ot.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Qi)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;ss(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)Qi.indexOf(u)>Qi.indexOf(o)&&Wg(this.matrix,s,u,t,o)}else ss(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 Ki(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 Ki(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 Qi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function Vv(n,e){return!n||!n.isValid?At.invalid("missing or invalid start"):!e||!e.isValid?At.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?At.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(At.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ot.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(At.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:At.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return At.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(At.fromDateTimes(t,a.time)),t=null);return At.merge(s)}difference(...e){return At.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ot.invalid(this.invalidReason)}mapEndpoints(e){return At.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Yt.defaultZone){const t=Be.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 Ai(e,Yt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Dt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Dt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Dt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Dt.create(t,null,"gregory").eras(e)}static features(){return{relative:Og()}}}function Lu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ot.fromMillis(i).as("days"))}function Hv(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=Lu(r,a);return(u-u%7)/7}],["days",Lu]],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 zv(n,e,t,i){let[s,l,o,r]=Hv(n,e,t);const a=e-s,u=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o0?ot.fromMillis(a,i).shiftTo(...u).plus(f):f}const Aa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Nu={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]},Bv=Aa.hanidec.replace(/[\[|\]]/g,"").split("");function Uv(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 Jn({numberingSystem:n},e=""){return new RegExp(`${Aa[n||"latn"]}${e}`)}const Wv="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(Uv(t))}}const Yv=String.fromCharCode(160),Yg=`[ ${Yv}]`,Kg=new RegExp(Yg,"g");function Kv(n){return n.replace(/\./g,"\\.?").replace(Kg,Yg)}function Fu(n){return n.replace(/\./g,"").replace(Kg," ").toLowerCase()}function Zn(n,e){return n===null?null:{regex:RegExp(n.map(Kv).join("|")),deser:([t])=>n.findIndex(i=>Fu(t)===Fu(i))+e}}function Ru(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function lr(n){return{regex:n,deser:([e])=>e}}function Jv(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zv(n,e){const t=Jn(e),i=Jn(e,"{2}"),s=Jn(e,"{3}"),l=Jn(e,"{4}"),o=Jn(e,"{6}"),r=Jn(e,"{1,2}"),a=Jn(e,"{1,3}"),u=Jn(e,"{1,6}"),f=Jn(e,"{1,9}"),d=Jn(e,"{2,4}"),p=Jn(e,"{4,6}"),m=b=>({regex:RegExp(Jv(b.val)),deser:([k])=>k,literal:!0}),g=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Zn(e.eras("short",!1),0);case"GG":return Zn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(d,Ur);case"yyyy":return ut(l);case"yyyyy":return ut(p);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Zn(e.months("short",!0,!1),1);case"MMMM":return Zn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Zn(e.months("short",!1,!1),1);case"LLLL":return Zn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return lr(f);case"uu":return lr(r);case"uuu":return ut(t);case"a":return Zn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(d,Ur);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Zn(e.weekdays("short",!1,!1),1);case"EEEE":return Zn(e.weekdays("long",!1,!1),1);case"ccc":return Zn(e.weekdays("short",!0,!1),1);case"cccc":return Zn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Ru(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Ru(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return lr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:Wv};return g.token=n,g}const Gv={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 Xv(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Gv[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Qv(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function xv(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ds(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 ey(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 it(n.z)||(t=Si.create(n.z)),it(n.Z)||(t||(t=new pn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(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),it(n.u)||(n.S=$a(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let or=null;function ty(){return or||(or=Be.fromMillis(1555555555555)),or}function ny(n,e){if(n.literal)return n;const t=yn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=yn.create(e,t).formatDateTimeParts(ty()).map(o=>Xv(o,e,t));return l.includes(void 0)?n:l}function iy(n,e){return Array.prototype.concat(...n.map(t=>ny(t,e)))}function Jg(n,e,t){const i=iy(yn.parseFormat(t),n),s=i.map(o=>Zv(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Qv(s),a=RegExp(o,"i"),[u,f]=xv(e,a,r),[d,p,m]=f?ey(f):[null,null,void 0];if(Ds(f,"a")&&Ds(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:d,zone:p,specificOffset:m}}}function sy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=Jg(n,e,t);return[i,s,l,o]}const Zg=[0,31,59,90,120,151,181,212,243,273,304,334],Gg=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Xg(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 Qg(n,e,t){return t+(Ml(n)?Gg:Zg)[e-1]}function xg(n,e){const t=Ml(n)?Gg:Zg,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...zo(n)}}function qu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Xg(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=xg(r,o);return{year:r,month:a,day:u,...zo(n)}}function rr(n){const{year:e,month:t,day:i}=n,s=Qg(e,t,i);return{year:e,ordinal:s,...zo(n)}}function ju(n){const{year:e,ordinal:t}=n,{month:i,day:s}=xg(e,t);return{year:e,month:i,day:s,...zo(n)}}function ly(n){const e=Vo(n.weekYear),t=yi(n.weekNumber,1,bo(n.weekYear)),i=yi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function oy(n){const e=Vo(n.year),t=yi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function e1(n){const e=Vo(n.year),t=yi(n.month,1,12),i=yi(n.day,1,go(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function t1(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=yi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=yi(t,0,59),r=yi(i,0,59),a=yi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const ar="Invalid DateTime",Vu=864e13;function zl(n){return new Xn("unsupported zone",`the zone "${n.name}" is not supported`)}function ur(n){return n.weekData===null&&(n.weekData=Zr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Be({...t,...e,old:t})}function n1(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 Hu(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 uo(n,e,t){return n1(Ta(n),e,t)}function zu(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=ot.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=Ta(l);let[a,u]=n1(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Be.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Be.invalid(new Xn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?yn.create(Dt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function fr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Bt(n.c.year,t?6:4),e?(i+="-",i+=Bt(n.c.month),i+="-",i+=Bt(n.c.day)):(i+=Bt(n.c.month),i+=Bt(n.c.day)),i}function Bu(n,e,t,i,s,l){let o=Bt(n.c.hour);return e?(o+=":",o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Bt(n.c.minute),(n.c.second!==0||!t)&&(o+=Bt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Bt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Bt(Math.trunc(-n.o/60)),o+=":",o+=Bt(Math.trunc(-n.o%60))):(o+="+",o+=Bt(Math.trunc(n.o/60)),o+=":",o+=Bt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const i1={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ry={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ay={ordinal:1,hour:0,minute:0,second:0,millisecond:0},s1=["year","month","day","hour","minute","second","millisecond"],uy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fy=["year","ordinal","hour","minute","second","millisecond"];function Uu(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 ag(n);return e}function Wu(n,e){const t=Ai(e.zone,Yt.defaultZone),i=Dt.fromObject(e),s=Yt.now();let l,o;if(it(n.year))l=s;else{for(const u of s1)it(n[u])&&(n[u]=i1[u]);const r=e1(n)||t1(n);if(r)return Be.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new Be({ts:l,zone:t,loc:i,o})}function Yu(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=Ca(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 Ku(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 Be{constructor(e){const t=e.zone||Yt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:zl(t));this.ts=it(e.ts)?Yt.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=Hu(this.ts,r),i=Number.isNaN(s.year)?new Xn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Dt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Be({})}static local(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return e.zone=pn.utcInstance,Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=b0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Be.invalid("invalid input");const s=Ai(t.zone,Yt.defaultZone);return s.isValid?new Be({ts:i,zone:s,loc:Dt.fromObject(t)}):Be.invalid(zl(s))}static fromMillis(e,t={}){if(ss(e))return e<-Vu||e>Vu?Be.invalid("Timestamp out of range"):new Be({ts:e,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ss(e))return new Be({ts:e*1e3,zone:Ai(t.zone,Yt.defaultZone),loc:Dt.fromObject(t)});throw new zn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Ai(t.zone,Yt.defaultZone);if(!i.isValid)return Be.invalid(zl(i));const s=Yt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Uu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,d=o.weekYear||o.weekNumber,p=Dt.fromObject(t);if((f||r)&&d)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=d||o.weekday&&!f;let _,g,b=Hu(s,l);m?(_=uy,g=ry,b=Zr(b)):r?(_=fy,g=ay,b=rr(b)):(_=s1,g=i1);let k=!1;for(const I of _){const L=o[I];it(L)?k?o[I]=g[I]:o[I]=b[I]:k=!0}const $=m?ly(o):r?oy(o):e1(o),T=$||t1(o);if(T)return Be.invalid(T);const C=m?qu(o):r?ju(o):o,[D,M]=uo(C,l,i),O=new Be({ts:D,zone:i,o:M,loc:p});return o.weekday&&f&&e.weekday!==O.weekday?Be.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=$v(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Cv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Tv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new zn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=sy(o,e,t);return f?Be.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Be.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Pv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new zn("need to specify a reason the DateTime is invalid");const i=e instanceof Xn?e:new Xn(e,t);if(Yt.throwOnInvalid)throw new d0(i);return new Be({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?ur(this).weekYear:NaN}get weekNumber(){return this.isValid?ur(this).weekNumber:NaN}get weekday(){return this.isValid?ur(this).weekday:NaN}get ordinal(){return this.isValid?rr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.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 Ml(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=yn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(pn.instance(e),t)}toLocal(){return this.setZone(Yt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Ai(e,Yt.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]=uo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Be.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Uu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=qu({...Zr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=ju({...rr(this.c),...t});const[f,d]=uo(u,this.o,this.zone);return Us(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e);return Us(this,zu(this,t))}minus(e){if(!this.isValid)return this;const t=ot.fromDurationLike(e).negate();return Us(this,zu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ot.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?yn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ar}toLocaleString(e=Br,t={}){return this.isValid?yn.create(this.loc.clone(t),e).formatDateTime(this):ar}toLocaleParts(e={}){return this.isValid?yn.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=fr(this,o);return r+="T",r+=Bu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?fr(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":"")+Bu(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?fr(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():ar}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 ot.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=v0(t).map(ot.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=zv(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Be.now(),e,t)}until(e){return this.isValid?At.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||Be.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Be.isDateTime))throw new zn("max requires all arguments be DateTimes");return $u(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Dt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return Jg(o,e,t)}static fromStringExplain(e,t,i={}){return Be.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Br}static get DATE_MED(){return ug}static get DATE_MED_WITH_WEEKDAY(){return h0}static get DATE_FULL(){return fg}static get DATE_HUGE(){return cg}static get TIME_SIMPLE(){return dg}static get TIME_WITH_SECONDS(){return pg}static get TIME_WITH_SHORT_OFFSET(){return mg}static get TIME_WITH_LONG_OFFSET(){return hg}static get TIME_24_SIMPLE(){return _g}static get TIME_24_WITH_SECONDS(){return gg}static get TIME_24_WITH_SHORT_OFFSET(){return bg}static get TIME_24_WITH_LONG_OFFSET(){return vg}static get DATETIME_SHORT(){return yg}static get DATETIME_SHORT_WITH_SECONDS(){return kg}static get DATETIME_MED(){return wg}static get DATETIME_MED_WITH_SECONDS(){return Sg}static get DATETIME_MED_WITH_WEEKDAY(){return _0}static get DATETIME_FULL(){return $g}static get DATETIME_FULL_WITH_SECONDS(){return Cg}static get DATETIME_HUGE(){return Tg}static get DATETIME_HUGE_WITH_SECONDS(){return Mg}}function Ys(n){if(Be.isDateTime(n))return n;if(n&&n.valueOf&&ss(n.valueOf()))return Be.fromJSDate(n);if(n&&typeof n=="object")return Be.fromObject(n);throw new zn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const cy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],dy=[".mp4",".avi",".mov",".3gp",".wmv"],py=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],my=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class H{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}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||H.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 H.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!H.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!H.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){H.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]=H.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(!H.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)(!H.isObject(l)&&!Array.isArray(l)||!H.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)(!H.isObject(s)&&!Array.isArray(s)||!H.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):H.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||H.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||H.isObject(e)&&Object.keys(e).length>0)&&H.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ssZ",24:"yyyy-MM-dd HH:mm:ss.SSSZ"},i=t[e.length]||t[19];return Be.fromFormat(e,i,{zone:"UTC"})}return Be.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return H.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{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!!cy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!dy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!py.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!my.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return H.hasImageExtension(e)?"image":H.hasDocumentExtension(e)?"document":H.hasVideoExtension(e)?"video":H.hasAudioExtension(e)?"audio":"file"}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,d=r.height;return a.width=t,a.height=i,u.drawImage(r,f>d?(f-d)/2:0,0,f>d?d:f,f>d?d: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(H.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)H.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):H.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,d,p;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};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||H.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((d=m.options)==null?void 0:d.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((p=m.options)==null?void 0:p.maxSelect)!==1&&(_=[_])):_="test",i[m.name]=_}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"view":return"ri-table-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"editor":return"ri-edit-2-line";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":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["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)&&!H.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!H.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=H.isObject(u)&&H.findByKey(s,"id",u.id);if(!f)return!1;for(let d in f)if(JSON.stringify(u[d])!=JSON.stringify(f[d]))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==="base"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],d=u.create(a,o,f);u.add(d),e(d.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(H.isEmpty(r)?s.push(i):typeof r=="boolean"?s.push(r?"True":"False"):typeof r=="string"?(r=r.indexOf("<")>=0?H.plainText(r):r,s.push(H.truncate(r))):s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","email","username","heading","label","key","id"];for(const o of l)if(!H.isEmpty(e[o]))return e[o];return i}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of H.extractColumnsFromQuery(e.options.query))H.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)H.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,d,p;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s+\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!H.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const g=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((g==null?void 0:g.length)!=4)continue;const b=(d=(f=g[1])==null?void 0:f.trim())==null?void 0:d.replace(l,"");b&&t.columns.push({name:b,collate:g[2]||"",sort:((p=g[3])==null?void 0:p.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+H.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` `),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+c.sort.toUpperCase()),l}).join(`, `),i.length>1&&(t+=` `),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=H.parseIndex(e);return i.tableName=t,H.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=H.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?H.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Bo=In([]);function l1(n,e=4e3){return Uo(n,"info",e)}function Qt(n,e=3e3){return Uo(n,"success",e)}function hl(n,e=4500){return Uo(n,"error",e)}function hy(n,e=4500){return Uo(n,"warning",e)}function Uo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{o1(i)},t)};Bo.update(s=>(Pa(s,i.message),H.pushOrReplaceByKey(s,i,"message"),s))}function o1(n){Bo.update(e=>(Pa(e,n),e))}function Ia(){Bo.update(n=>{for(let e of n)Pa(n,e);return[]})}function Pa(n,e){let t;typeof e=="string"?t=H.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),H.removeByKey(n,"message",t.message))}const Ci=In({});function un(n){Ci.set(n||{})}function Ri(n){Ci.update(e=>(H.deleteByPath(e,n),e))}const La=In({});function Gr(n){La.set(n||{})}const ci=In([]),ui=In({}),yo=In(!1),r1=In({});function _y(n){ci.update(e=>{const t=H.findByKey(e,"id",n);return t?ui.set(t):e.length&&ui.set(e[0]),e})}function gy(n){ui.update(e=>H.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ci.update(e=>(H.pushOrReplaceByKey(e,n,"id"),Na(),H.sortCollections(e)))}function by(n){ci.update(e=>(H.removeByKey(e,"id",n.id),ui.update(t=>t.id===n.id?e[0]:t),Na(),e))}async function vy(n=null){yo.set(!0);try{let e=await pe.collections.getFullList(200,{sort:"+name"});e=H.sortCollections(e),ci.set(e);const t=n&&H.findByKey(e,"id",n);t?ui.set(t):e.length&&ui.set(e[0]),Na()}catch(e){pe.errorResponseHandler(e)}yo.set(!1)}function Na(){r1.update(n=>(ci.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const cr="pb_admin_file_token";jo.prototype.logout=function(n=!0){this.authStore.clear(),n&&Vi("/login")};jo.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&&hl(l)}if(H.isEmpty(s.data)||un(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),Vi("/")};jo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=Db(r1);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(cr)||"";return(!t||lg(t,15))&&(t&&localStorage.removeItem(cr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(cr,t),this._adminFileTokenRequest=null),t};class yy extends og{save(e,t){super.save(e,t),t instanceof rs&&Gr(t)}clear(){super.clear(),Gr(null)}}const pe=new jo("../",new yy("pb_admin_auth"));pe.authStore.model instanceof rs&&Gr(pe.authStore.model);function ky(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=n[3].default,_=wt(m,n,n[2],null);return{c(){e=y("div"),t=y("main"),_&&_.c(),i=E(),s=y("footer"),l=y("a"),l.innerHTML=` @@ -14,7 +14,7 @@ `}}let Qr,Ji;const xr="app-tooltip";function Zu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Ji=Ji||document.querySelector("."+xr),Ji||(Ji=document.createElement("div"),Ji.classList.add(xr),document.body.appendChild(Ji)),Ji}function u1(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){ea();return}t.textContent=e.text,t.className=xr+" 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 ea(){clearTimeout(Qr),Ni().classList.remove("active"),Ni().activeNode=void 0}function Ty(n,e){Ni().activeNode=n,clearTimeout(Qr),Qr=setTimeout(()=>{Ni().classList.add("active"),u1(n,e)},isNaN(e.delay)?0:e.delay)}function We(n,e){let t=Zu(e);function i(){Ty(n,t)}function s(){ea()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&H.isFocusable(n))&&n.addEventListener("click",s),Ni(),{update(l){var o,r;t=Zu(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&u1(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ea(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Gu(n,e,t){const i=n.slice();return i[12]=e[t],i}const My=n=>({}),Xu=n=>({uniqueId:n[4]});function Oy(n){let e,t,i=n[3],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=He(t,Wt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=He(t,Wt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&w(e),a&&s&&s.end(),o=!1,r()}}}function Qu(n){let e,t,i=ko(n[12])+"",s,l,o,r;return{c(){e=y("div"),t=y("pre"),s=W(i),l=E(),h(e,"class","help-block help-block-error")},m(a,u){S(a,e,u),v(e,t),v(t,s),v(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=ko(a[12])+"")&&oe(s,i)},i(a){r||(a&&nt(()=>{r&&(o||(o=He(e,yt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=He(e,yt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&w(e),a&&o&&o.end()}}}function Ey(n){let e,t,i,s,l,o,r;const a=n[9].default,u=wt(a,n,n[8],Xu),f=[Dy,Oy],d=[];function p(m,_){return m[0]&&m[3].length?0:1}return i=p(n),s=d[i]=f[i](n),{c(){e=y("div"),u&&u.c(),t=E(),s.c(),h(e,"class",n[1]),x(e,"error",n[3].length)},m(m,_){S(m,e,_),u&&u.m(e,null),v(e,t),d[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(m,[_]){u&&u.p&&(!l||_&256)&&$t(u,a,m,m[8],l?St(a,m[8],_,My):Ct(m[8]),Xu);let g=i;i=p(m),i===g?d[i].p(m,_):(ae(),P(d[g],1,1,()=>{d[g]=null}),ue(),s=d[i],s?s.p(m,_):(s=d[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&h(e,"class",m[1]),(!l||_&10)&&x(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){P(u,m),P(s),l=!1},d(m){m&&w(e),u&&u.d(m),d[i].d(),n[11](null),o=!1,r()}}}const xu="Invalid value";function ko(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||xu:n||xu}function Ay(n,e,t){let i;Je(n,Ci,g=>t(7,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+H.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,d=[];function p(){Ri(r)}xt(()=>(f.addEventListener("input",p),f.addEventListener("change",p),()=>{f.removeEventListener("input",p),f.removeEventListener("change",p)}));function m(g){me.call(this,n,g)}function _(g){se[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,d=H.toArray(H.getNestedVal(i,r)))},[a,u,f,d,o,r,p,i,l,s,m,_]}class de extends ve{constructor(e){super(),be(this,e,Ay,Ey,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Iy(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Email"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","email"),h(l,"autocomplete","off"),h(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&1&&l.value!==u[0]&&fe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Py(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=W("Password"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Minimum 10 characters.",h(e,"for",i=n[9]),h(l,"type","password"),h(l,"autocomplete","new-password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0,h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),fe(l,n[1]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[6]),u=!0)},p(d,p){p&512&&i!==(i=d[9])&&h(e,"for",i),p&512&&o!==(o=d[9])&&h(l,"id",o),p&2&&l.value!==d[1]&&fe(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function Ly(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Password confirm"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&4&&l.value!==u[2]&&fe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Ny(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;return s=new de({props:{class:"form-field required",name:"email",$$slots:{default:[Iy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[Py,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Ly,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

    Create your first admin account in order to continue

    ",i=E(),U(s.$$.fragment),l=E(),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),f=y("button"),f.innerHTML=`Create and login - `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(_,g){S(_,e,g),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),z(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",at(n[4])),p=!0)},p(_,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:_}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:_}),o.$set(k);const $={};g&1540&&($.$$scope={dirty:g,ctx:_}),a.$set($),(!d||g&8)&&x(f,"btn-disabled",_[3]),(!d||g&8)&&x(f,"btn-loading",_[3])},i(_){d||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),d=!0)},o(_){P(s.$$.fragment,_),P(o.$$.fragment,_),P(a.$$.fragment,_),d=!1},d(_){_&&w(e),B(s),B(o),B(a),p=!1,m()}}}function Fy(n,e,t){const i=Tt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await pe.admins.create({email:s,password:l,passwordConfirm:o}),await pe.admins.authWithPassword(s,l),i("submit")}catch(p){pe.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class Ry extends ve{constructor(e){super(),be(this,e,Fy,Ny,_e,{})}}function ef(n){let e,t;return e=new a1({props:{$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qy(n){let e,t;return e=new Ry({}),e.$on("submit",n[1]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p:Q,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function jy(n){let e,t,i=n[0]&&ef(n);return{c(){i&&i.c(),e=$e()},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&&A(i,1)):(i=ef(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),P(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Vy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){pe.logout(!1),t(0,i=!0);return}pe.authStore.isValid?Vi("/collections"):pe.logout()}return[i,async()=>{t(0,i=!1),await an(),window.location.search=""}]}class Hy extends ve{constructor(e){super(),be(this,e,Vy,jy,_e,{})}}const Nt=In(""),wo=In(""),Es=In(!1);function zy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),fe(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&fe(e,l[7])},i:Q,o:Q,d(l){l&&w(e),n[13](null),i=!1,s()}}}function By(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=Lt(o,r(n)),se.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(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],ke(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),e.$on("submit",a[10]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function tf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function nf(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Uy(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[By,zy],m=[];function _(k,$){return k[4]&&!k[5]?0:1}l=_(n),o=m[l]=p[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&tf(),b=(n[0].length||n[7].length)&&nf(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",An(n[11])),J(e,"submit",at(n[10]))],f=!0)},p(k,[$]){let T=l;l=_(k),l===T?m[l].p(k,$):(ae(),P(m[T],1,1,()=>{m[T]=null}),ue(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?g?$&129&&A(g,1):(g=tf(),g.c(),A(g,1),g.m(e,a)):g&&(ae(),P(g,1,1,()=>{g=null}),ue()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=nf(k),b.c(),A(b,1),b.m(e,null)):b&&(ae(),P(b,1,1,()=>{b=null}),ue())},i(k){u||(A(o),A(g),A(b),u=!0)},o(k){P(o),P(g),P(b),u=!1},d(k){k&&w(e),m[l].d(),g&&g.d(),b&&b.d(),f=!1,Ee(d)}}}function Wy(n,e,t){const i=Tt(),s="search_"+H.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new kn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(D=!0){t(7,p=""),D&&(d==null||d.focus()),i("clear")}function _(){t(0,l=p),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await rt(()=>import("./FilterAutocompleteInput-5ad2deed.js"),["./FilterAutocompleteInput-5ad2deed.js","./index-c4d2d831.js"],import.meta.url)).default),t(5,f=!1))}xt(()=>{g()});function b(D){me.call(this,n,D)}function k(D){p=D,t(7,p),t(0,l)}function $(D){se[D?"unshift":"push"](()=>{d=D,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),_()};return n.$$set=D=>{"value"in D&&t(0,l=D.value),"placeholder"in D&&t(1,o=D.placeholder),"autocompleteCollection"in D&&t(2,r=D.autocompleteCollection),"extraAutocompleteKeys"in D&&t(3,a=D.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,_,b,k,$,T,C]}class Yo extends ve{constructor(e){super(),be(this,e,Wy,Uy,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Yy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[De(t=We.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&Vt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:Q,o:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function Ky(n,e,t){const i=Tt();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 xt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Fa extends ve{constructor(e){super(),be(this,e,Ky,Yy,_e,{tooltip:0})}}function Jy(n){let e,t,i,s,l;const o=n[6].default,r=wt(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&$t(r,o,a,a[5],i?St(o,a[5],u,null):Ct(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Ee(l)}}}function Zy(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(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class ln extends ve{constructor(e){super(),be(this,e,Zy,Jy,_e,{class:1,name:2,sort:0,disable:3})}}function Gy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Xy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=W(n[2]),s=E(),l=y("div"),o=W(n[1]),r=W(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&oe(i,a[2]),u&2&&oe(o,a[1])},d(a){a&&w(e)}}}function Qy(n){let e;function t(l,o){return l[0]?Xy:Gy}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function xy(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 $i extends ve{constructor(e){super(),be(this,e,xy,Qy,_e,{date:0})}}const e2=n=>({}),sf=n=>({}),t2=n=>({}),lf=n=>({});function n2(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=wt(u,n,n[4],lf),d=n[5].default,p=wt(d,n,n[4],null),m=n[5].after,_=wt(m,n,n[4],sf);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),_&&_.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&$t(f,u,g,g[4],o?St(u,g[4],b,t2):Ct(g[4]),lf),p&&p.p&&(!o||b&16)&&$t(p,d,g,g[4],o?St(d,g[4],b,null):Ct(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&h(i,"class",s),_&&_.p&&(!o||b&16)&&$t(_,m,g,g[4],o?St(m,g[4],b,e2):Ct(g[4]),sf)},i(g){o||(A(f,g),A(p,g),A(_,g),o=!0)},o(g){P(f,g),P(p,g),P(_,g),o=!1},d(g){g&&w(e),f&&f.d(g),p&&p.d(g),n[6](null),_&&_.d(g),r=!1,Ee(a)}}}function i2(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 p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){se[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class Ra extends ve{constructor(e){super(),be(this,e,i2,n2,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function of(n,e,t){const i=n.slice();return i[23]=e[t],i}function s2(n){let e;return{c(){e=y("div"),e.innerHTML=` + `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(_,g){S(_,e,g),v(e,t),v(e,i),z(s,e,null),v(e,l),z(o,e,null),v(e,r),z(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",at(n[4])),p=!0)},p(_,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:_}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:_}),o.$set(k);const $={};g&1540&&($.$$scope={dirty:g,ctx:_}),a.$set($),(!d||g&8)&&x(f,"btn-disabled",_[3]),(!d||g&8)&&x(f,"btn-loading",_[3])},i(_){d||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),d=!0)},o(_){P(s.$$.fragment,_),P(o.$$.fragment,_),P(a.$$.fragment,_),d=!1},d(_){_&&w(e),B(s),B(o),B(a),p=!1,m()}}}function Fy(n,e,t){const i=Tt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await pe.admins.create({email:s,password:l,passwordConfirm:o}),await pe.admins.authWithPassword(s,l),i("submit")}catch(p){pe.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class Ry extends ve{constructor(e){super(),be(this,e,Fy,Ny,_e,{})}}function ef(n){let e,t;return e=new a1({props:{$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qy(n){let e,t;return e=new Ry({}),e.$on("submit",n[1]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p:Q,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function jy(n){let e,t,i=n[0]&&ef(n);return{c(){i&&i.c(),e=$e()},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&&A(i,1)):(i=ef(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),P(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Vy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){pe.logout(!1),t(0,i=!0);return}pe.authStore.isValid?Vi("/collections"):pe.logout()}return[i,async()=>{t(0,i=!1),await an(),window.location.search=""}]}class Hy extends ve{constructor(e){super(),be(this,e,Vy,jy,_e,{})}}const Nt=In(""),wo=In(""),Es=In(!1);function zy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),fe(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&fe(e,l[7])},i:Q,o:Q,d(l){l&&w(e),n[13](null),i=!1,s()}}}function By(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=Lt(o,r(n)),se.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(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],ke(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ae();const d=e;P(d.$$.fragment,1,0,()=>{B(d,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),e.$on("submit",a[10]),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function tf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function nf(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Uy(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[By,zy],m=[];function _(k,$){return k[4]&&!k[5]?0:1}l=_(n),o=m[l]=p[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&tf(),b=(n[0].length||n[7].length)&&nf(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",An(n[11])),J(e,"submit",at(n[10]))],f=!0)},p(k,[$]){let T=l;l=_(k),l===T?m[l].p(k,$):(ae(),P(m[T],1,1,()=>{m[T]=null}),ue(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?g?$&129&&A(g,1):(g=tf(),g.c(),A(g,1),g.m(e,a)):g&&(ae(),P(g,1,1,()=>{g=null}),ue()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=nf(k),b.c(),A(b,1),b.m(e,null)):b&&(ae(),P(b,1,1,()=>{b=null}),ue())},i(k){u||(A(o),A(g),A(b),u=!0)},o(k){P(o),P(g),P(b),u=!1},d(k){k&&w(e),m[l].d(),g&&g.d(),b&&b.d(),f=!1,Ee(d)}}}function Wy(n,e,t){const i=Tt(),s="search_"+H.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new kn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(D=!0){t(7,p=""),D&&(d==null||d.focus()),i("clear")}function _(){t(0,l=p),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await rt(()=>import("./FilterAutocompleteInput-2cb65e7c.js"),["./FilterAutocompleteInput-2cb65e7c.js","./index-c4d2d831.js"],import.meta.url)).default),t(5,f=!1))}xt(()=>{g()});function b(D){me.call(this,n,D)}function k(D){p=D,t(7,p),t(0,l)}function $(D){se[D?"unshift":"push"](()=>{d=D,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),_()};return n.$$set=D=>{"value"in D&&t(0,l=D.value),"placeholder"in D&&t(1,o=D.placeholder),"autocompleteCollection"in D&&t(2,r=D.autocompleteCollection),"extraAutocompleteKeys"in D&&t(3,a=D.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,_,b,k,$,T,C]}class Yo extends ve{constructor(e){super(),be(this,e,Wy,Uy,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Yy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[De(t=We.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&Vt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:Q,o:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function Ky(n,e,t){const i=Tt();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 xt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Fa extends ve{constructor(e){super(),be(this,e,Ky,Yy,_e,{tooltip:0})}}function Jy(n){let e,t,i,s,l;const o=n[6].default,r=wt(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&$t(r,o,a,a[5],i?St(o,a[5],u,null):Ct(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Ee(l)}}}function Zy(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(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class ln extends ve{constructor(e){super(),be(this,e,Zy,Jy,_e,{class:1,name:2,sort:0,disable:3})}}function Gy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Xy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=W(n[2]),s=E(),l=y("div"),o=W(n[1]),r=W(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&oe(i,a[2]),u&2&&oe(o,a[1])},d(a){a&&w(e)}}}function Qy(n){let e;function t(l,o){return l[0]?Xy:Gy}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function xy(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 $i extends ve{constructor(e){super(),be(this,e,xy,Qy,_e,{date:0})}}const e2=n=>({}),sf=n=>({}),t2=n=>({}),lf=n=>({});function n2(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=wt(u,n,n[4],lf),d=n[5].default,p=wt(d,n,n[4],null),m=n[5].after,_=wt(m,n,n[4],sf);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),_&&_.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&$t(f,u,g,g[4],o?St(u,g[4],b,t2):Ct(g[4]),lf),p&&p.p&&(!o||b&16)&&$t(p,d,g,g[4],o?St(d,g[4],b,null):Ct(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&h(i,"class",s),_&&_.p&&(!o||b&16)&&$t(_,m,g,g[4],o?St(m,g[4],b,e2):Ct(g[4]),sf)},i(g){o||(A(f,g),A(p,g),A(_,g),o=!0)},o(g){P(f,g),P(p,g),P(_,g),o=!1},d(g){g&&w(e),f&&f.d(g),p&&p.d(g),n[6](null),_&&_.d(g),r=!1,Ee(a)}}}function i2(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 p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){se[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class Ra extends ve{constructor(e){super(),be(this,e,i2,n2,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function of(n,e,t){const i=n.slice();return i[23]=e[t],i}function s2(n){let e;return{c(){e=y("div"),e.innerHTML=` Method`,h(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function l2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="URL",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function o2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Referer",h(t,"class",H.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function r2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="User IP",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function a2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Status",h(t,"class",H.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function u2(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Created",h(t,"class",H.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function rf(n){let e;function t(l,o){return l[6]?c2:f2}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 f2(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&af(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=af(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function c2(n){let e;return{c(){e=y("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function af(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function uf(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ff(n,e){var Me,Ze,mt;let t,i,s,l=((Me=e[23].method)==null?void 0:Me.toUpperCase())+"",o,r,a,u,f,d=e[23].url+"",p,m,_,g,b,k,$=(e[23].referer||"N/A")+"",T,C,D,M,O,I=(e[23].userIp||"N/A")+"",L,F,q,N,R,j=e[23].status+"",V,K,ee,te,G,ce,X,le,ye,Se,Ve=(((Ze=e[23].meta)==null?void 0:Ze.errorMessage)||((mt=e[23].meta)==null?void 0:mt.errorData))&&uf();te=new $i({props:{date:e[23].created}});function ze(){return e[17](e[23])}function we(...Ge){return e[18](e[23],...Ge)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("span"),o=W(l),a=E(),u=y("td"),f=y("span"),p=W(d),_=E(),Ve&&Ve.c(),g=E(),b=y("td"),k=y("span"),T=W($),D=E(),M=y("td"),O=y("span"),L=W(I),q=E(),N=y("td"),R=y("span"),V=W(j),K=E(),ee=y("td"),U(te.$$.fragment),G=E(),ce=y("td"),ce.innerHTML='',X=E(),h(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",m=e[23].url),h(u,"class","col-type-text col-field-url"),h(k,"class","txt txt-ellipsis"),h(k,"title",C=e[23].referer),x(k,"txt-hint",!e[23].referer),h(b,"class","col-type-text col-field-referer"),h(O,"class","txt txt-ellipsis"),h(O,"title",F=e[23].userIp),x(O,"txt-hint",!e[23].userIp),h(M,"class","col-type-number col-field-userIp"),h(R,"class","label"),x(R,"label-danger",e[23].status>=400),h(N,"class","col-type-number col-field-status"),h(ee,"class","col-type-date col-field-created"),h(ce,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Ge,Ye){S(Ge,t,Ye),v(t,i),v(i,s),v(s,o),v(t,a),v(t,u),v(u,f),v(f,p),v(u,_),Ve&&Ve.m(u,null),v(t,g),v(t,b),v(b,k),v(k,T),v(t,D),v(t,M),v(M,O),v(O,L),v(t,q),v(t,N),v(N,R),v(R,V),v(t,K),v(t,ee),z(te,ee,null),v(t,G),v(t,ce),v(t,X),le=!0,ye||(Se=[J(t,"click",ze),J(t,"keydown",we)],ye=!0)},p(Ge,Ye){var qe,xe,en;e=Ge,(!le||Ye&8)&&l!==(l=((qe=e[23].method)==null?void 0:qe.toUpperCase())+"")&&oe(o,l),(!le||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&h(s,"class",r),(!le||Ye&8)&&d!==(d=e[23].url+"")&&oe(p,d),(!le||Ye&8&&m!==(m=e[23].url))&&h(f,"title",m),(xe=e[23].meta)!=null&&xe.errorMessage||(en=e[23].meta)!=null&&en.errorData?Ve||(Ve=uf(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!le||Ye&8)&&$!==($=(e[23].referer||"N/A")+"")&&oe(T,$),(!le||Ye&8&&C!==(C=e[23].referer))&&h(k,"title",C),(!le||Ye&8)&&x(k,"txt-hint",!e[23].referer),(!le||Ye&8)&&I!==(I=(e[23].userIp||"N/A")+"")&&oe(L,I),(!le||Ye&8&&F!==(F=e[23].userIp))&&h(O,"title",F),(!le||Ye&8)&&x(O,"txt-hint",!e[23].userIp),(!le||Ye&8)&&j!==(j=e[23].status+"")&&oe(V,j),(!le||Ye&8)&&x(R,"label-danger",e[23].status>=400);const ne={};Ye&8&&(ne.date=e[23].created),te.$set(ne)},i(Ge){le||(A(te.$$.fragment,Ge),le=!0)},o(Ge){P(te.$$.fragment,Ge),le=!1},d(Ge){Ge&&w(t),Ve&&Ve.d(),B(te),ye=!1,Ee(Se)}}}function d2(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L=[],F=new Map,q;function N(we){n[11](we)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[s2]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new ln({props:R}),se.push(()=>he(s,"sort",N));function j(we){n[12](we)}let V={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[l2]},$$scope:{ctx:n}};n[1]!==void 0&&(V.sort=n[1]),r=new ln({props:V}),se.push(()=>he(r,"sort",j));function K(we){n[13](we)}let ee={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[o2]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),f=new ln({props:ee}),se.push(()=>he(f,"sort",K));function te(we){n[14](we)}let G={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[r2]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),m=new ln({props:G}),se.push(()=>he(m,"sort",te));function ce(we){n[15](we)}let X={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[a2]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),b=new ln({props:X}),se.push(()=>he(b,"sort",ce));function le(we){n[16](we)}let ye={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[u2]},$$scope:{ctx:n}};n[1]!==void 0&&(ye.sort=n[1]),T=new ln({props:ye}),se.push(()=>he(T,"sort",le));let Se=n[3];const Ve=we=>we[23].id;for(let we=0;wel=!1)),s.$set(Ze);const mt={};Me&67108864&&(mt.$$scope={dirty:Me,ctx:we}),!a&&Me&2&&(a=!0,mt.sort=we[1],ke(()=>a=!1)),r.$set(mt);const Ge={};Me&67108864&&(Ge.$$scope={dirty:Me,ctx:we}),!d&&Me&2&&(d=!0,Ge.sort=we[1],ke(()=>d=!1)),f.$set(Ge);const Ye={};Me&67108864&&(Ye.$$scope={dirty:Me,ctx:we}),!_&&Me&2&&(_=!0,Ye.sort=we[1],ke(()=>_=!1)),m.$set(Ye);const ne={};Me&67108864&&(ne.$$scope={dirty:Me,ctx:we}),!k&&Me&2&&(k=!0,ne.sort=we[1],ke(()=>k=!1)),b.$set(ne);const qe={};Me&67108864&&(qe.$$scope={dirty:Me,ctx:we}),!C&&Me&2&&(C=!0,qe.sort=we[1],ke(()=>C=!1)),T.$set(qe),Me&841&&(Se=we[3],ae(),L=vt(L,Me,Ve,1,we,Se,F,I,Kt,ff,null,of),ue(),!Se.length&&ze?ze.p(we,Me):Se.length?ze&&(ze.d(1),ze=null):(ze=rf(we),ze.c(),ze.m(I,null))),(!q||Me&64)&&x(e,"table-loading",we[6])},i(we){if(!q){A(s.$$.fragment,we),A(r.$$.fragment,we),A(f.$$.fragment,we),A(m.$$.fragment,we),A(b.$$.fragment,we),A(T.$$.fragment,we);for(let Me=0;Me{if(F<=1&&g(),t(6,p=!1),t(5,f=N.page),t(4,d=N.totalItems),s("load",u.concat(N.items)),q){const R=++m;for(;N.items.length&&m==R;)t(3,u=u.concat(N.items.splice(0,10))),await H.yieldToMain()}else t(3,u=u.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,p=!1),console.warn(N),g(),pe.errorResponseHandler(N,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,d=0)}function b(F){a=F,t(1,a)}function k(F){a=F,t(1,a)}function $(F){a=F,t(1,a)}function T(F){a=F,t(1,a)}function C(F){a=F,t(1,a)}function D(F){a=F,t(1,a)}const M=F=>s("select",F),O=(F,q)=>{q.code==="Enter"&&(q.preventDefault(),s("select",F))},I=()=>t(0,o=""),L=()=>_(f+1);return n.$$set=F=>{"filter"in F&&t(0,o=F.filter),"presets"in F&&t(10,r=F.presets),"sort"in F&&t(1,a=F.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),_(1)),n.$$.dirty&24&&t(7,i=d>u.length)},[o,a,_,u,d,f,p,i,s,l,r,b,k,$,T,C,D,M,O,I,L]}class h2 extends ve{constructor(e){super(),be(this,e,m2,p2,_e,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 @@ -49,7 +49,7 @@ `),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}k.textContent=M,t.highlightElement(k)},function(M){b.setAttribute(r,f),k.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(d),$=0,T;T=k[$++];)t.highlightElement(T)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(XS);const xs=ma;var Mc={},QS={get exports(){return Mc},set exports(n){Mc=n}};(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[p]=` `+f[p],d=m)}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 d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",_="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 xS(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(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")&&h(e,"class",i)},i:Q,o:Q,d(s){s&&w(e)}}}function e$(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=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.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 xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class rb extends ve{constructor(e){super(),be(this,e,e$,xS,_e,{class:0,content:2,language:3})}}const t$=n=>({}),Oc=n=>({}),n$=n=>({}),Dc=n=>({});function Ec(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T=n[4]&&!n[2]&&Ac(n);const C=n[19].header,D=wt(C,n,n[18],Dc);let M=n[4]&&n[2]&&Ic(n);const O=n[19].default,I=wt(O,n,n[18],null),L=n[19].footer,F=wt(L,n,n[18],Oc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),D&&D.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(q,N){S(q,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),D&&D.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",at(n[20])),J(f,"scroll",n[22])],k=!0)},p(q,N){n=q,n[4]&&!n[2]?T?T.p(n,N):(T=Ac(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),D&&D.p&&(!b||N[0]&262144)&&$t(D,C,n,n[18],b?St(C,n[18],N,n$):Ct(n[18]),Dc),n[4]&&n[2]?M?M.p(n,N):(M=Ic(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&$t(I,O,n,n[18],b?St(O,n[18],N,null):Ct(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&$t(F,L,n,n[18],b?St(L,n[18],N,t$):Ct(n[18]),Oc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(q){b||(q&&nt(()=>{b&&(i||(i=He(t,Xr,{duration:ys,opacity:0},!0)),i.run(1))}),A(D,q),A(I,q),A(F,q),nt(()=>{b&&(g&&g.end(1),_=X_(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),_.start())}),b=!0)},o(q){q&&(i||(i=He(t,Xr,{duration:ys,opacity:0},!1)),i.run(0)),P(D,q),P(I,q),P(F,q),_&&_.invalidate(),g=ka(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(q){q&&w(e),q&&i&&i.end(),T&&T.d(),D&&D.d(q),M&&M.d(),I&&I.d(q),n[21](null),F&&F.d(q),q&&g&&g.end(),k=!1,Ee($)}}}function Ac(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ic(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function i$(n){let e,t,i,s,l=n[0]&&Ec(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Ec(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Ee(s)}}}let Xi,Tr=[];function ab(){return Xi=Xi||document.querySelector(".overlays"),Xi||(Xi=document.createElement("div"),Xi.classList.add("overlays"),document.body.appendChild(Xi)),Xi}let ys=150;function Pc(){return 1e3+ab().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:d=void 0}=e,{beforeHide:p=void 0}=e;const m=Tt(),_="op_"+H.randomString(10);let g,b,k,$,T="",C=o;function D(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function O(){return o}async function I(G){t(17,C=G),G?(k=document.activeElement,m("show"),g==null||g.focus()):(clearTimeout($),m("hide"),k==null||k.focus()),await an(),L()}function L(){g&&(o?t(6,g.style.zIndex=Pc(),g):t(6,g.style="",g))}function F(){H.pushUnique(Tr,_),document.body.classList.add("overlay-active")}function q(){H.removeByValue(Tr,_),Tr.length||document.body.classList.remove("overlay-active")}function N(G){o&&f&&G.code=="Escape"&&!H.isInput(G.target)&&g&&g.style.zIndex==Pc()&&(G.preventDefault(),M())}function R(G){o&&j(b)}function j(G,ce){ce&&t(8,T=""),G&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}G.scrollTop==0?t(8,T+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}xt(()=>(ab().appendChild(g),()=>{var G;clearTimeout($),q(),(G=g==null?void 0:g.classList)==null||G.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const V=()=>a?M():!0;function K(G){se[G?"unshift":"push"](()=>{b=G,t(7,b)})}const ee=G=>j(G.target);function te(G){se[G?"unshift":"push"](()=>{g=G,t(6,g)})}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,d=G.beforeOpen),"beforeHide"in G&&t(14,p=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&j(b,!0),n.$$.dirty[0]&64&&g&&L(),n.$$.dirty[0]&1&&(o?F():q())},[o,l,r,a,u,M,g,b,T,N,R,j,f,d,p,D,O,C,s,i,V,K,ee,te]}class hn extends ve{constructor(e){super(),be(this,e,s$,i$,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function l$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function o$(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=W(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&oe(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function r$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function a$(n){let e,t,i;return t=new rb({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function u$(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,_,g=n[2].status+"",b,k,$,T,C,D,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",O,I,L,F,q,N,R=n[2].auth+"",j,V,K,ee,te,G,ce=n[2].url+"",X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye=n[2].remoteIp+"",ne,qe,xe,en,Ne,Ce,tt=n[2].userIp+"",Et,Rt,Ht,Ln,ti,Sn,ht=n[2].userAgent+"",Nn,ds,ni,Mi,ps,pi,ge,Ae,Fe,Xe,Ot,$n,Fn,Wi,tn,fn;function Fl(Le,Oe){return Le[2].referer?o$:l$}let Y=Fl(n),Z=Y(n);const ie=[a$,r$],re=[];function Te(Le,Oe){return Oe&4&&(ge=null),ge==null&&(ge=!H.isEmpty(Le[2].meta)),ge?0:1}return Ae=Te(n,-1),Fe=re[Ae]=ie[Ae](n),tn=new $i({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=W(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),_=y("span"),b=W(g),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),D=y("td"),O=W(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",q=E(),N=y("td"),j=W(R),V=E(),K=y("tr"),ee=y("td"),ee.textContent="URL",te=E(),G=y("td"),X=W(ce),le=E(),ye=y("tr"),Se=y("td"),Se.textContent="Referer",Ve=E(),ze=y("td"),Z.c(),we=E(),Me=y("tr"),Ze=y("td"),Ze.textContent="Remote IP",mt=E(),Ge=y("td"),ne=W(Ye),qe=E(),xe=y("tr"),en=y("td"),en.textContent="User IP",Ne=E(),Ce=y("td"),Et=W(tt),Rt=E(),Ht=y("tr"),Ln=y("td"),Ln.textContent="UserAgent",ti=E(),Sn=y("td"),Nn=W(ht),ds=E(),ni=y("tr"),Mi=y("td"),Mi.textContent="Meta",ps=E(),pi=y("td"),Fe.c(),Xe=E(),Ot=y("tr"),$n=y("td"),$n.textContent="Created",Fn=E(),Wi=y("td"),U(tn.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(_,"class","label"),x(_,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h(Se,"class","min-width txt-hint txt-bold"),h(Ze,"class","min-width txt-hint txt-bold"),h(en,"class","min-width txt-hint txt-bold"),h(Ln,"class","min-width txt-hint txt-bold"),h(Mi,"class","min-width txt-hint txt-bold"),h($n,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Le,Oe){S(Le,e,Oe),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,_),v(_,b),v(t,k),v(t,$),v($,T),v($,C),v($,D),v(D,O),v(t,I),v(t,L),v(L,F),v(L,q),v(L,N),v(N,j),v(t,V),v(t,K),v(K,ee),v(K,te),v(K,G),v(G,X),v(t,le),v(t,ye),v(ye,Se),v(ye,Ve),v(ye,ze),Z.m(ze,null),v(t,we),v(t,Me),v(Me,Ze),v(Me,mt),v(Me,Ge),v(Ge,ne),v(t,qe),v(t,xe),v(xe,en),v(xe,Ne),v(xe,Ce),v(Ce,Et),v(t,Rt),v(t,Ht),v(Ht,Ln),v(Ht,ti),v(Ht,Sn),v(Sn,Nn),v(t,ds),v(t,ni),v(ni,Mi),v(ni,ps),v(ni,pi),re[Ae].m(pi,null),v(t,Xe),v(t,Ot),v(Ot,$n),v(Ot,Fn),v(Ot,Wi),z(tn,Wi,null),fn=!0},p(Le,Oe){var Ue;(!fn||Oe&4)&&r!==(r=Le[2].id+"")&&oe(a,r),(!fn||Oe&4)&&g!==(g=Le[2].status+"")&&oe(b,g),(!fn||Oe&4)&&x(_,"label-danger",Le[2].status>=400),(!fn||Oe&4)&&M!==(M=((Ue=Le[2].method)==null?void 0:Ue.toUpperCase())+"")&&oe(O,M),(!fn||Oe&4)&&R!==(R=Le[2].auth+"")&&oe(j,R),(!fn||Oe&4)&&ce!==(ce=Le[2].url+"")&&oe(X,ce),Y===(Y=Fl(Le))&&Z?Z.p(Le,Oe):(Z.d(1),Z=Y(Le),Z&&(Z.c(),Z.m(ze,null))),(!fn||Oe&4)&&Ye!==(Ye=Le[2].remoteIp+"")&&oe(ne,Ye),(!fn||Oe&4)&&tt!==(tt=Le[2].userIp+"")&&oe(Et,tt),(!fn||Oe&4)&&ht!==(ht=Le[2].userAgent+"")&&oe(Nn,ht);let Ke=Ae;Ae=Te(Le,Oe),Ae===Ke?re[Ae].p(Le,Oe):(ae(),P(re[Ke],1,1,()=>{re[Ke]=null}),ue(),Fe=re[Ae],Fe?Fe.p(Le,Oe):(Fe=re[Ae]=ie[Ae](Le),Fe.c()),A(Fe,1),Fe.m(pi,null));const Re={};Oe&4&&(Re.date=Le[2].created),tn.$set(Re)},i(Le){fn||(A(Fe),A(tn.$$.fragment,Le),fn=!0)},o(Le){P(Fe),P(tn.$$.fragment,Le),fn=!1},d(Le){Le&&w(e),Z.d(),re[Ae].d(),B(tn)}}}function f$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function c$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function d$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[c$],header:[f$],default:[u$]},$$scope:{ctx:n}};return e=new hn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),B(e,s)}}}function p$(n,e,t){let i,s=new zr;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){se[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){me.call(this,n,d)}function f(d){me.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class m$ extends ve{constructor(e){super(),be(this,e,p$,d$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function h$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[1],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lc(n){let e,t;return e=new GS({props:{filter:n[4],presets:n[5]}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Nc(n){let e,t;return e=new h2({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function _$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$=n[3],T,C=n[3],D,M;r=new Fa({}),r.$on("refresh",n[9]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[h$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Yo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let O=Lc(n),I=Nc(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=W(n[6]),o=E(),U(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),U(p.$$.fragment),m=E(),U(_.$$.fragment),g=E(),b=y("div"),k=E(),O.c(),T=E(),I.c(),D=$e(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),z(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),z(p,d,null),v(e,m),z(_,e,null),v(e,g),v(e,b),v(e,k),O.m(e,null),S(L,T,F),I.m(L,F),S(L,D,F),M=!0},p(L,F){(!M||F&64)&&oe(l,L[6]);const q={};F&49154&&(q.$$scope={dirty:F,ctx:L}),p.$set(q);const N={};F&1&&(N.value=L[0]),_.$set(N),F&8&&_e($,$=L[3])?(ae(),P(O,1,1,Q),ue(),O=Lc(L),O.c(),A(O,1),O.m(e,null)):O.p(L,F),F&8&&_e(C,C=L[3])?(ae(),P(I,1,1,Q),ue(),I=Nc(L),I.c(),A(I,1),I.m(D.parentNode,D)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(_.$$.fragment,L),A(O),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(_.$$.fragment,L),P(O),P(I),M=!1},d(L){L&&w(e),B(r),B(p),B(_),O.d(L),L&&w(T),L&&w(D),I.d(L)}}}function g$(n){let e,t,i,s;e=new Pn({props:{$$slots:{default:[_$]},$$scope:{ctx:n}}});let l={};return i=new m$({props:l}),n[13](i),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(o,r){z(e,o,r),S(o,t,r),z(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){B(e,o),o&&w(t),n[13](null),B(i,o)}}}const Fc="includeAdminLogs";function b$(n,e,t){var k;let i,s,l;Je(n,Nt,$=>t(6,l=$));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];rn(Nt,l="Request logs",l);let r,a="",u=((k=window.localStorage)==null?void 0:k.getItem(Fc))<<0,f=1;function d(){t(3,f++,f)}const p=()=>d();function m(){u=this.checked,t(1,u)}const _=$=>t(0,a=$.detail),g=$=>r==null?void 0:r.show($==null?void 0:$.detail);function b($){se[$?"unshift":"push"](()=>{r=$,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Fc,u<<0),n.$$.dirty&1&&t(4,s=H.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,d,p,m,_,g,b]}class v$ extends ve{constructor(e){super(),be(this,e,b$,g$,_e,{})}}const ou=In({});function vn(n,e,t){ou.set({text:n,yesCallback:e,noCallback:t})}function ub(){ou.set({})}function Rc(n){let e,t,i;const s=n[17].default,l=wt(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&$t(l,s,o,o[16],i?St(s,o[16],r,null):Ct(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function y$(n){let e,t,i,s,l=n[0]&&Rc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Rc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,Ee(s)}}}function k$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,_,g=!1;const b=Tt();function k(){t(0,o=!1),g=!1,clearTimeout(_)}function $(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(V){return!d||V.classList.contains(u)||(m==null?void 0:m.contains(V))&&!d.contains(V)||d.contains(V)&&V.closest&&V.closest("."+u)}function D(V){(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function M(V){(V.code==="Enter"||V.code==="Space")&&(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function O(V){o&&r&&V.code==="Escape"&&(V.preventDefault(),k())}function I(V){o&&!(d!=null&&d.contains(V.target))?g=!0:g&&(g=!1)}function L(V){var K;o&&g&&!(d!=null&&d.contains(V.target))&&!(m!=null&&m.contains(V.target))&&!((K=V.target)!=null&&K.closest(".flatpickr-calendar"))&&k()}function F(V){I(V),L(V)}function q(V){N(),d==null||d.addEventListener("click",D),t(15,m=V||(d==null?void 0:d.parentNode)),m==null||m.addEventListener("click",D),m==null||m.addEventListener("keydown",M)}function N(){clearTimeout(_),d==null||d.removeEventListener("click",D),m==null||m.removeEventListener("click",D),m==null||m.removeEventListener("keydown",M)}xt(()=>(q(),()=>N()));function R(V){se[V?"unshift":"push"](()=>{p=V,t(3,p)})}function j(V){se[V?"unshift":"push"](()=>{d=V,t(2,d)})}return n.$$set=V=>{"trigger"in V&&t(8,l=V.trigger),"active"in V&&t(0,o=V.active),"escClose"in V&&t(9,r=V.escClose),"autoScroll"in V&&t(10,a=V.autoScroll),"closableClass"in V&&t(11,u=V.closableClass),"class"in V&&t(1,f=V.class),"$$scope"in V&&t(16,s=V.$$scope)},n.$$.update=()=>{var V,K;n.$$.dirty&260&&d&&q(l),n.$$.dirty&32769&&(o?((V=m==null?void 0:m.classList)==null||V.add("active"),b("show")):((K=m==null?void 0:m.classList)==null||K.remove("active"),b("hide")))},[o,f,d,p,O,I,L,F,l,r,a,u,k,$,T,m,s,i,R,j]}class Kn extends ve{constructor(e){super(),be(this,e,k$,y$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function qc(n,e,t){const i=n.slice();return i[27]=e[t],i}function w$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=W("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function S$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Lt(o,r(n)),se.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ke(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ae();const p=e;P(p.$$.fragment,1,0,()=>{B(p,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function $$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function C$(n){let e,t,i,s;const l=[$$,S$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function jc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[C$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&jc(n);return{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),r&&r.c(),l=$e()},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=jc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function M$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=W(t),s=W(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&oe(i,t)},d(l){l&&w(e)}}}function Hc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function O$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,Ee(o)}}}function D$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[O$],header:[M$],default:[T$]},$$scope:{ctx:n}};for(let l=0;lte.name==V);ee?H.removeByValue(K.columns,ee):H.pushUnique(K.columns,{name:V}),t(2,p=H.buildIndex(K))}xt(async()=>{t(8,g=!0);try{t(7,_=(await rt(()=>import("./CodeEditor-ed3b6d0c.js"),["./CodeEditor-ed3b6d0c.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(V){console.warn(V)}t(8,g=!1)});const M=()=>T(),O=()=>k(),I=()=>C(),L=V=>{t(3,s.unique=V.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=H.buildIndex(s))};function F(V){p=V,t(2,p)}const q=V=>D(V);function N(V){se[V?"unshift":"push"](()=>{f=V,t(4,f)})}function R(V){me.call(this,n,V)}function j(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Jt(V)),t(14,r=Qe(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,K,ee;n.$$.dirty[0]&1&&t(10,i=(((K=(V=u==null?void 0:u.schema)==null?void 0:V.filter(te=>!te.toDelete))==null?void 0:K.map(te=>te.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=H.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(te=>te.name))||[])},[u,k,p,s,f,d,m,_,g,l,i,T,C,D,r,b,M,O,I,L,F,q,N,R,j]}class A$ extends ve{constructor(e){super(),be(this,e,E$,D$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function zc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=H.parseIndex(i[10]);return i[11]=s,i}function Bc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Uc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(Wc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Bc();function d(){return n[4](n[10],n[13])}return{c(){var m,_;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=W(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var g,b;S(m,e,_),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[De(r=We.call(null,e,((b=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,_){var g,b,k,$,T;n=m,n[11].unique?f||(f=Bc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(Wc).join(", "))+"")&&oe(l,s),_&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&Vt(r.update)&&_&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,Ee(u)}}}function I$(n){var C,D,M;let e,t,i=(((D=(C=n[0])==null?void 0:C.indexes)==null?void 0:D.length)||0)+"",s,l,o,r,a,u,f,d,p,m,_,g,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let O=0;Ohe(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=W("Unique constraints and indexes ("),s=W(i),l=W(")"),o=E(),r=y("div");for(let O=0;O+ +`)}},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 d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",_="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 xS(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(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")&&h(e,"class",i)},i:Q,o:Q,d(s){s&&w(e)}}}function e$(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=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.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 xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class rb extends ve{constructor(e){super(),be(this,e,e$,xS,_e,{class:0,content:2,language:3})}}const t$=n=>({}),Oc=n=>({}),n$=n=>({}),Dc=n=>({});function Ec(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T=n[4]&&!n[2]&&Ac(n);const C=n[19].header,D=wt(C,n,n[18],Dc);let M=n[4]&&n[2]&&Ic(n);const O=n[19].default,I=wt(O,n,n[18],null),L=n[19].footer,F=wt(L,n,n[18],Oc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),D&&D.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(q,N){S(q,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),D&&D.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",at(n[20])),J(f,"scroll",n[22])],k=!0)},p(q,N){n=q,n[4]&&!n[2]?T?T.p(n,N):(T=Ac(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),D&&D.p&&(!b||N[0]&262144)&&$t(D,C,n,n[18],b?St(C,n[18],N,n$):Ct(n[18]),Dc),n[4]&&n[2]?M?M.p(n,N):(M=Ic(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&$t(I,O,n,n[18],b?St(O,n[18],N,null):Ct(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&$t(F,L,n,n[18],b?St(L,n[18],N,t$):Ct(n[18]),Oc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(q){b||(q&&nt(()=>{b&&(i||(i=He(t,Xr,{duration:ys,opacity:0},!0)),i.run(1))}),A(D,q),A(I,q),A(F,q),nt(()=>{b&&(g&&g.end(1),_=X_(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),_.start())}),b=!0)},o(q){q&&(i||(i=He(t,Xr,{duration:ys,opacity:0},!1)),i.run(0)),P(D,q),P(I,q),P(F,q),_&&_.invalidate(),g=ka(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(q){q&&w(e),q&&i&&i.end(),T&&T.d(),D&&D.d(q),M&&M.d(),I&&I.d(q),n[21](null),F&&F.d(q),q&&g&&g.end(),k=!1,Ee($)}}}function Ac(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ic(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function i$(n){let e,t,i,s,l=n[0]&&Ec(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Ec(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,Ee(s)}}}let Xi,Tr=[];function ab(){return Xi=Xi||document.querySelector(".overlays"),Xi||(Xi=document.createElement("div"),Xi.classList.add("overlays"),document.body.appendChild(Xi)),Xi}let ys=150;function Pc(){return 1e3+ab().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:d=void 0}=e,{beforeHide:p=void 0}=e;const m=Tt(),_="op_"+H.randomString(10);let g,b,k,$,T="",C=o;function D(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function O(){return o}async function I(G){t(17,C=G),G?(k=document.activeElement,m("show"),g==null||g.focus()):(clearTimeout($),m("hide"),k==null||k.focus()),await an(),L()}function L(){g&&(o?t(6,g.style.zIndex=Pc(),g):t(6,g.style="",g))}function F(){H.pushUnique(Tr,_),document.body.classList.add("overlay-active")}function q(){H.removeByValue(Tr,_),Tr.length||document.body.classList.remove("overlay-active")}function N(G){o&&f&&G.code=="Escape"&&!H.isInput(G.target)&&g&&g.style.zIndex==Pc()&&(G.preventDefault(),M())}function R(G){o&&j(b)}function j(G,ce){ce&&t(8,T=""),G&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}G.scrollTop==0?t(8,T+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}xt(()=>(ab().appendChild(g),()=>{var G;clearTimeout($),q(),(G=g==null?void 0:g.classList)==null||G.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const V=()=>a?M():!0;function K(G){se[G?"unshift":"push"](()=>{b=G,t(7,b)})}const ee=G=>j(G.target);function te(G){se[G?"unshift":"push"](()=>{g=G,t(6,g)})}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,d=G.beforeOpen),"beforeHide"in G&&t(14,p=G.beforeHide),"$$scope"in G&&t(18,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&j(b,!0),n.$$.dirty[0]&64&&g&&L(),n.$$.dirty[0]&1&&(o?F():q())},[o,l,r,a,u,M,g,b,T,N,R,j,f,d,p,D,O,C,s,i,V,K,ee,te]}class hn extends ve{constructor(e){super(),be(this,e,s$,i$,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function l$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function o$(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=W(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&oe(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function r$(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function a$(n){let e,t,i;return t=new rb({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function u$(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,_,g=n[2].status+"",b,k,$,T,C,D,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",O,I,L,F,q,N,R=n[2].auth+"",j,V,K,ee,te,G,ce=n[2].url+"",X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye=n[2].remoteIp+"",ne,qe,xe,en,Ne,Ce,tt=n[2].userIp+"",Et,Rt,Ht,Ln,ti,Sn,ht=n[2].userAgent+"",Nn,ds,ni,Mi,ps,pi,ge,Ae,Fe,Xe,Ot,$n,Fn,Wi,tn,fn;function Fl(Le,Oe){return Le[2].referer?o$:l$}let Y=Fl(n),Z=Y(n);const ie=[a$,r$],re=[];function Te(Le,Oe){return Oe&4&&(ge=null),ge==null&&(ge=!H.isEmpty(Le[2].meta)),ge?0:1}return Ae=Te(n,-1),Fe=re[Ae]=ie[Ae](n),tn=new $i({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=W(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),_=y("span"),b=W(g),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),D=y("td"),O=W(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",q=E(),N=y("td"),j=W(R),V=E(),K=y("tr"),ee=y("td"),ee.textContent="URL",te=E(),G=y("td"),X=W(ce),le=E(),ye=y("tr"),Se=y("td"),Se.textContent="Referer",Ve=E(),ze=y("td"),Z.c(),we=E(),Me=y("tr"),Ze=y("td"),Ze.textContent="Remote IP",mt=E(),Ge=y("td"),ne=W(Ye),qe=E(),xe=y("tr"),en=y("td"),en.textContent="User IP",Ne=E(),Ce=y("td"),Et=W(tt),Rt=E(),Ht=y("tr"),Ln=y("td"),Ln.textContent="UserAgent",ti=E(),Sn=y("td"),Nn=W(ht),ds=E(),ni=y("tr"),Mi=y("td"),Mi.textContent="Meta",ps=E(),pi=y("td"),Fe.c(),Xe=E(),Ot=y("tr"),$n=y("td"),$n.textContent="Created",Fn=E(),Wi=y("td"),U(tn.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(_,"class","label"),x(_,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h(Se,"class","min-width txt-hint txt-bold"),h(Ze,"class","min-width txt-hint txt-bold"),h(en,"class","min-width txt-hint txt-bold"),h(Ln,"class","min-width txt-hint txt-bold"),h(Mi,"class","min-width txt-hint txt-bold"),h($n,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Le,Oe){S(Le,e,Oe),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,_),v(_,b),v(t,k),v(t,$),v($,T),v($,C),v($,D),v(D,O),v(t,I),v(t,L),v(L,F),v(L,q),v(L,N),v(N,j),v(t,V),v(t,K),v(K,ee),v(K,te),v(K,G),v(G,X),v(t,le),v(t,ye),v(ye,Se),v(ye,Ve),v(ye,ze),Z.m(ze,null),v(t,we),v(t,Me),v(Me,Ze),v(Me,mt),v(Me,Ge),v(Ge,ne),v(t,qe),v(t,xe),v(xe,en),v(xe,Ne),v(xe,Ce),v(Ce,Et),v(t,Rt),v(t,Ht),v(Ht,Ln),v(Ht,ti),v(Ht,Sn),v(Sn,Nn),v(t,ds),v(t,ni),v(ni,Mi),v(ni,ps),v(ni,pi),re[Ae].m(pi,null),v(t,Xe),v(t,Ot),v(Ot,$n),v(Ot,Fn),v(Ot,Wi),z(tn,Wi,null),fn=!0},p(Le,Oe){var Ue;(!fn||Oe&4)&&r!==(r=Le[2].id+"")&&oe(a,r),(!fn||Oe&4)&&g!==(g=Le[2].status+"")&&oe(b,g),(!fn||Oe&4)&&x(_,"label-danger",Le[2].status>=400),(!fn||Oe&4)&&M!==(M=((Ue=Le[2].method)==null?void 0:Ue.toUpperCase())+"")&&oe(O,M),(!fn||Oe&4)&&R!==(R=Le[2].auth+"")&&oe(j,R),(!fn||Oe&4)&&ce!==(ce=Le[2].url+"")&&oe(X,ce),Y===(Y=Fl(Le))&&Z?Z.p(Le,Oe):(Z.d(1),Z=Y(Le),Z&&(Z.c(),Z.m(ze,null))),(!fn||Oe&4)&&Ye!==(Ye=Le[2].remoteIp+"")&&oe(ne,Ye),(!fn||Oe&4)&&tt!==(tt=Le[2].userIp+"")&&oe(Et,tt),(!fn||Oe&4)&&ht!==(ht=Le[2].userAgent+"")&&oe(Nn,ht);let Ke=Ae;Ae=Te(Le,Oe),Ae===Ke?re[Ae].p(Le,Oe):(ae(),P(re[Ke],1,1,()=>{re[Ke]=null}),ue(),Fe=re[Ae],Fe?Fe.p(Le,Oe):(Fe=re[Ae]=ie[Ae](Le),Fe.c()),A(Fe,1),Fe.m(pi,null));const Re={};Oe&4&&(Re.date=Le[2].created),tn.$set(Re)},i(Le){fn||(A(Fe),A(tn.$$.fragment,Le),fn=!0)},o(Le){P(Fe),P(tn.$$.fragment,Le),fn=!1},d(Le){Le&&w(e),Z.d(),re[Ae].d(),B(tn)}}}function f$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function c$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function d$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[c$],header:[f$],default:[u$]},$$scope:{ctx:n}};return e=new hn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),B(e,s)}}}function p$(n,e,t){let i,s=new zr;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){se[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){me.call(this,n,d)}function f(d){me.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class m$ extends ve{constructor(e){super(),be(this,e,p$,d$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function h$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[1],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lc(n){let e,t;return e=new GS({props:{filter:n[4],presets:n[5]}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Nc(n){let e,t;return e=new h2({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function _$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$=n[3],T,C=n[3],D,M;r=new Fa({}),r.$on("refresh",n[9]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[h$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Yo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let O=Lc(n),I=Nc(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=W(n[6]),o=E(),U(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),U(p.$$.fragment),m=E(),U(_.$$.fragment),g=E(),b=y("div"),k=E(),O.c(),T=E(),I.c(),D=$e(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),z(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),z(p,d,null),v(e,m),z(_,e,null),v(e,g),v(e,b),v(e,k),O.m(e,null),S(L,T,F),I.m(L,F),S(L,D,F),M=!0},p(L,F){(!M||F&64)&&oe(l,L[6]);const q={};F&49154&&(q.$$scope={dirty:F,ctx:L}),p.$set(q);const N={};F&1&&(N.value=L[0]),_.$set(N),F&8&&_e($,$=L[3])?(ae(),P(O,1,1,Q),ue(),O=Lc(L),O.c(),A(O,1),O.m(e,null)):O.p(L,F),F&8&&_e(C,C=L[3])?(ae(),P(I,1,1,Q),ue(),I=Nc(L),I.c(),A(I,1),I.m(D.parentNode,D)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(_.$$.fragment,L),A(O),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(_.$$.fragment,L),P(O),P(I),M=!1},d(L){L&&w(e),B(r),B(p),B(_),O.d(L),L&&w(T),L&&w(D),I.d(L)}}}function g$(n){let e,t,i,s;e=new Pn({props:{$$slots:{default:[_$]},$$scope:{ctx:n}}});let l={};return i=new m$({props:l}),n[13](i),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(o,r){z(e,o,r),S(o,t,r),z(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){B(e,o),o&&w(t),n[13](null),B(i,o)}}}const Fc="includeAdminLogs";function b$(n,e,t){var k;let i,s,l;Je(n,Nt,$=>t(6,l=$));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];rn(Nt,l="Request logs",l);let r,a="",u=((k=window.localStorage)==null?void 0:k.getItem(Fc))<<0,f=1;function d(){t(3,f++,f)}const p=()=>d();function m(){u=this.checked,t(1,u)}const _=$=>t(0,a=$.detail),g=$=>r==null?void 0:r.show($==null?void 0:$.detail);function b($){se[$?"unshift":"push"](()=>{r=$,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Fc,u<<0),n.$$.dirty&1&&t(4,s=H.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,d,p,m,_,g,b]}class v$ extends ve{constructor(e){super(),be(this,e,b$,g$,_e,{})}}const ou=In({});function vn(n,e,t){ou.set({text:n,yesCallback:e,noCallback:t})}function ub(){ou.set({})}function Rc(n){let e,t,i;const s=n[17].default,l=wt(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&$t(l,s,o,o[16],i?St(s,o[16],r,null):Ct(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function y$(n){let e,t,i,s,l=n[0]&&Rc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container"),h(e,"tabindex","-1")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Rc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,Ee(s)}}}function k$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,_,g=!1;const b=Tt();function k(){t(0,o=!1),g=!1,clearTimeout(_)}function $(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(V){return!d||V.classList.contains(u)||(m==null?void 0:m.contains(V))&&!d.contains(V)||d.contains(V)&&V.closest&&V.closest("."+u)}function D(V){(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function M(V){(V.code==="Enter"||V.code==="Space")&&(!o||C(V.target))&&(V.preventDefault(),V.stopPropagation(),T())}function O(V){o&&r&&V.code==="Escape"&&(V.preventDefault(),k())}function I(V){o&&!(d!=null&&d.contains(V.target))?g=!0:g&&(g=!1)}function L(V){var K;o&&g&&!(d!=null&&d.contains(V.target))&&!(m!=null&&m.contains(V.target))&&!((K=V.target)!=null&&K.closest(".flatpickr-calendar"))&&k()}function F(V){I(V),L(V)}function q(V){N(),d==null||d.addEventListener("click",D),t(15,m=V||(d==null?void 0:d.parentNode)),m==null||m.addEventListener("click",D),m==null||m.addEventListener("keydown",M)}function N(){clearTimeout(_),d==null||d.removeEventListener("click",D),m==null||m.removeEventListener("click",D),m==null||m.removeEventListener("keydown",M)}xt(()=>(q(),()=>N()));function R(V){se[V?"unshift":"push"](()=>{p=V,t(3,p)})}function j(V){se[V?"unshift":"push"](()=>{d=V,t(2,d)})}return n.$$set=V=>{"trigger"in V&&t(8,l=V.trigger),"active"in V&&t(0,o=V.active),"escClose"in V&&t(9,r=V.escClose),"autoScroll"in V&&t(10,a=V.autoScroll),"closableClass"in V&&t(11,u=V.closableClass),"class"in V&&t(1,f=V.class),"$$scope"in V&&t(16,s=V.$$scope)},n.$$.update=()=>{var V,K;n.$$.dirty&260&&d&&q(l),n.$$.dirty&32769&&(o?((V=m==null?void 0:m.classList)==null||V.add("active"),b("show")):((K=m==null?void 0:m.classList)==null||K.remove("active"),b("hide")))},[o,f,d,p,O,I,L,F,l,r,a,u,k,$,T,m,s,i,R,j]}class Kn extends ve{constructor(e){super(),be(this,e,k$,y$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function qc(n,e,t){const i=n.slice();return i[27]=e[t],i}function w$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=W("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function S$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Lt(o,r(n)),se.push(()=>he(e,"value",l))),{c(){e&&U(e.$$.fragment),i=$e()},m(a,u){e&&z(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ke(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ae();const p=e;P(p.$$.fragment,1,0,()=>{B(p,1)}),ue()}o?(e=Lt(o,r(a)),se.push(()=>he(e,"value",l)),U(e.$$.fragment),A(e.$$.fragment,1),z(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&B(e,a)}}}function $$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function C$(n){let e,t,i,s;const l=[$$,S$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function jc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[C$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&jc(n);return{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),r&&r.c(),l=$e()},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=jc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function M$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=W(t),s=W(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&oe(i,t)},d(l){l&&w(e)}}}function Hc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function O$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,Ee(o)}}}function D$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[O$],header:[M$],default:[T$]},$$scope:{ctx:n}};for(let l=0;lte.name==V);ee?H.removeByValue(K.columns,ee):H.pushUnique(K.columns,{name:V}),t(2,p=H.buildIndex(K))}xt(async()=>{t(8,g=!0);try{t(7,_=(await rt(()=>import("./CodeEditor-d6b5e403.js"),["./CodeEditor-d6b5e403.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(V){console.warn(V)}t(8,g=!1)});const M=()=>T(),O=()=>k(),I=()=>C(),L=V=>{t(3,s.unique=V.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=H.buildIndex(s))};function F(V){p=V,t(2,p)}const q=V=>D(V);function N(V){se[V?"unshift":"push"](()=>{f=V,t(4,f)})}function R(V){me.call(this,n,V)}function j(V){me.call(this,n,V)}return n.$$set=V=>{e=je(je({},e),Jt(V)),t(14,r=Qe(e,o)),"collection"in V&&t(0,u=V.collection)},n.$$.update=()=>{var V,K,ee;n.$$.dirty[0]&1&&t(10,i=(((K=(V=u==null?void 0:u.schema)==null?void 0:V.filter(te=>!te.toDelete))==null?void 0:K.map(te=>te.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=H.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(te=>te.name))||[])},[u,k,p,s,f,d,m,_,g,l,i,T,C,D,r,b,M,O,I,L,F,q,N,R,j]}class A$ extends ve{constructor(e){super(),be(this,e,E$,D$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function zc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=H.parseIndex(i[10]);return i[11]=s,i}function Bc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Uc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(Wc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Bc();function d(){return n[4](n[10],n[13])}return{c(){var m,_;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=W(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var g,b;S(m,e,_),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[De(r=We.call(null,e,((b=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,_){var g,b,k,$,T;n=m,n[11].unique?f||(f=Bc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(Wc).join(", "))+"")&&oe(l,s),_&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&Vt(r.update)&&_&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,Ee(u)}}}function I$(n){var C,D,M;let e,t,i=(((D=(C=n[0])==null?void 0:C.indexes)==null?void 0:D.length)||0)+"",s,l,o,r,a,u,f,d,p,m,_,g,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let O=0;Ohe(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=W("Unique constraints and indexes ("),s=W(i),l=W(")"),o=E(),r=y("div");for(let O=0;O+ New index`,f=E(),U(d.$$.fragment),h(e,"class","section-title"),h(u,"type","button"),h(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),h(r,"class","indexes-list svelte-167lbwu")},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),S(O,o,I),S(O,r,I);for(let L=0;Lp=!1)),d.$set(L)},i(O){m||(A(d.$$.fragment,O),m=!0)},o(O){P(d.$$.fragment,O),m=!1},d(O){O&&w(e),O&&w(o),O&&w(r),pt(k,O),O&&w(f),n[6](null),B(d,O),_=!1,g()}}}const Wc=n=>n.name;function P$(n,e,t){let i;Je(n,Ci,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let g=0;gl==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function u(m){se[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const d=m=>{for(let _=0;_{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,d,p]}class L$ extends ve{constructor(e){super(),be(this,e,P$,I$,_e,{collection:0})}}function Yc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Kc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function d(...p){return n[5](n[6],...p)}return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),o=W(l),r=E(),h(t,"class","icon "+n[6].icon+" svelte-1p626x7"),h(s,"class","txt"),h(e,"tabindex","0"),h(e,"class","dropdown-item closable svelte-1p626x7")},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),v(s,o),v(e,r),a||(u=[J(e,"click",An(f)),J(e,"keydown",An(d))],a=!0)},p(p,m){n=p},d(p){p&&w(e),a=!1,Ee(u)}}}function N$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class q$ extends ve{constructor(e){super(),be(this,e,R$,F$,_e,{class:0})}}const j$=n=>({interactive:n&128,hasErrors:n&64}),Jc=n=>({interactive:n[7],hasErrors:n[6]}),V$=n=>({interactive:n&128,hasErrors:n&64}),Zc=n=>({interactive:n[7],hasErrors:n[6]}),H$=n=>({interactive:n&128,hasErrors:n&64}),Gc=n=>({interactive:n[7],hasErrors:n[6]}),z$=n=>({interactive:n&128,hasErrors:n&64}),Xc=n=>({interactive:n[7],hasErrors:n[6]});function Qc(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","drag-handle-wrapper"),h(e,"draggable","true"),h(e,"aria-label","Sort")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function xc(n){let e,t,i,s;return{c(){e=y("span"),h(e,"class","marker marker-required")},m(l,o){S(l,e,o),i||(s=De(t=We.call(null,e,n[5])),i=!0)},p(l,o){t&&Vt(t.update)&&o&32&&t.update.call(null,l[5])},d(l){l&&w(e),i=!1,s()}}}function B$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_=n[0].required&&xc(n);return{c(){e=y("div"),_&&_.c(),t=E(),i=y("div"),s=y("i"),o=E(),r=y("input"),h(e,"class","markers"),h(s,"class",l=H.getFieldTypeIcon(n[0].type)),h(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),x(i,"txt-disabled",!n[7]),h(r,"type","text"),r.required=!0,r.disabled=a=!n[7],r.readOnly=u=n[0].id&&n[0].system,h(r,"spellcheck","false"),r.autofocus=f=!n[0].id,h(r,"placeholder","Field name"),r.value=d=n[0].name},m(g,b){S(g,e,b),_&&_.m(e,null),S(g,t,b),S(g,i,b),v(i,s),S(g,o,b),S(g,r,b),n[15](r),n[0].id||r.focus(),p||(m=J(r,"input",n[16]),p=!0)},p(g,b){g[0].required?_?_.p(g,b):(_=xc(g),_.c(),_.m(e,null)):_&&(_.d(1),_=null),b&1&&l!==(l=H.getFieldTypeIcon(g[0].type))&&h(s,"class",l),b&128&&x(i,"txt-disabled",!g[7]),b&128&&a!==(a=!g[7])&&(r.disabled=a),b&1&&u!==(u=g[0].id&&g[0].system)&&(r.readOnly=u),b&1&&f!==(f=!g[0].id)&&(r.autofocus=f),b&1&&d!==(d=g[0].name)&&r.value!==d&&(r.value=d)},d(g){g&&w(e),_&&_.d(),g&&w(t),g&&w(i),g&&w(o),g&&w(r),n[15](null),p=!1,m()}}}function U$(n){let e,t,i;return{c(){e=y("button"),t=y("i"),h(t,"class","ri-settings-3-line"),h(e,"type","button"),h(e,"aria-label","Field options"),h(e,"class",i="btn btn-sm btn-circle btn-transparent options-trigger "+(n[6]?"btn-danger":"btn-hint"))},m(s,l){S(s,e,l),v(e,t),n[17](e)},p(s,l){l&64&&i!==(i="btn btn-sm btn-circle btn-transparent options-trigger "+(s[6]?"btn-danger":"btn-hint"))&&h(e,"class",i)},d(s){s&&w(e),n[17](null)}}}function W$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),h(e,"aria-label","Restore")},m(s,l){S(s,e,l),t||(i=[De(We.call(null,e,"Restore")),J(e,"click",n[10])],t=!0)},p:Q,d(s){s&&w(e),t=!1,Ee(i)}}}function ed(n){let e,t;return e=new Kn({props:{class:"dropdown dropdown-block schema-field-dropdown",trigger:n[3],$$slots:{default:[J$]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.trigger=i[3]),s&8388833&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function Y$(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),o=W(n[5]),r=E(),a=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(a,"class","ri-information-line link-hint"),h(s,"for",f=n[25])},m(m,_){S(m,e,_),e.checked=n[0].required,S(m,i,_),S(m,s,_),v(s,l),v(l,o),v(s,r),v(s,a),d||(p=[J(e,"change",n[18]),De(u=We.call(null,a,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(n[0])}.`,position:"right"}))],d=!0)},p(m,_){_&33554432&&t!==(t=m[25])&&h(e,"id",t),_&1&&(e.checked=m[0].required),_&32&&oe(o,m[5]),u&&Vt(u.update)&&_&1&&u.update.call(null,{text:`Requires the field value NOT to be ${H.zeroDefaultStr(m[0])}.`,position:"right"}),_&33554432&&f!==(f=m[25])&&h(s,"for",f)},d(m){m&&w(e),m&&w(i),m&&w(s),d=!1,Ee(p)}}}function td(n){let e,t,i,s,l,o,r,a,u;return a=new Kn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[K$]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=E(),s=y("div"),l=y("button"),o=y("i"),r=E(),U(a.$$.fragment),h(t,"class","flex-fill"),h(o,"class","ri-more-line"),h(l,"type","button"),h(l,"aria-label","More"),h(l,"class","btn btn-circle btn-sm btn-transparent"),h(s,"class","inline-flex flex-gap-sm flex-nowrap"),h(e,"class","col-sm-4 m-l-auto txt-right")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(s,l),v(l,o),v(l,r),z(a,l,null),u=!0},p(f,d){const p={};d&8388608&&(p.$$scope={dirty:d,ctx:f}),a.$set(p)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){P(a.$$.fragment,f),u=!1},d(f){f&&w(e),B(a)}}}function K$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Remove',h(e,"type","button"),h(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[9]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function J$(n){let e,t,i,s,l,o,r,a,u;const f=n[13].options,d=wt(f,n,n[23],Gc),p=n[13].beforeNonempty,m=wt(p,n,n[23],Zc);o=new de({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[Y$,({uniqueId:k})=>({25:k}),({uniqueId:k})=>k?33554432:0]},$$scope:{ctx:n}}});const _=n[13].afterNonempty,g=wt(_,n,n[23],Jc);let b=!n[0].toDelete&&td(n);return{c(){e=y("div"),t=y("div"),d&&d.c(),i=E(),m&&m.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),g&&g.c(),a=E(),b&&b.c(),h(t,"class","col-sm-12 hidden-empty"),h(l,"class","col-sm-4"),h(e,"class","grid grid-sm")},m(k,$){S(k,e,$),v(e,t),d&&d.m(t,null),v(e,i),m&&m.m(e,null),v(e,s),v(e,l),z(o,l,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0},p(k,$){d&&d.p&&(!u||$&8388800)&&$t(d,f,k,k[23],u?St(f,k[23],$,H$):Ct(k[23]),Gc),m&&m.p&&(!u||$&8388800)&&$t(m,p,k,k[23],u?St(p,k[23],$,V$):Ct(k[23]),Zc);const T={};$&41943073&&(T.$$scope={dirty:$,ctx:k}),o.$set(T),g&&g.p&&(!u||$&8388800)&&$t(g,_,k,k[23],u?St(_,k[23],$,j$):Ct(k[23]),Jc),k[0].toDelete?b&&(ae(),P(b,1,1,()=>{b=null}),ue()):b?(b.p(k,$),$&1&&A(b,1)):(b=td(k),b.c(),A(b,1),b.m(e,null))},i(k){u||(A(d,k),A(m,k),A(o.$$.fragment,k),A(g,k),A(b),u=!0)},o(k){P(d,k),P(m,k),P(o.$$.fragment,k),P(g,k),P(b),u=!1},d(k){k&&w(e),d&&d.d(k),m&&m.d(k),B(o),g&&g.d(k),b&&b.d()}}}function Z$(n){let e,t,i,s,l,o,r,a,u,f,d,p=n[7]&&Qc();s=new de({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[B$]},$$scope:{ctx:n}}});const m=n[13].default,_=wt(m,n,n[23],Xc);function g(T,C){if(T[0].toDelete)return W$;if(T[7])return U$}let b=g(n),k=b&&b(n),$=n[7]&&ed(n);return{c(){e=y("div"),t=y("div"),p&&p.c(),i=E(),U(s.$$.fragment),l=E(),_&&_.c(),o=E(),k&&k.c(),r=E(),$&&$.c(),h(t,"class","schema-field-header"),h(e,"draggable",!0),h(e,"class","schema-field"),x(e,"drag-over",n[4])},m(T,C){S(T,e,C),v(e,t),p&&p.m(t,null),v(t,i),z(s,t,null),v(t,l),_&&_.m(t,null),v(t,o),k&&k.m(t,null),v(e,r),$&&$.m(e,null),u=!0,f||(d=[J(e,"dragstart",n[19]),J(e,"dragenter",n[20]),J(e,"drop",at(n[21])),J(e,"dragleave",n[22]),J(e,"dragover",at(n[14]))],f=!0)},p(T,[C]){T[7]?p||(p=Qc(),p.c(),p.m(t,i)):p&&(p.d(1),p=null);const D={};C&128&&(D.class="form-field required m-0 "+(T[7]?"":"disabled")),C&2&&(D.name="schema."+T[1]+".name"),C&8388773&&(D.$$scope={dirty:C,ctx:T}),s.$set(D),_&&_.p&&(!u||C&8388800)&&$t(_,m,T,T[23],u?St(m,T[23],C,z$):Ct(T[23]),Xc),b===(b=g(T))&&k?k.p(T,C):(k&&k.d(1),k=b&&b(T),k&&(k.c(),k.m(t,null))),T[7]?$?($.p(T,C),C&128&&A($,1)):($=ed(T),$.c(),A($,1),$.m(e,null)):$&&(ae(),P($,1,1,()=>{$=null}),ue()),(!u||C&16)&&x(e,"drag-over",T[4])},i(T){u||(A(s.$$.fragment,T),A(_,T),A($),T&&nt(()=>{u&&(a||(a=He(e,yt,{duration:150},!0)),a.run(1))}),u=!0)},o(T){P(s.$$.fragment,T),P(_,T),P($),T&&(a||(a=He(e,yt,{duration:150},!1)),a.run(0)),u=!1},d(T){T&&w(e),p&&p.d(),B(s),_&&_.d(T),k&&k.d(),$&&$.d(),T&&a&&a.end(),f=!1,Ee(d)}}}function G$(n,e,t){let i,s,l,o;Je(n,Ci,N=>t(12,o=N));let{$$slots:r={},$$scope:a}=e,{key:u=""}=e,{field:f=new wn}=e,d,p,m=!1;const _=Tt(),g={bool:"Nonfalsey",number:"Nonzero"};function b(){f.id?t(0,f.toDelete=!0,f):_("remove")}function k(){t(0,f.toDelete=!1,f),un({})}function $(N){return H.slugify(N)}xt(()=>{f.onMountSelect&&(t(0,f.onMountSelect=!1,f),d==null||d.select())});function T(N){me.call(this,n,N)}function C(N){se[N?"unshift":"push"](()=>{d=N,t(2,d)})}const D=N=>{const R=f.name;t(0,f.name=$(N.target.value),f),N.target.value=f.name,_("rename",{oldName:R,newName:f.name})};function M(N){se[N?"unshift":"push"](()=>{p=N,t(3,p)})}function O(){f.required=this.checked,t(0,f)}const I=N=>{if(!N.target.classList.contains("drag-handle-wrapper")){N.preventDefault();return}const R=document.createElement("div");N.dataTransfer.setDragImage(R,0,0),i&&_("dragstart",N)},L=N=>{i&&(t(4,m=!0),_("dragenter",N))},F=N=>{i&&(t(4,m=!1),_("drop",N))},q=N=>{i&&(t(4,m=!1),_("dragleave",N))};return n.$$set=N=>{"key"in N&&t(1,u=N.key),"field"in N&&t(0,f=N.field),"$$scope"in N&&t(23,a=N.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&f.toDelete&&f.originalName&&f.name!==f.originalName&&t(0,f.name=f.originalName,f),n.$$.dirty&1&&!f.originalName&&f.name&&t(0,f.originalName=f.name,f),n.$$.dirty&1&&typeof f.toDelete>"u"&&t(0,f.toDelete=!1,f),n.$$.dirty&1&&f.required&&t(0,f.nullable=!1,f),n.$$.dirty&1&&t(7,i=!f.toDelete&&!(f.id&&f.system)),n.$$.dirty&4098&&t(6,s=!H.isEmpty(H.getNestedVal(o,`schema.${u}`))),n.$$.dirty&1&&t(5,l=g[f==null?void 0:f.type]||"Nonempty")},[f,u,d,p,m,l,s,i,_,b,k,$,o,r,T,C,D,M,O,I,L,F,q,a]}class di extends ve{constructor(e){super(),be(this,e,G$,Z$,_e,{key:1,field:0})}}function X$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min","0")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},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=y("label"),t=W("Max length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min",r=n[0].options.min||0)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&8192&&i!==(i=f[13])&&h(e,"for",i),d&8192&&o!==(o=f[13])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min||0)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function x$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Regex pattern"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","text"),h(l,"id",o=n[13]),h(l,"placeholder","Valid Go regular expression, eg. ^w+$")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&&l.value!==u[0].options.pattern&&fe(l,u[0].options.pattern)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function eC(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[X$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[Q$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[x$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),h(t,"class","col-sm-3"),h(l,"class","col-sm-3"),h(a,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(d,p){S(d,e,p),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),f=!0},p(d,p){const m={};p&2&&(m.name="schema."+d[1]+".options.min"),p&24577&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const _={};p&2&&(_.name="schema."+d[1]+".options.max"),p&24577&&(_.$$scope={dirty:p,ctx:d}),o.$set(_);const g={};p&2&&(g.name="schema."+d[1]+".options.pattern"),p&24577&&(g.$$scope={dirty:p,ctx:d}),u.$set(g)},i(d){f||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),f=!1},d(d){d&&w(e),B(i),B(o),B(u)}}}function tC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[eC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("drop",n[9]),e.$on("dragstart",n[10]),e.$on("dragenter",n[11]),e.$on("dragleave",n[12]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};a&16387&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function nC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(k){l=k,t(0,l)}function d(k){me.call(this,n,k)}function p(k){me.call(this,n,k)}function m(k){me.call(this,n,k)}function _(k){me.call(this,n,k)}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}return n.$$set=k=>{e=je(je({},e),Jt(k)),t(2,s=Qe(e,i)),"field"in k&&t(0,l=k.field),"key"in k&&t(1,o=k.key)},[l,o,s,r,a,u,f,d,p,m,_,g,b]}class iC extends ve{constructor(e){super(),be(this,e,nC,tC,_e,{field:0,key:1})}}function sC(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Min"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&fe(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function lC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=W("Max"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),h(l,"min",r=n[0].options.min)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),fe(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&4096&&i!==(i=f[12])&&h(e,"for",i),d&4096&&o!==(o=f[12])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&fe(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function oC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[sC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[lC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function rC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[oC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function aC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Jt(b)),t(2,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class uC extends ve{constructor(e){super(),be(this,e,aC,rC,_e,{field:0,key:1})}}function fC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function cC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Jt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class dC extends ve{constructor(e){super(),be(this,e,cC,fC,_e,{field:0,key:1})}}function pC(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=H.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=je(je({},e),Jt(u)),t(3,l=Qe(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 Vs extends ve{constructor(e){super(),be(this,e,mC,pC,_e,{value:0,separator:1})}}function hC(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[3](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(g.value=n[0].options.exceptDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`List of domains that are NOT allowed. This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.onlyDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function _C(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[4](b)}let g={id:n[12]+".options.onlyDomains",disabled:!H.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(g.value=n[0].options.onlyDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]+".options.onlyDomains"),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`List of domains that are ONLY allowed. This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]+".options.onlyDomains"))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]+".options.onlyDomains"),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function gC(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[hC,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[_C,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.onlyDomains"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),B(i),B(o)}}}function bC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[gC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function vC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(b){n.$$.not_equal(l.options.exceptDomains,b)&&(l.options.exceptDomains=b,t(0,l))}function a(b){n.$$.not_equal(l.options.onlyDomains,b)&&(l.options.onlyDomains=b,t(0,l))}function u(b){l=b,t(0,l)}function f(b){me.call(this,n,b)}function d(b){me.call(this,n,b)}function p(b){me.call(this,n,b)}function m(b){me.call(this,n,b)}function _(b){me.call(this,n,b)}function g(b){me.call(this,n,b)}return n.$$set=b=>{e=je(je({},e),Jt(b)),t(2,s=Qe(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class fb extends ve{constructor(e){super(),be(this,e,vC,bC,_e,{field:0,key:1})}}function yC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function kC(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Jt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class wC extends ve{constructor(e){super(),be(this,e,kC,yC,_e,{field:0,key:1})}}function SC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){U(e.$$.fragment)},m(r,a){z(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Zt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ke(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){B(e,r)}}}function $C(n,e,t){const i=["field","key"];let s=Qe(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){me.call(this,n,_)}function u(_){me.call(this,n,_)}function f(_){me.call(this,n,_)}function d(_){me.call(this,n,_)}function p(_){me.call(this,n,_)}function m(_){me.call(this,n,_)}return n.$$set=_=>{e=je(je({},e),Jt(_)),t(2,s=Qe(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class CC extends ve{constructor(e){super(),be(this,e,$C,SC,_e,{field:0,key:1})}}var Mr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ts={_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},kl={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},_n=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function nd(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Or=function(n){return n instanceof Array?n:[n]};function cn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(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 cb(n,e){if(e(n))return n;if(n.parentNode)return cb(n.parentNode,e)}function so(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("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 Tn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Dr=function(){},No=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},TC={D:Dr,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*Vn(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:Dr,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:Dr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ts={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})"},cl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[cl.w(n,e,t)]},F:function(n,e,t){return No(cl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return _n(cl.h(n,e,t))},H:function(n){return _n(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[Vn(n.getHours()>11)]},M:function(n,e){return No(n.getMonth(),!0,e)},S:function(n){return _n(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return _n(n.getFullYear(),4)},d:function(n){return _n(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return _n(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return _n(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)}},db=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl: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(d,p,m){return cl[d]&&m[p-1]!=="\\"?cl[d](r,f,t):d!=="\\"?d:""}).join("")}},ha=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?kl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,d=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 p=o||(t||Ts).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,p);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var _=void 0,g=[],b=0,k=0,$="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Ar(t.config);Z.setHours(ie.hours,ie.minutes,ie.seconds,Z.getMilliseconds()),t.selectedDates=[Z],t.latestSelectedDateObj=Z}Y!==void 0&&Y.type!=="blur"&&Fl(Y);var re=t._input.value;d(),tn(),t._input.value!==re&&t._debouncedChange()}function u(Y,Z){return Y%12+12*Vn(Z===t.l10n.amPM[1])}function f(Y){switch(Y%24){case 0:case 12:return 12;default:return Y%12}}function d(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Y=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,Z=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Y=u(Y,t.amPM.textContent));var re=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Mn(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 Pe=Er(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Le=Er(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Oe=Er(Y,Z,ie);if(Oe>Le&&Oe=12)]),t.secondElement!==void 0&&(t.secondElement.value=_n(ie)))}function _(Y){var Z=Tn(Y),ie=parseInt(Z.value)+(Y.delta||0);(ie/1e3>1||Y.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&we(ie)}function g(Y,Z,ie,re){if(Z instanceof Array)return Z.forEach(function(Te){return g(Y,Te,ie,re)});if(Y instanceof Array)return Y.forEach(function(Te){return g(Te,Z,ie,re)});Y.addEventListener(Z,ie,re),t._handlers.push({remove:function(){return Y.removeEventListener(Z,ie,re)}})}function b(){Fe("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(re){return g(re,"click",t[ie])})}),t.isMobile){ge();return}var Y=nd(ne,50);if(t._debouncedChange=nd(b,EC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&Ye(Tn(ie))}),g(t._input,"keydown",Ge),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Ge),!t.config.inline&&!t.config.static&&g(window,"resize",Y),window.ontouchstart!==void 0?g(window.document,"touchstart",ze):g(window.document,"mousedown",ze),g(window.document,"focus",ze,{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",fn),g(t.monthNav,["keyup","increment"],_),g(t.daysContainer,"click",ti)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var Z=function(ie){return Tn(ie).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],Z),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&g(t._input,"blur",mt)}function $(Y,Z){var ie=Y!==void 0?t.parseDate(Y):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Y);var Te=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&&(!Te&&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 Pe=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Pe,t.element),Pe.appendChild(t.element),t.altInput&&Pe.appendChild(t.altInput),Pe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(Y,Z,ie,re){var Te=Me(Z,!0),Pe=ft("span",Y,Z.getDate().toString());return Pe.dateObj=Z,Pe.$i=re,Pe.setAttribute("aria-label",t.formatDate(Z,t.config.ariaDateFormat)),Y.indexOf("hidden")===-1&&Mn(Z,t.now)===0&&(t.todayDateElem=Pe,Pe.classList.add("today"),Pe.setAttribute("aria-current","date")),Te?(Pe.tabIndex=-1,Ot(Z)&&(Pe.classList.add("selected"),t.selectedDateElem=Pe,t.config.mode==="range"&&(cn(Pe,"startRange",t.selectedDates[0]&&Mn(Z,t.selectedDates[0],!0)===0),cn(Pe,"endRange",t.selectedDates[1]&&Mn(Z,t.selectedDates[1],!0)===0),Y==="nextMonthDay"&&Pe.classList.add("inRange")))):Pe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&$n(Z)&&!Ot(Z)&&Pe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Y!=="prevMonthDay"&&re%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(Z)+""),Fe("onDayCreate",Pe),Pe}function O(Y){Y.focus(),t.config.mode==="range"&&Ye(Y)}function I(Y){for(var Z=Y>0?0:t.config.showMonths-1,ie=Y>0?t.config.showMonths:-1,re=Z;re!=ie;re+=Y)for(var Te=t.daysContainer.children[re],Pe=Y>0?0:Te.children.length-1,Le=Y>0?Te.children.length:-1,Oe=Pe;Oe!=Le;Oe+=Y){var Ke=Te.children[Oe];if(Ke.className.indexOf("hidden")===-1&&Me(Ke.dateObj))return Ke}}function L(Y,Z){for(var ie=Y.className.indexOf("Month")===-1?Y.dateObj.getMonth():t.currentMonth,re=Z>0?t.config.showMonths:-1,Te=Z>0?1:-1,Pe=ie-t.currentMonth;Pe!=re;Pe+=Te)for(var Le=t.daysContainer.children[Pe],Oe=ie-t.currentMonth===Pe?Y.$i+Z:Z<0?Le.children.length-1:0,Ke=Le.children.length,Re=Oe;Re>=0&&Re0?Ke:-1);Re+=Te){var Ue=Le.children[Re];if(Ue.className.indexOf("hidden")===-1&&Me(Ue.dateObj)&&Math.abs(Y.$i-Re)>=Math.abs(Z))return O(Ue)}t.changeMonth(Te),F(I(Te),0)}function F(Y,Z){var ie=l(),re=Ze(ie||document.body),Te=Y!==void 0?Y:re?ie:t.selectedDateElem!==void 0&&Ze(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ze(t.todayDateElem)?t.todayDateElem:I(Z>0?1:-1);Te===void 0?t._input.focus():re?L(Te,Z):O(Te)}function q(Y,Z){for(var ie=(new Date(Y,Z,1).getDay()-t.l10n.firstDayOfWeek+7)%7,re=t.utils.getDaysInMonth((Z-1+12)%12,Y),Te=t.utils.getDaysInMonth(Z,Y),Pe=window.document.createDocumentFragment(),Le=t.config.showMonths>1,Oe=Le?"prevMonthDay hidden":"prevMonthDay",Ke=Le?"nextMonthDay hidden":"nextMonthDay",Re=re+1-ie,Ue=0;Re<=re;Re++,Ue++)Pe.appendChild(M("flatpickr-day "+Oe,new Date(Y,Z-1,Re),Re,Ue));for(Re=1;Re<=Te;Re++,Ue++)Pe.appendChild(M("flatpickr-day",new Date(Y,Z,Re),Re,Ue));for(var bt=Te+1;bt<=42-ie&&(t.config.showMonths===1||Ue%7!==0);bt++,Ue++)Pe.appendChild(M("flatpickr-day "+Ke,new Date(Y,Z+1,bt%Te),bt,Ue));var ii=ft("div","dayContainer");return ii.appendChild(Pe),ii}function N(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var Y=document.createDocumentFragment(),Z=0;Z1||t.config.monthSelectorType!=="dropdown")){var Y=function(re){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&ret.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var Z=0;Z<12;Z++)if(Y(Z)){var ie=ft("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,Z).getMonth().toString(),ie.textContent=No(Z,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===Z&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function j(){var Y=ft("div","flatpickr-month"),Z=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Le){var Oe=Tn(Le),Ke=parseInt(Oe.value,10);t.changeMonth(Ke-t.currentMonth),Fe("onMonthChange")}),R(),ie=t.monthsDropdownContainer);var re=so("cur-year",{tabindex:"-1"}),Te=re.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Pe=ft("div","flatpickr-current-month");return Pe.appendChild(ie),Pe.appendChild(re),Z.appendChild(Pe),Y.appendChild(Z),{container:Y,yearElement:Te,monthElement:ie}}function V(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Y=t.config.showMonths;Y--;){var Z=j();t.yearElements.push(Z.yearElement),t.monthElements.push(Z.monthElement),t.monthNav.appendChild(Z.container)}t.monthNav.appendChild(t.nextMonthNav)}function K(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,V(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Y){t.__hidePrevMonthArrow!==Y&&(cn(t.prevMonthNav,"flatpickr-disabled",Y),t.__hidePrevMonthArrow=Y)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Y){t.__hideNextMonthArrow!==Y&&(cn(t.nextMonthNav,"flatpickr-disabled",Y),t.__hideNextMonthArrow=Y)}}),t.currentYearElement=t.yearElements[0],Fn(),t.monthNav}function ee(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Y=Ar(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var Z=ft("span","flatpickr-time-separator",":"),ie=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var re=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=re.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Y.hours:f(Y.hours)),t.minuteElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Y.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(ie),t.timeContainer.appendChild(Z),t.timeContainer.appendChild(re),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=so("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Y.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(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[Vn((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 te(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var Y=t.config.showMonths;Y--;){var Z=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(Z)}return G(),t.weekdayContainer}function G(){if(t.weekdayContainer){var Y=t.l10n.firstDayOfWeek,Z=id(t.l10n.weekdays.shorthand);Y>0&&YD=!1)),C.$set(j)},i(N){if(!M){for(let R=0;RD.name===C)}function f(C){return i.findIndex(D=>D===C)}function d(C,D){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===D||!D||t(0,s.indexes=s.indexes.map(O=>H.replaceIndexColumn(O,C,D)),s)}function p(C,D){if(!C)return;C.dataTransfer.dropEffect="move";const M=parseInt(C.dataTransfer.getData("text/plain")),O=s.schema;Mo(C),g=C=>d(C.detail.oldName,C.detail.newName),b=(C,D)=>JT(D.detail,C),k=(C,D)=>p(D.detail,C),$=C=>r(C.detail);function T(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new kn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,f,d,p,m,_,g,b,k,$,T]}class GT extends ve{constructor(e){super(),be(this,e,ZT,KT,_e,{collection:0})}}const XT=n=>({isAdminOnly:n&512}),Ed=n=>({isAdminOnly:n[9]}),QT=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]}),xT=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]});function e4(n){let e,t;return e=new de({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[n4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function t4(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","txt-center")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function Pd(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` Set Admins only`,h(e,"type","button"),h(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Ld(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=`Unlock and set custom rule -
    `,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function n4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,d,p,m,_,g,b,k,$;const T=n[12].beforeLabel,C=wt(T,n,n[15],Id),D=n[12].afterLabel,M=wt(D,n,n[15],Ad);let O=!n[9]&&Pd(n);function I(j){n[14](j)}var L=n[7];function F(j){let V={id:j[18],baseCollection:j[1],disabled:j[9],placeholder:j[9]?"":j[5]};return j[0]!==void 0&&(V.value=j[0]),{props:V}}L&&(m=Lt(L,F(n)),n[13](m),se.push(()=>he(m,"value",I)));let q=n[9]&&Ld(n);const N=n[12].default,R=wt(N,n,n[15],Ed);return{c(){e=y("div"),t=y("label"),C&&C.c(),i=E(),s=y("span"),l=W(n[2]),o=E(),a=W(r),u=E(),M&&M.c(),f=E(),O&&O.c(),p=E(),m&&U(m.$$.fragment),g=E(),q&&q.c(),b=E(),k=y("div"),R&&R.c(),h(s,"class","txt"),x(s,"txt-hint",n[9]),h(t,"for",d=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(k,"class","help-block")},m(j,V){S(j,e,V),v(e,t),C&&C.m(t,null),v(t,i),v(t,s),v(s,l),v(s,o),v(s,a),v(t,u),M&&M.m(t,null),v(t,f),O&&O.m(t,null),v(e,p),m&&z(m,e,null),v(e,g),q&&q.m(e,null),S(j,b,V),S(j,k,V),R&&R.m(k,null),$=!0},p(j,V){C&&C.p&&(!$||V&33280)&&$t(C,T,j,j[15],$?St(T,j[15],V,xT):Ct(j[15]),Id),(!$||V&4)&&oe(l,j[2]),(!$||V&512)&&r!==(r=j[9]?"- Admins only":"")&&oe(a,r),(!$||V&512)&&x(s,"txt-hint",j[9]),M&&M.p&&(!$||V&33280)&&$t(M,D,j,j[15],$?St(D,j[15],V,QT):Ct(j[15]),Ad),j[9]?O&&(O.d(1),O=null):O?O.p(j,V):(O=Pd(j),O.c(),O.m(t,null)),(!$||V&262144&&d!==(d=j[18]))&&h(t,"for",d);const K={};if(V&262144&&(K.id=j[18]),V&2&&(K.baseCollection=j[1]),V&512&&(K.disabled=j[9]),V&544&&(K.placeholder=j[9]?"":j[5]),!_&&V&1&&(_=!0,K.value=j[0],ke(()=>_=!1)),V&128&&L!==(L=j[7])){if(m){ae();const ee=m;P(ee.$$.fragment,1,0,()=>{B(ee,1)}),ue()}L?(m=Lt(L,F(j)),j[13](m),se.push(()=>he(m,"value",I)),U(m.$$.fragment),A(m.$$.fragment,1),z(m,e,g)):m=null}else L&&m.$set(K);j[9]?q?(q.p(j,V),V&512&&A(q,1)):(q=Ld(j),q.c(),A(q,1),q.m(e,null)):q&&(ae(),P(q,1,1,()=>{q=null}),ue()),R&&R.p&&(!$||V&33280)&&$t(R,N,j,j[15],$?St(N,j[15],V,XT):Ct(j[15]),Ed)},i(j){$||(A(C,j),A(M,j),m&&A(m.$$.fragment,j),A(q),A(R,j),$=!0)},o(j){P(C,j),P(M,j),m&&P(m.$$.fragment,j),P(q),P(R,j),$=!1},d(j){j&&w(e),C&&C.d(j),M&&M.d(j),O&&O.d(),n[13](null),m&&B(m),q&&q.d(),j&&w(b),j&&w(k),R&&R.d(j)}}}function i4(n){let e,t,i,s;const l=[t4,e4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Nd;function s4(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,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,_=Nd,g=!1;b();async function b(){_||g||(t(8,g=!0),t(7,_=(await rt(()=>import("./FilterAutocompleteInput-5ad2deed.js"),["./FilterAutocompleteInput-5ad2deed.js","./index-c4d2d831.js"],import.meta.url)).default),Nd=_,t(8,g=!1))}async function k(){t(0,r=m||""),await an(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(D){se[D?"unshift":"push"](()=>{p=D,t(6,p)})}function C(D){r=D,t(0,r)}return n.$$set=D=>{"collection"in D&&t(1,o=D.collection),"rule"in D&&t(0,r=D.rule),"label"in D&&t(2,a=D.label),"formKey"in D&&t(3,u=D.formKey),"required"in D&&t(4,f=D.required),"placeholder"in D&&t(5,d=D.placeholder),"$$scope"in D&&t(15,l=D.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,_,g,i,k,$,s,T,C,l]}class Os extends ve{constructor(e){super(),be(this,e,s4,i4,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Fd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Rd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L=n[2],F=[];for(let q=0;q@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* +
    `,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:Q,i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function n4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,d,p,m,_,g,b,k,$;const T=n[12].beforeLabel,C=wt(T,n,n[15],Id),D=n[12].afterLabel,M=wt(D,n,n[15],Ad);let O=!n[9]&&Pd(n);function I(j){n[14](j)}var L=n[7];function F(j){let V={id:j[18],baseCollection:j[1],disabled:j[9],placeholder:j[9]?"":j[5]};return j[0]!==void 0&&(V.value=j[0]),{props:V}}L&&(m=Lt(L,F(n)),n[13](m),se.push(()=>he(m,"value",I)));let q=n[9]&&Ld(n);const N=n[12].default,R=wt(N,n,n[15],Ed);return{c(){e=y("div"),t=y("label"),C&&C.c(),i=E(),s=y("span"),l=W(n[2]),o=E(),a=W(r),u=E(),M&&M.c(),f=E(),O&&O.c(),p=E(),m&&U(m.$$.fragment),g=E(),q&&q.c(),b=E(),k=y("div"),R&&R.c(),h(s,"class","txt"),x(s,"txt-hint",n[9]),h(t,"for",d=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(k,"class","help-block")},m(j,V){S(j,e,V),v(e,t),C&&C.m(t,null),v(t,i),v(t,s),v(s,l),v(s,o),v(s,a),v(t,u),M&&M.m(t,null),v(t,f),O&&O.m(t,null),v(e,p),m&&z(m,e,null),v(e,g),q&&q.m(e,null),S(j,b,V),S(j,k,V),R&&R.m(k,null),$=!0},p(j,V){C&&C.p&&(!$||V&33280)&&$t(C,T,j,j[15],$?St(T,j[15],V,xT):Ct(j[15]),Id),(!$||V&4)&&oe(l,j[2]),(!$||V&512)&&r!==(r=j[9]?"- Admins only":"")&&oe(a,r),(!$||V&512)&&x(s,"txt-hint",j[9]),M&&M.p&&(!$||V&33280)&&$t(M,D,j,j[15],$?St(D,j[15],V,QT):Ct(j[15]),Ad),j[9]?O&&(O.d(1),O=null):O?O.p(j,V):(O=Pd(j),O.c(),O.m(t,null)),(!$||V&262144&&d!==(d=j[18]))&&h(t,"for",d);const K={};if(V&262144&&(K.id=j[18]),V&2&&(K.baseCollection=j[1]),V&512&&(K.disabled=j[9]),V&544&&(K.placeholder=j[9]?"":j[5]),!_&&V&1&&(_=!0,K.value=j[0],ke(()=>_=!1)),V&128&&L!==(L=j[7])){if(m){ae();const ee=m;P(ee.$$.fragment,1,0,()=>{B(ee,1)}),ue()}L?(m=Lt(L,F(j)),j[13](m),se.push(()=>he(m,"value",I)),U(m.$$.fragment),A(m.$$.fragment,1),z(m,e,g)):m=null}else L&&m.$set(K);j[9]?q?(q.p(j,V),V&512&&A(q,1)):(q=Ld(j),q.c(),A(q,1),q.m(e,null)):q&&(ae(),P(q,1,1,()=>{q=null}),ue()),R&&R.p&&(!$||V&33280)&&$t(R,N,j,j[15],$?St(N,j[15],V,XT):Ct(j[15]),Ed)},i(j){$||(A(C,j),A(M,j),m&&A(m.$$.fragment,j),A(q),A(R,j),$=!0)},o(j){P(C,j),P(M,j),m&&P(m.$$.fragment,j),P(q),P(R,j),$=!1},d(j){j&&w(e),C&&C.d(j),M&&M.d(j),O&&O.d(),n[13](null),m&&B(m),q&&q.d(),j&&w(b),j&&w(k),R&&R.d(j)}}}function i4(n){let e,t,i,s;const l=[t4,e4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=$e()},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):(ae(),P(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Nd;function s4(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,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,_=Nd,g=!1;b();async function b(){_||g||(t(8,g=!0),t(7,_=(await rt(()=>import("./FilterAutocompleteInput-2cb65e7c.js"),["./FilterAutocompleteInput-2cb65e7c.js","./index-c4d2d831.js"],import.meta.url)).default),Nd=_,t(8,g=!1))}async function k(){t(0,r=m||""),await an(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(D){se[D?"unshift":"push"](()=>{p=D,t(6,p)})}function C(D){r=D,t(0,r)}return n.$$set=D=>{"collection"in D&&t(1,o=D.collection),"rule"in D&&t(0,r=D.rule),"label"in D&&t(2,a=D.label),"formKey"in D&&t(3,u=D.formKey),"required"in D&&t(4,f=D.required),"placeholder"in D&&t(5,d=D.placeholder),"$$scope"in D&&t(15,l=D.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,_,g,i,k,$,s,T,C,l]}class Os extends ve{constructor(e){super(),be(this,e,s4,i4,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Fd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Rd(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L=n[2],F=[];for(let q=0;q@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* @request.query.* @request.data.* @request.auth.*`,m=E(),_=y("hr"),g=E(),b=y("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=E(),$=y("div"),$.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=E(),C=y("hr"),D=E(),M=y("p"),M.innerHTML=`Example rule: @@ -101,7 +101,7 @@ If your query doesn't have a suitable one, you can use the universal (ROW_NUMBER() OVER()) as id.
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,u=E(),g&&g.c(),f=$e(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=_(b),l===$?m[l].p(b,k):(ae(),P(m[$],1,1,()=>{m[$]=null}),ue(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=Bd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function p4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[d4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function m4(n,e,t){let i;Je(n,Ci,d=>t(4,i=d));let{collection:s=new kn}=e,l,o=!1,r=[];function a(d){var _;t(3,r=[]);const p=H.getNestedVal(d,"schema",null);if(H.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=H.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);H.removeByValue(m,"id"),H.removeByValue(m,"created"),H.removeByValue(m,"updated");for(let g in p)for(let b in p[g]){const k=p[g][b].message,$=m[g]||g;r.push(H.sentenize($+": "+k))}}xt(async()=>{t(2,o=!0);try{t(1,l=(await rt(()=>import("./CodeEditor-ed3b6d0c.js"),["./CodeEditor-ed3b6d0c.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Ri("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class h4 extends ve{constructor(e){super(),be(this,e,m4,p4,_e,{collection:0})}}const _4=n=>({active:n&1}),Wd=n=>({active:n[0]});function Yd(n){let e,t,i;const s=n[15].default,l=wt(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(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&16384)&&$t(l,s,o,o[14],i?St(s,o[14],r,null):Ct(o[14]),null)},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,yt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,yt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function g4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=wt(a,n,n[14],Wd);let f=n[0]&&Yd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",at(n[17])),J(t,"drop",at(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",at(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&$t(u,a,d,d[14],l?St(a,d[14],p,_4):Ct(d[14]),Wd),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Yd(d),f.c(),A(f,1),f.m(e,null)):f&&(ae(),P(f,1,1,()=>{f=null}),ue()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,Ee(r)}}}function b4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function _(){return!!f}function g(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const q of F)q.click()}}xt(()=>()=>clearTimeout(r));function T(F){me.call(this,n,F)}const C=()=>d&&k(),D=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),O=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){se[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,_,g,b,r,s,i,T,C,D,M,O,I,L]}class co extends ve{constructor(e){super(),be(this,e,b4,g4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function v4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function y4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[v4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function k4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function w4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function S4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?w4:k4}let u=a(n),f=u(n),d=n[3]&&Kd();return{c(){e=y("div"),e.innerHTML=` + MAX(balance) as maxBalance).`,u=E(),g&&g.c(),f=$e(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=_(b),l===$?m[l].p(b,k):(ae(),P(m[$],1,1,()=>{m[$]=null}),ue(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=Bd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function p4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[d4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function m4(n,e,t){let i;Je(n,Ci,d=>t(4,i=d));let{collection:s=new kn}=e,l,o=!1,r=[];function a(d){var _;t(3,r=[]);const p=H.getNestedVal(d,"schema",null);if(H.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=H.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);H.removeByValue(m,"id"),H.removeByValue(m,"created"),H.removeByValue(m,"updated");for(let g in p)for(let b in p[g]){const k=p[g][b].message,$=m[g]||g;r.push(H.sentenize($+": "+k))}}xt(async()=>{t(2,o=!0);try{t(1,l=(await rt(()=>import("./CodeEditor-d6b5e403.js"),["./CodeEditor-d6b5e403.js","./index-c4d2d831.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Ri("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class h4 extends ve{constructor(e){super(),be(this,e,m4,p4,_e,{collection:0})}}const _4=n=>({active:n&1}),Wd=n=>({active:n[0]});function Yd(n){let e,t,i;const s=n[15].default,l=wt(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(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&16384)&&$t(l,s,o,o[14],i?St(s,o[14],r,null):Ct(o[14]),null)},i(o){i||(A(l,o),o&&nt(()=>{i&&(t||(t=He(e,yt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=He(e,yt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function g4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=wt(a,n,n[14],Wd);let f=n[0]&&Yd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",at(n[17])),J(t,"drop",at(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",at(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&$t(u,a,d,d[14],l?St(a,d[14],p,_4):Ct(d[14]),Wd),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Yd(d),f.c(),A(f,1),f.m(e,null)):f&&(ae(),P(f,1,1,()=>{f=null}),ue()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,Ee(r)}}}function b4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=Tt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function _(){return!!f}function g(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const q of F)q.click()}}xt(()=>()=>clearTimeout(r));function T(F){me.call(this,n,F)}const C=()=>d&&k(),D=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),O=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){se[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,_,g,b,r,s,i,T,C,D,M,O,I,L]}class co extends ve{constructor(e){super(),be(this,e,b4,g4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function v4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function y4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[v4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function k4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function w4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function S4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?w4:k4}let u=a(n),f=u(n),d=n[3]&&Kd();return{c(){e=y("div"),e.innerHTML=` Username/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=$e(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[3]?d?m&8&&A(d,1):(d=Kd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function $4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(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),v(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Jd(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[C4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+(H.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[T4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),a=!0},p(u,f){const d={};f&1&&(d.class="form-field "+(H.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(H.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&nt(()=>{a&&(r||(r=He(e,yt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=He(e,yt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),B(i),B(o),u&&r&&r.end()}}}function C4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[7](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`Email domains that are NOT allowed to sign up. This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.onlyEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function T4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[8](b)}let g={id:n[12],disabled:!H.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Vs({props:g}),se.push(()=>he(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),U(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),z(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=De(We.call(null,s,{text:`Email domains that are ONLY allowed to sign up. This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!H.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyEmailDomains,ke(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),B(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function M4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[$4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Jd(n);return{c(){U(e.$$.fragment),t=E(),l&&l.c(),i=$e()},m(o,r){z(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&&A(l,1)):(l=Jd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){B(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function O4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function D4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Zd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function E4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowEmailAuth?D4:O4}let u=a(n),f=u(n),d=n[2]&&Zd();return{c(){e=y("div"),e.innerHTML=` @@ -114,7 +114,7 @@ Also note that some OAuth2 providers (like Twitter), don't return an email and t you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=$e(),h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),u&&u.m(s,null),S(d,r,p),f&&f.m(d,p),S(d,a,p)},p(d,p){d[6].length?u||(u=tp(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),d[8]?f?f.p(d,p):(f=np(d),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(d){d&&w(e),u&&u.d(),d&&w(r),f&&f.d(d),d&&w(a)}}}function z4(n){let e;return{c(){e=y("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function B4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Cancel',t=E(),i=y("button"),i.innerHTML='Confirm',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function U4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[B4],header:[z4],default:[H4]},$$scope:{ctx:n}};return e=new hn({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[13](null),B(e,s)}}}function W4(n,e,t){let i,s,l,o,r;const a=Tt();let u,f,d;async function p(C,D){t(1,f=C),t(2,d=D),await an(),i||s.length||l.length||o.length?u==null||u.show():_()}function m(){u==null||u.hide()}function _(){m(),a("confirm")}const g=()=>m(),b=()=>_();function k(C){se[C?"unshift":"push"](()=>{u=C,t(4,u)})}function $(C){me.call(this,n,C)}function T(C){me.call(this,n,C)}return n.$$.update=()=>{var C,D,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(7,s=((C=d==null?void 0:d.schema)==null?void 0:C.filter(O=>O.id&&!O.toDelete&&O.originalName!=O.name))||[]),n.$$.dirty&4&&t(6,l=((D=d==null?void 0:d.schema)==null?void 0:D.filter(O=>O.id&&O.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(O=>{var L,F,q;const I=(L=f==null?void 0:f.schema)==null?void 0:L.find(N=>N.id==O.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((q=O.options)==null?void 0:q.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(d!=null&&d.$isView)||i)},[m,f,d,i,u,o,l,s,r,_,p,g,b,k,$,T]}class Y4 extends ve{constructor(e){super(),be(this,e,W4,U4,_e,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function ap(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function K4(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new GT({props:l}),se.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function J4(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new h4({props:l}),se.push(()=>he(e,"collection",s)),{c(){U(e.$$.fragment)},m(o,r){z(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){B(e,o)}}}function up(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new u4({props:o}),se.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function fp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new V4({props:o}),se.push(()=>he(t,"collection",l)),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(r,a){S(r,e,a),z(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===Ls)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),B(t)}}}function Z4(n){let e,t,i,s,l,o,r;const a=[J4,K4],u=[];function f(m,_){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let d=n[3]===wl&&up(n),p=n[2].$isAuth&&fp(n);return{c(){e=y("div"),t=y("div"),s.c(),l=E(),d&&d.c(),o=E(),p&&p.c(),h(t,"class","tab-item"),x(t,"active",n[3]===Li),h(e,"class","tabs-content svelte-12y0yzb")},m(m,_){S(m,e,_),v(e,t),u[i].m(t,null),v(e,l),d&&d.m(e,null),v(e,o),p&&p.m(e,null),r=!0},p(m,_){let g=i;i=f(m),i===g?u[i].p(m,_):(ae(),P(u[g],1,1,()=>{u[g]=null}),ue(),s=u[i],s?s.p(m,_):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&x(t,"active",m[3]===Li),m[3]===wl?d?(d.p(m,_),_[0]&8&&A(d,1)):(d=up(m),d.c(),A(d,1),d.m(e,o)):d&&(ae(),P(d,1,1,()=>{d=null}),ue()),m[2].$isAuth?p?(p.p(m,_),_[0]&4&&A(p,1)):(p=fp(m),p.c(),A(p,1),p.m(e,null)):p&&(ae(),P(p,1,1,()=>{p=null}),ue())},i(m){r||(A(s),A(d),A(p),r=!0)},o(m){P(s),P(d),P(p),r=!1},d(m){m&&w(e),u[i].d(),d&&d.d(),p&&p.d()}}}function cp(n){let e,t,i,s,l,o,r;return o=new Kn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[G4]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),i=y("button"),s=y("i"),l=E(),U(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"aria-label","More"),h(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),v(i,s),v(i,l),z(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),B(o)}}}function G4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=` Duplicate`,t=E(),i=y("button"),i.innerHTML=` Delete`,h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",An(at(n[25])))],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Ee(l)}}}function dp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[X4]},$$scope:{ctx:n}}}),{c(){e=y("i"),t=E(),U(i.$$.fragment),h(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),z(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),B(i,l)}}}function pp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,d;function p(){return n[27](n[47])}return{c(){e=y("button"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" collection"),u=E(),h(t,"class",i=wi(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),h(l,"class","txt"),h(e,"type","button"),h(e,"class","dropdown-item closable"),x(e,"selected",n[47]==n[2].type)},m(m,_){S(m,e,_),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),v(e,u),f||(d=J(e,"click",p),f=!0)},p(m,_){n=m,_[0]&64&&i!==(i=wi(H.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&h(t,"class",i),_[0]&64&&o!==(o=n[48]+"")&&oe(r,o),_[0]&68&&x(e,"selected",n[47]==n[2].type)},d(m){m&&w(e),f=!1,d()}}}function X4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{q=null}),ue()),(!I||j[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(R[2].$isNew?"btn-outline":"btn-transparent")))&&h(p,"class",C),(!I||j[0]&4&&D!==(D=!R[2].$isNew))&&(p.disabled=D),R[2].system?N||(N=mp(),N.c(),N.m(O.parentNode,O)):N&&(N.d(1),N=null)},i(R){I||(A(q),I=!0)},o(R){P(q),I=!1},d(R){R&&w(e),R&&w(s),R&&w(l),R&&w(f),R&&w(d),q&&q.d(),R&&w(M),N&&N.d(R),R&&w(O),L=!1,F()}}}function hp(n){let e,t,i,s,l,o;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=De(t=We.call(null,e,n[11])),l=!0)},p(r,a){t&&Vt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&nt(()=>{s&&(i||(i=He(e,Wt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=He(e,Wt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function _p(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function gp(n){var a,u,f;let e,t,i,s=!H.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&&bp();return{c(){e=y("button"),t=y("span"),t.textContent="Options",i=E(),r&&r.c(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","tab-item"),x(e,"active",n[3]===Ls)},m(d,p){S(d,e,p),v(e,t),v(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(d,p){var m,_,g;p[0]&32&&(s=!H.isEmpty((m=d[5])==null?void 0:m.options)&&!((g=(_=d[5])==null?void 0:_.options)!=null&&g.manageRule)),s?r?p[0]&32&&A(r,1):(r=bp(),r.c(),A(r,1),r.m(e,null)):r&&(ae(),P(r,1,1,()=>{r=null}),ue()),p[0]&8&&x(e,"active",d[3]===Ls)},d(d){d&&w(e),r&&r.d(),l=!1,o()}}}function bp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function x4(n){var V,K,ee,te,G,ce,X,le;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,d,p,m,_=(V=n[2])!=null&&V.$isView?"Query":"Fields",g,b,k=!H.isEmpty(n[11]),$,T,C,D,M=!H.isEmpty((K=n[5])==null?void 0:K.listRule)||!H.isEmpty((ee=n[5])==null?void 0:ee.viewRule)||!H.isEmpty((te=n[5])==null?void 0:te.createRule)||!H.isEmpty((G=n[5])==null?void 0:G.updateRule)||!H.isEmpty((ce=n[5])==null?void 0:ce.deleteRule)||!H.isEmpty((le=(X=n[5])==null?void 0:X.options)==null?void 0:le.manageRule),O,I,L,F,q=!n[2].$isNew&&!n[2].system&&cp(n);r=new de({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[Q4,({uniqueId:ye})=>({46:ye}),({uniqueId:ye})=>[0,ye?32768:0]]},$$scope:{ctx:n}}});let N=k&&hp(n),R=M&&_p(),j=n[2].$isAuth&&gp(n);return{c(){e=y("h4"),i=W(t),s=E(),q&&q.c(),l=E(),o=y("form"),U(r.$$.fragment),a=E(),u=y("input"),f=E(),d=y("div"),p=y("button"),m=y("span"),g=W(_),b=E(),N&&N.c(),$=E(),T=y("button"),C=y("span"),C.textContent="API Rules",D=E(),R&&R.c(),O=E(),j&&j.c(),h(e,"class","upsert-panel-title svelte-12y0yzb"),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(m,"class","txt"),h(p,"type","button"),h(p,"class","tab-item"),x(p,"active",n[3]===Li),h(C,"class","txt"),h(T,"type","button"),h(T,"class","tab-item"),x(T,"active",n[3]===wl),h(d,"class","tabs-header stretched")},m(ye,Se){S(ye,e,Se),v(e,i),S(ye,s,Se),q&&q.m(ye,Se),S(ye,l,Se),S(ye,o,Se),z(r,o,null),v(o,a),v(o,u),S(ye,f,Se),S(ye,d,Se),v(d,p),v(p,m),v(m,g),v(p,b),N&&N.m(p,null),v(d,$),v(d,T),v(T,C),v(T,D),R&&R.m(T,null),v(d,O),j&&j.m(d,null),I=!0,L||(F=[J(o,"submit",at(n[28])),J(p,"click",n[29]),J(T,"click",n[30])],L=!0)},p(ye,Se){var ze,we,Me,Ze,mt,Ge,Ye,ne;(!I||Se[0]&4)&&t!==(t=ye[2].$isNew?"New collection":"Edit collection")&&oe(i,t),!ye[2].$isNew&&!ye[2].system?q?(q.p(ye,Se),Se[0]&4&&A(q,1)):(q=cp(ye),q.c(),A(q,1),q.m(l.parentNode,l)):q&&(ae(),P(q,1,1,()=>{q=null}),ue());const Ve={};Se[0]&8192&&(Ve.class="form-field collection-field-name required m-b-0 "+(ye[13]?"disabled":"")),Se[0]&8260|Se[1]&1081344&&(Ve.$$scope={dirty:Se,ctx:ye}),r.$set(Ve),(!I||Se[0]&4)&&_!==(_=(ze=ye[2])!=null&&ze.$isView?"Query":"Fields")&&oe(g,_),Se[0]&2048&&(k=!H.isEmpty(ye[11])),k?N?(N.p(ye,Se),Se[0]&2048&&A(N,1)):(N=hp(ye),N.c(),A(N,1),N.m(p,null)):N&&(ae(),P(N,1,1,()=>{N=null}),ue()),(!I||Se[0]&8)&&x(p,"active",ye[3]===Li),Se[0]&32&&(M=!H.isEmpty((we=ye[5])==null?void 0:we.listRule)||!H.isEmpty((Me=ye[5])==null?void 0:Me.viewRule)||!H.isEmpty((Ze=ye[5])==null?void 0:Ze.createRule)||!H.isEmpty((mt=ye[5])==null?void 0:mt.updateRule)||!H.isEmpty((Ge=ye[5])==null?void 0:Ge.deleteRule)||!H.isEmpty((ne=(Ye=ye[5])==null?void 0:Ye.options)==null?void 0:ne.manageRule)),M?R?Se[0]&32&&A(R,1):(R=_p(),R.c(),A(R,1),R.m(T,null)):R&&(ae(),P(R,1,1,()=>{R=null}),ue()),(!I||Se[0]&8)&&x(T,"active",ye[3]===wl),ye[2].$isAuth?j?j.p(ye,Se):(j=gp(ye),j.c(),j.m(d,null)):j&&(j.d(1),j=null)},i(ye){I||(A(q),A(r.$$.fragment,ye),A(N),A(R),I=!0)},o(ye){P(q),P(r.$$.fragment,ye),P(N),P(R),I=!1},d(ye){ye&&w(e),ye&&w(s),q&&q.d(ye),ye&&w(l),ye&&w(o),B(r),ye&&w(f),ye&&w(d),N&&N.d(),R&&R.d(),j&&j.d(),L=!1,Ee(F)}}}function eM(n){let e,t,i,s,l,o=n[2].$isNew?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=W(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[9],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],x(s,"btn-loading",n[9])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(d,p){p[0]&512&&(e.disabled=d[9]),p[0]&4&&o!==(o=d[2].$isNew?"Create":"Save changes")&&oe(r,o),p[0]&4608&&a!==(a=!d[12]||d[9])&&(s.disabled=a),p[0]&512&&x(s,"btn-loading",d[9])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function tM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[eM],header:[x4],default:[Z4]},$$scope:{ctx:n}};e=new hn({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new Y4({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[37](null),B(e,r),r&&w(t),n[40](null),B(i,r)}}}const Li="schema",wl="api_rules",Ls="options",nM="base",vp="auth",yp="view";function Ir(n){return JSON.stringify(n)}function iM(n,e,t){let i,s,l,o;Je(n,Ci,ne=>t(5,o=ne));const r={};r[nM]="Base",r[yp]="View",r[vp]="Auth";const a=Tt();let u,f,d=null,p=new kn,m=!1,_=!1,g=Li,b=Ir(p),k="";function $(ne){t(3,g=ne)}function T(ne){return D(ne),t(10,_=!0),$(Li),u==null?void 0:u.show()}function C(){return u==null?void 0:u.hide()}async function D(ne){un({}),typeof ne<"u"?(t(20,d=ne),t(2,p=ne.$clone())):(t(20,d=null),t(2,p=new kn)),t(2,p.schema=p.schema||[],p),t(2,p.originalName=p.name||"",p),await an(),t(21,b=Ir(p))}function M(){p.$isNew?O():f==null||f.show(d,p)}function O(){if(m)return;t(9,m=!0);const ne=I();let qe;p.$isNew?qe=pe.collections.create(ne):qe=pe.collections.update(p.id,ne),qe.then(xe=>{Ia(),gy(xe),t(10,_=!1),C(),Qt(p.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:p.$isNew,collection:xe})}).catch(xe=>{pe.errorResponseHandler(xe)}).finally(()=>{t(9,m=!1)})}function I(){const ne=p.$export();ne.schema=ne.schema.slice(0);for(let qe=ne.schema.length-1;qe>=0;qe--)ne.schema[qe].toDelete&&ne.schema.splice(qe,1);return ne}function L(){d!=null&&d.id&&vn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>pe.collections.delete(d==null?void 0:d.id).then(()=>{C(),Qt(`Successfully deleted collection "${d==null?void 0:d.name}".`),a("delete",d),by(d)}).catch(ne=>{pe.errorResponseHandler(ne)}))}function F(ne){t(2,p.type=ne,p),Ri("schema")}function q(){s?vn("You have unsaved changes. Do you really want to discard them?",()=>{N()}):N()}async function N(){const ne=d==null?void 0:d.$clone();if(ne){if(ne.id="",ne.created="",ne.updated="",ne.name+="_duplicate",!H.isEmpty(ne.schema))for(const qe of ne.schema)qe.id="";if(!H.isEmpty(ne.indexes))for(let qe=0;qeC(),j=()=>M(),V=()=>q(),K=()=>L(),ee=ne=>{t(2,p.name=H.slugify(ne.target.value),p),ne.target.value=p.name},te=ne=>F(ne),G=()=>{l&&M()},ce=()=>$(Li),X=()=>$(wl),le=()=>$(Ls);function ye(ne){p=ne,t(2,p),t(20,d)}function Se(ne){p=ne,t(2,p),t(20,d)}function Ve(ne){p=ne,t(2,p),t(20,d)}function ze(ne){p=ne,t(2,p),t(20,d)}const we=()=>s&&_?(vn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),C()}),!1):!0;function Me(ne){se[ne?"unshift":"push"](()=>{u=ne,t(7,u)})}function Ze(ne){me.call(this,n,ne)}function mt(ne){me.call(this,n,ne)}function Ge(ne){se[ne?"unshift":"push"](()=>{f=ne,t(8,f)})}const Ye=()=>O();return n.$$.update=()=>{var ne,qe;n.$$.dirty[0]&32&&(o.schema||(ne=o.options)!=null&&ne.query?t(11,k=H.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&p.type===yp&&(t(2,p.createRule=null,p),t(2,p.updateRule=null,p),t(2,p.deleteRule=null,p),t(2,p.indexes=[],p)),n.$$.dirty[0]&1048580&&p!=null&&p.name&&(d==null?void 0:d.name)!=(p==null?void 0:p.name)&&t(2,p.indexes=(qe=p.indexes)==null?void 0:qe.map(xe=>H.replaceIndexTableName(xe,p.name)),p),n.$$.dirty[0]&4&&t(13,i=!p.$isNew&&p.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Ir(p)),n.$$.dirty[0]&20&&t(12,l=p.$isNew||s),n.$$.dirty[0]&12&&g===Ls&&p.type!==vp&&$(Li)},[$,C,p,g,s,o,r,u,f,m,_,k,l,i,M,O,L,F,q,T,d,b,R,j,V,K,ee,te,G,ce,X,le,ye,Se,Ve,ze,we,Me,Ze,mt,Ge,Ye]}class uu extends ve{constructor(e){super(),be(this,e,iM,tM,_e,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function kp(n,e,t){const i=n.slice();return i[15]=e[t],i}function wp(n){let e,t=n[1].length&&Sp();return{c(){t&&t.c(),e=$e()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Sp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Sp(n){let e;return{c(){e=y("p"),e.textContent="No collections found.",h(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 $p(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,d,p;return{key:n,first:null,c(){var m;t=y("a"),i=y("i"),l=E(),o=y("span"),a=W(r),u=E(),h(i,"class",s=H.getCollectionTypeIcon(e[15].type)),h(o,"class","txt"),h(t,"href",f="/collections?collectionId="+e[15].id),h(t,"class","sidebar-list-item"),x(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,_){S(m,t,_),v(t,i),v(t,l),v(t,o),v(o,a),v(t,u),d||(p=De(dn.call(null,t)),d=!0)},p(m,_){var g;e=m,_&8&&s!==(s=H.getCollectionTypeIcon(e[15].type))&&h(i,"class",s),_&8&&r!==(r=e[15].name+"")&&oe(a,r),_&8&&f!==(f="/collections?collectionId="+e[15].id)&&h(t,"href",f),_&40&&x(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),d=!1,p()}}}function Cp(n){let e,t,i,s;return{c(){e=y("footer"),t=y("button"),t.innerHTML=` - New collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function sM(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[3];const D=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),fe(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let q=0;q20),L[7]?O&&(O.d(1),O=null):O?O.p(L,F):(O=Cp(L),O.c(),O.m(e,null));const q={};b.$set(q)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function oM(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,$=>t(5,o=$)),Je(n,ci,$=>t(9,r=$)),Je(n,yo,$=>t(6,a=$)),Je(n,Es,$=>t(7,u=$));let f,d="";function p($){rn(ui,o=$,o)}const m=()=>t(0,d="");function _(){d=this.value,t(0,d)}const g=()=>f==null?void 0:f.show();function b($){se[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&lM(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,_,g,b,k]}class rM extends ve{constructor(e){super(),be(this,e,oM,sM,_e,{})}}function Tp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Mp(n){n[18]=n[19].default}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Dp(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ep(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Dp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=$e(),d&&d.c(),s=E(),l=y("button"),r=W(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,_){S(m,t,_),d&&d.m(m,_),S(m,s,_),S(m,l,_),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Dp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),_&8&&o!==(o=e[15].label+"")&&oe(r,o),_&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Ap(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:fM,then:uM,catch:aM,value:19,blocks:[,,,]};return hu(t=n[15].component,s),{c(){e=$e(),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)&&hu(t,s)||zb(s,n,o)},i(l){i||(A(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 aM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function uM(n){Mp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){U(e.$$.fragment),t=E()},m(s,l){z(e,s,l),S(s,t,l),i=!0},p(s,l){Mp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){B(e,s),s&&w(t)}}}function fM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function Ip(n,e){let t,i,s,l=e[5]===e[14]&&Ap(e);return{key:n,first:null,c(){t=$e(),l&&l.c(),i=$e(),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&&A(l,1)):(l=Ap(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function cM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function pM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[dM],default:[cM]},$$scope:{ctx:n}};return e=new hn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),B(e,s)}}}function mM(n,e,t){const i={list:{label:"List/Search",component:rt(()=>import("./ListApiDocs-7984933b.js"),["./ListApiDocs-7984933b.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:rt(()=>import("./ViewApiDocs-e1f1acb4.js"),["./ViewApiDocs-e1f1acb4.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:rt(()=>import("./CreateApiDocs-6fd167db.js"),["./CreateApiDocs-6fd167db.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:rt(()=>import("./UpdateApiDocs-992b265a.js"),["./UpdateApiDocs-992b265a.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:rt(()=>import("./DeleteApiDocs-c0d2fce4.js"),["./DeleteApiDocs-c0d2fce4.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:rt(()=>import("./RealtimeApiDocs-eaba7ffc.js"),["./RealtimeApiDocs-eaba7ffc.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:rt(()=>import("./AuthWithPasswordDocs-6b6ca833.js"),["./AuthWithPasswordDocs-6b6ca833.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:rt(()=>import("./AuthWithOAuth2Docs-ea3b1fde.js"),["./AuthWithOAuth2Docs-ea3b1fde.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:rt(()=>import("./AuthRefreshDocs-4103ee7c.js"),["./AuthRefreshDocs-4103ee7c.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:rt(()=>import("./RequestVerificationDocs-d948a007.js"),["./RequestVerificationDocs-d948a007.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:rt(()=>import("./ConfirmVerificationDocs-d1d2a4dc.js"),["./ConfirmVerificationDocs-d1d2a4dc.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:rt(()=>import("./RequestPasswordResetDocs-16e43168.js"),["./RequestPasswordResetDocs-16e43168.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:rt(()=>import("./ConfirmPasswordResetDocs-0123ea90.js"),["./ConfirmPasswordResetDocs-0123ea90.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:rt(()=>import("./RequestEmailChangeDocs-2a33c31c.js"),["./RequestEmailChangeDocs-2a33c31c.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:rt(()=>import("./ConfirmEmailChangeDocs-727175b6.js"),["./ConfirmEmailChangeDocs-727175b6.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:rt(()=>import("./AuthMethodsDocs-45c570e8.js"),["./AuthMethodsDocs-45c570e8.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:rt(()=>import("./ListExternalAuthsDocs-368be48d.js"),["./ListExternalAuthsDocs-368be48d.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:rt(()=>import("./UnlinkExternalAuthDocs-86559302.js"),["./UnlinkExternalAuthDocs-86559302.js","./SdkTabs-579eff6e.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new kn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function _(k){se[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}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"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,_,g,b]}class hM extends ve{constructor(e){super(),be(this,e,mM,pM,_e,{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 _M(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","text"),h(r,"requried",a=!n[2]),h(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),h(r,"id",f=n[13])},m(m,_){S(m,e,_),v(e,t),v(e,i),v(e,s),S(m,o,_),S(m,r,_),fe(r,n[0].username),d||(p=J(r,"input",n[5]),d=!0)},p(m,_){_&8192&&l!==(l=m[13])&&h(e,"for",l),_&4&&a!==(a=!m[2])&&h(r,"requried",a),_&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&h(r,"placeholder",u),_&8192&&f!==(f=m[13])&&h(r,"id",f),_&1&&r.value!==m[0].username&&fe(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function gM(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,_,g,b,k,$,T;return{c(){var C;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=W("Public: "),p=W(d),_=E(),g=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[13]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(g,"type","email"),g.autofocus=n[2],h(g,"autocomplete","off"),h(g,"id",b=n[13]),g.required=k=(C=n[1].options)==null?void 0:C.requireEmail,h(g,"class","svelte-1751a4d")},m(C,D){S(C,e,D),v(e,t),v(e,i),v(e,s),S(C,o,D),S(C,r,D),v(r,a),v(a,u),v(u,f),v(u,p),S(C,_,D),S(C,g,D),fe(g,n[0].email),n[2]&&g.focus(),$||(T=[De(We.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(g,"input",n[7])],$=!0)},p(C,D){var M;D&8192&&l!==(l=C[13])&&h(e,"for",l),D&1&&d!==(d=C[0].emailVisibility?"On":"Off")&&oe(p,d),D&1&&m!==(m="btn btn-sm btn-transparent "+(C[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),D&4&&(g.autofocus=C[2]),D&8192&&b!==(b=C[13])&&h(g,"id",b),D&2&&k!==(k=(M=C[1].options)==null?void 0:M.requireEmail)&&(g.required=k),D&1&&g.value!==C[0].email&&fe(g,C[0].email)},d(C){C&&w(e),C&&w(o),C&&w(r),C&&w(_),C&&w(g),$=!1,Ee(T)}}}function Pp(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[bM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[3],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lp(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[vM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[3]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d&24577&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&24577&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&8)&&x(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{u&&(a||(a=He(e,yt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=He(e,yt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function vM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].password&&fe(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function yM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&fe(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function kM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",at(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function wM(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[_M,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[gM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Pp(n),g=(n[2]||n[3])&&Lp(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[kM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),_&&_.c(),u=E(),g&&g.c(),f=E(),d=y("div"),U(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),_&&_.m(a,null),v(a,u),g&&g.m(a,null),v(e,f),v(e,d),z(p,d,null),m=!0},p(k,[$]){var M;const T={};$&4&&(T.class="form-field "+(k[2]?"":"required")),$&24581&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&24583&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[2]?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(k,$),$&4&&A(_,1)):(_=Pp(k),_.c(),A(_,1),_.m(a,u)),k[2]||k[3]?g?(g.p(k,$),$&12&&A(g,1)):(g=Lp(k),g.c(),A(g,1),g.m(a,null)):g&&(ae(),P(g,1,1,()=>{g=null}),ue());const D={};$&24581&&(D.$$scope={dirty:$,ctx:k}),p.$set(D)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(_),A(g),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(_),P(g),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),B(i),B(o),_&&_.d(),g&&g.d(),B(p)}}}function SM(n,e,t){let{collection:i=new kn}=e,{record:s=new ki}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function d(){r=this.checked,t(3,r)}function p(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function _(){s.verified=this.checked,t(0,s),t(3,r)}const g=b=>{l||vn("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),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ri("password"),Ri("passwordConfirm")))},[s,i,l,r,o,a,u,f,d,p,m,_,g]}class $M extends ve{constructor(e){super(),be(this,e,SM,wM,_e,{collection:1,record:0,isNew:2})}}function CM(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,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}xt(()=>(u(),()=>clearTimeout(a)));function d(m){se[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Jt(m)),t(3,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class MM extends ve{constructor(e){super(),be(this,e,TM,CM,_e,{value:0,maxHeight:4})}}function OM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new MM({props:_}),se.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),z(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&oe(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!d&&b&1&&(d=!0,k.value=g[0],ke(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),B(f,g)}}}function DM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[OM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function EM(n,e,t){let{field:i=new wn}=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 AM extends ve{constructor(e){super(),be(this,e,EM,DM,_e,{field:1,value:0})}}function IM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",_=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),fe(f,n[0]),g||(b=J(f,"input",n[2]),g=!0)},p(k,$){var T,C;$&2&&i!==(i=H.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&oe(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&_!==(_=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",_),$&1&>(f.value)!==k[0]&&fe(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function PM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[IM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function LM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=gt(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 NM extends ve{constructor(e){super(),be(this,e,LM,PM,_e,{field:1,value:0})}}function FM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=W(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&oe(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function RM(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[FM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qM(n,e,t){let{field:i=new wn}=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 jM extends ve{constructor(e){super(),be(this,e,qM,RM,_e,{field:1,value:0})}}function VM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function HM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[VM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function zM(n,e,t){let{field:i=new wn}=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 BM extends ve{constructor(e){super(),be(this,e,zM,HM,_e,{field:1,value:0})}}function UM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function WM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[UM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function YM(n,e,t){let{field:i=new wn}=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 KM extends ve{constructor(e){super(),be(this,e,YM,WM,_e,{field:1,value:0})}}function Np(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[De(We.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function JM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b=n[0]&&!n[1].required&&Np(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new ru({props:T}),se.push(()=>he(p,"value",k)),se.push(()=>he(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" (UTC)"),f=E(),b&&b.c(),d=E(),U(p.$$.fragment),h(t,"class",i=wi(H.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,D){S(C,e,D),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,D),b&&b.m(C,D),S(C,d,D),z(p,C,D),g=!0},p(C,D){(!g||D&2&&i!==(i=wi(H.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!g||D&2)&&o!==(o=C[1].name+"")&&oe(r,o),(!g||D&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,D):(b=Np(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};D&256&&(M.id=C[8]),!m&&D&4&&(m=!0,M.value=C[2],ke(()=>m=!1)),!_&&D&1&&(_=!0,M.formattedValue=C[0],ke(()=>_=!1)),p.$set(M)},i(C){g||(A(p.$$.fragment,C),g=!0)},o(C){P(p.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),B(p,C)}}}function ZM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[JM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function GM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class XM extends ve{constructor(e){super(),be(this,e,GM,ZM,_e,{field:1,value:0})}}function Fp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=W("Select up to "),s=W(i),l=W(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&oe(s,i)},d(o){o&&w(e)}}}function QM(n){var $,T,C,D,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;function g(O){n[3](O)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((D=n[1].options)==null?void 0:D.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new au({props:b}),se.push(()=>he(f,"selected",g));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Fp(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),p=E(),k&&k.c(),m=$e(),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,I),z(f,O,I),S(O,p,I),k&&k.m(O,I),S(O,m,I),_=!0},p(O,I){var F,q,N,R,j;(!_||I&2&&i!==(i=H.getFieldTypeIcon(O[1].type)))&&h(t,"class",i),(!_||I&2)&&o!==(o=O[1].name+"")&&oe(r,o),(!_||I&16&&a!==(a=O[4]))&&h(e,"for",a);const L={};I&16&&(L.id=O[4]),I&6&&(L.toggle=!O[1].required||O[2]),I&4&&(L.multiple=O[2]),I&7&&(L.closable=!O[2]||((F=O[0])==null?void 0:F.length)>=((q=O[1].options)==null?void 0:q.maxSelect)),I&2&&(L.items=(N=O[1].options)==null?void 0:N.values),I&2&&(L.searchable=((R=O[1].options)==null?void 0:R.values)>5),!d&&I&1&&(d=!0,L.selected=O[0],ke(()=>d=!1)),f.$set(L),((j=O[1].options)==null?void 0:j.maxSelect)>1?k?k.p(O,I):(k=Fp(O),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(O){_||(A(f.$$.fragment,O),_=!0)},o(O){P(f.$$.fragment,O),_=!1},d(O){O&&w(e),O&&w(u),B(f,O),O&&w(p),k&&k.d(O),O&&w(m)}}}function xM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[QM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function e6(n,e,t){let i,{field:s=new wn}=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 t6 extends ve{constructor(e){super(),be(this,e,e6,xM,_e,{field:1,value:0})}}function n6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("textarea"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&16&&a!==(a=g[4])&&h(e,"for",a),b&16&&d!==(d=g[4])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function i6(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function s6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class l6 extends ve{constructor(e){super(),be(this,e,s6,i6,_e,{field:1,value:0})}}function o6(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function r6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!mn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function a6(n){let e;function t(l,o){return l[2]?r6:o6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function u6(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),H.hasImageExtension(s==null?void 0:s.name)&&H.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 f6 extends ve{constructor(e){super(),be(this,e,u6,a6,_e,{file:0,size:1})}}function Rp(n){let e;function t(l,o){return l[4]==="image"?d6:c6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 c6(n){let e,t;return{c(){e=y("object"),t=W("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function d6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!mn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function p6(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Rp(n);return{c(){i&&i.c(),t=$e()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Rp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function m6(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[0])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function h6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=W(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&oe(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function _6(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[h6],header:[m6],default:[p6]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function g6(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){se[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=H.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class b6 extends ve{constructor(e){super(),be(this,e,g6,_6,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function v6(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?S6:u[3]==="video"||u[3]==="audio"?w6:k6}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function y6(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function k6(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function w6(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function S6(n){let e,t,i,s,l;return{c(){e=y("img"),mn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!mn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function $6(n){let e,t,i;function s(a,u){return a[2]?y6:v6}let l=s(n),o=l(n),r={};return t=new b6({props:r}),n[12](t),{c(){o.c(),e=E(),U(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),z(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||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[12](null),B(t,a)}}}function C6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",d="",p=!1;m();async function m(){t(2,p=!0);try{t(10,d=await pe.getAdminFileToken(l.collectionId))}catch(k){console.warn("File token failure:",k)}t(2,p=!1)}function _(){t(5,u="")}const g=k=>{s&&(k.preventDefault(),a==null||a.show(f))};function b(k){se[k?"unshift":"push"](()=>{a=k,t(4,a)})}return n.$$set=k=>{"record"in k&&t(9,l=k.record),"filename"in k&&t(0,o=k.filename),"size"in k&&t(1,r=k.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=H.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=p?"":pe.files.getUrl(l,o,{token:d})),n.$$.dirty&1541&&t(5,u=p?"":pe.files.getUrl(l,o,{thumb:"100x100",token:d}))},[o,r,p,i,a,u,f,s,_,l,d,g,b]}class fu extends ve{constructor(e){super(),be(this,e,C6,$6,_e,{record:9,filename:0,size:1})}}function qp(n,e,t){const i=n.slice();return i[27]=e[t],i[29]=t,i}function jp(n,e,t){const i=n.slice();i[30]=e[t],i[29]=t;const s=i[1].includes(i[29]);return i[31]=s,i}function T6(n){let e,t,i;function s(){return n[17](n[29])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[De(We.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ee(i)}}}function M6(n){let e,t,i;function s(){return n[16](n[29])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Vp(n,e){let t,i,s,l,o,r,a=e[30]+"",u,f,d,p,m,_,g;s=new fu({props:{record:e[2],filename:e[30]}});function b(T,C){return C[0]&18&&(_=null),_==null&&(_=!!T[1].includes(T[29])),_?M6:T6}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=W(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[29])),h(r,"href",f=pe.files.getUrl(e[2],e[30],{token:e[9]})),h(r,"class",d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),g=!0},p(T,C){e=T;const D={};C[0]&4&&(D.record=e[2]),C[0]&16&&(D.filename=e[30]),s.$set(D),(!g||C[0]&18)&&x(i,"fade",e[1].includes(e[29])),(!g||C[0]&16)&&a!==(a=e[30]+"")&&oe(u,a),(!g||C[0]&532&&f!==(f=pe.files.getUrl(e[2],e[30],{token:e[9]})))&&h(r,"href",f),(!g||C[0]&18&&d!==(d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),B(s),$.d()}}}function Hp(n){let e,t,i,s,l,o,r,a,u=n[27].name+"",f,d,p,m,_,g,b;i=new f6({props:{file:n[27]}});function k(){return n[18](n[29])}return{c(){e=y("div"),t=y("figure"),U(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=W(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[27].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),_=!0,g||(b=[De(We.call(null,m,"Remove file")),J(m,"click",k)],g=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[27]),i.$set(C),(!_||T[0]&1)&&u!==(u=n[27].name+"")&&oe(f,u),(!_||T[0]&1&&d!==(d=n[27].name))&&h(l,"title",d)},i($){_||(A(i.$$.fragment,$),_=!0)},o($){P(i.$$.fragment,$),_=!1},d($){$&&w(e),B(i),g=!1,Ee(b)}}}function O6(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,_,g,b,k,$,T,C,D,M,O,I,L=n[4];const F=j=>j[30]+j[2].id;for(let j=0;jP(N[j],1,1,()=>{N[j]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("div");for(let j=0;jNew collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function sM(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[3];const D=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),fe(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let q=0;q20),L[7]?O&&(O.d(1),O=null):O?O.p(L,F):(O=Cp(L),O.c(),O.m(e,null));const q={};b.$set(q)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function oM(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,$=>t(5,o=$)),Je(n,ci,$=>t(9,r=$)),Je(n,yo,$=>t(6,a=$)),Je(n,Es,$=>t(7,u=$));let f,d="";function p($){rn(ui,o=$,o)}const m=()=>t(0,d="");function _(){d=this.value,t(0,d)}const g=()=>f==null?void 0:f.show();function b($){se[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&lM(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,_,g,b,k]}class rM extends ve{constructor(e){super(),be(this,e,oM,sM,_e,{})}}function Tp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Mp(n){n[18]=n[19].default}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Dp(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ep(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Dp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=$e(),d&&d.c(),s=E(),l=y("button"),r=W(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,_){S(m,t,_),d&&d.m(m,_),S(m,s,_),S(m,l,_),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Dp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),_&8&&o!==(o=e[15].label+"")&&oe(r,o),_&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Ap(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:fM,then:uM,catch:aM,value:19,blocks:[,,,]};return hu(t=n[15].component,s),{c(){e=$e(),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)&&hu(t,s)||zb(s,n,o)},i(l){i||(A(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 aM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function uM(n){Mp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){U(e.$$.fragment),t=E()},m(s,l){z(e,s,l),S(s,t,l),i=!0},p(s,l){Mp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){B(e,s),s&&w(t)}}}function fM(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function Ip(n,e){let t,i,s,l=e[5]===e[14]&&Ap(e);return{key:n,first:null,c(){t=$e(),l&&l.c(),i=$e(),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&&A(l,1)):(l=Ap(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),P(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function cM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function pM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[dM],default:[cM]},$$scope:{ctx:n}};return e=new hn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),B(e,s)}}}function mM(n,e,t){const i={list:{label:"List/Search",component:rt(()=>import("./ListApiDocs-cdbbc796.js"),["./ListApiDocs-cdbbc796.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:rt(()=>import("./ViewApiDocs-faa823f0.js"),["./ViewApiDocs-faa823f0.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:rt(()=>import("./CreateApiDocs-26edb809.js"),["./CreateApiDocs-26edb809.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:rt(()=>import("./UpdateApiDocs-46a3fb31.js"),["./UpdateApiDocs-46a3fb31.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:rt(()=>import("./DeleteApiDocs-d48d8ce5.js"),["./DeleteApiDocs-d48d8ce5.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:rt(()=>import("./RealtimeApiDocs-0f10005c.js"),["./RealtimeApiDocs-0f10005c.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:rt(()=>import("./AuthWithPasswordDocs-b477ad64.js"),["./AuthWithPasswordDocs-b477ad64.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:rt(()=>import("./AuthWithOAuth2Docs-7bef9a29.js"),["./AuthWithOAuth2Docs-7bef9a29.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:rt(()=>import("./AuthRefreshDocs-15565011.js"),["./AuthRefreshDocs-15565011.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:rt(()=>import("./RequestVerificationDocs-9ffa98c8.js"),["./RequestVerificationDocs-9ffa98c8.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:rt(()=>import("./ConfirmVerificationDocs-66d14bec.js"),["./ConfirmVerificationDocs-66d14bec.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:rt(()=>import("./RequestPasswordResetDocs-d38da1b2.js"),["./RequestPasswordResetDocs-d38da1b2.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:rt(()=>import("./ConfirmPasswordResetDocs-4f5db084.js"),["./ConfirmPasswordResetDocs-4f5db084.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:rt(()=>import("./RequestEmailChangeDocs-bffab216.js"),["./RequestEmailChangeDocs-bffab216.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:rt(()=>import("./ConfirmEmailChangeDocs-794546bd.js"),["./ConfirmEmailChangeDocs-794546bd.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:rt(()=>import("./AuthMethodsDocs-e361f3fc.js"),["./AuthMethodsDocs-e361f3fc.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:rt(()=>import("./ListExternalAuthsDocs-099b085b.js"),["./ListExternalAuthsDocs-099b085b.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:rt(()=>import("./UnlinkExternalAuthDocs-8dff2352.js"),["./UnlinkExternalAuthDocs-8dff2352.js","./SdkTabs-bef23fdf.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new kn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function _(k){se[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){me.call(this,n,k)}function b(k){me.call(this,n,k)}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"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,_,g,b]}class hM extends ve{constructor(e){super(),be(this,e,mM,pM,_e,{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 _M(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",H.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","text"),h(r,"requried",a=!n[2]),h(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),h(r,"id",f=n[13])},m(m,_){S(m,e,_),v(e,t),v(e,i),v(e,s),S(m,o,_),S(m,r,_),fe(r,n[0].username),d||(p=J(r,"input",n[5]),d=!0)},p(m,_){_&8192&&l!==(l=m[13])&&h(e,"for",l),_&4&&a!==(a=!m[2])&&h(r,"requried",a),_&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&h(r,"placeholder",u),_&8192&&f!==(f=m[13])&&h(r,"id",f),_&1&&r.value!==m[0].username&&fe(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function gM(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,_,g,b,k,$,T;return{c(){var C;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=W("Public: "),p=W(d),_=E(),g=y("input"),h(t,"class",H.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[13]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(g,"type","email"),g.autofocus=n[2],h(g,"autocomplete","off"),h(g,"id",b=n[13]),g.required=k=(C=n[1].options)==null?void 0:C.requireEmail,h(g,"class","svelte-1751a4d")},m(C,D){S(C,e,D),v(e,t),v(e,i),v(e,s),S(C,o,D),S(C,r,D),v(r,a),v(a,u),v(u,f),v(u,p),S(C,_,D),S(C,g,D),fe(g,n[0].email),n[2]&&g.focus(),$||(T=[De(We.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(g,"input",n[7])],$=!0)},p(C,D){var M;D&8192&&l!==(l=C[13])&&h(e,"for",l),D&1&&d!==(d=C[0].emailVisibility?"On":"Off")&&oe(p,d),D&1&&m!==(m="btn btn-sm btn-transparent "+(C[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),D&4&&(g.autofocus=C[2]),D&8192&&b!==(b=C[13])&&h(g,"id",b),D&2&&k!==(k=(M=C[1].options)==null?void 0:M.requireEmail)&&(g.required=k),D&1&&g.value!==C[0].email&&fe(g,C[0].email)},d(C){C&&w(e),C&&w(o),C&&w(r),C&&w(_),C&&w(g),$=!1,Ee(T)}}}function Pp(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[bM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function bM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[3],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Lp(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[vM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[yM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),U(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[3]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),z(s,i,null),v(t,l),v(t,o),z(r,o,null),u=!0},p(f,d){const p={};d&24577&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&24577&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&8)&&x(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&nt(()=>{u&&(a||(a=He(e,yt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=He(e,yt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),B(s),B(r),f&&a&&a.end()}}}function vM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].password&&fe(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function yM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[13]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[13]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),fe(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(d,p){p&8192&&l!==(l=d[13])&&h(e,"for",l),p&8192&&a!==(a=d[13])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&fe(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function kM(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[13]),h(s,"for",o=n[13])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",at(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function wM(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[_M,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[gM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Pp(n),g=(n[2]||n[3])&&Lp(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[kM,({uniqueId:k})=>({13:k}),({uniqueId:k})=>k?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),_&&_.c(),u=E(),g&&g.c(),f=E(),d=y("div"),U(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),_&&_.m(a,null),v(a,u),g&&g.m(a,null),v(e,f),v(e,d),z(p,d,null),m=!0},p(k,[$]){var M;const T={};$&4&&(T.class="form-field "+(k[2]?"":"required")),$&24581&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&24583&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[2]?_&&(ae(),P(_,1,1,()=>{_=null}),ue()):_?(_.p(k,$),$&4&&A(_,1)):(_=Pp(k),_.c(),A(_,1),_.m(a,u)),k[2]||k[3]?g?(g.p(k,$),$&12&&A(g,1)):(g=Lp(k),g.c(),A(g,1),g.m(a,null)):g&&(ae(),P(g,1,1,()=>{g=null}),ue());const D={};$&24581&&(D.$$scope={dirty:$,ctx:k}),p.$set(D)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(_),A(g),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(_),P(g),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),B(i),B(o),_&&_.d(),g&&g.d(),B(p)}}}function SM(n,e,t){let{collection:i=new kn}=e,{record:s=new ki}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function d(){r=this.checked,t(3,r)}function p(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function _(){s.verified=this.checked,t(0,s),t(3,r)}const g=b=>{l||vn("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),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ri("password"),Ri("passwordConfirm")))},[s,i,l,r,o,a,u,f,d,p,m,_,g]}class $M extends ve{constructor(e){super(),be(this,e,SM,wM,_e,{collection:1,record:0,isNew:2})}}function CM(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,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}xt(()=>(u(),()=>clearTimeout(a)));function d(m){se[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=je(je({},e),Jt(m)),t(3,s=Qe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class MM extends ve{constructor(e){super(),be(this,e,TM,CM,_e,{value:0,maxHeight:4})}}function OM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new MM({props:_}),se.push(()=>he(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),z(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=H.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&oe(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!d&&b&1&&(d=!0,k.value=g[0],ke(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),B(f,g)}}}function DM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[OM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function EM(n,e,t){let{field:i=new wn}=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 AM extends ve{constructor(e){super(),be(this,e,EM,DM,_e,{field:1,value:0})}}function IM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",_=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),fe(f,n[0]),g||(b=J(f,"input",n[2]),g=!0)},p(k,$){var T,C;$&2&&i!==(i=H.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&oe(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&_!==(_=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",_),$&1&>(f.value)!==k[0]&&fe(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function PM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[IM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function LM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e;function l(){s=gt(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 NM extends ve{constructor(e){super(),be(this,e,LM,PM,_e,{field:1,value:0})}}function FM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=W(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&oe(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function RM(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[FM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function qM(n,e,t){let{field:i=new wn}=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 jM extends ve{constructor(e){super(),be(this,e,qM,RM,_e,{field:1,value:0})}}function VM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function HM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[VM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function zM(n,e,t){let{field:i=new wn}=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 BM extends ve{constructor(e){super(),be(this,e,zM,HM,_e,{field:1,value:0})}}function UM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("input"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),fe(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&fe(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function WM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[UM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function YM(n,e,t){let{field:i=new wn}=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 KM extends ve{constructor(e){super(),be(this,e,YM,WM,_e,{field:1,value:0})}}function Np(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[De(We.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:Q,d(l){l&&w(e),i=!1,Ee(s)}}}function JM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b=n[0]&&!n[1].required&&Np(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:H.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new ru({props:T}),se.push(()=>he(p,"value",k)),se.push(()=>he(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),a=W(" (UTC)"),f=E(),b&&b.c(),d=E(),U(p.$$.fragment),h(t,"class",i=wi(H.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,D){S(C,e,D),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,D),b&&b.m(C,D),S(C,d,D),z(p,C,D),g=!0},p(C,D){(!g||D&2&&i!==(i=wi(H.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!g||D&2)&&o!==(o=C[1].name+"")&&oe(r,o),(!g||D&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,D):(b=Np(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};D&256&&(M.id=C[8]),!m&&D&4&&(m=!0,M.value=C[2],ke(()=>m=!1)),!_&&D&1&&(_=!0,M.formattedValue=C[0],ke(()=>_=!1)),p.$set(M)},i(C){g||(A(p.$$.fragment,C),g=!0)},o(C){P(p.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),B(p,C)}}}function ZM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[JM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function GM(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class XM extends ve{constructor(e){super(),be(this,e,GM,ZM,_e,{field:1,value:0})}}function Fp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=W("Select up to "),s=W(i),l=W(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&oe(s,i)},d(o){o&&w(e)}}}function QM(n){var $,T,C,D,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;function g(O){n[3](O)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((D=n[1].options)==null?void 0:D.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new au({props:b}),se.push(()=>he(f,"selected",g));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Fp(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),U(f.$$.fragment),p=E(),k&&k.c(),m=$e(),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(O,I){S(O,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(O,u,I),z(f,O,I),S(O,p,I),k&&k.m(O,I),S(O,m,I),_=!0},p(O,I){var F,q,N,R,j;(!_||I&2&&i!==(i=H.getFieldTypeIcon(O[1].type)))&&h(t,"class",i),(!_||I&2)&&o!==(o=O[1].name+"")&&oe(r,o),(!_||I&16&&a!==(a=O[4]))&&h(e,"for",a);const L={};I&16&&(L.id=O[4]),I&6&&(L.toggle=!O[1].required||O[2]),I&4&&(L.multiple=O[2]),I&7&&(L.closable=!O[2]||((F=O[0])==null?void 0:F.length)>=((q=O[1].options)==null?void 0:q.maxSelect)),I&2&&(L.items=(N=O[1].options)==null?void 0:N.values),I&2&&(L.searchable=((R=O[1].options)==null?void 0:R.values)>5),!d&&I&1&&(d=!0,L.selected=O[0],ke(()=>d=!1)),f.$set(L),((j=O[1].options)==null?void 0:j.maxSelect)>1?k?k.p(O,I):(k=Fp(O),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(O){_||(A(f.$$.fragment,O),_=!0)},o(O){P(f.$$.fragment,O),_=!1},d(O){O&&w(e),O&&w(u),B(f,O),O&&w(p),k&&k.d(O),O&&w(m)}}}function xM(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[QM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function e6(n,e,t){let i,{field:s=new wn}=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 t6 extends ve{constructor(e){super(),be(this,e,e6,xM,_e,{field:1,value:0})}}function n6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("textarea"),h(t,"class",i=H.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=H.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&oe(r,o),b&16&&a!==(a=g[4])&&h(e,"for",a),b&16&&d!==(d=g[4])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function i6(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment)},m(i,s){z(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||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function s6(n,e,t){let{field:i=new wn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class l6 extends ve{constructor(e){super(),be(this,e,s6,i6,_e,{field:1,value:0})}}function o6(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function r6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!mn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function a6(n){let e;function t(l,o){return l[2]?r6:o6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function u6(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),H.hasImageExtension(s==null?void 0:s.name)&&H.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 f6 extends ve{constructor(e){super(),be(this,e,u6,a6,_e,{file:0,size:1})}}function Rp(n){let e;function t(l,o){return l[4]==="image"?d6:c6}let i=t(n),s=i(n);return{c(){s.c(),e=$e()},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 c6(n){let e,t;return{c(){e=y("object"),t=W("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function d6(n){let e,t,i;return{c(){e=y("img"),mn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!mn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function p6(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Rp(n);return{c(){i&&i.c(),t=$e()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Rp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function m6(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",at(n[0])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function h6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=W(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&oe(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function _6(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[h6],header:[m6],default:[p6]},$$scope:{ctx:n}};return e=new hn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){U(e.$$.fragment)},m(s,l){z(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),B(e,s)}}}function g6(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){se[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){me.call(this,n,m)}function p(m){me.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=H.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class b6 extends ve{constructor(e){super(),be(this,e,g6,_6,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function v6(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?S6:u[3]==="video"||u[3]==="audio"?w6:k6}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function y6(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function k6(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function w6(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function S6(n){let e,t,i,s,l;return{c(){e=y("img"),mn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!mn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function $6(n){let e,t,i;function s(a,u){return a[2]?y6:v6}let l=s(n),o=l(n),r={};return t=new b6({props:r}),n[12](t),{c(){o.c(),e=E(),U(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),z(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||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[12](null),B(t,a)}}}function C6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",d="",p=!1;m();async function m(){t(2,p=!0);try{t(10,d=await pe.getAdminFileToken(l.collectionId))}catch(k){console.warn("File token failure:",k)}t(2,p=!1)}function _(){t(5,u="")}const g=k=>{s&&(k.preventDefault(),a==null||a.show(f))};function b(k){se[k?"unshift":"push"](()=>{a=k,t(4,a)})}return n.$$set=k=>{"record"in k&&t(9,l=k.record),"filename"in k&&t(0,o=k.filename),"size"in k&&t(1,r=k.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=H.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=p?"":pe.files.getUrl(l,o,{token:d})),n.$$.dirty&1541&&t(5,u=p?"":pe.files.getUrl(l,o,{thumb:"100x100",token:d}))},[o,r,p,i,a,u,f,s,_,l,d,g,b]}class fu extends ve{constructor(e){super(),be(this,e,C6,$6,_e,{record:9,filename:0,size:1})}}function qp(n,e,t){const i=n.slice();return i[27]=e[t],i[29]=t,i}function jp(n,e,t){const i=n.slice();i[30]=e[t],i[29]=t;const s=i[1].includes(i[29]);return i[31]=s,i}function T6(n){let e,t,i;function s(){return n[17](n[29])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[De(We.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Ee(i)}}}function M6(n){let e,t,i;function s(){return n[16](n[29])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Vp(n,e){let t,i,s,l,o,r,a=e[30]+"",u,f,d,p,m,_,g;s=new fu({props:{record:e[2],filename:e[30]}});function b(T,C){return C[0]&18&&(_=null),_==null&&(_=!!T[1].includes(T[29])),_?M6:T6}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),U(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=W(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[29])),h(r,"href",f=pe.files.getUrl(e[2],e[30],{token:e[9]})),h(r,"class",d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),z(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),g=!0},p(T,C){e=T;const D={};C[0]&4&&(D.record=e[2]),C[0]&16&&(D.filename=e[30]),s.$set(D),(!g||C[0]&18)&&x(i,"fade",e[1].includes(e[29])),(!g||C[0]&16)&&a!==(a=e[30]+"")&&oe(u,a),(!g||C[0]&532&&f!==(f=pe.files.getUrl(e[2],e[30],{token:e[9]})))&&h(r,"href",f),(!g||C[0]&18&&d!==(d="txt-ellipsis "+(e[31]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),B(s),$.d()}}}function Hp(n){let e,t,i,s,l,o,r,a,u=n[27].name+"",f,d,p,m,_,g,b;i=new f6({props:{file:n[27]}});function k(){return n[18](n[29])}return{c(){e=y("div"),t=y("figure"),U(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=W(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[27].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),z(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),_=!0,g||(b=[De(We.call(null,m,"Remove file")),J(m,"click",k)],g=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[27]),i.$set(C),(!_||T[0]&1)&&u!==(u=n[27].name+"")&&oe(f,u),(!_||T[0]&1&&d!==(d=n[27].name))&&h(l,"title",d)},i($){_||(A(i.$$.fragment,$),_=!0)},o($){P(i.$$.fragment,$),_=!1},d($){$&&w(e),B(i),g=!1,Ee(b)}}}function O6(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,_,g,b,k,$,T,C,D,M,O,I,L=n[4];const F=j=>j[30]+j[2].id;for(let j=0;jP(N[j],1,1,()=>{N[j]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=W(o),u=E(),f=y("div");for(let j=0;j{M[F]=null}),ue(),o=M[l],o?o.p(I,L):(o=M[l]=D[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,Ee(C)}}}function wE(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[gE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[bE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[kE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),S(r,s,a),z(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 d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){B(e,r),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function Eh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function SE(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Eh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=W(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=$e(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&oe(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Eh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),P(f,1,1,()=>{f=null}),ue())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function $E(n){let e,t;const i=[n[8]];let s={$$slots:{header:[SE],default:[wE]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=Ah,p=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await rt(()=>import("./CodeEditor-ed3b6d0c.js"),["./CodeEditor-ed3b6d0c.js","./index-c4d2d831.js"],import.meta.url)).default),Ah=d,t(5,p=!1))}function k(G){H.copyToClipboard(G),l1(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function D(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),O=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function F(){u.body=this.value,t(0,u)}const q=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),R=()=>k("{TOKEN}"),j=()=>k("{ACTION_URL}");function V(G){se[G?"unshift":"push"](()=>{f=G,t(3,f)})}function K(G){me.call(this,n,G)}function ee(G){me.call(this,n,G)}function te(G){me.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),Jt(G)),t(8,l=Qe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!H.isEmpty(H.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ri(r))},[u,r,a,f,d,p,i,k,l,m,_,g,o,$,T,C,D,M,O,I,L,F,q,N,R,j,V,K,ee,te]}class Nr extends ve{constructor(e){super(),be(this,e,CE,$E,_e,{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 Ih(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ph(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=Ib(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=W(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(_,g){S(_,t,g),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(_,g){e=_,g&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(_){_&&w(t),d.r(),p=!1,m()}}}function TE(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[ME,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),U(t.$$.fragment),i=E(),U(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),z(t,e,null),v(e,i),z(s,e,null),l=!0,o||(r=J(e,"submit",at(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),B(t),B(s),o=!1,r()}}}function DE(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function EE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function AE(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[EE],header:[DE],default:[OE]},$$scope:{ctx:n}};return e=new hn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){U(e.$$.fragment)},m(s,l){z(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[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),B(e,s)}}}const Fr="last_email_test",Lh="email_test_request";function IE(n,e,t){let i;const s=Tt(),l="email_test_"+H.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(Fr),u=o[0].value,f=!1,d=null;function p(O="",I=""){t(1,a=O||localStorage.getItem(Fr)),t(2,u=I||o[0].value),un({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Fr,a),clearTimeout(d),d=setTimeout(()=>{pe.cancelRequest(Lh),hl("Test email send timeout.")},3e4);try{await pe.settings.testEmail(a,u,{$cancelKey:Lh}),Qt("Successfully sent test email."),s("submit"),t(4,f=!1),await an(),m()}catch(O){t(4,f=!1),pe.errorResponseHandler(O)}clearTimeout(d)}}const g=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>_(),T=()=>!f;function C(O){se[O?"unshift":"push"](()=>{r=O,t(3,r)})}function D(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,p,b,g,k,$,T,C,D,M]}class PE extends ve{constructor(e){super(),be(this,e,IE,AE,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function LE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[FE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[RE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});function q(X){n[14](X)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Nr({props:N}),se.push(()=>he(u,"config",q));function R(X){n[15](X)}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),p=new Nr({props:j}),se.push(()=>he(p,"config",R));function V(X){n[16](X)}let K={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(K.config=n[0].meta.confirmEmailChangeTemplate),g=new Nr({props:K}),se.push(()=>he(g,"config",V)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[qE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Nh(n);function te(X,le){return X[4]?YE:WE}let G=te(n),ce=G(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),d=E(),U(p.$$.fragment),_=E(),U(g.$$.fragment),k=E(),$=y("hr"),T=E(),U(C.$$.fragment),D=E(),ee&&ee.c(),M=E(),O=y("div"),I=y("div"),L=E(),ce.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(O,"class","flex")},m(X,le){S(X,e,le),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),S(X,r,le),S(X,a,le),z(u,a,null),v(a,d),z(p,a,null),v(a,_),z(g,a,null),S(X,k,le),S(X,$,le),S(X,T,le),z(C,X,le),S(X,D,le),ee&&ee.m(X,le),S(X,M,le),S(X,O,le),v(O,I),v(O,L),ce.m(O,null),F=!0},p(X,le){const ye={};le[0]&1|le[1]&3&&(ye.$$scope={dirty:le,ctx:X}),i.$set(ye);const Se={};le[0]&1|le[1]&3&&(Se.$$scope={dirty:le,ctx:X}),o.$set(Se);const Ve={};!f&&le[0]&1&&(f=!0,Ve.config=X[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Ve);const ze={};!m&&le[0]&1&&(m=!0,ze.config=X[0].meta.resetPasswordTemplate,ke(()=>m=!1)),p.$set(ze);const we={};!b&&le[0]&1&&(b=!0,we.config=X[0].meta.confirmEmailChangeTemplate,ke(()=>b=!1)),g.$set(we);const Me={};le[0]&1|le[1]&3&&(Me.$$scope={dirty:le,ctx:X}),C.$set(Me),X[0].smtp.enabled?ee?(ee.p(X,le),le[0]&1&&A(ee,1)):(ee=Nh(X),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(ae(),P(ee,1,1,()=>{ee=null}),ue()),G===(G=te(X))&&ce?ce.p(X,le):(ce.d(1),ce=G(X),ce&&(ce.c(),ce.m(O,null)))},i(X){F||(A(i.$$.fragment,X),A(o.$$.fragment,X),A(u.$$.fragment,X),A(p.$$.fragment,X),A(g.$$.fragment,X),A(C.$$.fragment,X),A(ee),F=!0)},o(X){P(i.$$.fragment,X),P(o.$$.fragment,X),P(u.$$.fragment,X),P(p.$$.fragment,X),P(g.$$.fragment,X),P(C.$$.fragment,X),P(ee),F=!1},d(X){X&&w(e),B(i),B(o),X&&w(r),X&&w(a),B(u),B(p),B(g),X&&w(k),X&&w($),X&&w(T),B(C,X),X&&w(D),ee&&ee.d(X),X&&w(M),X&&w(O),ce.d()}}}function NE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function FE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&fe(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function RE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&fe(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),De(We.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(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[jE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[VE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[HE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[zE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[BE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[UE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),_=y("div"),U(g.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(_,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,_),z(g,_,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(O,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:O}),u.$set(q);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:O}),p.$set(N);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:O}),g.$set(R);const j={};I[0]&1|I[1]&3&&(j.$$scope={dirty:I,ctx:O}),$.$set(j)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(p.$$.fragment,O),A(g.$$.fragment,O),A($.$$.fragment,O),O&&nt(()=>{M&&(D||(D=He(e,yt,{duration:150},!0)),D.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(g.$$.fragment,O),P($.$$.fragment,O),O&&(D||(D=He(e,yt,{duration:150},!1)),D.run(0)),M=!1},d(O){O&&w(e),B(i),B(o),B(u),B(p),B(g),B($),O&&D&&D.end()}}}function jE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&fe(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&fe(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("TLS encryption"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function zE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("AUTH method"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function BE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&fe(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UE(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 du({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Password"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function WE(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + `,k=W("."),h(e,"for",i=n[31]),h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(b,"type","button"),h(b,"class","label label-sm link-primary txt-mono"),h(b,"title","Required parameter"),h(a,"class","help-block")},m(I,L){S(I,e,L),v(e,t),S(I,s,L),M[l].m(I,L),S(I,r,L),S(I,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),v(a,b),v(a,k),$=!0,T||(C=[J(f,"click",n[22]),J(p,"click",n[23]),J(_,"click",n[24]),J(b,"click",n[25])],T=!0)},p(I,L){(!$||L[1]&1&&i!==(i=I[31]))&&h(e,"for",i);let F=l;l=O(I),l===F?M[l].p(I,L):(ae(),P(M[F],1,1,()=>{M[F]=null}),ue(),o=M[l],o?o.p(I,L):(o=M[l]=D[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,Ee(C)}}}function wE(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[gE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[bE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[kE,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(r,a){z(e,r,a),S(r,t,a),z(i,r,a),S(r,s,a),z(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 d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){B(e,r),r&&w(t),B(i,r),r&&w(s),B(l,r)}}}function Eh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=De(We.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&nt(()=>{i&&(t||(t=He(e,Wt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Wt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function SE(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Eh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=W(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=$e(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&oe(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Eh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),P(f,1,1,()=>{f=null}),ue())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function $E(n){let e,t;const i=[n[8]];let s={$$slots:{header:[SE],default:[wE]},$$scope:{ctx:n}};for(let l=0;lt(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=Ah,p=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await rt(()=>import("./CodeEditor-d6b5e403.js"),["./CodeEditor-d6b5e403.js","./index-c4d2d831.js"],import.meta.url)).default),Ah=d,t(5,p=!1))}function k(G){H.copyToClipboard(G),l1(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function D(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),O=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function F(){u.body=this.value,t(0,u)}const q=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),R=()=>k("{TOKEN}"),j=()=>k("{ACTION_URL}");function V(G){se[G?"unshift":"push"](()=>{f=G,t(3,f)})}function K(G){me.call(this,n,G)}function ee(G){me.call(this,n,G)}function te(G){me.call(this,n,G)}return n.$$set=G=>{e=je(je({},e),Jt(G)),t(8,l=Qe(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!H.isEmpty(H.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ri(r))},[u,r,a,f,d,p,i,k,l,m,_,g,o,$,T,C,D,M,O,I,L,F,q,N,R,j,V,K,ee,te]}class Nr extends ve{constructor(e){super(),be(this,e,CE,$E,_e,{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 Ih(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ph(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=Ib(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=W(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(_,g){S(_,t,g),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(_,g){e=_,g&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(_){_&&w(t),d.r(),p=!1,m()}}}function TE(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[ME,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),U(t.$$.fragment),i=E(),U(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),z(t,e,null),v(e,i),z(s,e,null),l=!0,o||(r=J(e,"submit",at(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),B(t),B(s),o=!1,r()}}}function DE(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function EE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=W("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function AE(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[EE],header:[DE],default:[OE]},$$scope:{ctx:n}};return e=new hn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){U(e.$$.fragment)},m(s,l){z(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[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),B(e,s)}}}const Fr="last_email_test",Lh="email_test_request";function IE(n,e,t){let i;const s=Tt(),l="email_test_"+H.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(Fr),u=o[0].value,f=!1,d=null;function p(O="",I=""){t(1,a=O||localStorage.getItem(Fr)),t(2,u=I||o[0].value),un({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Fr,a),clearTimeout(d),d=setTimeout(()=>{pe.cancelRequest(Lh),hl("Test email send timeout.")},3e4);try{await pe.settings.testEmail(a,u,{$cancelKey:Lh}),Qt("Successfully sent test email."),s("submit"),t(4,f=!1),await an(),m()}catch(O){t(4,f=!1),pe.errorResponseHandler(O)}clearTimeout(d)}}const g=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>_(),T=()=>!f;function C(O){se[O?"unshift":"push"](()=>{r=O,t(3,r)})}function D(O){me.call(this,n,O)}function M(O){me.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,p,b,g,k,$,T,C,D,M]}class PE extends ve{constructor(e){super(),be(this,e,IE,AE,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function LE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M,O,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[FE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[RE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});function q(X){n[14](X)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Nr({props:N}),se.push(()=>he(u,"config",q));function R(X){n[15](X)}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),p=new Nr({props:j}),se.push(()=>he(p,"config",R));function V(X){n[16](X)}let K={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(K.config=n[0].meta.confirmEmailChangeTemplate),g=new Nr({props:K}),se.push(()=>he(g,"config",V)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[qE,({uniqueId:X})=>({31:X}),({uniqueId:X})=>[0,X?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Nh(n);function te(X,le){return X[4]?YE:WE}let G=te(n),ce=G(n);return{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),d=E(),U(p.$$.fragment),_=E(),U(g.$$.fragment),k=E(),$=y("hr"),T=E(),U(C.$$.fragment),D=E(),ee&&ee.c(),M=E(),O=y("div"),I=y("div"),L=E(),ce.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(O,"class","flex")},m(X,le){S(X,e,le),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),S(X,r,le),S(X,a,le),z(u,a,null),v(a,d),z(p,a,null),v(a,_),z(g,a,null),S(X,k,le),S(X,$,le),S(X,T,le),z(C,X,le),S(X,D,le),ee&&ee.m(X,le),S(X,M,le),S(X,O,le),v(O,I),v(O,L),ce.m(O,null),F=!0},p(X,le){const ye={};le[0]&1|le[1]&3&&(ye.$$scope={dirty:le,ctx:X}),i.$set(ye);const Se={};le[0]&1|le[1]&3&&(Se.$$scope={dirty:le,ctx:X}),o.$set(Se);const Ve={};!f&&le[0]&1&&(f=!0,Ve.config=X[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Ve);const ze={};!m&&le[0]&1&&(m=!0,ze.config=X[0].meta.resetPasswordTemplate,ke(()=>m=!1)),p.$set(ze);const we={};!b&&le[0]&1&&(b=!0,we.config=X[0].meta.confirmEmailChangeTemplate,ke(()=>b=!1)),g.$set(we);const Me={};le[0]&1|le[1]&3&&(Me.$$scope={dirty:le,ctx:X}),C.$set(Me),X[0].smtp.enabled?ee?(ee.p(X,le),le[0]&1&&A(ee,1)):(ee=Nh(X),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(ae(),P(ee,1,1,()=>{ee=null}),ue()),G===(G=te(X))&&ce?ce.p(X,le):(ce.d(1),ce=G(X),ce&&(ce.c(),ce.m(O,null)))},i(X){F||(A(i.$$.fragment,X),A(o.$$.fragment,X),A(u.$$.fragment,X),A(p.$$.fragment,X),A(g.$$.fragment,X),A(C.$$.fragment,X),A(ee),F=!0)},o(X){P(i.$$.fragment,X),P(o.$$.fragment,X),P(u.$$.fragment,X),P(p.$$.fragment,X),P(g.$$.fragment,X),P(C.$$.fragment,X),P(ee),F=!1},d(X){X&&w(e),B(i),B(o),X&&w(r),X&&w(a),B(u),B(p),B(g),X&&w(k),X&&w($),X&&w(T),B(C,X),X&&w(D),ee&&ee.d(X),X&&w(M),X&&w(O),ce.d()}}}function NE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function FE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&fe(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function RE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&fe(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function qE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),De(We.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(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,Ee(f)}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,D,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[jE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[VE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[HE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[zE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[BE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[UE,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),U(i.$$.fragment),s=E(),l=y("div"),U(o.$$.fragment),r=E(),a=y("div"),U(u.$$.fragment),f=E(),d=y("div"),U(p.$$.fragment),m=E(),_=y("div"),U(g.$$.fragment),b=E(),k=y("div"),U($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(_,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(O,I){S(O,e,I),v(e,t),z(i,t,null),v(e,s),v(e,l),z(o,l,null),v(e,r),v(e,a),z(u,a,null),v(e,f),v(e,d),z(p,d,null),v(e,m),v(e,_),z(g,_,null),v(e,b),v(e,k),z($,k,null),v(e,T),v(e,C),M=!0},p(O,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:O}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:O}),o.$set(F);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:O}),u.$set(q);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:O}),p.$set(N);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:O}),g.$set(R);const j={};I[0]&1|I[1]&3&&(j.$$scope={dirty:I,ctx:O}),$.$set(j)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(p.$$.fragment,O),A(g.$$.fragment,O),A($.$$.fragment,O),O&&nt(()=>{M&&(D||(D=He(e,yt,{duration:150},!0)),D.run(1))}),M=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(p.$$.fragment,O),P(g.$$.fragment,O),P($.$$.fragment,O),O&&(D||(D=He(e,yt,{duration:150},!1)),D.run(0)),M=!1},d(O){O&&w(e),B(i),B(o),B(u),B(p),B(g),B($),O&&D&&D.end()}}}function jE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&fe(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function VE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&fe(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function HE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("TLS encryption"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function zE(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 Bi({props:u}),se.push(()=>he(l,"keyOfSelected",a)),{c(){e=y("label"),t=W("AUTH method"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function BE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=W("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),fe(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&fe(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function UE(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 du({props:u}),se.push(()=>he(l,"value",a)),{c(){e=y("label"),t=W("Password"),s=E(),U(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),z(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),B(l,f)}}}function WE(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` Send test email`,h(e,"type","button"),h(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function YE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],h(l,"class","txt"),h(s,"type","submit"),h(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"click",n[24]),J(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&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Ee(a)}}}function KE(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[NE,LE],$=[];function T(C,D){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[5]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,D){S(C,e,D),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,D),S(C,a,D),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",at(n[27])),g=!0)},p(C,D){(!_||D[0]&32)&&oe(o,C[5]);let M=p;p=T(C),p===M?$[p].p(C,D):(ae(),P($[M],1,1,()=>{$[M]=null}),ue(),m=$[p],m?m.p(C,D):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function JE(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[KE]},$$scope:{ctx:n}}});let r={};return l=new PE({props:r}),n[28](l),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[28](null),B(l,a)}}}function ZE(n,e,t){let i,s,l;Je(n,Nt,te=>t(5,l=te));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];rn(Nt,l="Mail settings",l);let a,u={},f={},d=!1,p=!1;m();async function m(){t(2,d=!0);try{const te=await pe.settings.getAll()||{};g(te)}catch(te){pe.errorResponseHandler(te)}t(2,d=!1)}async function _(){if(!(p||!s)){t(3,p=!0);try{const te=await pe.settings.update(H.filterRedactedProps(f));g(te),un({}),Qt("Successfully saved mail settings.")}catch(te){pe.errorResponseHandler(te)}t(3,p=!1)}}function g(te={}){t(0,f={meta:(te==null?void 0:te.meta)||{},smtp:(te==null?void 0:te.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 k(){f.meta.senderName=this.value,t(0,f)}function $(){f.meta.senderAddress=this.value,t(0,f)}function T(te){n.$$.not_equal(f.meta.verificationTemplate,te)&&(f.meta.verificationTemplate=te,t(0,f))}function C(te){n.$$.not_equal(f.meta.resetPasswordTemplate,te)&&(f.meta.resetPasswordTemplate=te,t(0,f))}function D(te){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,te)&&(f.meta.confirmEmailChangeTemplate=te,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=gt(this.value),t(0,f)}function L(te){n.$$.not_equal(f.smtp.tls,te)&&(f.smtp.tls=te,t(0,f))}function F(te){n.$$.not_equal(f.smtp.authMethod,te)&&(f.smtp.authMethod=te,t(0,f))}function q(){f.smtp.username=this.value,t(0,f)}function N(te){n.$$.not_equal(f.smtp.password,te)&&(f.smtp.password=te,t(0,f))}const R=()=>b(),j=()=>_(),V=()=>a==null?void 0:a.show(),K=()=>_();function ee(te){se[te?"unshift":"push"](()=>{a=te,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,d,p,s,l,o,r,_,b,u,i,k,$,T,C,D,M,O,I,L,F,q,N,R,j,V,K,ee]}class GE extends ve{constructor(e){super(),be(this,e,ZE,JE,_e,{},null,[-1,-1])}}function XE(n){var C,D;let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[xE,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Fh(n),k=n[1].s3.enabled&&Rh(n),$=((D=n[1].s3)==null?void 0:D.enabled)&&!n[6]&&!n[3]&&qh(n),T=n[6]&&jh(n);return{c(){U(e.$$.fragment),t=E(),b&&b.c(),i=E(),k&&k.c(),s=E(),l=y("div"),o=y("div"),r=E(),$&&$.c(),a=E(),T&&T.c(),u=E(),f=y("button"),d=y("span"),d.textContent="Save changes",h(o,"class","flex-fill"),h(d,"class","txt"),h(f,"type","submit"),h(f,"class","btn btn-expanded"),f.disabled=p=!n[6]||n[3],x(f,"btn-loading",n[3]),h(l,"class","flex")},m(M,O){z(e,M,O),S(M,t,O),b&&b.m(M,O),S(M,i,O),k&&k.m(M,O),S(M,s,O),S(M,l,O),v(l,o),v(l,r),$&&$.m(l,null),v(l,a),T&&T.m(l,null),v(l,u),v(l,f),v(f,d),m=!0,_||(g=J(f,"click",n[19]),_=!0)},p(M,O){var L,F;const I={};O&100663298&&(I.$$scope={dirty:O,ctx:M}),e.$set(I),((L=M[0].s3)==null?void 0:L.enabled)!=M[1].s3.enabled?b?(b.p(M,O),O&3&&A(b,1)):(b=Fh(M),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(ae(),P(b,1,1,()=>{b=null}),ue()),M[1].s3.enabled?k?(k.p(M,O),O&2&&A(k,1)):(k=Rh(M),k.c(),A(k,1),k.m(s.parentNode,s)):k&&(ae(),P(k,1,1,()=>{k=null}),ue()),(F=M[1].s3)!=null&&F.enabled&&!M[6]&&!M[3]?$?$.p(M,O):($=qh(M),$.c(),$.m(l,a)):$&&($.d(1),$=null),M[6]?T?T.p(M,O):(T=jh(M),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||O&72&&p!==(p=!M[6]||M[3]))&&(f.disabled=p),(!m||O&8)&&x(f,"btn-loading",M[3])},i(M){m||(A(e.$$.fragment,M),A(b),A(k),m=!0)},o(M){P(e.$$.fragment,M),P(b),P(k),m=!1},d(M){B(e,M),M&&w(t),b&&b.d(M),M&&w(i),k&&k.d(M),M&&w(s),M&&w(l),$&&$.d(),T&&T.d(),_=!1,g()}}}function QE(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function xE(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=W("Use S3 storage"),h(e,"type","checkbox"),h(e,"id",t=n[25]),e.required=!0,h(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),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&h(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Fh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,d,p=n[1].s3.enabled?"S3 storage":"local file system",m,_,g,b,k,$,T,C,D,M,O,I;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=W(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=y("strong"),u=W(a),f=W(` @@ -206,6 +206,6 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `),o=y("button"),o.innerHTML='Load from JSON file',r=E(),U(a.$$.fragment),u=E(),f=E(),L&&L.c(),d=E(),F&&F.c(),p=E(),q&&q.c(),m=E(),_=y("div"),N&&N.c(),g=E(),b=y("div"),k=E(),$=y("button"),T=y("span"),T.textContent="Review",h(e,"type","file"),h(e,"class","hidden"),h(e,"accept",".json"),h(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),h(i,"class","content txt-xl m-b-base"),h(b,"class","flex-fill"),h(T,"class","txt"),h($,"type","button"),h($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=C=!n[14],h(_,"class","flex m-t-base")},m(R,j){S(R,e,j),n[19](e),S(R,t,j),S(R,i,j),v(i,s),v(s,l),v(s,o),S(R,r,j),z(a,R,j),S(R,u,j),S(R,f,j),L&&L.m(R,j),S(R,d,j),F&&F.m(R,j),S(R,p,j),q&&q.m(R,j),S(R,m,j),S(R,_,j),N&&N.m(_,null),v(_,g),v(_,b),v(_,k),v(_,$),v($,T),D=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(R,j){(!D||j[0]&4096)&&x(o,"btn-loading",R[12]);const V={};j[0]&64&&(V.class="form-field "+(R[6]?"":"field-error")),j[0]&65|j[1]&1536&&(V.$$scope={dirty:j,ctx:R}),a.$set(V),R[6]&&R[1].length&&!R[7]?L||(L=S_(),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?F?F.p(R,j):(F=$_(R),F.c(),F.m(p.parentNode,p)):F&&(F.d(1),F=null),R[13].length?q?q.p(R,j):(q=N_(R),q.c(),q.m(m.parentNode,m)):q&&(q.d(1),q=null),R[0]?N?N.p(R,j):(N=F_(R),N.c(),N.m(_,g)):N&&(N.d(1),N=null),(!D||j[0]&16384&&C!==(C=!R[14]))&&($.disabled=C)},i(R){D||(A(a.$$.fragment,R),A(I),D=!0)},o(R){P(a.$$.fragment,R),P(I),D=!1},d(R){R&&w(e),n[19](null),R&&w(t),R&&w(i),R&&w(r),B(a,R),R&&w(u),R&&w(f),L&&L.d(R),R&&w(d),F&&F.d(R),R&&w(p),q&&q.d(R),R&&w(m),R&&w(_),N&&N.d(),M=!1,Ee(O)}}}function sI(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function w_(n){let e;return{c(){e=y("div"),e.textContent="Invalid collections configuration.",h(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function lI(n){let e,t,i,s,l,o,r,a,u,f,d=!!n[0]&&!n[6]&&w_();return{c(){e=y("label"),t=W("Collections"),s=E(),l=y("textarea"),r=E(),d&&d.c(),a=$e(),h(e,"for",i=n[40]),h(e,"class","p-b-10"),h(l,"id",o=n[40]),h(l,"class","code"),h(l,"spellcheck","false"),h(l,"rows","15"),l.required=!0},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),fe(l,n[0]),S(p,r,m),d&&d.m(p,m),S(p,a,m),u||(f=J(l,"input",n[22]),u=!0)},p(p,m){m[1]&512&&i!==(i=p[40])&&h(e,"for",i),m[1]&512&&o!==(o=p[40])&&h(l,"id",o),m[0]&1&&fe(l,p[0]),p[0]&&!p[6]?d||(d=w_(),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),d&&d.d(p),p&&w(a),u=!1,f()}}}function S_(n){let e;return{c(){e=y("div"),e.innerHTML=`
    Your collections configuration is already up-to-date!
    `,h(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $_(n){let e,t,i,s,l,o=n[9].length&&C_(n),r=n[4].length&&O_(n),a=n[8].length&&I_(n);return{c(){e=y("h5"),e.textContent="Detected changes",t=E(),i=y("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),h(e,"class","section-title"),h(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),v(i,s),r&&r.m(i,null),v(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=C_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=O_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=I_(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 C_(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=E(),s=y("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:Q,d(u){u&&w(e),r=!1,a()}}}function F_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function oI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[sI,iI],_=[];function g(b,k){return b[5]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&oe(o,b[15]);let $=f;f=g(b),f===$?_[f].p(b,k):(ae(),P(_[$],1,1,()=>{_[$]=null}),ue(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function rI(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[oI]},$$scope:{ctx:n}}});let r={};return l=new nI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[27](null),B(l,a)}}}function aI(n,e,t){let i,s,l,o,r,a,u;Je(n,Nt,G=>t(15,u=G)),rn(Nt,u="Import collections",u);let f,d,p="",m=!1,_=[],g=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,g=await pe.collections.getFullList(200));for(let G of g)delete G.created,delete G.updated}catch(G){pe.errorResponseHandler(G)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let G of _){const ce=H.findByKey(g,"id",G.id);!(ce!=null&&ce.id)||!H.hasCollectionChanges(ce,G,b)||k.push({new:G,old:ce})}}function D(){t(1,_=[]);try{t(1,_=JSON.parse(p))}catch{}Array.isArray(_)?t(1,_=H.filterDuplicatesByKey(_)):t(1,_=[]);for(let G of _)delete G.created,delete G.updated,G.schema=H.filterDuplicatesByKey(G.schema)}function M(){var G,ce;for(let X of _){const le=H.findByKey(g,"name",X.name)||H.findByKey(g,"id",X.id);if(!le)continue;const ye=X.id,Se=le.id;X.id=Se;const Ve=Array.isArray(le.schema)?le.schema:[],ze=Array.isArray(X.schema)?X.schema:[];for(const we of ze){const Me=H.findByKey(Ve,"name",we.name);Me&&Me.id&&(we.id=Me.id)}for(let we of _)if(Array.isArray(we.schema))for(let Me of we.schema)(G=Me.options)!=null&&G.collectionId&&((ce=Me.options)==null?void 0:ce.collectionId)===ye&&(Me.options.collectionId=Se)}t(0,p=JSON.stringify(_,null,4))}function O(G){t(12,m=!0);const ce=new FileReader;ce.onload=async X=>{t(12,m=!1),t(10,f.value="",f),t(0,p=X.target.result),await an(),_.length||(hl("Invalid collections configuration."),I())},ce.onerror=X=>{console.warn(X),hl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},ce.readAsText(G)}function I(){t(0,p=""),t(10,f.value="",f),un({})}function L(G){se[G?"unshift":"push"](()=>{f=G,t(10,f)})}const F=()=>{f.files.length&&O(f.files[0])},q=()=>{f.click()};function N(){p=this.value,t(0,p)}function R(){b=this.checked,t(3,b)}const j=()=>M(),V=()=>I(),K=()=>d==null?void 0:d.show(g,_,b);function ee(G){se[G?"unshift":"push"](()=>{d=G,t(11,d)})}const te=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&D(),n.$$.dirty[0]&3&&t(6,i=!!p&&_.length&&_.length===_.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(G=>i&&b&&!H.findByKey(_,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(G=>i&&!H.findByKey(g,"id",G.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(G=>{let ce=H.findByKey(g,"name",G.name)||H.findByKey(g,"id",G.id);if(!ce)return!1;if(ce.id!=G.id)return!0;const X=Array.isArray(ce.schema)?ce.schema:[],le=Array.isArray(G.schema)?G.schema:[];for(const ye of le){if(H.findByKey(X,"id",ye.id))continue;const Ve=H.findByKey(X,"name",ye.name);if(Ve&&ye.id!=Ve.id)return!0}return!1}))},[p,_,g,b,k,$,i,o,l,s,f,d,m,a,r,u,M,O,I,L,F,q,N,R,j,V,K,ee,te]}class uI extends ve{constructor(e){super(),be(this,e,aI,rI,_e,{},null,[-1,-1])}}const zt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Vi("/"):!0}],fI={"/login":qt({component:nE,conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":qt({asyncComponent:()=>rt(()=>import("./PageAdminRequestPasswordReset-f2d951d5.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageAdminConfirmPasswordReset-638f988c.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":qt({component:TD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":qt({component:v$,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":qt({component:dE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":qt({component:GD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":qt({component:GE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":qt({component:dA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":qt({component:DA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":qt({component:qA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":qt({component:UA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":qt({component:uI,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-2d9b57c3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-2d9b57c3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-19275fb7.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-19275fb7.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-5246a39b.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-5246a39b.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":qt({asyncComponent:()=>rt(()=>import("./PageOAuth2Redirect-5f45cdfd.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"*":qt({component:Hy,userData:{showAppSidebar:!1}})};function cI(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:d=m=>Math.sqrt(m)*120,easing:p=Wo}=i;return{delay:f,duration:Vt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,_)=>{const g=_*a,b=_*u,k=m+_*e.width/t.width,$=m+_*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${$});`}}}function R_(n,e,t){const i=n.slice();return i[2]=e[t],i}function dI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function mI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hI(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function q_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m,_=Q,g,b,k;function $(M,O){return M[2].type==="info"?hI:M[2].type==="success"?mI:M[2].type==="warning"?pI:dI}let T=$(e),C=T(e);function D(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),C.c(),s=E(),l=y("div"),r=W(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){S(M,t,O),v(t,i),C.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),g=!0,b||(k=J(u,"click",at(D)),b=!0)},p(M,O){e=M,T!==(T=$(e))&&(C.d(1),C=T(e),C&&(C.c(),C.m(i,null))),(!g||O&1)&&o!==(o=e[2].message+"")&&oe(r,o),(!g||O&1)&&x(t,"alert-info",e[2].type=="info"),(!g||O&1)&&x(t,"alert-success",e[2].type=="success"),(!g||O&1)&&x(t,"alert-danger",e[2].type=="error"),(!g||O&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){qb(t),_(),K_(t,m)},a(){_(),_=Rb(t,m,cI,{duration:150})},i(M){g||(nt(()=>{g&&(p&&p.end(1),d=X_(t,yt,{duration:150}),d.start())}),g=!0)},o(M){d&&d.invalidate(),p=ka(t,Xr,{duration:150}),g=!1},d(M){M&&w(t),C.d(),M&&p&&p.end(),b=!1,k()}}}function _I(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=>o1(l)]}class bI extends ve{constructor(e){super(),be(this,e,gI,_I,_e,{})}}function vI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=W(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&oe(i,t)},d(l){l&&w(e)}}}function yI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Ee(r)}}}function kI(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:[yI],header:[vI]},$$scope:{ctx:n}};return e=new hn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),B(e,s)}}}function wI(n,e,t){let i;Je(n,ou,d=>t(1,i=d));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(d){se[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await an(),t(3,o=!1),ub()};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 SI extends ve{constructor(e){super(),be(this,e,wI,kI,_e,{})}}function j_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return g=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[$I]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),_=E(),U(g.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),mn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,_),z(g,d,null),b=!0,k||($=[De(dn.call(null,t)),De(dn.call(null,l)),De(Gn.call(null,l,{path:"/collections/?.*",className:"current-route"})),De(We.call(null,l,{text:"Collections",position:"right"})),De(dn.call(null,r)),De(Gn.call(null,r,{path:"/logs/?.*",className:"current-route"})),De(We.call(null,r,{text:"Logs",position:"right"})),De(dn.call(null,u)),De(Gn.call(null,u,{path:"/settings/?.*",className:"current-route"})),De(We.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!mn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const D={};C&4096&&(D.$$scope={dirty:C,ctx:T}),g.$set(D)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),B(g),k=!1,Ee($)}}}function $I(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` + to.
    `,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:Q,d(u){u&&w(e),r=!1,a()}}}function F_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function oI(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[sI,iI],_=[];function g(b,k){return b[5]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=W(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&oe(o,b[15]);let $=f;f=g(b),f===$?_[f].p(b,k):(ae(),P(_[$],1,1,()=>{_[$]=null}),ue(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function rI(n){let e,t,i,s,l,o;e=new Ui({}),i=new Pn({props:{$$slots:{default:[oI]},$$scope:{ctx:n}}});let r={};return l=new nI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){U(e.$$.fragment),t=E(),U(i.$$.fragment),s=E(),U(l.$$.fragment)},m(a,u){z(e,a,u),S(a,t,u),z(i,a,u),S(a,s,u),z(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 d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){B(e,a),a&&w(t),B(i,a),a&&w(s),n[27](null),B(l,a)}}}function aI(n,e,t){let i,s,l,o,r,a,u;Je(n,Nt,G=>t(15,u=G)),rn(Nt,u="Import collections",u);let f,d,p="",m=!1,_=[],g=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,g=await pe.collections.getFullList(200));for(let G of g)delete G.created,delete G.updated}catch(G){pe.errorResponseHandler(G)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let G of _){const ce=H.findByKey(g,"id",G.id);!(ce!=null&&ce.id)||!H.hasCollectionChanges(ce,G,b)||k.push({new:G,old:ce})}}function D(){t(1,_=[]);try{t(1,_=JSON.parse(p))}catch{}Array.isArray(_)?t(1,_=H.filterDuplicatesByKey(_)):t(1,_=[]);for(let G of _)delete G.created,delete G.updated,G.schema=H.filterDuplicatesByKey(G.schema)}function M(){var G,ce;for(let X of _){const le=H.findByKey(g,"name",X.name)||H.findByKey(g,"id",X.id);if(!le)continue;const ye=X.id,Se=le.id;X.id=Se;const Ve=Array.isArray(le.schema)?le.schema:[],ze=Array.isArray(X.schema)?X.schema:[];for(const we of ze){const Me=H.findByKey(Ve,"name",we.name);Me&&Me.id&&(we.id=Me.id)}for(let we of _)if(Array.isArray(we.schema))for(let Me of we.schema)(G=Me.options)!=null&&G.collectionId&&((ce=Me.options)==null?void 0:ce.collectionId)===ye&&(Me.options.collectionId=Se)}t(0,p=JSON.stringify(_,null,4))}function O(G){t(12,m=!0);const ce=new FileReader;ce.onload=async X=>{t(12,m=!1),t(10,f.value="",f),t(0,p=X.target.result),await an(),_.length||(hl("Invalid collections configuration."),I())},ce.onerror=X=>{console.warn(X),hl("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},ce.readAsText(G)}function I(){t(0,p=""),t(10,f.value="",f),un({})}function L(G){se[G?"unshift":"push"](()=>{f=G,t(10,f)})}const F=()=>{f.files.length&&O(f.files[0])},q=()=>{f.click()};function N(){p=this.value,t(0,p)}function R(){b=this.checked,t(3,b)}const j=()=>M(),V=()=>I(),K=()=>d==null?void 0:d.show(g,_,b);function ee(G){se[G?"unshift":"push"](()=>{d=G,t(11,d)})}const te=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&D(),n.$$.dirty[0]&3&&t(6,i=!!p&&_.length&&_.length===_.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(G=>i&&b&&!H.findByKey(_,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(G=>i&&!H.findByKey(g,"id",G.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(G=>{let ce=H.findByKey(g,"name",G.name)||H.findByKey(g,"id",G.id);if(!ce)return!1;if(ce.id!=G.id)return!0;const X=Array.isArray(ce.schema)?ce.schema:[],le=Array.isArray(G.schema)?G.schema:[];for(const ye of le){if(H.findByKey(X,"id",ye.id))continue;const Ve=H.findByKey(X,"name",ye.name);if(Ve&&ye.id!=Ve.id)return!0}return!1}))},[p,_,g,b,k,$,i,o,l,s,f,d,m,a,r,u,M,O,I,L,F,q,N,R,j,V,K,ee,te]}class uI extends ve{constructor(e){super(),be(this,e,aI,rI,_e,{},null,[-1,-1])}}const zt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Vi("/"):!0}],fI={"/login":qt({component:nE,conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":qt({asyncComponent:()=>rt(()=>import("./PageAdminRequestPasswordReset-4f869a22.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageAdminConfirmPasswordReset-19ab2844.js"),[],import.meta.url),conditions:zt.concat([n=>!pe.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":qt({component:TD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":qt({component:v$,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":qt({component:dE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":qt({component:GD,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":qt({component:GE,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":qt({component:dA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":qt({component:DA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":qt({component:qA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":qt({component:UA,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":qt({component:uI,conditions:zt.concat([n=>pe.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-75950edb.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmPasswordReset-75950edb.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-f05f93e2.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmVerification-f05f93e2.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-b08cb6a3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":qt({asyncComponent:()=>rt(()=>import("./PageRecordConfirmEmailChange-b08cb6a3.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":qt({asyncComponent:()=>rt(()=>import("./PageOAuth2Redirect-f11dcc6f.js"),[],import.meta.url),conditions:zt,userData:{showAppSidebar:!1}}),"*":qt({component:Hy,userData:{showAppSidebar:!1}})};function cI(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:d=m=>Math.sqrt(m)*120,easing:p=Wo}=i;return{delay:f,duration:Vt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,_)=>{const g=_*a,b=_*u,k=m+_*e.width/t.width,$=m+_*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${$});`}}}function R_(n,e,t){const i=n.slice();return i[2]=e[t],i}function dI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function pI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function mI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hI(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function q_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m,_=Q,g,b,k;function $(M,O){return M[2].type==="info"?hI:M[2].type==="success"?mI:M[2].type==="warning"?pI:dI}let T=$(e),C=T(e);function D(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),C.c(),s=E(),l=y("div"),r=W(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){S(M,t,O),v(t,i),C.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),g=!0,b||(k=J(u,"click",at(D)),b=!0)},p(M,O){e=M,T!==(T=$(e))&&(C.d(1),C=T(e),C&&(C.c(),C.m(i,null))),(!g||O&1)&&o!==(o=e[2].message+"")&&oe(r,o),(!g||O&1)&&x(t,"alert-info",e[2].type=="info"),(!g||O&1)&&x(t,"alert-success",e[2].type=="success"),(!g||O&1)&&x(t,"alert-danger",e[2].type=="error"),(!g||O&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){qb(t),_(),K_(t,m)},a(){_(),_=Rb(t,m,cI,{duration:150})},i(M){g||(nt(()=>{g&&(p&&p.end(1),d=X_(t,yt,{duration:150}),d.start())}),g=!0)},o(M){d&&d.invalidate(),p=ka(t,Xr,{duration:150}),g=!1},d(M){M&&w(t),C.d(),M&&p&&p.end(),b=!1,k()}}}function _I(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=>o1(l)]}class bI extends ve{constructor(e){super(),be(this,e,gI,_I,_e,{})}}function vI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=W(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&oe(i,t)},d(l){l&&w(e)}}}function yI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Ee(r)}}}function kI(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:[yI],header:[vI]},$$scope:{ctx:n}};return e=new hn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){U(e.$$.fragment)},m(s,l){z(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||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),B(e,s)}}}function wI(n,e,t){let i;Je(n,ou,d=>t(1,i=d));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(d){se[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await an(),t(3,o=!1),ub()};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 SI extends ve{constructor(e){super(),be(this,e,wI,kI,_e,{})}}function j_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return g=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[$I]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),_=E(),U(g.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),mn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,_),z(g,d,null),b=!0,k||($=[De(dn.call(null,t)),De(dn.call(null,l)),De(Gn.call(null,l,{path:"/collections/?.*",className:"current-route"})),De(We.call(null,l,{text:"Collections",position:"right"})),De(dn.call(null,r)),De(Gn.call(null,r,{path:"/logs/?.*",className:"current-route"})),De(We.call(null,r,{text:"Logs",position:"right"})),De(dn.call(null,u)),De(Gn.call(null,u,{path:"/settings/?.*",className:"current-route"})),De(We.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!mn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const D={};C&4096&&(D.$$scope={dirty:C,ctx:T}),g.$set(D)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),B(g),k=!1,Ee($)}}}function $I(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` Manage admins`,t=E(),i=y("hr"),s=E(),l=y("button"),l.innerHTML=` Logout`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"type","button"),h(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=[De(dn.call(null,e)),J(l,"click",n[7])],o=!0)},p:Q,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Ee(r)}}}function V_(n){let e,t,i;return t=new cu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:H.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=y("div"),U(t.$$.fragment),h(e,"class","tinymce-preloader hidden")},m(s,l){S(s,e,l),z(t,e,null),i=!0},p:Q,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),B(t)}}}function CI(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;document.title=e=H.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((b=n[0])==null?void 0:b.id)&&n[1]&&j_(n);o=new Xb({props:{routes:fI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new bI({}),f=new SI({});let g=n[1]&&!n[2]&&V_(n);return{c(){t=E(),i=y("div"),_&&_.c(),s=E(),l=y("div"),U(o.$$.fragment),r=E(),U(a.$$.fragment),u=E(),U(f.$$.fragment),d=E(),g&&g.c(),p=$e(),h(l,"class","app-body"),h(i,"class","app-layout")},m(k,$){S(k,t,$),S(k,i,$),_&&_.m(i,null),v(i,s),v(i,l),z(o,l,null),v(l,r),z(a,l,null),S(k,u,$),z(f,k,$),S(k,d,$),g&&g.m(k,$),S(k,p,$),m=!0},p(k,[$]){var T;(!m||$&24)&&e!==(e=H.joinNonEmpty([k[4],k[3],"PocketBase"]," - "))&&(document.title=e),(T=k[0])!=null&&T.id&&k[1]?_?(_.p(k,$),$&3&&A(_,1)):(_=j_(k),_.c(),A(_,1),_.m(i,s)):_&&(ae(),P(_,1,1,()=>{_=null}),ue()),k[1]&&!k[2]?g?(g.p(k,$),$&6&&A(g,1)):(g=V_(k),g.c(),A(g,1),g.m(p.parentNode,p)):g&&(ae(),P(g,1,1,()=>{g=null}),ue())},i(k){m||(A(_),A(o.$$.fragment,k),A(a.$$.fragment,k),A(f.$$.fragment,k),A(g),m=!0)},o(k){P(_),P(o.$$.fragment,k),P(a.$$.fragment,k),P(f.$$.fragment,k),P(g),m=!1},d(k){k&&w(t),k&&w(i),_&&_.d(),B(o),B(a),k&&w(u),B(f,k),k&&w(d),g&&g.d(k),k&&w(p)}}}function TI(n,e,t){let i,s,l,o;Je(n,Es,g=>t(10,i=g)),Je(n,wo,g=>t(3,s=g)),Je(n,La,g=>t(0,l=g)),Je(n,Nt,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var b,k,$,T;((b=g==null?void 0:g.detail)==null?void 0:b.location)!==r&&(t(1,a=!!(($=(k=g==null?void 0:g.detail)==null?void 0:k.userData)!=null&&$.showAppSidebar)),r=(T=g==null?void 0:g.detail)==null?void 0:T.location,rn(Nt,o="",o),un({}),ub())}function d(){Vi("/")}async function p(){var g,b;if(l!=null&&l.id)try{const k=await pe.settings.getAll({$cancelKey:"initialAppSettings"});rn(wo,s=((g=k==null?void 0:k.meta)==null?void 0:g.appName)||"",s),rn(Es,i=!!((b=k==null?void 0:k.meta)!=null&&b.hideControls),i)}catch(k){k!=null&&k.isAbort||console.warn("Failed to load app settings.",k)}}function m(){pe.logout()}const _=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&p()},[l,a,u,s,o,f,d,m,_]}class MI extends ve{constructor(e){super(),be(this,e,TI,CI,_e,{})}}new MI({target:document.getElementById("app")});export{Ee as A,Qt as B,H as C,Vi as D,$e as E,a1 as F,sg as G,xt as H,Je as I,ci as J,Tt as K,se as L,rb as M,vt as N,us as O,Kt as P,pt as Q,jo as R,ve as S,kn as T,Rr as U,P as a,E as b,U as c,B as d,y as e,h as f,S as g,v as h,be as i,De as j,ae as k,dn as l,z as m,ue as n,w as o,pe as p,de as q,x as r,_e as s,A as t,J as u,at as v,W as w,oe as x,Q as y,fe as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 04425f27..108ba36d 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -45,7 +45,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/utils/CommonHelper.js b/ui/src/utils/CommonHelper.js index cf6e0391..6caf7a9b 100644 --- a/ui/src/utils/CommonHelper.js +++ b/ui/src/utils/CommonHelper.js @@ -1360,7 +1360,7 @@ export default class CommonHelper { }, { type: "menuitem", - text: "RTR content", + text: "RTL content", icon: "rtl", onAction: () => { window?.localStorage?.setItem(lastDirectionKey, "rtl");