diff --git a/apis/realtime.go b/apis/realtime.go
index a4c066a8..91191292 100644
--- a/apis/realtime.go
+++ b/apis/realtime.go
@@ -251,7 +251,7 @@ func (api *realtimeApi) canAccessRecord(client subscriptions.Client, record *mod
}
// emulate request data
- requestData := &models.FilterRequestData{
+ requestData := &models.RequestData{
Method: "GET",
}
requestData.AuthRecord, _ = client.Get(ContextAuthRecordKey).(*models.Record)
diff --git a/apis/record_auth.go b/apis/record_auth.go
index a11c0a84..3f48ead2 100644
--- a/apis/record_auth.go
+++ b/apis/record_auth.go
@@ -72,7 +72,7 @@ func (api *recordAuthApi) authResponse(c echo.Context, authRecord *models.Record
expands := strings.Split(c.QueryParam(expandQueryParam), ",")
if len(expands) > 0 {
// create a copy of the cached request data and adjust it to the current auth record
- requestData := *GetRequestData(e.HttpContext)
+ requestData := *RequestData(e.HttpContext)
requestData.Admin = nil
requestData.AuthRecord = e.Record
failed := api.app.Dao().ExpandRecord(
@@ -204,7 +204,7 @@ func (api *recordAuthApi) authWithOAuth2(c echo.Context) error {
record, authData, submitErr := form.Submit(func(createForm *forms.RecordUpsert, authRecord *models.Record, authUser *auth.AuthUser) error {
return createForm.DrySubmit(func(txDao *daos.Dao) error {
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
requestData.Data = form.CreateData
createRuleFunc := func(q *dbx.SelectQuery) error {
diff --git a/apis/record_crud.go b/apis/record_crud.go
index fb22fe29..42585ac2 100644
--- a/apis/record_crud.go
+++ b/apis/record_crud.go
@@ -51,7 +51,7 @@ func (api *recordApi) list(c echo.Context) error {
return err
}
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
if requestData.Admin == nil && collection.ListRule == nil {
// only admins can access if the rule is nil
@@ -110,7 +110,7 @@ func (api *recordApi) view(c echo.Context) error {
return NewNotFoundError("", nil)
}
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
if requestData.Admin == nil && collection.ViewRule == nil {
// only admins can access if the rule is nil
@@ -155,7 +155,7 @@ func (api *recordApi) create(c echo.Context) error {
return NewNotFoundError("", "Missing collection context.")
}
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
if requestData.Admin == nil && collection.CreateRule == nil {
// only admins can access if the rule is nil
@@ -251,7 +251,7 @@ func (api *recordApi) update(c echo.Context) error {
return NewNotFoundError("", nil)
}
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
if requestData.Admin == nil && collection.UpdateRule == nil {
// only admins can access if the rule is nil
@@ -325,7 +325,7 @@ func (api *recordApi) delete(c echo.Context) error {
return NewNotFoundError("", nil)
}
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
if requestData.Admin == nil && collection.DeleteRule == nil {
// only admins can access if the rule is nil
diff --git a/apis/record_helpers.go b/apis/record_helpers.go
index 2beddcff..c9be32ce 100644
--- a/apis/record_helpers.go
+++ b/apis/record_helpers.go
@@ -15,17 +15,22 @@ import (
const ContextRequestDataKey = "requestData"
-// GetRequestData exports common request data fields
+// Deprecated: Will be removed after v0.9. Use apis.RequestData(c) instead.
+func GetRequestData(c echo.Context) *models.RequestData {
+ return RequestData(c)
+}
+
+// RequestData exports cached common request data fields
// (query, body, logged auth state, etc.) from the provided context.
-func GetRequestData(c echo.Context) *models.FilterRequestData {
- // return cached to avoid reading the body multiple times
+func RequestData(c echo.Context) *models.RequestData {
+ // return cached to avoid copying the body multiple times
if v := c.Get(ContextRequestDataKey); v != nil {
- if data, ok := v.(*models.FilterRequestData); ok {
+ if data, ok := v.(*models.RequestData); ok {
return data
}
}
- result := &models.FilterRequestData{
+ result := &models.RequestData{
Method: c.Request().Method,
Query: map[string]any{},
Data: map[string]any{},
@@ -54,7 +59,7 @@ func EnrichRecord(c echo.Context, dao *daos.Dao, record *models.Record, defaultE
// - ensures that the emails of the auth records and their expanded auth relations
// are visibe only for the current logged admin, record owner or record with manage access
func EnrichRecords(c echo.Context, dao *daos.Dao, records []*models.Record, defaultExpands ...string) error {
- requestData := GetRequestData(c)
+ requestData := RequestData(c)
if err := autoIgnoreAuthRecordsEmailVisibility(dao, records, requestData); err != nil {
return fmt.Errorf("Failed to resolve email visibility: %v", err)
@@ -77,7 +82,7 @@ func EnrichRecords(c echo.Context, dao *daos.Dao, records []*models.Record, defa
// expandFetch is the records fetch function that is used to expand related records.
func expandFetch(
dao *daos.Dao,
- requestData *models.FilterRequestData,
+ requestData *models.RequestData,
) daos.ExpandFetchFunc {
return func(relCollection *models.Collection, relIds []string) ([]*models.Record, error) {
records, err := dao.FindRecordsByIds(relCollection.Id, relIds, func(q *dbx.SelectQuery) error {
@@ -117,7 +122,7 @@ func expandFetch(
func autoIgnoreAuthRecordsEmailVisibility(
dao *daos.Dao,
records []*models.Record,
- requestData *models.FilterRequestData,
+ requestData *models.RequestData,
) error {
if len(records) == 0 || !records[0].Collection().IsAuth() {
return nil // nothing to check
@@ -185,7 +190,7 @@ func autoIgnoreAuthRecordsEmailVisibility(
func hasAuthManageAccess(
dao *daos.Dao,
record *models.Record,
- requestData *models.FilterRequestData,
+ requestData *models.RequestData,
) bool {
if !record.Collection().IsAuth() {
return false
diff --git a/apis/record_helpers_test.go b/apis/record_helpers_test.go
index 9aa5a30b..a147c491 100644
--- a/apis/record_helpers_test.go
+++ b/apis/record_helpers_test.go
@@ -13,7 +13,7 @@ import (
"github.com/pocketbase/pocketbase/tests"
)
-func TestGetRequestData(t *testing.T) {
+func TestRequestData(t *testing.T) {
e := echo.New()
req := httptest.NewRequest(http.MethodPost, "/?test=123", strings.NewReader(`{"test":456}`))
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)
@@ -28,10 +28,10 @@ func TestGetRequestData(t *testing.T) {
dummyAdmin.Id = "id2"
c.Set(apis.ContextAdminKey, dummyAdmin)
- result := apis.GetRequestData(c)
+ result := apis.RequestData(c)
if result == nil {
- t.Fatal("Expected *models.FilterRequestData instance, got nil")
+ t.Fatal("Expected *models.RequestData instance, got nil")
}
if result.Method != http.MethodPost {
diff --git a/daos/collection.go b/daos/collection.go
index a2952a23..aa4ffdf5 100644
--- a/daos/collection.go
+++ b/daos/collection.go
@@ -54,7 +54,7 @@ func (dao *Dao) FindCollectionByNameOrId(nameOrId string) (*models.Collection, e
// IsCollectionNameUnique checks that there is no existing collection
// with the provided name (case insensitive!).
//
-// Note: case sensitive check because the name is used also as a table name for the records.
+// Note: case insensitive check because the name is used also as a table name for the records.
func (dao *Dao) IsCollectionNameUnique(name string, excludeIds ...string) bool {
if name == "" {
return false
diff --git a/models/base.go b/models/base.go
index b4fb8788..f542ac30 100644
--- a/models/base.go
+++ b/models/base.go
@@ -1,4 +1,4 @@
-// Package models implements all PocketBase DB models.
+// Package models implements all PocketBase DB models and DTOs.
package models
import (
diff --git a/models/filter_request_data.go b/models/request_data.go
similarity index 73%
rename from models/filter_request_data.go
rename to models/request_data.go
index fa6adc2a..a129c8e7 100644
--- a/models/filter_request_data.go
+++ b/models/request_data.go
@@ -1,8 +1,8 @@
package models
-// FilterRequestData defines a HTTP request data struct, usually used
+// RequestData defines a HTTP request data struct, usually used
// as part of the `@request.*` filter resolver.
-type FilterRequestData struct {
+type RequestData struct {
Method string `json:"method"`
Query map[string]any `json:"query"`
Data map[string]any `json:"data"`
diff --git a/resolvers/record_field_resolver.go b/resolvers/record_field_resolver.go
index 4276094d..2ab8b04a 100644
--- a/resolvers/record_field_resolver.go
+++ b/resolvers/record_field_resolver.go
@@ -55,7 +55,7 @@ type RecordFieldResolver struct {
loadedCollections []*models.Collection
joins []join // we cannot use a map because the insertion order is not preserved
exprs []dbx.Expression
- requestData *models.FilterRequestData
+ requestData *models.RequestData
staticRequestData map[string]any
}
@@ -67,7 +67,7 @@ type RecordFieldResolver struct {
func NewRecordFieldResolver(
dao *daos.Dao,
baseCollection *models.Collection,
- requestData *models.FilterRequestData,
+ requestData *models.RequestData,
allowHiddenFields bool,
) *RecordFieldResolver {
r := &RecordFieldResolver{
diff --git a/resolvers/record_field_resolver_test.go b/resolvers/record_field_resolver_test.go
index 7d63f6de..04b8a953 100644
--- a/resolvers/record_field_resolver_test.go
+++ b/resolvers/record_field_resolver_test.go
@@ -20,7 +20,7 @@ func TestRecordFieldResolverUpdateQuery(t *testing.T) {
t.Fatal(err)
}
- requestData := &models.FilterRequestData{
+ requestData := &models.RequestData{
AuthRecord: authRecord,
}
@@ -182,7 +182,7 @@ func TestRecordFieldResolverResolveSchemaFields(t *testing.T) {
t.Fatal(err)
}
- requestData := &models.FilterRequestData{
+ requestData := &models.RequestData{
AuthRecord: authRecord,
}
@@ -263,7 +263,7 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) {
t.Fatal(err)
}
- requestData := &models.FilterRequestData{
+ requestData := &models.RequestData{
Method: "get",
Query: map[string]any{
"a": 123,
diff --git a/ui/dist/assets/AuthMethodsDocs.91bd4123.js b/ui/dist/assets/AuthMethodsDocs.e9abbcf9.js
similarity index 77%
rename from ui/dist/assets/AuthMethodsDocs.91bd4123.js
rename to ui/dist/assets/AuthMethodsDocs.e9abbcf9.js
index 2f25a458..e15930d4 100644
--- a/ui/dist/assets/AuthMethodsDocs.91bd4123.js
+++ b/ui/dist/assets/AuthMethodsDocs.e9abbcf9.js
@@ -1,4 +1,4 @@
-import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,P as re,Q as we,k as ve,R as Ce,n as Pe,t as J,a as Y,o as _,d as pe,L as Me,C as Se,p as $e,r as H,u as je,O as Ae}from"./index.786ddc4b.js";import{S as Be}from"./SdkTabs.af9891cd.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(J(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,K=a[0].name+"",U,R,q,P,D,j,W,M,N,X,Q,A,Z,V,y=a[0].name+"",I,x,L,B,E,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:`
+import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as _,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index.27866c98.js";import{S as Be}from"./SdkTabs.22a960f8.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",I,x,E,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -14,7 +14,7 @@ import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n
...
final result = await pb.collection('${(ne=a[0])==null?void 0:ne.name}').listAuthMethods();
- `}});let z=a[2];const oe=e=>e[5].code;for(let e=0;e
This method is usually called by users on page/screen reload to ensure that the previously stored
- data in pb.authStore
is still valid and up-to-date.
Authorization:TOKEN
header",Q=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`pb.authStore
is still valid and up-to-date.`,v=p(),ae(g.$$.fragment),w=p(),B=a("h6"),B.textContent="API details",I=p(),S=a("div"),F=a("strong"),F.textContent="POST",ce=p(),L=a("div"),M=a("p"),de=k("/api/collections/"),J=a("strong"),K=k(N),ue=k("/auth-refresh"),pe=p(),V=a("p"),V.innerHTML="Requires record Authorization:TOKEN
header",Q=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`This action usually should be called right after the provider login page redirect.
You could also check the OAuth2 web integration example - .
`,g=p(),re(k.$$.fragment),R=p(),C=s("h6"),C.textContent="API details",N=p(),y=s("div"),F=s("strong"),F.textContent="POST",pe=p(),x=s("div"),D=s("p"),he=v("/api/collections/"),Q=s("strong"),z=v(M),be=v("/auth-with-oauth2"),K=p(),q=s("div"),q.textContent="Body Parameters",Y=p(),I=s("table"),I.innerHTML=`=T)h=u+1;else{i=e[f+2],O.advance();continue O}}break}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a =T)h=u+1;else{i=e[f+2],O.advance();continue O}}break}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;aParam
+ `}});let W=o[2];const ie=e=>e[5].code;for(let e=0;eParam
Type
Description `,V=h(),B=c("div"),B.textContent="Responses",X=h(),S=c("div"),q=c("div");for(let e=0;eString
- The account password to confirm the email change.
Authorization:TOKEN
header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,F,D,V,H,I,j,g,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Authorization:TOKEN
header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,F,D,V,L,I,j,g,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='multipart/form-data
.`,I=m(),j=a("p"),j.innerHTML=`File upload is supported only via multipart/form-data
.
Authorization:TOKEN
header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&z(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&z(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function He(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",F,le,K,C,N,O,Q,y,L,se,H,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new Le({props:{js:`
+import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index.27866c98.js";import{S as He}from"./SdkTabs.22a960f8.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN
header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${o[3]}');
@@ -14,12 +14,12 @@ import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n
...
await pb.collection('${(pe=o[0])==null?void 0:pe.name}').delete('RECORD_ID');
- `}});let _=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;eOPERAND
OPERATOR
OPERAND
, where:`,n=a(),i=l("ul"),c=l("li"),c.innerHTML=`OPERAND
- could be any of the above field literal, string (single
diff --git a/ui/dist/assets/ListExternalAuthsDocs.a160e1ab.js b/ui/dist/assets/ListExternalAuthsDocs.3f25886a.js
similarity index 78%
rename from ui/dist/assets/ListExternalAuthsDocs.a160e1ab.js
rename to ui/dist/assets/ListExternalAuthsDocs.3f25886a.js
index a74c47c9..b86a0310 100644
--- a/ui/dist/assets/ListExternalAuthsDocs.a160e1ab.js
+++ b/ui/dist/assets/ListExternalAuthsDocs.3f25886a.js
@@ -1,4 +1,4 @@
-import{S as Be,i as qe,s as Le,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s,m as Se,x as U,P as Pe,Q as Oe,k as Me,R as Re,n as We,t as te,a as le,o as d,d as Ee,L as ze,C as De,p as He,r as j,u as Ue,O as je}from"./index.786ddc4b.js";import{S as Ge}from"./SdkTabs.af9891cd.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Ie(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Se(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ee(n)}}}function Ke(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",G,oe,se,K,N,y,Q,I,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,S,Z,E,x,B,ee,C,q,$=[],de=new Map,ue,L,k=[],pe=new Map,T;y=new Ge({props:{js:`
+import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s,m as Se,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ee,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index.27866c98.js";import{S as Ne}from"./SdkTabs.22a960f8.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Ie(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Se(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ee(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,I,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,S,Z,E,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${a[3]}');
@@ -22,12 +22,12 @@ import{S as Be,i as qe,s as Le,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s
final result = await pb.collection('${(ke=a[0])==null?void 0:ke.name}').listExternalAuths(
pb.authStore.model.id,
);
- `}});let H=a[2];const fe=e=>e[5].code;for(let e=0;eEnter the email associated with your account and we\u2019ll send you a recovery link:
`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),(!a||$&2)&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=E(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange.ca0271a1.js b/ui/dist/assets/PageRecordConfirmEmailChange.c22b2e8b.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange.ca0271a1.js rename to ui/dist/assets/PageRecordConfirmEmailChange.c22b2e8b.js index 77f5222b..7a7743a9 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange.ca0271a1.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange.c22b2e8b.js @@ -1,4 +1,4 @@ -import{S as z,i as G,s as I,F as J,c as T,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as P,h as k,u as q,v as K,y as E,x as O,z as F}from"./index.786ddc4b.js";function Q(r){let e,t,s,l,n,o,c,i,a,u,g,$,p=r[3]&&S(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),s=m("h5"),l=C(`Type your password to confirm changing your email address +import{S as z,i as G,s as I,F as J,c as T,m as L,t as v,a as y,d as R,C as M,E as N,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as C,b as h,f as d,r as P,h as k,u as q,v as K,y as E,x as O,z as F}from"./index.27866c98.js";function Q(r){let e,t,s,l,n,o,c,i,a,u,g,$,p=r[3]&&S(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),s=m("h5"),l=C(`Type your password to confirm changing your email address `),p&&p.c(),n=h(),T(o.$$.fragment),c=h(),i=m("button"),a=m("span"),a.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(a,"class","txt"),d(i,"type","submit"),d(i,"class","btn btn-lg btn-block"),i.disabled=r[1],P(i,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,s),k(s,l),p&&p.m(s,null),k(e,n),L(o,e,null),k(e,c),k(e,i),k(i,a),u=!0,g||($=q(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=S(f),p.c(),p.m(s,null)):p&&(p.d(1),p=null);const H={};w&769&&(H.$$scope={dirty:w,ctx:f}),o.$set(H),(!u||w&2)&&(i.disabled=f[1]),(!u||w&2)&&P(i,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),R(o),g=!1,$()}}}function U(r){let e,t,s,l,n;return{c(){e=m("div"),e.innerHTML=`Successfully changed the user email address.
You can now sign in with your new email address.
Successfully changed the user password.
You can now sign in with your new password.
Invalid or expired verification token.
Successfully verified email address.
Subscribe to realtime changes via Server-Sent Events (SSE).
Events are sent for create, update and delete record operations (see "Event data format" section below).
`,_=a(),$=u("div"),$.innerHTML=`google
, twitter
,
- github
, etc.Authorization:TOKEN
header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,j,B;return{c(){t=r("tr"),t.innerHTML='Authorization:TOKEN
header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='multipart/form-data
.`,j=m(),B=r("p"),B.innerHTML=`File upload is supported only via multipart/form-data
.
+ `}});let R=p[5]&&yt(),q=((ot=p[0])==null?void 0:ot.isAuth)&&kt(),de=(dt=p[0])==null?void 0:dt.schema;const lt=e=>e[12].name;for(let e=0;emultipart/form-data
.`,N=m(),B=r("p"),B.innerHTML=`File upload is supported only via multipart/form-data
.
Authorization:TOKEN
header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ue,je;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,U=i[0].name+"",K,ve,W,g,X,B,Y,$,j,we,N,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,L,y=[],He=new Map,T;g=new dt({props:{js:`
+import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index.27866c98.js";import{S as dt}from"./SdkTabs.22a960f8.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN
header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:`
import PocketBase from 'pocketbase';
const pb = new PocketBase('${i[3]}');
...
- const record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID', {
+ const record = await pb.collection('${(Ne=i[0])==null?void 0:Ne.name}').getOne('RECORD_ID', {
expand: 'relField1,relField2.subRelField',
});
`,dart:`
@@ -15,10 +15,10 @@ import{S as Ze,i as et,s as tt,O as Ye,e as o,w as m,b as f,c as _e,f as _,g as
...
- final record = await pb.collection('${(je=i[0])==null?void 0:je.name}').getOne('RECORD_ID',
+ final record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID',
'expand': 'relField1,relField2.subRelField',
);
- `}});let v=i[1]&&Ke();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let V=i[4];const Le=e=>e[6].code;for(let e=0;e@request.method
+ .`),c=O(),d=v("div");for(let G=0;G@request.method
@request.query.*
@request.data.*
@request.auth.*
`,$=O(),C=v("hr"),M=O(),T=v("p"),T.innerHTML="You could also add constraints and query other collections using the @collection filter:",D=O(),E=v("div"),E.innerHTML="@collection.ANY_COLLECTION_NAME.*
",I=O(),L=v("hr"),F=O(),q=v("p"),q.innerHTML=`Example rule:
@@ -101,7 +101,7 @@ Also note that some OAuth2 providers (like Twitter), don't return an email and t
`),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&16&&l!==(l=h[14].originalName+"")&&ae(o,l),m&16&&c!==(c=h[14].name+"")&&ae(d,c)},d(h){h&&w(e)}}}function gd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=B("Removed field "),i=v("span"),l=B(s),o=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ae(l,s)},d(r){r&&w(e)}}}function M3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&pd(),m=n[5]&&hd(n),b=n[4],g=[];for(let $=0;$Configure common settings for sending emails.
",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=K(u,"submit",ut(n[25])),b=!0)},p(C,M){(!m||M&32)&&ae(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),A(h,1),h.m(u,null))},i(C){m||(A(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function _D(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[gD]},$$scope:{ctx:n}}});let r={};return l=new iD({props:r}),n[26](l),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&1073741887&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},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){H(e,a),a&&w(t),H(i,a),a&&w(s),n[26](null),H(l,a)}}}function bD(n,e,t){let i,s,l;Ze(n,mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}];Ht(mt,l="Mail settings",l);let r,a={},u={},f=!1,c=!1;d();async function d(){t(2,f=!0);try{const X=await de.settings.getAll()||{};m(X)}catch(X){de.errorResponseHandler(X)}t(2,f=!1)}async function h(){if(!(c||!s)){t(3,c=!0);try{const X=await de.settings.update(W.filterRedactedProps(u));m(X),Fn({}),Lt("Successfully saved mail settings.")}catch(X){de.errorResponseHandler(X)}t(3,c=!1)}}function m(X={}){t(0,u={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),t(9,a=JSON.parse(JSON.stringify(u)))}function b(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function g(){u.meta.senderName=this.value,t(0,u)}function y(){u.meta.senderAddress=this.value,t(0,u)}function k(X){n.$$.not_equal(u.meta.verificationTemplate,X)&&(u.meta.verificationTemplate=X,t(0,u))}function $(X){n.$$.not_equal(u.meta.resetPasswordTemplate,X)&&(u.meta.resetPasswordTemplate=X,t(0,u))}function C(X){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,X)&&(u.meta.confirmEmailChangeTemplate=X,t(0,u))}function M(){u.smtp.enabled=this.checked,t(0,u)}function T(){u.smtp.host=this.value,t(0,u)}function D(){u.smtp.port=rt(this.value),t(0,u)}function E(X){n.$$.not_equal(u.smtp.tls,X)&&(u.smtp.tls=X,t(0,u))}function I(){u.smtp.username=this.value,t(0,u)}function L(X){n.$$.not_equal(u.smtp.password,X)&&(u.smtp.password=X,t(0,u))}const F=()=>b(),q=()=>h(),z=()=>r==null?void 0:r.show(),J=()=>h();function G(X){le[X?"unshift":"push"](()=>{r=X,t(1,r)})}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(4,s=i!=JSON.stringify(u))},[u,r,f,c,s,l,o,h,b,a,i,g,y,k,$,C,M,T,D,E,I,L,F,q,z,J,G]}class vD extends ye{constructor(e){super(),ve(this,e,bD,_D,be,{})}}function yD(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[wD,({uniqueId:T})=>({25:T}),({uniqueId:T})=>T?33554432:0]},$$scope:{ctx:n}}});let g=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&ch(n),y=n[1].s3.enabled&&dh(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&ph(n),$=n[6]&&hh(n);return{c(){j(e.$$.fragment),t=O(),g&&g.c(),i=O(),y&&y.c(),s=O(),l=v("div"),o=v("div"),r=O(),k&&k.c(),a=O(),$&&$.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],ne(f,"btn-loading",n[3]),p(l,"class","flex")},m(T,D){R(e,T,D),S(T,t,D),g&&g.m(T,D),S(T,i,D),y&&y.m(T,D),S(T,s,D),S(T,l,D),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),$&&$.m(l,null),_(l,u),_(l,f),_(f,c),h=!0,m||(b=K(f,"click",n[19]),m=!0)},p(T,D){var I,L;const E={};D&100663298&&(E.$$scope={dirty:D,ctx:T}),e.$set(E),((I=T[0].s3)==null?void 0:I.enabled)!=T[1].s3.enabled?g?(g.p(T,D),D&3&&A(g,1)):(g=ch(T),g.c(),A(g,1),g.m(i.parentNode,i)):g&&(pe(),P(g,1,1,()=>{g=null}),he()),T[1].s3.enabled?y?(y.p(T,D),D&2&&A(y,1)):(y=dh(T),y.c(),A(y,1),y.m(s.parentNode,s)):y&&(pe(),P(y,1,1,()=>{y=null}),he()),((L=T[1].s3)==null?void 0:L.enabled)&&!T[6]&&!T[3]?k?k.p(T,D):(k=ph(T),k.c(),k.m(l,a)):k&&(k.d(1),k=null),T[6]?$?$.p(T,D):($=hh(T),$.c(),$.m(l,u)):$&&($.d(1),$=null),(!h||D&72&&d!==(d=!T[6]||T[3]))&&(f.disabled=d),(!h||D&8)&&ne(f,"btn-loading",T[3])},i(T){h||(A(e.$$.fragment,T),A(g),A(y),h=!0)},o(T){P(e.$$.fragment,T),P(g),P(y),h=!1},d(T){H(e,T),T&&w(t),g&&g.d(T),T&&w(i),y&&y.d(T),T&&w(s),T&&w(l),k&&k.d(),$&&$.d(),m=!1,b()}}}function kD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function wD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ch(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,b,g,y,k,$,C,M,T,D,E;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=B(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=B(a),f=B(` @@ -169,6 +169,6 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c," `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),j(a.$$.fragment),u=O(),f=O(),I&&I.c(),c=O(),L&&L.c(),d=O(),F&&F.c(),h=O(),m=v("div"),q&&q.c(),b=O(),g=v("div"),y=O(),k=v("button"),$=v("span"),$.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ne(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p($,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(m,"class","flex m-t-base")},m(z,J){S(z,e,J),n[19](e),S(z,t,J),S(z,i,J),_(i,s),_(s,l),_(s,o),S(z,r,J),R(a,z,J),S(z,u,J),S(z,f,J),I&&I.m(z,J),S(z,c,J),L&&L.m(z,J),S(z,d,J),F&&F.m(z,J),S(z,h,J),S(z,m,J),q&&q.m(m,null),_(m,b),_(m,g),_(m,y),_(m,k),_(k,$),M=!0,T||(D=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],T=!0)},p(z,J){(!M||J[0]&4096)&&ne(o,"btn-loading",z[12]);const G={};J[0]&64&&(G.class="form-field "+(z[6]?"":"field-error")),J[0]&65|J[1]&1536&&(G.$$scope={dirty:J,ctx:z}),a.$set(G),z[6]&&z[1].length&&!z[7]?I||(I=Zh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),z[6]&&z[1].length&&z[7]?L?L.p(z,J):(L=Gh(z),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),z[13].length?F?F.p(z,J):(F=rm(z),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),z[0]?q?q.p(z,J):(q=am(z),q.c(),q.m(m,b)):q&&(q.d(1),q=null),(!M||J[0]&16384&&C!==(C=!z[14]))&&(k.disabled=C)},i(z){M||(A(a.$$.fragment,z),A(E),M=!0)},o(z){P(a.$$.fragment,z),P(E),M=!1},d(z){z&&w(e),n[19](null),z&&w(t),z&&w(i),z&&w(r),H(a,z),z&&w(u),z&&w(f),I&&I.d(z),z&&w(c),L&&L.d(z),z&&w(d),F&&F.d(z),z&&w(h),z&&w(m),q&&q.d(),T=!1,Pe(D)}}}function $A(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function Jh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function CA(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Jh();return{c(){e=v("label"),t=B("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),ce(l,n[0]),S(d,r,h),c&&c.m(d,h),S(d,a,h),u||(f=K(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&ce(l,d[0]),!!d[0]&&!d[6]?c||(c=Jh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function Zh(n){let e;return{c(){e=v("div"),e.innerHTML=`