mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-09-30 03:22:04 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f0041a128 | ||
|
|
0ac24af7c9 | ||
|
|
96b2c5fedf | ||
|
|
4019ca5f00 | ||
|
|
20fe3c8c91 | ||
|
|
d87a5e544c | ||
|
|
bb527be493 | ||
|
|
9e3b230c8e | ||
|
|
686198a22e | ||
|
|
086b992c7d | ||
|
|
88d8cec3d9 | ||
|
|
7926501649 |
No files matched your search
@@ -29,7 +29,7 @@
|
||||
The easiest way to interact with the API is to use one of the official SDK clients:
|
||||
|
||||
- **JavaScript - [pocketbase/js-sdk](https://github.com/pocketbase/js-sdk)** (_browser and node_)
|
||||
- **Dart** - _soon_
|
||||
- **Dart - [pocketbase/dart-sdk](https://github.com/pocketbase/dart-sdk)** (_web, mobile, desktop_)
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -58,6 +58,10 @@ func (api *realtimeApi) connect(c echo.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if api.app.IsDebug() {
|
||||
log.Printf("Realtime connection establisehd: %s\n", client.Id())
|
||||
}
|
||||
|
||||
// signalize established connection (aka. fire "connect" message)
|
||||
fmt.Fprint(c.Response(), "id:"+client.Id()+"\n")
|
||||
fmt.Fprint(c.Response(), "event:PB_CONNECT\n")
|
||||
|
||||
@@ -58,11 +58,14 @@ func (dao *Dao) expandRecords(records []*models.Record, expandPath string, fetch
|
||||
// extract the relation field (if exist)
|
||||
mainCollection := records[0].Collection()
|
||||
relField := mainCollection.Schema.GetFieldByName(parts[0])
|
||||
if relField == nil {
|
||||
return fmt.Errorf("Couldn't find field %q in collection %q.", parts[0], mainCollection.Name)
|
||||
if relField == nil || relField.Type != schema.FieldTypeRelation {
|
||||
return fmt.Errorf("Couldn't find relation field %q in collection %q.", parts[0], mainCollection.Name)
|
||||
}
|
||||
relField.InitOptions()
|
||||
relFieldOptions, _ := relField.Options.(*schema.RelationOptions)
|
||||
relFieldOptions, ok := relField.Options.(*schema.RelationOptions)
|
||||
if !ok {
|
||||
return fmt.Errorf("Cannot initialize the options of relation field %q.", parts[0])
|
||||
}
|
||||
|
||||
relCollection, err := dao.FindCollectionByNameOrId(relFieldOptions.CollectionId)
|
||||
if err != nil {
|
||||
|
||||
@@ -63,7 +63,7 @@ func TestExpandRecords(t *testing.T) {
|
||||
0,
|
||||
2,
|
||||
},
|
||||
// invalid missing first level expand
|
||||
// missing relation field
|
||||
{
|
||||
[]string{"b8ba58f9-e2d7-42a0-b0e7-a11efd98236b", "df55c8ff-45ef-4c82-8aed-6e2183fe1125"},
|
||||
[]string{"invalid"},
|
||||
@@ -73,7 +73,17 @@ func TestExpandRecords(t *testing.T) {
|
||||
0,
|
||||
1,
|
||||
},
|
||||
// invalid missing second level expand
|
||||
// existing, but non-relation type field
|
||||
{
|
||||
[]string{"b8ba58f9-e2d7-42a0-b0e7-a11efd98236b", "df55c8ff-45ef-4c82-8aed-6e2183fe1125"},
|
||||
[]string{"title"},
|
||||
func(c *models.Collection, ids []string) ([]*models.Record, error) {
|
||||
return app.Dao().FindRecordsByIds(c, ids, nil)
|
||||
},
|
||||
0,
|
||||
1,
|
||||
},
|
||||
// invalid/missing second level expand
|
||||
{
|
||||
[]string{"b8ba58f9-e2d7-42a0-b0e7-a11efd98236b", "df55c8ff-45ef-4c82-8aed-6e2183fe1125"},
|
||||
[]string{"manyrels.invalid"},
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strconv"
|
||||
@@ -201,6 +202,10 @@ func (form *RecordUpsert) LoadData(r *http.Request) error {
|
||||
// check if there are any new uploaded form files
|
||||
files, err := rest.FindUploadedFiles(r, key)
|
||||
if err != nil {
|
||||
if form.app.IsDebug() {
|
||||
log.Printf("%q uploaded file error: %v\n", key, err)
|
||||
}
|
||||
|
||||
continue // skip invalid or missing file(s)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ const AdminPasswordResetBody = `
|
||||
<p>Follow this link to reset your admin password for {{.AppName}}.</p>
|
||||
|
||||
<p>
|
||||
<a class="btn" href="{{.ActionUrl}}">Reset password</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}">{{.ActionUrl}}</a>
|
||||
<a class="btn" href="{{.ActionUrl}}" target="_blank" rel="noopener">Reset password</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}" target="_blank" rel="noopener">{{.ActionUrl}}</a>
|
||||
</p>
|
||||
|
||||
<p><i>If you did not request to reset your password, please ignore this email and the link will expire on its own.</i></p>
|
||||
|
||||
@@ -14,8 +14,8 @@ const UserConfirmEmailChangeBody = `
|
||||
<p>Hello,</p>
|
||||
<p>Click on the button below to confirm your new email address.</p>
|
||||
<p>
|
||||
<a class="btn" href="{{.ActionUrl}}">Confirm new email</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}">{{.ActionUrl}}</a>
|
||||
<a class="btn" href="{{.ActionUrl}}" target="_blank" rel="noopener">Confirm new email</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}" target="_blank" rel="noopener">{{.ActionUrl}}</a>
|
||||
</p>
|
||||
<p><i>If you didn’t ask to change your email address, you can ignore this email.</i></p>
|
||||
<p>
|
||||
|
||||
@@ -14,8 +14,8 @@ const UserPasswordResetBody = `
|
||||
<p>Hello,</p>
|
||||
<p>Click on the button below to reset your password.</p>
|
||||
<p>
|
||||
<a class="btn" href="{{.ActionUrl}}">Reset password</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}">{{.ActionUrl}}</a>
|
||||
<a class="btn" href="{{.ActionUrl}}" target="_blank" rel="noopener">Reset password</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}" target="_blank" rel="noopener">{{.ActionUrl}}</a>
|
||||
</p>
|
||||
<p><i>If you didn’t ask to reset your password, you can ignore this email.</i></p>
|
||||
<p>
|
||||
|
||||
@@ -15,8 +15,8 @@ const UserVerificationBody = `
|
||||
<p>Thank you for joining us at {{.AppName}}.</p>
|
||||
<p>Click on the button below to verify your email address.</p>
|
||||
<p>
|
||||
<a class="btn" href="{{.ActionUrl}}">Verify</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}">{{.ActionUrl}}</a>
|
||||
<a class="btn" href="{{.ActionUrl}}" target="_blank" rel="noopener">Verify</a>
|
||||
<a class="fallback-link" href="{{.ActionUrl}}" target="_blank" rel="noopener">{{.ActionUrl}}</a>
|
||||
</p>
|
||||
<p>
|
||||
Thanks,<br/>
|
||||
|
||||
@@ -21,7 +21,7 @@ type Github struct {
|
||||
// NewGithubProvider creates new Github provider instance with some defaults.
|
||||
func NewGithubProvider() *Github {
|
||||
return &Github{&baseProvider{
|
||||
scopes: []string{"user"},
|
||||
scopes: []string{"read:user", "user:email"},
|
||||
authUrl: "https://github.com/login/oauth/authorize",
|
||||
tokenUrl: "https://github.com/login/oauth/access_token",
|
||||
userApiUrl: "https://api.github.com/user",
|
||||
|
||||
@@ -177,21 +177,22 @@ func TestFileSystemServe(t *testing.T) {
|
||||
"test_name.txt",
|
||||
false,
|
||||
map[string]string{
|
||||
"Content-Disposition": "attachment; filename=test_name.txt",
|
||||
"Content-Type": "application/octet-stream",
|
||||
"Content-Length": "0",
|
||||
"Content-Disposition": "attachment; filename=test_name.txt",
|
||||
"Content-Type": "application/octet-stream",
|
||||
"Content-Length": "0",
|
||||
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||
},
|
||||
},
|
||||
// png inline
|
||||
{
|
||||
// svg exception
|
||||
// png inline
|
||||
"image.png",
|
||||
"test_name.png",
|
||||
false,
|
||||
map[string]string{
|
||||
"Content-Disposition": "inline; filename=test_name.png",
|
||||
"Content-Type": "image/png",
|
||||
"Content-Length": "73",
|
||||
"Content-Disposition": "inline; filename=test_name.png",
|
||||
"Content-Type": "image/png",
|
||||
"Content-Length": "73",
|
||||
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -200,9 +201,10 @@ func TestFileSystemServe(t *testing.T) {
|
||||
"test_name.svg",
|
||||
false,
|
||||
map[string]string{
|
||||
"Content-Disposition": "attachment; filename=test_name.svg",
|
||||
"Content-Type": "image/svg+xml",
|
||||
"Content-Length": "0",
|
||||
"Content-Disposition": "attachment; filename=test_name.svg",
|
||||
"Content-Type": "image/svg+xml",
|
||||
"Content-Length": "0",
|
||||
"Content-Security-Policy": "default-src 'none'; style-src 'unsafe-inline'; sandbox",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -147,11 +147,17 @@ func (f FilterData) resolveToken(token fexpr.Token, fieldResolver FieldResolver)
|
||||
}
|
||||
|
||||
return name, params, err
|
||||
case fexpr.TokenNumber, fexpr.TokenText:
|
||||
case fexpr.TokenText:
|
||||
placeholder := "t" + security.RandomString(7)
|
||||
name := fmt.Sprintf("{:%s}", placeholder)
|
||||
params := dbx.Params{placeholder: token.Literal}
|
||||
|
||||
return name, params, nil
|
||||
case fexpr.TokenNumber:
|
||||
placeholder := "t" + security.RandomString(7)
|
||||
name := fmt.Sprintf("{:%s}", placeholder)
|
||||
params := dbx.Params{placeholder: cast.ToFloat64(token.Literal)}
|
||||
|
||||
return name, params, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -288,8 +288,8 @@ func TestProviderExecNonEmptyQuery(t *testing.T) {
|
||||
false,
|
||||
`{"page":1,"perPage":` + fmt.Sprint(MaxPerPage) + `,"totalItems":1,"items":[{"test1":2,"test2":"test2.2","test3":""}]}`,
|
||||
[]string{
|
||||
"SELECT COUNT(*) FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= '2') ORDER BY `test1` ASC, `test2` DESC",
|
||||
"SELECT * FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= '2') ORDER BY `test1` ASC, `test2` DESC LIMIT 200",
|
||||
"SELECT COUNT(*) FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= 2) ORDER BY `test1` ASC, `test2` DESC",
|
||||
"SELECT * FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= 2) ORDER BY `test1` ASC, `test2` DESC LIMIT 200",
|
||||
},
|
||||
},
|
||||
// valid sort and filter fields (zero results)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# all environments should start with 'PB_' prefix
|
||||
PB_BACKEND_URL = /
|
||||
PB_BACKEND_URL = ../
|
||||
PB_PROFILE_COLLECTION = profiles
|
||||
PB_RULES_SYNTAX_DOCS = https://pocketbase.io/docs/manage-collections#rules-filters-syntax
|
||||
PB_INSTALLER_PARAM = installer
|
||||
@@ -1,12 +0,0 @@
|
||||
import{S as Sa,i as va,s as Ca,e as Aa,f as Ma,g as Da,y as xn,o as Oa,G as Ta,H as Ba,I as Ra,J as Pa,K as La,C as kn,L as Ea}from"./index.38300823.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new zo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new qo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(hr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,hr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=`
|
||||
`){let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>e&&o&&(s+=i),e<h&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new Q(i,s)),i=[],s=-1);return s>-1&&t.push(new Q(i,s)),t}}class Ve extends z{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],h=o+l.length;if(e<=h&&t>=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new Ve(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
||||
`){let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],h=o+l.length;o>e&&r&&(s+=i),e<h&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ve))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Q(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ve)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof Q&&h&&(p=c[c.length-1])instanceof Q&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new Q(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:Ve.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ve(l,t)}}z.empty=new Q([""],0);function Ia(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Pi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=t&&(h>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=h+1}return e}function hr(n,e,t){return Pi(n,[""],e,t)}class Zt{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Q?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Q?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(s instanceof Q){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Q?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class zo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zt(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class qo{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=zo.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=function(){return this});class Na{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Dt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<Dt.length;n++)Dt[n]+=Dt[n-1];function Va(n){for(let e=1;e<Dt.length;e+=2)if(Dt[e]>n)return Dt[e-1]<=n;return!1}function ar(n){return n>=127462&&n<=127487}const cr=8205;function Ae(n,e,t=!0,i=!0){return(t?Ko:Fa)(n,e,i)}function Ko(n,e,t){if(e==n.length)return e;e&&Uo(n.charCodeAt(e))&&jo(n.charCodeAt(e-1))&&e--;let i=re(n,e);for(e+=ve(i);e<n.length;){let s=re(n,e);if(i==cr||s==cr||t&&Va(s))e+=ve(s),i=s;else if(ar(s)){let r=0,o=e-2;for(;o>=0&&ar(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Fa(n,e,t){for(;e>0;){let i=Ko(n,e-2,t);if(i<e)return i;e--}return 0}function Uo(n){return n>=56320&&n<57344}function jo(n){return n>=55296&&n<56320}function re(n,e){let t=n.charCodeAt(e);if(!jo(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Uo(i)?(t-55296<<10)+(i-56320)+65536:t}function Rs(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const Kn=/\r\n?|\n/;var me=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(me||(me={}));class We{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Un(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s
Line truncated
|
||||
`}get readOnly(){return this.facet(tl)}phrase(e,...t){for(let i of this.facet(V.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(Xo))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return Xa(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let h=Ae(t,o,!1);if(r(t.slice(h,o))!=ce.Word)break;o=h}for(;l<s;){let h=Ae(t,l);if(r(t.slice(l,h))!=ce.Word)break;l=h}return o==l?null:m.range(o+i,l+i)}}V.allowMultipleSelections=Yo;V.tabSize=T.define({combine:n=>n.length?n[0]:4});V.lineSeparator=_o;V.readOnly=tl;V.phrases=T.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});V.languageData=Xo;V.changeFilter=Qo;V.transactionFilter=Zo;V.transactionExtender=el;_e.reconfigure=H.define();function zt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class pt{eq(e){return this==e}range(e,t=e){return ri.create(e,t,this)}}pt.prototype.startSide=pt.prototype.endSide=0;pt.prototype.point=!1;pt.prototype.mapMode=me.TrackDel;class ri{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ri(e,t,i)}}function Yn(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Es{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-e||(i?this.value[h].endSide:this.value[h].startSide)-t;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let h=0;h<this.value.length;h++){let a=this.value[h],c=this.from[h]+e,f=this.to[h]+e,u,d;if(c==f){let p=t.mapPos(c,a.startSide,a.mapMode);if(p==null||(u=d=p,a.startSide!=a.endSide&&(d=t.mapPos(c,a.endSide),d<u)))continue}else if(u=t.mapPos(c,a.startSide),d=t.mapPos(f,a.endSide),u>d||u==d&&a.startSide>0&&a.endSide<=0)continue;(d-u||a.endSide-a.startSide)<0||(o<0&&(o=u),a.point&&(l=Math.max(l,d-u)),i.push(a),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Es(s,r,i,l):null,pos:o}}}class Y{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new Y(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Yn)),this.isEmpty)return t.length?Y.of(t):this;let l=new sl(this,null,-1).goto(0),h=0,a=[],c=new gt;for(;l.value||h<t.length;)if(h<t.length&&(l.from-t[h].from||l.startSide-t[h].value.startSide)>=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(l.chunkIndex)<t[h].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||a.push(ri.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!a.length?Y.empty:this.nextLayer.update({add:a,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],h=this.chunk[o],a=e.touchesRange(l,l+h.length);if(a===!1)s=Math.max(s,h.maxPoint),t.push(h),i.push(e.mapPos(l));else if(a===!0){let{mapped:c,pos:f}=h.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new Y(i,t,r||Y.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return oi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return oi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),h=dr(o,l,i),a=new Ut(o,h,r),c=new Ut(l
Line truncated
|
||||
`)}static newName(){let e=yr[mr]||1;return yr[mr]=e+1,Zn+e.toString(36)}static mount(e,t){(e[es]||new _a(e)).mount(Array.isArray(t)?t:[t])}}let bi=null;class _a{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(bi)return e.adoptedStyleSheets=[bi.sheet].concat(e.adoptedStyleSheets),e[es]=bi;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),bi=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[es]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r<e.length;r++){let o=e[r],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h<o.rules.length;h++)t.insertRule(o.rules[h],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(!t){let r="";for(let o=0;o<this.modules.length;o++)r+=this.modules[o].getRules()+`
|
||||
`;this.styleTag.textContent=r}}}var rt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Rt={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},br=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),Qa=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),Za=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),wr=typeof navigator<"u"&&/Mac/.test(navigator.platform),ec=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),tc=br&&(wr||+br[1]<57)||Za&≀for(var oe=0;oe<10;oe++)rt[48+oe]=rt[96+oe]=String(oe);for(var oe=1;oe<=24;oe++)rt[oe+111]="F"+oe;for(var oe=65;oe<=90;oe++)rt[oe]=String.fromCharCode(oe+32),Rt[oe]=String.fromCharCode(oe);for(var vn in rt)Rt.hasOwnProperty(vn)||(Rt[vn]=rt[vn]);function ic(n){var e=tc&&(n.ctrlKey||n.altKey||n.metaKey)||(Qa||ec)&&n.shiftKey&&n.key&&n.key.length==1,t=!e&&n.key||(n.shiftKey?Rt:rt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function Hi(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Pt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function nc(){let n=document.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function ts(n,e){if(!e.anchorNode)return!1;try{return Pt(n,e.anchorNode)}catch{return!1}}function li(n){return n.nodeType==3?Lt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Wi(n,e,t,i){return t?xr(n,e,t,i,-1)||xr(n,e,t,i,1):!1}function is(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function xr(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:zi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=is(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?zi(n):0}else return!1}}function zi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const rl={left:0,right:0,top:0,bottom:0};function on(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function sc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function rc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=sc(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top<f.top?(p=-(f.top-e.top+o),t>0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p<f.top&&(p=-(f.top+p-e.top+o)));else{let g=e.bottom-e.top,y=f.bottom-f.top;p=(s=="center"&&g<=y?e.top+g/2-y/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-y+o)-f.top}if(i=="nearest"?e.left<f.left?(d=-(f.left-e.left+r),t>0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.left<f.left+d&&(d=-(f.left+d-e.left+r))):d=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==l?e.left-r:e.right-(f.right-f.left)+r)-f.left,d||p)if(u)a.scrollBy(d,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(d){let g=c.scrollLeft;c.scrollLeft+=d,d=c.scrollLeft-g}e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(u)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}class oc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let vt=null;function ol(n){if(n.setActive)return n.setActive();if(vt)return n.focus(vt);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(vt==null?{get preventScroll(){return vt={preventScroll:!0},!0}}:void 0),!vt){vt=!1;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],r=e[t++];i.scrollTop!=s&&(i.Line truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=m.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Pc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ce.Space&&(s=o),s==o}}function Lc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return m.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i!=null?i:n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=Il(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return m.cursor(g,e.assoc,void 0,o)}}function Dn(n,e,t){let i=n.state.facet(Dl).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.from<l&&(t=e.from>t.from?m.cursor(o,1):m.cursor(l,-1),s=!0)});if(!s)return t}}class Ec{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let t in ie){let i=ie[t];e.contentDOM.addEventListener(t,s=>{!Vr(e,s)||this.ignoreDuringComposition(s)||t=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,s)?s.preventDefault():i(e,s))}),this.registeredEvents.push(t)}M.chrome&&M.chrome_version>=102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,M.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{!Vr(e,l)||this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Re(t.state,o)}}return!1}runScrollHandlers(e,t){for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Re(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(M.android&&M.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return M.ios&&(i=Nl.find(s=>s.keyCode==t.keyCode))&&!(t.ctrlKey||t.altKey||t.metaKey)&&!t.synthetic?(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,ti(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:M.safari&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229||e.type=="compositionend"&&!M.ios}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Nl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Vl=[16,17,18,20,91,92,224,225];class Ic{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.lastEvent=t;let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(V.allowMultipleSelections)&&Nc(e,t),this.dragMove=Vc(e,t),this.dragging=Fc(e,t)&&Fs(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.i
Line truncated
|
||||
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\uFEFF\uFFF9-\uFFFC]`,ws),Bf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Bn=null;function Rf(){var n;if(Bn==null&&typeof document<"u"&&document.body){let e=document.body.style;Bn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Bn||!1}const Ii=T.define({combine(n){let e=zt(n,{render:null,specialChars:Tf,addSpecialChars:null});return(e.replaceTabs=!Rf())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ws)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ws)),e}});function Pf(n={}){return[Ii.of(n),Lf()]}let so=null;function Lf(){return so||(so=ue.fromClass(class{constructor(n){this.view=n,this.decorations=R.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Ii)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Of({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=re(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=ui(o.text,l,i-o.from);return R.replace({widget:new Vf((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=R.replace({widget:new Nf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Ii);n.startState.facet(Ii)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Ef="\u2022";function If(n){return n>=32?Ef:n==10?"\u2424":String.fromCharCode(9216+n)}class Nf extends xt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=If(this.code),i=e.state.phrase("Control character")+" "+(Bf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Vf extends xt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class Ff extends xt{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function ro(n){return ue.fromClass(class{constructor(e){this.view=e,this.placeholder=R.set([R.widget({widget:new Ff(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?R.none:this.placeholder}},{decorations:e=>e.decorations})}const xs=2e3;function Hf(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>xs||t.off>xs||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(m.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=Qn(a.text,o,n.tabSize,!0);if(c>-1){let f=Qn(a.text,l,n.tabSize);r.push(m.range(a.from+c,a.from+f))}}}return r}function Wf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function oo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>xs?-1:s==i.length?Wf(n,e.clientX):ui(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function zf(n,e){let t=oo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=oo(n,s);if(!l)return i;let h=Hf(n.state,t,l);return h.length?o?m.create(h.concat(i.ranges)):m.create(h):i}}:null}function qf(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?zf(t,i):null)}const Rn="-10000px";class Kf{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){let t=e.state.facet(this.facet),i=t.filter(r=>r);if(t===this.input){for(let r of this.tooltipViews)r.update&&r.update(e);return!1}let s=[];for(let
Line truncated
|
||||
`&&(t="");else{let i=t.indexOf(`
|
||||
`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;t+=this.ranges[++this.rangeIndex].from-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,s,r){if(this.ranges.length>1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new bh(t,e?e.state.tabSize:4,e?bt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=xh(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=_.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Wu,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new _(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new _(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function xh(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let s=n(e,t);if(e.pos>e.start)return s}throw new Error("Stream parser failed to advance stream.")}const Xs=Object.create(null),ci=[we.none],Wu=new zs(ci),yo=[],kh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])kh[n]=vh(Xs,e);class Sh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),kh)}resolve(e){return e?this.table[e]||(this.table[e]=vh(this.extra,e)):0}}const zu=new Sh(Xs);function Fn(n,e){yo.indexOf(n)>-1||(yo.push(n),console.warn(e))}function vh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||k[r];o?typeof o=="function"?t?t=o(t):Fn(r,`Modifier ${r} used at start of tag`):t?Fn(r,`Tag ${r} used as modifier`):t=o:Fn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=we.define({id:ci.length,name:i,props:[lu({[i]:t})]});return ci.push(s),s.id}function qu(n){let e=we.define({id:ci.length,name:"Document",props:[ai.add(()=>n)]});return ci.push(e),e}const Ku=n=>{let e=_s(n.state);return e.line?Uu(n):e.block?Gu(n):!1};function Ys(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const Uu=Ys(Xu,0),ju=Ys(Ch,0),Gu=Ys((n,e)=>Ch(n,e,$u(e)),0);function _s(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Jt=50;function Ju(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Jt,i),o=n.sliceDoc(s,s+Jt),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*Jt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Jt),f=n.sliceDoc(s-Jt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function $u(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from,to:s.to})}return e}function Ch(n,e,t=e.selection.ranges){let i=t.map(r=>_s(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>Ju(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;o<s.length;o++)if(l=s[o]){let h=i[o],{open:a,close:c}=l;r.push({from:a.pos-h.open.length,to:a.pos+a.margin},{from:c.pos-c.margin,to:c.pos+h.close.length})}return{changes:r}}return null}function Xu(n,e,t=e.selection.ranges){let i=[],s=-1;for(let{from:r,to:o}of t){let l=i.length,h=1e9;for(let a=r;a<=o;){let c=e.doc.lineAt(a);if(c.from>s&&(r==o||o>c.from)){s=c.from;let f=_s(e,a).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp}create(){return this.regexp?new op(this):new rp(this)}getCursor(e,t=0,i=e.length){return this.regexp?Mt(this,e,t,i):At(this,e,t,i)}}class la{constructor(e){this.spec=e}}function At(n,e,t,i){return new Ht(e,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase())}class rp extends la{constructor(e){super(e)}nextMatch(e,t,i){let s=At(this.spec,e,i,e.length).nextOverlapping();return s.done&&(s=At(this.spec,e,0,t).nextOverlapping()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=At(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=At(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=At(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Mt(n,e,t,i){return new na(e,n.search,n.caseSensitive?void 0:{ignoreCase:!0},t,i)}class op extends la{nextMatch(e,t,i){let s=Mt(this.spec,e,i,e.length).next();return s.done&&(s=Mt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Mt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=Mt(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Mt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const fi=H.define(),tr=H.define(),it=ke.define({create(n){return new zn(Ts(n).create(),null)},update(n,e){for(let t of e.effects)t.is(fi)?n=new zn(t.value.create(),n.panel):t.is(tr)&&(n=new zn(n.query,t.value?ir:null));return n},provide:n=>Gi.from(n,e=>e.panel)});class zn{constructor(e,t){this.query=e,this.panel=t}}const lp=R.mark({class:"cm-searchMatch"}),hp=R.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ap=ue.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(it))}update(n){let e=n.state.field(it);(e!=n.startState.field(it)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return R.none;let{view:t}=this,i=new gt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:h}=r[s];for(;s<o-1&&h>r[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state.doc,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?hp:lp)})}return i.finish()}},{decorations:n=>n.decorations});function pi(n){return e=>{let t=e.state.field(it,!1);return t&&t.query.spec.valid?n(e,t):ha(e)}}const en=pi((n,{query:e})=>{let{from:t,to:i}=n.state.selection.main,s=e.nextMatch(n.state.doc,t,i);return!s||s.from==t&&s.to==i?!1:(n.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:nr(n,s),userEvent:"select.search"}),!0)}),tn=pi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main,r=e.prevMatch(t.doc,i,s);return r?(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:nr(n,r),userEvent:"select.search"}),!0):!1}),cp=pi((n,{query:e})=>{let t=e.matchAll(n.state.doc,1e3);return!t||!t.length?!1:(n.dispatch({selection:m.create(t.map(i=>m.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),fp=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Ht(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(m.range(l.value.from,l.value.to))}return e(n.update({selection:m.create(r,o),userEvent:"select.search.matches"})),!0},Po=pi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t.doc,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t.doc,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l={anchor:r.from-c,head:r.to-c},a.push(nr(n,r))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:a,userEvent:"input.replace"}),!0}),up=pi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state.doc,1e9).map(s=>{let{from:r,to:o}=s;re
Line truncated
|
||||
@@ -0,0 +1,12 @@
|
||||
import{S as Sa,i as va,s as Ca,e as Aa,f as Ma,g as Da,y as Sn,o as Oa,G as Ta,H as Ba,I as Ra,J as La,K as Pa,C as vn,L as Ea}from"./index.7985c732.js";class z{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ve.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Ve.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Zt(this),r=new Zt(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Zt(this,e)}iterRange(e,t=this.length){return new qo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Ko(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?z.empty:e.length<=32?new Q(e):Ve.from(Q.split(e,[]))}}class Q extends z{constructor(e,t=Ia(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Na(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new Q(ar(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Pi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new Q(l,o.length+r.length));else{let h=l.length>>1;i.push(new Q(l.slice(0,h)),new Q(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let s=Pi(this.text,Pi(i.text,ar(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new Q(s,r):Ve.from(Q.split(s,[]),r)}sliceString(e,t=this.length,i=`
|
||||
`){let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>e&&o&&(s+=i),e<h&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=h+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new Q(i,s)),i=[],s=-1);return s>-1&&t.push(new Q(i,s)),t}}class Ve extends z{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,h=i+o.lines-1;if((t?h:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=h+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],h=o+l.length;if(e<=h&&t>=o){let a=s&((o<=e?1:0)|(h>=t?2:0));o>=e&&h<=t&&!a?i.push(l):l.decompose(e-o,t-o,i,a)}o=h+1}}replace(e,t,i){if(i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new Ve(c,this.length-(t-e)+i.length)}return super.replace(r,l,h)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
||||
`){let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],h=o+l.length;o>e&&r&&(s+=i),e<h&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=h+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ve))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let h=this.children[s],a=e.children[r];if(h!=a)return i+h.scanIdentical(a,t);i+=h.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new Q(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],h=0,a=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ve)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof Q&&h&&(p=c[c.length-1])instanceof Q&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new Q(p.text.concat(d.text),p.length+1+d.length)):(h+d.lines>s&&u(),h+=d.lines,a+=d.length+1,c.push(d))}function u(){h!=0&&(l.push(c.length==1?c[0]:Ve.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ve(l,t)}}z.empty=new Q([""],0);function Ia(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Pi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=t&&(h>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=h+1}return e}function ar(n,e,t){return Pi(n,[""],e,t)}class Zt{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Q?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof Q?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(s instanceof Q){let h=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,h.length>Math.max(0,e))return this.value=e==0?h:t>0?h.slice(e):h.slice(0,h.length-e),this;e-=h.length}else{let h=s.children[o+(t<0?-1:0)];e>h.length?(e-=h.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(h),this.offsets.push(t>0?1:(h instanceof Q?h.text.length:h.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class qo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Zt(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class Ko{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(z.prototype[Symbol.iterator]=function(){return this.iter()},Zt.prototype[Symbol.iterator]=qo.prototype[Symbol.iterator]=Ko.prototype[Symbol.iterator]=function(){return this});class Na{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}let Dt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<Dt.length;n++)Dt[n]+=Dt[n-1];function Va(n){for(let e=1;e<Dt.length;e+=2)if(Dt[e]>n)return Dt[e-1]<=n;return!1}function cr(n){return n>=127462&&n<=127487}const fr=8205;function Ae(n,e,t=!0,i=!0){return(t?Uo:Fa)(n,e,i)}function Uo(n,e,t){if(e==n.length)return e;e&&jo(n.charCodeAt(e))&&Go(n.charCodeAt(e-1))&&e--;let i=re(n,e);for(e+=ve(i);e<n.length;){let s=re(n,e);if(i==fr||s==fr||t&&Va(s))e+=ve(s),i=s;else if(cr(s)){let r=0,o=e-2;for(;o>=0&&cr(re(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Fa(n,e,t){for(;e>0;){let i=Uo(n,e-2,t);if(i<e)return i;e--}return 0}function jo(n){return n>=56320&&n<57344}function Go(n){return n>=55296&&n<56320}function re(n,e){let t=n.charCodeAt(e);if(!Go(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return jo(i)?(t-55296<<10)+(i-56320)+65536:t}function Ls(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const jn=/\r\n?|\n/;var me=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(me||(me={}));class We{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Gn(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s
Line truncated
|
||||
`}get readOnly(){return this.facet(il)}phrase(e,...t){for(let i of this.facet(V.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(Yo))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return Xa(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let h=Ae(t,o,!1);if(r(t.slice(h,o))!=ce.Word)break;o=h}for(;l<s;){let h=Ae(t,l);if(r(t.slice(l,h))!=ce.Word)break;l=h}return o==l?null:m.range(o+i,l+i)}}V.allowMultipleSelections=_o;V.tabSize=T.define({combine:n=>n.length?n[0]:4});V.lineSeparator=Qo;V.readOnly=il;V.phrases=T.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});V.languageData=Yo;V.changeFilter=Zo;V.transactionFilter=el;V.transactionExtender=tl;Qe.reconfigure=H.define();function zt(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class pt{eq(e){return this==e}range(e,t=e){return ri.create(e,t,this)}}pt.prototype.startSide=pt.prototype.endSide=0;pt.prototype.point=!1;pt.prototype.mapMode=me.TrackDel;class ri{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new ri(e,t,i)}}function Qn(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Is{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let h=o+l>>1,a=r[h]-e||(i?this.value[h].endSide:this.value[h].startSide)-t;if(h==o)return a>=0?o:l;a>=0?l=h:o=h+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let h=0;h<this.value.length;h++){let a=this.value[h],c=this.from[h]+e,f=this.to[h]+e,u,d;if(c==f){let p=t.mapPos(c,a.startSide,a.mapMode);if(p==null||(u=d=p,a.startSide!=a.endSide&&(d=t.mapPos(c,a.endSide),d<u)))continue}else if(u=t.mapPos(c,a.startSide),d=t.mapPos(f,a.endSide),u>d||u==d&&a.startSide>0&&a.endSide<=0)continue;(d-u||a.endSide-a.startSide)<0||(o<0&&(o=u),a.point&&(l=Math.max(l,d-u)),i.push(a),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Is(s,r,i,l):null,pos:o}}}class Y{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new Y(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Qn)),this.isEmpty)return t.length?Y.of(t):this;let l=new rl(this,null,-1).goto(0),h=0,a=[],c=new gt;for(;l.value||h<t.length;)if(h<t.length&&(l.from-t[h].from||l.startSide-t[h].value.startSide)>=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(l.chunkIndex)<t[h].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||a.push(ri.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!a.length?Y.empty:this.nextLayer.update({add:a,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],h=this.chunk[o],a=e.touchesRange(l,l+h.length);if(a===!1)s=Math.max(s,h.maxPoint),t.push(h),i.push(e.mapPos(l));else if(a===!0){let{mapped:c,pos:f}=h.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new Y(i,t,r||Y.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return oi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return oi.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),h=pr(o,l,i),a=new Ut(o,h,r),c=new Ut(l
Line truncated
|
||||
`)}static newName(){let e=br[yr]||1;return br[yr]=e+1,ts+e.toString(36)}static mount(e,t){(e[is]||new _a(e)).mount(Array.isArray(t)?t:[t])}}let wi=null;class _a{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(wi)return e.adoptedStyleSheets=[wi.sheet].concat(e.adoptedStyleSheets),e[is]=wi;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),wi=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[is]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r<e.length;r++){let o=e[r],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h<o.rules.length;h++)t.insertRule(o.rules[h],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(!t){let r="";for(let o=0;o<this.modules.length;o++)r+=this.modules[o].getRules()+`
|
||||
`;this.styleTag.textContent=r}}}var ot={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Rt={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},wr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),Qa=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),Za=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),xr=typeof navigator<"u"&&/Mac/.test(navigator.platform),ec=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),tc=wr&&(xr||+wr[1]<57)||Za&&xr;for(var oe=0;oe<10;oe++)ot[48+oe]=ot[96+oe]=String(oe);for(var oe=1;oe<=24;oe++)ot[oe+111]="F"+oe;for(var oe=65;oe<=90;oe++)ot[oe]=String.fromCharCode(oe+32),Rt[oe]=String.fromCharCode(oe);for(var An in ot)Rt.hasOwnProperty(An)||(Rt[An]=ot[An]);function ic(n){var e=tc&&(n.ctrlKey||n.altKey||n.metaKey)||(Qa||ec)&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Rt:ot)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function zi(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Lt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function nc(){let n=document.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function Ii(n,e){if(!e.anchorNode)return!1;try{return Lt(n,e.anchorNode)}catch{return!1}}function li(n){return n.nodeType==3?Pt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function qi(n,e,t,i){return t?kr(n,e,t,i,-1)||kr(n,e,t,i,1):!1}function Ki(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function kr(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:hi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Ki(n)+(s<0?0:1),n=r}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=s<0?hi(n):0}else return!1}}function hi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const ol={left:0,right:0,top:0,bottom:0};function hn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function sc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function rc(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=sc(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.parentNode;continue}let g=c.getBoundingClientRect();f={left:g.left,right:g.left+c.clientWidth,top:g.top,bottom:g.top+c.clientHeight}}let d=0,p=0;if(s=="nearest")e.top<f.top?(p=-(f.top-e.top+o),t>0&&e.bottom>f.bottom+p&&(p=e.bottom-f.bottom+p+o)):e.bottom>f.bottom&&(p=e.bottom-f.bottom+o,t<0&&e.top-p<f.top&&(p=-(f.top+p-e.top+o)));else{let g=e.bottom-e.top,y=f.bottom-f.top;p=(s=="center"&&g<=y?e.top+g/2-y/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-y+o)-f.top}if(i=="nearest"?e.left<f.left?(d=-(f.left-e.left+r),t>0&&e.right>f.right+d&&(d=e.right-f.right+d+r)):e.right>f.right&&(d=e.right-f.right+r,t<0&&e.left<f.left+d&&(d=-(f.left+d-e.left+r))):d=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==l?e.left-r:e.right-(f.right-f.left)+r)-f.left,d||p)if(u)a.scrollBy(d,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(d){let g=c.scrollLeft;c.scrollLeft+=d,d=c.scrollLeft-g}e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(u)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}class oc{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,s){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=s}}let vt=null;function ll(n){if(n.setActive)return n.setActive();if(vt)return n.focus(vt);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(vt==null?{get preventScroll(){return vt={preventScroll:!0},!0}}:void 0),!vt){vt=!1;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],r=e[t++];i.scrollTop!Line truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=m.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Pc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==ce.Space&&(s=o),s==o}}function Ec(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return m.cursor(s,e.assoc);let o=e.goalColumn,l,h=n.contentDOM.getBoundingClientRect(),a=n.coordsAtPos(s),c=n.documentTop;if(a)o==null&&(o=a.left-h.left),l=r<0?a.top:a.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(h.right-h.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=h.left+o,u=i!=null?i:n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=Nl(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return m.cursor(g,e.assoc,void 0,o)}}function Tn(n,e,t){let i=n.state.facet(Ol).map(s=>s(n));for(;;){let s=!1;for(let r of i)r.between(t.from-1,t.from+1,(o,l,h)=>{t.from>o&&t.from<l&&(t=e.from>t.from?m.cursor(o,1):m.cursor(l,-1),s=!0)});if(!s)return t}}class Ic{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let t in ie){let i=ie[t];e.contentDOM.addEventListener(t,s=>{!Fr(e,s)||this.ignoreDuringComposition(s)||t=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,s)?s.preventDefault():i(e,s))},gs[t]),this.registeredEvents.push(t)}A.chrome&&A.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,A.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let s;this.customHandlers=[];for(let r of t)if(s=(i=r.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:r.value,handlers:s});for(let o in s)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{!Fr(e,l)||this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let s of this.customHandlers){let r=s.handlers[e];if(r)try{if(r.call(s.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Re(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let s=i.handlers.scroll;if(s)try{s.call(i.plugin,t,e)}catch(r){Re(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(A.android&&A.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return A.ios&&(i=Vl.find(s=>s.keyCode==t.keyCode))&&!(t.ctrlKey||t.altKey||t.metaKey)&&!t.synthetic?(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,ti(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:A.safari&&!A.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229||e.type=="compositionend"&&!A.ios}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Vl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Fl=[16,17,18,20,91,92,224,225];class Nc{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.lastEvent=t;let r=e.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this)),r.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(V.allowMultipleSelections)&&Vc(e,t),this.dragMove=Fc(e,t),this.dragging=Hc(e,t)&&Hs(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging|
Line truncated
|
||||
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,xs),Rf={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ln=null;function Lf(){var n;if(Ln==null&&typeof document<"u"&&document.body){let e=document.body.style;Ln=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Ln||!1}const Vi=T.define({combine(n){let e=zt(n,{render:null,specialChars:Bf,addSpecialChars:null});return(e.replaceTabs=!Lf())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,xs)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,xs)),e}});function Pf(n={}){return[Vi.of(n),Ef()]}let ro=null;function Ef(){return ro||(ro=ue.fromClass(class{constructor(n){this.view=n,this.decorations=R.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Vi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Tf({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=re(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,h=di(o.text,l,i-o.from);return R.replace({widget:new Ff((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=R.replace({widget:new Vf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Vi);n.startState.facet(Vi)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const If="\u2022";function Nf(n){return n>=32?If:n==10?"\u2424":String.fromCharCode(9216+n)}class Vf extends xt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Nf(this.code),i=e.state.phrase("Control character")+" "+(Rf[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Ff extends xt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}class Hf extends xt{constructor(e){super(),this.content=e}toDOM(){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content),typeof this.content=="string"?e.setAttribute("aria-label","placeholder "+this.content):e.setAttribute("aria-hidden","true"),e}ignoreEvent(){return!1}}function oo(n){return ue.fromClass(class{constructor(e){this.view=e,this.placeholder=R.set([R.widget({widget:new Hf(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?R.none:this.placeholder}},{decorations:e=>e.decorations})}const ks=2e3;function Wf(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>ks||t.off>ks||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let h=i;h<=s;h++){let a=n.doc.line(h);a.length<=l&&r.push(m.range(a.from+o,a.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let h=i;h<=s;h++){let a=n.doc.line(h),c=es(a.text,o,n.tabSize,!0);if(c>-1){let f=es(a.text,l,n.tabSize);r.push(m.range(a.from+c,a.from+f))}}}return r}function zf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function lo(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>ks?-1:s==i.length?zf(n,e.clientX):di(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function qf(n,e){let t=lo(n,e),i=n.state.selection;return t?{update(s){if(s.docChanged){let r=s.changes.mapPos(s.startState.doc.line(t.line).from),o=s.state.doc.lineAt(r);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(s.changes)}},get(s,r,o){let l=lo(n,s);if(!l)return i;let h=Wf(n.state,t,l);return h.length?o?m.create(h.concat(i.ranges)):m.create(h):i}}:null}function Kf(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?qf(t,i):null)}const Pn="-10000px";class Uf{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(s=>s),this.tooltipViews=this.tooltips.map(i)}update(e){let t=e.state.facet(this.facet),i=t.filt
Line truncated
|
||||
`&&(t="");else{let i=t.indexOf(`
|
||||
`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let s=this.rangeIndex;;){let r=this.ranges[s].to;if(r>=i||(t=t.slice(0,r-(i-t.length)),s++,s==this.ranges.length))break;let o=this.ranges[s].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let s=this.ranges[this.rangeIndex].to,r=e+t;if(i>0?s>r:s>=r)break;t+=this.ranges[++this.rangeIndex].from-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,s,r){if(this.ranges.length>1){r=this.skipGapsTo(t,r,1),t+=r;let o=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-o}return this.chunk.push(e,t,i,s),r}parseLine(e){let{line:t,end:i}=this.nextLine(),s=0,{streamParser:r}=this.lang,o=new bh(t,e?e.state.tabSize:4,e?bt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=xh(r.token,o,this.state);if(l&&(s=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,s)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=_.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:zu,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new _(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new _(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function xh(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let s=n(e,t);if(e.pos>e.start)return s}throw new Error("Stream parser failed to advance stream.")}const Ys=Object.create(null),fi=[we.none],zu=new qs(fi),bo=[],kh=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])kh[n]=vh(Ys,e);class Sh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),kh)}resolve(e){return e?this.table[e]||(this.table[e]=vh(this.extra,e)):0}}const qu=new Sh(Ys);function Wn(n,e){bo.indexOf(n)>-1||(bo.push(n),console.warn(e))}function vh(n,e){let t=null;for(let r of e.split(".")){let o=n[r]||k[r];o?typeof o=="function"?t?t=o(t):Wn(r,`Modifier ${r} used at start of tag`):t?Wn(r,`Tag ${r} used as modifier`):t=o:Wn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=we.define({id:fi.length,name:i,props:[hu({[i]:t})]});return fi.push(s),s.id}function Ku(n){let e=we.define({id:fi.length,name:"Document",props:[ci.add(()=>n)]});return fi.push(e),e}const Uu=n=>{let e=Qs(n.state);return e.line?ju(n):e.block?Ju(n):!1};function _s(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let s=n(e,t);return s?(i(t.update(s)),!0):!1}}const ju=_s(Yu,0),Gu=_s(Ch,0),Ju=_s((n,e)=>Ch(n,e,Xu(e)),0);function Qs(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Jt=50;function $u(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Jt,i),o=n.sliceDoc(s,s+Jt),l=/\s*$/.exec(r)[0].length,h=/^\s*/.exec(o)[0].length,a=r.length-l;if(r.slice(a-e.length,a)==e&&o.slice(h,h+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:s+h,margin:h&&1}};let c,f;s-i<=2*Jt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Jt),f=n.sliceDoc(s-Jt,s));let u=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(u,u+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:i+u+e.length,margin:/\s/.test(c.charAt(u+e.length))?1:0},close:{pos:s-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function Xu(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),s=t.to<=i.to?i:n.doc.lineAt(t.to),r=e.length-1;r>=0&&e[r].to>i.from?e[r].to=s.to:e.push({from:i.from,to:s.to})}return e}function Ch(n,e,t=e.selection.ranges){let i=t.map(r=>Qs(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>$u(e,i[o],r.from,r.to));if(n!=2&&!s.every(r=>r))return{changes:e.changes(t.map((r,o)=>s[o]?[]:[{from:r.from,insert:i[o].open+" "},{from:r.to,insert:" "+i[o].close}]))};if(n!=1&&s.some(r=>r)){let r=[];for(let o=0,l;o<s.length;o++)if(l=s[o]){let h=i[o],{open:a,close:c}=l;r.push({from:a.pos-h.open.length,to:a.pos+a.margin},{from:c.pos-c.margin,to:c.pos+h.close.length})}return{changes:r}}return null}function Yu(n,e,t=e.selection.ranges){let i=[],s=-1;for(let{from:r,to:o}of t){let l=i.length,h=1e9;for(let a=r;a<=o;){let c=e.doc.lineAt(a);if(c.from>s&&(r==o||o>c.from)){s=c.from;let f=Qs(e,a).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp}create(){return this.regexp?new lp(this):new op(this)}getCursor(e,t=0,i=e.length){return this.regexp?Mt(this,e,t,i):At(this,e,t,i)}}class la{constructor(e){this.spec=e}}function At(n,e,t,i){return new Ht(e,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase())}class op extends la{constructor(e){super(e)}nextMatch(e,t,i){let s=At(this.spec,e,i,e.length).nextOverlapping();return s.done&&(s=At(this.spec,e,0,t).nextOverlapping()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=At(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=At(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=At(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Mt(n,e,t,i){return new na(e,n.search,n.caseSensitive?void 0:{ignoreCase:!0},t,i)}class lp extends la{nextMatch(e,t,i){let s=Mt(this.spec,e,i,e.length).next();return s.done&&(s=Mt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Mt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=Mt(this.spec,e,0,e.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Mt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const ui=H.define(),ir=H.define(),nt=ke.define({create(n){return new Kn(Bs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(ui)?n=new Kn(t.value.create(),n.panel):t.is(ir)&&(n=new Kn(n.query,t.value?nr:null));return n},provide:n=>$i.from(n,e=>e.panel)});class Kn{constructor(e,t){this.query=e,this.panel=t}}const hp=R.mark({class:"cm-searchMatch"}),ap=R.mark({class:"cm-searchMatch cm-searchMatch-selected"}),cp=ue.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(nt))}update(n){let e=n.state.field(nt);(e!=n.startState.field(nt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return R.none;let{view:t}=this,i=new gt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:h}=r[s];for(;s<o-1&&h>r[s+1].from-2*250;)h=r[++s].to;n.highlight(t.state.doc,l,h,(a,c)=>{let f=t.state.selection.ranges.some(u=>u.from==a&&u.to==c);i.add(a,c,f?ap:hp)})}return i.finish()}},{decorations:n=>n.decorations});function gi(n){return e=>{let t=e.state.field(nt,!1);return t&&t.query.spec.valid?n(e,t):ha(e)}}const nn=gi((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state.doc,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:sr(n,i),userEvent:"select.search"}),!0):!1}),sn=gi((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t.doc,i,i);return s?(n.dispatch({selection:{anchor:s.from,head:s.to},scrollIntoView:!0,effects:sr(n,s),userEvent:"select.search"}),!0):!1}),fp=gi((n,{query:e})=>{let t=e.matchAll(n.state.doc,1e3);return!t||!t.length?!1:(n.dispatch({selection:m.create(t.map(i=>m.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),up=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:s}=t.main,r=[],o=0;for(let l=new Ht(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(m.range(l.value.from,l.value.to))}return e(n.update({selection:m.create(r,o),userEvent:"select.search.matches"})),!0},Po=gi((n,{query:e})=>{let{state:t}=n,{from:i,to:s}=t.selection.main;if(t.readOnly)return!1;let r=e.nextMatch(t.doc,i,i);if(!r)return!1;let o=[],l,h,a=[];if(r.from==i&&r.to==s&&(h=t.toText(e.getReplacement(r)),o.push({from:r.from,to:r.to,insert:h}),r=e.nextMatch(t.doc,r.from,r.to),a.push(O.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),r){let c=o.length==0||o[0].from>=r.to?0:r.to-r.from-h.length;l={anchor:r.from-c,head:r.to-c},a.push(sr(n,r))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:a,userEvent:"input.replace"}),!0}),dp=gi((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state.doc,1e9).map(s=>{let{from:r,to:o}=s;return{from:r,to:o,insert:e.getRep
Line truncated
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{S as E,i as G,s as I,F as K,c as F,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 k,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.38300823.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=k(),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=k(),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,C,v,P,A,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 F,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 k,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.7985c732.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=k(),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=k(),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,C,v,P,A,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=k(),F(r.$$.fragment),p=k(),F(d.$$.fragment),n=k(),i=c("button"),g=c("span"),g.textContent="Set new password",R=k(),C=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(C,"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,C,$),_(C,v),P=!0,A||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],A=!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),(!P||$&4)&&(i.disabled=a[2]),$&4&&L(i,"btn-loading",a[2])},i(a){P||(H(r.$$.fragment,a),H(d.$$.fragment,a),P=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),P=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(C),A=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){F(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};
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{S as E,i as M,s as T,F as j,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 z,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as A,v as I,w as h,x as J,y as P,z as R}from"./index.38300823.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=`<h4 class="m-b-xs">Forgotten admin password</h4>
|
||||
import{S as E,i as M,s as T,F as j,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 z,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as A,v as I,w as h,x as J,y as P,z as R}from"./index.7985c732.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=`<h4 class="m-b-xs">Forgotten admin password</h4>
|
||||
<p>Enter the email associated with your account and we\u2019ll send you a recovery link:</p>`,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=A(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]),$&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='<i class="ri-checkbox-circle-line"></i>',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=A(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=z(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 j({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 E{constructor(e){super(),M(this,e,W,V,T,{})}}export{Y as default};
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{S as J,i as M,s as N,F as R,c as S,m as U,t as $,a as v,d as z,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,q as B,e as m,w as y,b as C,f as d,r as H,h as k,u as E,v as D,y as h,x as G,z as T}from"./index.38300823.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address
|
||||
import{S as J,i as M,s as N,F as R,c as S,m as U,t as $,a as v,d as z,C as W,E as Y,g as _,k as j,n as A,o as b,p as F,q as B,e as m,w as y,b as C,f as d,r as H,h as k,u as E,v as D,y as h,x as G,z as T}from"./index.7985c732.js";function I(r){let e,s,t,l,n,o,c,a,i,u,g,q,p=r[3]&&L(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[O,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),s=m("div"),t=m("h4"),l=y(`Type your password to confirm changing your email address
|
||||
`),p&&p.c(),n=C(),S(o.$$.fragment),c=C(),a=m("button"),i=m("span"),i.textContent="Confirm new email",d(t,"class","m-b-xs"),d(s,"class","content txt-center m-b-sm"),d(i,"class","txt"),d(a,"type","submit"),d(a,"class","btn btn-lg btn-block"),a.disabled=r[1],H(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,s),k(s,t),k(t,l),p&&p.m(t,null),k(e,n),U(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||(q=E(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=L(f),p.c(),p.m(t,null)):p&&(p.d(1),p=null);const P={};w&769&&(P.$$scope={dirty:w,ctx:f}),o.$set(P),(!u||w&2)&&(a.disabled=f[1]),w&2&&H(a,"btn-loading",f[1])},i(f){u||($(o.$$.fragment,f),u=!0)},o(f){v(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),z(o),g=!1,q()}}}function K(r){let e,s,t,l,n;return{c(){e=m("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
|
||||
<div class="content txt-bold"><p>Email address changed</p>
|
||||
<p>You can now sign in with your new email address.</p></div>`,s=C(),t=m("button"),t.textContent="Close",d(e,"class","alert alert-success"),d(t,"type","button"),d(t,"class","btn btn-secondary btn-block")},m(o,c){_(o,e,c),_(o,s,c),_(o,t,c),l||(n=E(t,"click",r[6]),l=!0)},p:h,i:h,o:h,d(o){o&&b(e),o&&b(s),o&&b(t),l=!1,n()}}}function L(r){let e,s,t;return{c(){e=y("to "),s=m("strong"),t=y(r[3]),d(s,"class","txt-nowrap")},m(l,n){_(l,e,n),_(l,s,n),k(s,t)},p(l,n){n&8&&G(t,l[3])},d(l){l&&b(e),l&&b(s)}}}function O(r){let e,s,t,l,n,o,c,a;return{c(){e=m("label"),s=y("Password"),l=C(),n=m("input"),d(e,"for",t=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,s),_(i,l,u),_(i,n,u),T(n,r[0]),n.focus(),c||(a=E(n,"input",r[7]),c=!0)},p(i,u){u&256&&t!==(t=i[8])&&d(e,"for",t),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&T(n,i[0])},d(i){i&&b(e),i&&b(l),i&&b(n),c=!1,a()}}}function Q(r){let e,s,t,l;const n=[K,I],o=[];function c(a,i){return a[2]?0:1}return e=c(r),s=o[e]=n[e](r),{c(){s.c(),t=Y()},m(a,i){o[e].m(a,i),_(a,t,i),l=!0},p(a,i){let u=e;e=c(a),e===u?o[e].p(a,i):(j(),v(o[u],1,1,()=>{o[u]=null}),A(),s=o[e],s?s.p(a,i):(s=o[e]=n[e](a),s.c()),$(s,1),s.m(t.parentNode,t))},i(a){l||($(s),l=!0)},o(a){v(s),l=!1},d(a){o[e].d(a),a&&b(t)}}}function V(r){let e,s;return e=new R({props:{nobranding:!0,$$slots:{default:[Q]},$$scope:{ctx:r}}}),{c(){S(e.$$.fragment)},m(t,l){U(e,t,l),s=!0},p(t,[l]){const n={};l&527&&(n.$$scope={dirty:l,ctx:t}),e.$set(n)},i(t){s||($(e.$$.fragment,t),s=!0)},o(t){v(e.$$.fragment,t),s=!1},d(t){z(e,t)}}}function X(r,e,s){let t,{params:l}=e,n="",o=!1,c=!1;async function a(){if(!o){s(1,o=!0);try{await F.Users.confirmEmailChange(l==null?void 0:l.token,n),s(2,c=!0)}catch(g){F.errorResponseHandler(g)}s(1,o=!1)}}const i=()=>window.close();function u(){n=this.value,s(0,n)}return r.$$set=g=>{"params"in g&&s(5,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&s(3,t=W.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[n,o,c,t,a,l,i,u]}class x extends J{constructor(e){super(),M(this,e,X,V,N,{params:5})}}export{x as default};
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{S as W,i as Y,s as j,F as A,c as H,m as N,t as P,a as q,d as S,C as B,E as D,g as _,k as G,n as I,o as m,p as z,q as E,e as b,w as y,b as C,f as c,r as J,h as w,u as h,v as K,y as F,x as O,z as R}from"./index.38300823.js";function Q(i){let e,l,t,n,s,o,p,a,r,u,v,g,k,L,d=i[4]&&M(i);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:i}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password
|
||||
import{S as W,i as Y,s as j,F as A,c as H,m as N,t as P,a as q,d as S,C as B,E as D,g as _,k as G,n as I,o as m,p as z,q as E,e as b,w as y,b as C,f as c,r as J,h as w,u as h,v as K,y as F,x as O,z as R}from"./index.7985c732.js";function Q(i){let e,l,t,n,s,o,p,a,r,u,v,g,k,L,d=i[4]&&M(i);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:i}}}),a=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),t=b("h4"),n=y(`Reset your user password
|
||||
`),d&&d.c(),s=C(),H(o.$$.fragment),p=C(),H(a.$$.fragment),r=C(),u=b("button"),v=b("span"),v.textContent="Set new password",c(t,"class","m-b-xs"),c(l,"class","content txt-center m-b-sm"),c(v,"class","txt"),c(u,"type","submit"),c(u,"class","btn btn-lg btn-block"),u.disabled=i[2],J(u,"btn-loading",i[2])},m(f,$){_(f,e,$),w(e,l),w(l,t),w(t,n),d&&d.m(t,null),w(e,s),N(o,e,null),w(e,p),N(a,e,null),w(e,r),w(e,u),w(u,v),g=!0,k||(L=h(e,"submit",K(i[5])),k=!0)},p(f,$){f[4]?d?d.p(f,$):(d=M(f),d.c(),d.m(t,null)):d&&(d.d(1),d=null);const T={};$&3073&&(T.$$scope={dirty:$,ctx:f}),o.$set(T);const U={};$&3074&&(U.$$scope={dirty:$,ctx:f}),a.$set(U),(!g||$&4)&&(u.disabled=f[2]),$&4&&J(u,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(a.$$.fragment,f),g=!0)},o(f){q(o.$$.fragment,f),q(a.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),S(o),S(a),k=!1,L()}}}function V(i){let e,l,t,n,s;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
|
||||
<div class="content txt-bold"><p>Password changed</p>
|
||||
<p>You can now sign in with your new password.</p></div>`,l=C(),t=b("button"),t.textContent="Close",c(e,"class","alert alert-success"),c(t,"type","button"),c(t,"class","btn btn-secondary btn-block")},m(o,p){_(o,e,p),_(o,l,p),_(o,t,p),n||(s=h(t,"click",i[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(t),n=!1,s()}}}function M(i){let e,l,t;return{c(){e=y("for "),l=b("strong"),t=y(i[4])},m(n,s){_(n,e,s),_(n,l,s),w(l,t)},p(n,s){s&16&&O(t,n[4])},d(n){n&&m(e),n&&m(l)}}}function X(i){let e,l,t,n,s,o,p,a;return{c(){e=b("label"),l=y("New password"),n=C(),s=b("input"),c(e,"for",t=i[10]),c(s,"type","password"),c(s,"id",o=i[10]),s.required=!0,s.autofocus=!0},m(r,u){_(r,e,u),w(e,l),_(r,n,u),_(r,s,u),R(s,i[0]),s.focus(),p||(a=h(s,"input",i[8]),p=!0)},p(r,u){u&1024&&t!==(t=r[10])&&c(e,"for",t),u&1024&&o!==(o=r[10])&&c(s,"id",o),u&1&&s.value!==r[0]&&R(s,r[0])},d(r){r&&m(e),r&&m(n),r&&m(s),p=!1,a()}}}function Z(i){let e,l,t,n,s,o,p,a;return{c(){e=b("label"),l=y("New password confirm"),n=C(),s=b("input"),c(e,"for",t=i[10]),c(s,"type","password"),c(s,"id",o=i[10]),s.required=!0},m(r,u){_(r,e,u),w(e,l),_(r,n,u),_(r,s,u),R(s,i[1]),p||(a=h(s,"input",i[9]),p=!0)},p(r,u){u&1024&&t!==(t=r[10])&&c(e,"for",t),u&1024&&o!==(o=r[10])&&c(s,"id",o),u&2&&s.value!==r[1]&&R(s,r[1])},d(r){r&&m(e),r&&m(n),r&&m(s),p=!1,a()}}}function x(i){let e,l,t,n;const s=[V,Q],o=[];function p(a,r){return a[3]?0:1}return e=p(i),l=o[e]=s[e](i),{c(){l.c(),t=D()},m(a,r){o[e].m(a,r),_(a,t,r),n=!0},p(a,r){let u=e;e=p(a),e===u?o[e].p(a,r):(G(),q(o[u],1,1,()=>{o[u]=null}),I(),l=o[e],l?l.p(a,r):(l=o[e]=s[e](a),l.c()),P(l,1),l.m(t.parentNode,t))},i(a){n||(P(l),n=!0)},o(a){q(l),n=!1},d(a){o[e].d(a),a&&m(t)}}}function ee(i){let e,l;return e=new A({props:{nobranding:!0,$$slots:{default:[x]},$$scope:{ctx:i}}}),{c(){H(e.$$.fragment)},m(t,n){N(e,t,n),l=!0},p(t,[n]){const s={};n&2079&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){l||(P(e.$$.fragment,t),l=!0)},o(t){q(e.$$.fragment,t),l=!1},d(t){S(e,t)}}}function te(i,e,l){let t,{params:n}=e,s="",o="",p=!1,a=!1;async function r(){if(!p){l(2,p=!0);try{await z.Users.confirmPasswordReset(n==null?void 0:n.token,s,o),l(3,a=!0)}catch(k){z.errorResponseHandler(k)}l(2,p=!1)}}const u=()=>window.close();function v(){s=this.value,l(0,s)}function g(){o=this.value,l(1,o)}return i.$$set=k=>{"params"in k&&l(6,n=k.params)},i.$$.update=()=>{i.$$.dirty&64&&l(4,t=B.getJWTPayload(n==null?void 0:n.token).email||"")},[s,o,p,a,t,r,n,u,v,g]}class le extends W{constructor(e){super(),Y(this,e,te,ee,j,{params:6})}}export{le as default};
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,p as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.38300823.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
|
||||
import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,p as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.7985c732.js";function P(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
|
||||
<div class="content txt-bold"><p>Invalid or expired verification token.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[4]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function S(o){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
|
||||
<div class="content txt-bold"><p>Successfully verified email address.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,c){r(l,t,c),r(l,s,c),r(l,e,c),n||(i=_(e,"click",o[3]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function T(o){let t;return{c(){t=u("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function F(o){let t;function s(i,l){return i[1]?T:i[0]?S:P}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(i,l){n.m(i,l),r(i,t,l)},p(i,l){e===(e=s(i))&&n?n.p(i,l):(n.d(1),n=e(i),n&&(n.c(),n.m(t.parentNode,t)))},d(i){n.d(i),i&&a(t)}}}function U(o){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[F]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const i={};n&67&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){s||(g(t.$$.fragment,e),s=!0)},o(e){$(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function V(o,t,s){let{params:e}=t,n=!1,i=!1;l();async function l(){s(1,i=!0);try{await H.Users.confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch(d){console.warn(d),s(0,n=!1)}s(1,i=!1)}const c=()=>window.close(),b=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,i,e,c,b]}class E extends k{constructor(t){super(),v(this,t,V,U,y,{params:2})}}export{E as default};
|
||||
Vendored
-382
@@ -1,382 +0,0 @@
|
||||
const __=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 oe(){}const bl=n=>n;function _t(n,e){for(const t in e)n[t]=e[t];return n}function jp(n){return n()}function Ya(){return Object.create(null)}function st(n){n.forEach(jp)}function Zn(n){return typeof n=="function"}function Pe(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Ll;function ti(n,e){return Ll||(Ll=document.createElement("a")),Ll.href=e,n===Ll.href}function b_(n){return Object.keys(n).length===0}function qp(n,...e){if(n==null)return oe;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function qt(n,e,t){n.$$.on_destroy.push(qp(e,t))}function On(n,e,t,i){if(n){const s=Vp(n,e,t,i);return n[0](s)}}function Vp(n,e,t,i){return n[1]&&i?_t(t.ctx.slice(),n[1](i(e))):t.ctx}function En(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;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function An(n,e,t,i,s,l){if(s){const o=Vp(e,t,i,l);n.p(o,s)}}function Pn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function ci(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function tn(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function Ka(n){return n==null?"":n}function wn(n,e,t){return n.set(t),e}function et(n){return n&&Zn(n.destroy)?n.destroy:oe}const zp=typeof window<"u";let Po=zp?()=>window.performance.now():()=>Date.now(),sa=zp?n=>requestAnimationFrame(n):oe;const _s=new Set;function Bp(n){_s.forEach(e=>{e.c(n)||(_s.delete(e),e.f())}),_s.size!==0&&sa(Bp)}function Lo(n){let e;return _s.size===0&&sa(Bp),{promise:new Promise(t=>{_s.add(e={c:n,f:t})}),abort(){_s.delete(e)}}}function p(n,e){n.appendChild(e)}function Up(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function v_(n){const e=_("style");return y_(Up(n),e),e.sheet}function y_(n,e){p(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Bn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function R(n){return document.createTextNode(n)}function T(){return R(" ")}function lt(){return R("")}function X(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Qt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function ni(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Wp(n){return function(e){e.target===this&&n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function fi(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 It(n){return n===""?null:+n}function k_(n){return Array.from(n.childNodes)}function me(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function $e(n,e){n.value=e==null?"":e}function Za(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ee(n,e,t){n.classList[t?"add":"remove"](e)}function Yp(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const ao=new Map;let uo=0;function w_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function S_(n,e){const t={stylesheet:v_(e),rules:{}};return ao.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{
|
||||
`;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}}
|
||||
`}const f=u+`100% {${o(t,1-t)}}
|
||||
}`,c=`__svelte_${w_(f)}_${r}`,d=Up(n),{stylesheet:m,rules:g}=ao.get(d)||S_(d,n);g[c]||(g[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,uo+=1,c}function al(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),uo-=s,uo||$_())}function $_(){sa(()=>{uo||(ao.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),ao.clear())})}function C_(n,e,t,i){if(!e)return oe;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return oe;const{delay:l=0,duration:o=300,easing:r=bl,start:a=Po()+l,end:u=a+o,tick:f=oe,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,g;function v(){c&&(g=rl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&al(n,g),d=!1}return Lo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const C=y-a,$=0+1*r(C/o);f($,1-$)}return!0}),v(),f(0,1),b}function M_(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,Kp(n,s)}}function Kp(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ul;function Gs(n){ul=n}function Fo(){if(!ul)throw new Error("Function called outside component initialization");return ul}function Jn(n){Fo().$$.on_mount.push(n)}function T_(n){Fo().$$.after_update.push(n)}function D_(n){Fo().$$.on_destroy.push(n)}function hn(){const n=Fo();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Yp(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function pt(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Ws=[],he=[],no=[],Cr=[],Zp=Promise.resolve();let Mr=!1;function Jp(){Mr||(Mr=!0,Zp.then(Gp))}function di(){return Jp(),Zp}function Lt(n){no.push(n)}function He(n){Cr.push(n)}const Jo=new Set;let Fl=0;function Gp(){const n=ul;do{for(;Fl<Ws.length;){const e=Ws[Fl];Fl++,Gs(e),O_(e.$$)}for(Gs(null),Ws.length=0,Fl=0;he.length;)he.pop()();for(let e=0;e<no.length;e+=1){const t=no[e];Jo.has(t)||(Jo.add(t),t())}no.length=0}while(Ws.length);for(;Cr.length;)Cr.pop()();Mr=!1,Jo.clear(),Gs(n)}function O_(n){if(n.fragment!==null){n.update(),st(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Lt)}}let Ls;function la(){return Ls||(Ls=Promise.resolve(),Ls.then(()=>{Ls=null})),Ls}function ts(n,e,t){n.dispatchEvent(Yp(`${e?"intro":"outro"}${t}`))}const io=new Set;let ri;function De(){ri={r:0,c:[],p:ri}}function Oe(){ri.r||st(ri.c),ri=ri.p}function A(n,e){n&&n.i&&(io.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(io.has(n))return;io.add(n),ri.c.push(()=>{io.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const oa={duration:0};function Xp(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&al(n,l)}function u(){const{delay:c=0,duration:d=300,easing:m=bl,tick:g=oe,css:v}=i||oa;v&&(l=rl(n,0,1,d,c,m,v,r++)),g(0,1);const b=Po()+c,y=b+d;o&&o.abort(),s=!0,Lt(()=>ts(n,!0,"start")),o=Lo(C=>{if(s){if(C>=y)return g(1,0),ts(n,!0,"end"),a(),s=!1;if(C>=b){const $=m((C-b)/d);g($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,al(n),Zn(i)?(i=i(),la().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Qp(n,e,t){let i=e(n,t),s=!0,l;const o=ri;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=bl,tick:c=oe,css:d}=i||oa;d&&(l=rl(n,1,0,u,a,f,d));const m=Po()+a,g=m+u;Lt(()=>ts(n,!1,"start")),Lo(v=>{if(s){if(v>=g)return c(0,1),ts(n,!1,"end"),--o.r||st(o.c),!1;if(v>=m){const b=f((v-m)/u);c(1-b,b)}}return s})}return Zn(i)?la().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&al(n,l),s=!1)}}}function at(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&al(n,a)}function f(d,m){const g=d.b-l;return m*=Math.abs(g),{a:l,b:d.b,d:g,duration:m,start:d.start,end:d.start+m,group:d.group}}function c(d){const{delay:m=0,duration:g=300,easing:v=bl,tick:b=oe,css:y}=s||oa,C={start:Po()+m,b:d};d||(C.group=ri,ri.r+=1),o||r?r=C:(y&&(u(),a=rl(n,l,d,g,m,v,y)),d&&b(0,1),o=f(C,g),Lt(()=>ts(n,d,"start")),Lo($=>{if(r&&$>r.start&&(o=f(r,g),r=null,ts(n,o.b,"start"),y&&(u(),a=rl(n,l,o.b,o.duration,0,v,s.css))),o){if($>=o.end)b(l=o.b,1-l),ts(n,o.b,"end"),r||(o.b?u():--o.group.r||st(o.group.c)),o=null;else if($>=o.start){const S=$-o.start;l=o.a+o.d*v(S/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Zn(s)?la().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function cn(n,e){n.d(1),e.delete(n.key)}function Bt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function E_(n,e){n.f(),Bt(n,e)}function dt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=
Line truncated
|
||||
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=T(),i=_("div"),h(e,"class","block txt-center m-b-lg"),h(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Zb(n){let e,t,i,s,l,o,r,a,u=!n[0]&&Cu();const f=n[2].default,c=On(f,n,n[1],null);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),u&&u.c(),l=T(),c&&c.c(),o=T(),r=_("div"),h(t,"class","flex-fill"),h(s,"class","wrapper wrapper-sm m-b-xl svelte-1wbawr2"),h(r,"class","flex-fill"),h(e,"class","page-wrapper full-page-panel svelte-1wbawr2")},m(d,m){w(d,e,m),p(e,t),p(e,i),p(e,s),u&&u.m(s,null),p(s,l),c&&c.m(s,null),p(e,o),p(e,r),a=!0},p(d,[m]){d[0]?u&&(u.d(1),u=null):u||(u=Cu(),u.c(),u.m(s,l)),c&&c.p&&(!a||m&2)&&An(c,f,d,d[1],a?En(f,d[1],m,null):Pn(d[1]),null)},i(d){a||(A(c,d),a=!0)},o(d){P(c,d),a=!1},d(d){d&&k(e),u&&u.d(),c&&c.d(d)}}}function Jb(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(1,s=o.$$scope)},[l,s,i]}class fg extends Fe{constructor(e){super(),Le(this,e,Jb,Zb,Pe,{nobranding:0})}}function Mu(n,e,t){const i=n.slice();return i[11]=e[t],i}const Gb=n=>({}),Tu=n=>({uniqueId:n[3]});function Xb(n){let e=(n[11]||go)+"",t;return{c(){t=R(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||go)+"")&&me(t,e)},d(i){i&&k(t)}}}function Qb(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||go)+"",t;return{c(){t=R(e)},m(l,o){w(l,t,o)},p(l,o){var r,a;o&4&&e!==(e=(((r=l[11])==null?void 0:r.message)||((a=l[11])==null?void 0:a.code)||go)+"")&&me(t,e)},d(l){l&&k(t)}}}function Du(n){let e,t;function i(o,r){return typeof o[11]=="object"?Qb:Xb}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=T(),h(e,"class","help-block help-block-error")},m(o,r){w(o,e,r),l.m(e,null),p(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&&k(e),l.d()}}}function xb(n){let e,t,i,s,l;const o=n[7].default,r=On(o,n,n[6],Tu);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Du(Mu(n,a,f));return{c(){e=_("div"),r&&r.c(),t=T();for(let f=0;f<u.length;f+=1)u[f].c();h(e,"class",n[0]),ee(e,"error",n[2].length)},m(f,c){w(f,e,c),r&&r.m(e,null),p(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=X(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&An(r,o,f,f[6],i?En(o,f[6],c,Gb):Pn(f[6]),Tu),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const m=Mu(f,a,d);u[d]?u[d].p(m,c):(u[d]=Du(m),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&h(e,"class",f[0]),c&5&&ee(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){P(r,f),i=!1},d(f){f&&k(e),r&&r.d(f),Bn(u,f),n[9](null),s=!1,l()}}}const go="Invalid value";function e1(n,e,t){let i;qt(n,rs,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+Y.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){ug(r)}Jn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(g){pt.call(this,n,g)}function m(g){he[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,r=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=Y.toArray(Y.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,m]}class Ie extends Fe{constructor(e){super(),Le(this,e,e1,xb,Pe,{name:4,class:0})}}function t1(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Email"),s=T(),l=_("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){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0]),l.focus(),r||(a=X(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]&&$e(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function n1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("Password"),s=T(),l=_("input"),r=T(),a=_("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(c,d){w(c,e,d),p(e,t),w(c,s,d),w(c,l,d),$e(l,n[1]),w(c,r,d),w(c,a,d),u||(f=X(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&h(e,"for",i),d&512&&o!==(o=c[9])&&h(l,"id",o),d&2&&l.value!==c[1]&&$e(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function i1(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Password confirm"),s=T(),l=_("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){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[2]),r||(a=X(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]&&$e(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function s1(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new Ie({props:{class:"form-field required",name:"email",$$slots:{default:[t1,({uniqueId:g})=>({9:gLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),ee(f,"btn-disabled",n[3]),ee(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(g,v){w(g,e,v),p(e,t),p(e,i),V(s,e,null),p(e,l),V(o,e,null),p(e,r),V(a,e,null),p(e,u),p(e,f),c=!0,d||(m=X(e,"submit",Qt(n[4])),d=!0)},p(g,[v]){const b={};v&1537&&(b.$$scope={dirty:v,ctx:g}),s.$set(b);const y={};v&1538&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const C={};v&1540&&(C.$$scope={dirty:v,ctx:g}),a.$set(C),v&8&&ee(f,"btn-disabled",g[3]),v&8&&ee(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),c=!1},d(g){g&&k(e),z(s),z(o),z(a),d=!1,m()}}}function l1(n,e,t){const i=hn();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await Se.Admins.create({email:s,password:l,passwordConfirm:o}),await Se.Admins.authViaEmail(s,l),i("submit")}catch(d){Se.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class o1 extends Fe{constructor(e){super(),Le(this,e,l1,s1,Pe,{})}}function Ou(n){let e,t;return e=new fg({props:{$$slots:{default:[r1]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(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){z(e,i)}}}function r1(n){let e,t;return e=new o1({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:oe,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function a1(n){let e,t,i=n[0]&&Ou(n);return{c(){i&&i.c(),e=lt()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Ou(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(De(),P(i,1,1,()=>{i=null}),Oe())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function u1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){Se.logout(!1),t(0,i=!0);return}Se.AuthStore.isValid?Ts("/collections"):Se.logout()}return[i,async()=>{t(0,i=!1),await di(),window.location.search=""}]}class f1 extends Fe{constructor(e){super(),Le(this,e,u1,a1,Pe,{})}}const nn=si(""),_o=si("");function qo(n){const e=n-1;return e*e*e+1}function bo(n,{delay:e=0,duration:t=400,easing:i=bl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function Un(n,{delay:e=0,duration:t=400,easing:i=qo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px);
|
||||
opacity: ${a-f*d}`}}function on(n,{delay:e=0,duration:t=400,easing:i=qo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*l};height: ${m*o}px;padding-top: ${m*r}px;padding-bottom: ${m*a}px;margin-top: ${m*u}px;margin-bottom: ${m*f}px;border-top-width: ${m*c}px;border-bottom-width: ${m*d}px;`}}function Wn(n,{delay:e=0,duration:t=400,easing:i=qo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${a} scale(${1-u*d});
|
||||
opacity: ${r-f*d}
|
||||
`}}function c1(n){let e,t,i,s;return{c(){e=_("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),$e(e,n[7]),i||(s=X(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]&&$e(e,l[7])},i:oe,o:oe,d(l){l&&k(e),n[13](null),i=!1,s()}}}function d1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={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=new o(r(n)),he.push(()=>Re(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=lt()},m(a,u){e&&V(e,a,u),w(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],He(()=>t=!1)),o!==(o=a[4])){if(e){De();const c=e;P(c.$$.fragment,1,0,()=>{z(c,1)}),Oe()}o?(e=new o(r(a)),he.push(()=>Re(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(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&&k(i),e&&z(e,a)}}}function Eu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Au();return{c(){r&&r.c(),e=T(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',h(t,"type","button"),h(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(o=X(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Au(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(De(),P(r,1,1,()=>{r=null}),Oe())},i(a){s||(A(r),Lt(()=>{i||(i=at(t,Un,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),i||(i=at(t,Un,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,o()}}}function Au(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Lt(()=>{t||(t=at(e,Un,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=at(e,Un,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function h1(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[d1,c1],m=[];function g(b,y){return b[4]&&!b[5]?0:1}o=g(n),r=m[o]=d[o](n);let v=(n[0].length||n[7].length)&&Eu(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=T(),r.c(),a=T(),v&&v.c(),h(s,"class","ri-search-line"),h(i,"for",n[8]),h(i,"class","m-l-10 txt-xl"),h(t,"class","searchbar"),h(e,"class","searchbar-wrapper")},m(b,y){w(b,e,y),p(e,t),p(t,i),p(i,s),p(t,l),m[o].m(t,null),p(t,a),v&&v.m(t,null),u=!0,f||(c=[X(t,"submit",Qt(n[10])),X(e,"click",ni(n[11]))],f=!0)},p(b,[y]){let C=o;o=g(b),o===C?m[o].p(b,y):(De(),P(m[C],1,1,()=>{m[C]=null}),Oe(),r=m[o],r?r.p(b,y):(r=m[o]=d[o](b),r.c()),A(r,1),r.m(t,a)),b[0].length||b[7].length?v?(v.p(b,y),y&129&&A(v,1)):(v=Eu(b),v.c(),A(v,1),v.m(t,null)):v&&(De(),P(v,1,1,()=>{v=null}),Oe())},i(b){u||(A(r),A(v),u=!0)},o(b){P(r),P(v),u=!1},d(b){b&&k(e),m[o].d(),v&&v.d(),f=!1,st(c)}}}function p1(n,e,t){const i=hn(),s="search_"+Y.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Fn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function v(){u||f||(t(5,f=!0),t(4,u=(await Qi(()=>import("./FilterAutocompleteInput.22ad58b4.js"),[])).default),t(5,f=!1))}Jn(()=>{v()});function b(M){pt.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function C(M){he[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const S=()=>{m(!1),g()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,g,b,y,C,$,S]}class Vo extends Fe{constructor(e){super(),Le(this,e,p1,h1,Pe,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Hr,Wi;const jr="app-tooltip";function Pu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Li(){return Wi=Wi||document.querySelector("."+jr),Wi||(Wi=document.createElement("div"),Wi.classList.add(jr),document.body.appendChild(Wi)),Wi}function cg(n,e){let t=Li();if(!t.classList.contains("active")||!(e!=null&&e.text)){qr();return}t.textContent=e.text,t.className=jr+" active",e.class&&t.classList.add(e.class),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.posi
Line truncated
|
||||
<span class="txt">method</span>`,h(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function C1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="url",h(t,"class",Y.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function M1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="referer",h(t,"class",Y.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function T1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="status",h(t,"class",Y.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function D1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function Fu(n){let e;function t(l,o){return l[6]?E1:O1}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function O1(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Iu(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=T(),o&&o.c(),l=T(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),p(e,t),p(t,i),p(t,s),o&&o.m(t,null),p(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Iu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function E1(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Iu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Nu(n){let e;return{c(){e=_("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ru(n,e){var le,ue,Me;let t,i,s,l=((le=e[21].method)==null?void 0:le.toUpperCase())+"",o,r,a,u,f,c=e[21].url+"",d,m,g,v,b,y,C=(e[21].referer||"N/A")+"",$,S,M,D,E,O=e[21].status+"",F,L,H,j,Q,ie,U,K,W,J,se=(((ue=e[21].meta)==null?void 0:ue.errorMessage)||((Me=e[21].meta)==null?void 0:Me.errorData))&&Nu();j=new wi({props:{date:e[21].created}});function fe(){return e[16](e[21])}function ke(...Z){return e[17](e[21],...Z)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),o=R(l),a=T(),u=_("td"),f=_("span"),d=R(c),g=T(),se&&se.c(),v=T(),b=_("td"),y=_("span"),$=R(C),M=T(),D=_("td"),E=_("span"),F=R(O),L=T(),H=_("td"),B(j.$$.fragment),Q=T(),ie=_("td"),ie.innerHTML='<i class="ri-arrow-right-line"></i>',U=T(),h(s,"class",r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",m=e[21].url),h(u,"class","col-type-text col-field-url"),h(y,"class","txt txt-ellipsis"),h(y,"title",S=e[21].referer),ee(y,"txt-hint",!e[21].referer),h(b,"class","col-type-text col-field-referer"),h(E,"class","label"),ee(E,"label-danger",e[21].status>=400),h(D,"class","col-type-number col-field-status"),h(H,"class","col-type-date col-field-created"),h(ie,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Z,be){w(Z,t,be),p(t,i),p(i,s),p(s,o),p(t,a),p(t,u),p(u,f),p(f,d),p(u,g),se&&se.m(u,null),p(t,v),p(t,b),p(b,y),p(y,$),p(t,M),p(t,D),p(D,E),p(E,F),p(t,L),p(t,H),V(j,H,null),p(t,Q),p(t,ie),p(t,U),K=!0,W||(J=[X(t,"click",fe),X(t,"keydown",ke)],W=!0)},p(Z,be){var G,_e,je;e=Z,(!K||be&8)&&l!==(l=((G=e[21].method)==null?void 0:G.toUpperCase())+"")&&me(o,l),(!K||be&8&&r!==(r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&h(s,"class",r),(!K||be&8)&&c!==(c=e[21].url+"")&&me(d,c),(!K||be&8&&m!==(m=e[21].url))&&h(f,"title",m),((_e=e[21].meta)==null?void 0:_e.errorMessage)||((je=e[21].meta)==null?void 0:je.errorData)?se||(se=Nu(),se.c(),se.m(u,null)):se&&(se.d(1),se=null),(!K||be&8)&&C!==(C=(e[21].referer||"N/A")+"")&&me($,C),(!K||be&8&&S!==(S=e[21].referer))&&h(y,"title",S),be&8&&ee(y,"txt-hint",!e[21].referer),(!K||be&8)&&O!==(O=e[21].status+"")&&me(F,O),be&8&&ee(E,"label-danger",e[21].status>=400);const x={};be&8&&(x.date=e[21].created),j.$set(x)},i(Z){K||(A(j.$$.fragment,Z),K=!0)},o(Z){P(j.$$.fragment,Z),K=!1},d(Z){Z&&k(t),se&&se.d(),z(j),W=!1,st(J)}}}function Hu(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),o=R(n[4]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),p(e,t),p(e,s),p(e,l),p(e,o)},p(r,a){a&8&&i!==(i=r[3].length+"")&&me(s,i),a&16&&me(o,r[4])},d(r){r&&k(e)}}}function ju(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=R("Load more ("),o=R(l),r=R(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[6]),ee(t,"btn-disabled",n[6]),h(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),p(e,t),p(t,i),p(i,s),p(i,o),p(i,r),a||(u=X(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&me(o,l),c&64&&ee(t,"btn-loading",f[6]),c&64&&ee(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function A1(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$,S,M,D,E=[],O=new Map,F,L,H,j;function Q(G){n[11](G)}let ie={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[$1]},$$scope:{ctx:n}};n[1]!==void 0&&(ie.sort=n[1]),l=new rn({props:ie}),he.push(()=>Re(l,"sort",Q));function U(G){n[12](G)}let K={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[C1]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),a=new rn({props:K}),he.push(()=>Re(a,"sort",U));function W(G){n[13](G)}let J={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[M1]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),c=new rn({props:J}),he.push(()=>Re(c,"sort",W));function se(G){n[14](G)}let fe={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[T1]},$$scope:{ctx:n}};n[1]!==void 0&&(fe.sort=n[1]),g=new rn({props:fe}),he.push(()=>Re(g,"sort",se));function ke(G){n[15](G)}let le={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[D1]},$$scope:{ctx:n}};n[1]!==void 0&&(le.sort=n[1]),y=new rn({props:le}),he.push(()=>Re(y,"sort",ke));let ue=n[3];const Me=G=>G[21].id;for(let G=0;G<ue.length;G+=1){let _e=Lu(n,ue,G),je=Me(_e);O.set(je,E[G]=Ru(je,_e))}let Z=null;ue.length||(Z=Fu(
Line truncated
|
||||
* Chart.js v3.8.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/const dg=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function hg(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,dg.call(window,()=>{s=!1,n.apply(e,l)}))}}function F1(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const I1=n=>n==="start"?"left":n==="end"?"right":"center",qu=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function mi(){}const N1=function(){let n=0;return function(){return n++}}();function Pt(n){return n===null||typeof n>"u"}function zt(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 bt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Xt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Hn(n,e){return Xt(n)?n:e}function yt(n,e){return typeof n>"u"?e:n}const R1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,pg=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Zt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function At(n,e,t,i){let s,l,o;if(zt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(bt(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function vo(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function yo(n){if(zt(n))return n.map(yo);if(bt(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=yo(n[t[s]]);return e}return n}function mg(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function H1(n,e,t,i){if(!mg(n))return;const s=e[n],l=t[n];bt(s)&&bt(l)?fl(s,l,i):e[n]=yo(l)}function fl(n,e,t){const i=zt(e)?e:[e],s=i.length;if(!bt(n))return n;t=t||{};const l=t.merger||H1;for(let o=0;o<s;++o){if(e=i[o],!bt(e))continue;const r=Object.keys(e);for(let a=0,u=r.length;a<u;++a)l(r[a],n,e,t)}return n}function tl(n,e){return fl(n,e,{merger:j1})}function j1(n,e,t){if(!mg(n))return;const i=e[n],s=t[n];bt(i)&&bt(s)?tl(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=yo(s))}const q1="",V1=".";function Vu(n,e){const t=n.indexOf(V1,e);return t===-1?n.length:t}function Ii(n,e){if(e===q1)return n;let t=0,i=Vu(e,t);for(;n&&i>t;)n=n[e.slice(t,i)],t=i+1,i=Vu(e,t);return n}function va(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Yn=n=>typeof n<"u",Ni=n=>typeof n=="function",zu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function z1(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Gt=Math.PI,Vt=2*Gt,B1=Vt+Gt,ko=Number.POSITIVE_INFINITY,U1=Gt/180,Jt=Gt/2,Hs=Gt/4,Bu=Gt*2/3,Vn=Math.log10,ai=Math.sign;function Uu(n){const e=Math.round(n);n=nl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Vn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function W1(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function cl(n){return!isNaN(parseFloat(n))&&isFinite(n)}function nl(n,e,t){return Math.abs(n-e)<t}function Y1(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function gg(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function ei(n){return n*(Gt/180)}function ya(n){return n*(180/Gt)}function Wu(n){if(!Xt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function _g(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Gt&&(l+=Vt),{angle:l,distance:s}}function Vr(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function K1(n,e){return(n-e+B1)%Vt-Gt}function Mn(n){return(n%Vt+Vt)%Vt}function dl(n,e,t,i){const s=Mn(n),l=Mn(e),o=Mn(t),r=Mn(l-s),a=Mn(o-s),u=Mn(s-l),f=Mn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function fn(n,e,t){return Math.max(e,Math.min(t,n))}function Z1(n){return fn(n,-32768,32767)}function hl(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}const ql=n=>n===0||n===1,Yu=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*Vt/t)),Ku=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*Vt/t)+1,il={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Jt)+1,easeOutSine:n=>Math.sin(n*Jt),easeInOutSine:n=>-.5*(Math.cos(Gt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(Line truncated
|
||||
* @kurkle/color v0.2.1
|
||||
* https://github.com/kurkle/color#readme
|
||||
* (c) 2022 Jukka Kurkela
|
||||
* Released under the MIT License
|
||||
*/function $l(n){return n+.5|0}const Ai=(n,e,t)=>Math.max(Math.min(n,t),e);function Zs(n){return Ai($l(n*2.55),0,255)}function Fi(n){return Ai($l(n*255),0,255)}function bi(n){return Ai($l(n/2.55)/100,0,1)}function Zu(n){return Ai($l(n*100),0,100)}const Rn={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},zr=[..."0123456789ABCDEF"],J1=n=>zr[n&15],G1=n=>zr[(n&240)>>4]+zr[n&15],Vl=n=>(n&240)>>4===(n&15),X1=n=>Vl(n.r)&&Vl(n.g)&&Vl(n.b)&&Vl(n.a);function Q1(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Rn[n[1]]*17,g:255&Rn[n[2]]*17,b:255&Rn[n[3]]*17,a:e===5?Rn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Rn[n[1]]<<4|Rn[n[2]],g:Rn[n[3]]<<4|Rn[n[4]],b:Rn[n[5]]<<4|Rn[n[6]],a:e===9?Rn[n[7]]<<4|Rn[n[8]]:255})),t}const x1=(n,e)=>n<255?e(n):"";function ev(n){var e=X1(n)?J1:G1;return n?"#"+e(n.r)+e(n.g)+e(n.b)+x1(n.a,e):void 0}const tv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function bg(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 nv(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 iv(n,e,t){const i=bg(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 sv(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function ka(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),o=Math.min(t,i,s),r=(l+o)/2;let a,u,f;return l!==o&&(f=l-o,u=r>.5?f/(2-l-o):f/(l+o),a=sv(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function wa(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Fi)}function Sa(n,e,t){return wa(bg,n,e,t)}function lv(n,e,t){return wa(iv,n,e,t)}function ov(n,e,t){return wa(nv,n,e,t)}function vg(n){return(n%360+360)%360}function rv(n){const e=tv.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Zs(+e[5]):Fi(+e[5]));const s=vg(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=lv(s,l,o):e[1]==="hsv"?i=ov(s,l,o):i=Sa(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function av(n,e){var t=ka(n);t[0]=vg(t[0]+e),t=Sa(t),n.r=t[0],n.g=t[1],n.b=t[2]}function uv(n){if(!n)return;const e=ka(n),t=e[0],i=Zu(e[1]),s=Zu(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${bi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Ju={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"},Gu={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 fv(){const n={},e=Object.keys(Gu),t=Object.keys(Ju);let i,s,l,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<t.length;s++)l=t[s]Line truncated
|
||||
* Chart.js v3.8.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/class py{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=dg.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 gi=new py;const ff="transparent",my={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Qu(n||ff),s=i.valid&&Qu(e||ff);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class gy{constructor(e,t,i,s){const l=t[i];s=Ul([e.to,s,l,e.from]);const o=Ul([e.from,l,s]);this._active=!0,this._fn=e.fn||my[e.type||typeof o],this._easing=il[e.easing]||il.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Ul([e.to,t,s,e.from]),this._from=Ul([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||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?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;s<i.length;s++)i[s][t]()}}const _y=["x","y","borderWidth","radius","tension"],by=["color","borderColor","backgroundColor"];kt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const vy=Object.keys(kt.animation);kt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});kt.set("animations",{colors:{type:"color",properties:by},numbers:{type:"number",properties:_y}});kt.describe("animations",{_fallback:"animation"});kt.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 Ng{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!bt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!bt(s))return;const l={};for(const o of vy)l[o]=s[o];(zt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=ky(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&yy(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new gy(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return gi.add(this._chart,i),!0}}function yy(n,e){const t=[]Line truncated
|
||||
`)>-1?n.split(`
|
||||
`):n}function R2(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 qf(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),c=l.length,d=s.length,m=i.length,g=Kn(e.padding);let v=g.height,b=0,y=i.reduce((S,M)=>S+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(v+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const S=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;v+=m*S+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(v+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let C=0;const $=function(S){b=Math.max(b,t.measureText(S).width+C)};return t.save(),t.font=u.string,At(n.title,$),t.font=a.string,At(n.beforeBody.concat(n.afterBody),$),C=e.displayColors?o+2+e.boxPadding:0,At(i,S=>{At(S.before,$),At(S.lines,$),At(S.after,$)}),C=0,t.font=f.string,At(n.footer,$),t.restore(),b+=g.width,{width:b,height:v}}function H2(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function j2(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 q2(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"),j2(u,n,e,t)&&(u="center"),u}function Vf(n,e,t){const i=t.yAlign||e.yAlign||H2(n,t);return{xAlign:t.xAlign||e.xAlign||q2(n,e,t,i),yAlign:i}}function V2(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function z2(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function zf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:m}=vs(o);let g=V2(e,r);const v=z2(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,m)+s),{x:fn(g,0,i.width-e.width),y:fn(v,0,i.height-e.height)}}function Xl(n,e,t){const i=Kn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Bf(n){return li([],_i(n))}function B2(n,e,t){return Hi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Uf(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class Xr extends $i{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 Ng(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=B2(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=li(r,_i(s)),r=li(r,_i(l)),r=li(r,_i(o)),r}getBeforeBody(e,t){return Bf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return At(e,l=>{const o={before:[],lines:[],after:[]},r=Uf(i,l);li(o.before,_i(r.beforeLabel.call(this,l))),li(o.lines,r.label.call(this,l)),li(o.after,_i(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return Bf(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=li(r,_i(s)),r=li(r,_i(l)),r=li(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;a<u;++a)r.push(R2(this.chart,t[a]));return e.filter&&(r=r.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),At(r,f=>{const c=Uf(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;l
Line truncated
|
||||
* chartjs-adapter-luxon v1.1.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2021 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/const fw={datetime:tt.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:tt.TIME_WITH_SECONDS,minute:tt.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};qg._date.override({_id:"luxon",_create:function(n){return tt.fromMillis(n,this.options)},formats:function(){return fw},parse:function(n,e){const t=this.options;if(n===null||typeof n>"u")return null;const i=typeof n;return i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=tt.fromFormat(n,e,t):n=tt.fromISO(n,t):n instanceof Date?n=tt.fromJSDate(n,t):i==="object"&&!(n instanceof tt)&&(n=tt.fromObject(n)),n.isValid?n.valueOf():null},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e,this.options):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 Qf(n){let e,t,i;return{c(){e=_("div"),h(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(Lt(()=>{t||(t=at(e,Wn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){t||(t=at(e,Wn,{duration:150},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function cw(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=R(n[1]),t=T(),s=R(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&me(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&me(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function dw(n){let e;return{c(){e=R("Loading...")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function hw(n){let e,t,i,s,l,o,r=n[2]&&Qf();function a(c,d){return c[2]?dw:cw}let u=a(n),f=u(n);return{c(){e=_("div"),r&&r.c(),t=T(),i=_("canvas"),s=T(),l=_("div"),f.c(),h(i,"class","chart-canvas svelte-vh4sl8"),Za(i,"height","250px"),Za(i,"width","100%"),h(e,"class","chart-wrapper svelte-vh4sl8"),ee(e,"loading",n[2]),h(l,"class","txt-hint m-t-xs txt-right")},m(c,d){w(c,e,d),r&&r.m(e,null),p(e,t),p(e,i),n[8](i),w(c,s,d),w(c,l,d),f.m(l,null),o=!0},p(c,[d]){c[2]?r?d&4&&A(r,1):(r=Qf(),r.c(),A(r,1),r.m(e,t)):r&&(De(),P(r,1,1,()=>{r=null}),Oe()),d&4&&ee(e,"loading",c[2]),u===(u=a(c))&&f?f.p(c,d):(f.d(1),f=u(c),f&&(f.c(),f.m(l,null)))},i(c){o||(A(r),o=!0)},o(c){P(r),o=!1},d(c){c&&k(e),r&&r.d(),n[8](null),c&&k(s),c&&k(l),f.d()}}}function pw(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),Se.Logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let g of m)r.push({x:Y.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),Se.errorResponseHandler(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Jn(()=>(Oo.register(ji,Wo,Tl,qa,Ol,N2,U2),t(6,o=new Oo(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,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 d(m){he[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,d]}class mw extends Fe{constructor(e){super(),Le(this,e,pw,hw,Pe,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var xf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r_={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
||||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||||
*
|
||||
* @license MIT <https://opensource.org/licenses/MIT>
|
||||
* @author Lea Verou <https://lea.verou.me>
|
||||
* @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 C($){return $ instanceof a?new a($.type,C($.content),$.alias):Array.isArray($)?$.map(C):$.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++l}),C.__id},clone:function C($,S){S=S||{};var M,D;switch(r.util.type($)){case"Object":if(D=r.util.objId($),S[D])return S[D];M={},S[D]=M;for(var E in $)$.hasOwnProperty(E)&&(M[E]=C($[E],S));return M;case"Array":return D=r.util.objId($),S[D]?S[D]:(M=[],S[D]=M,$.forEach(function(O,F){M[F]=C(O,S)}),M);default:return $}},getLanguage:function(C){for(;C;){var $=s.exec(C.className);if($)return $[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,$){C.className=C.className.replace(RegExp(s,"gi"),""),C.classList.add("language-"+$)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var C=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(C){var $=document.getElementsByTagName("script");for(var S in $)if($[S].src==C)return $[S]}return null}},isActive:function(C,$,S){for(var M="no-"+$;C;){var D=C.classList;if(D.contains($))return!0;if(D.contains(M))return!1;C=C.parentElement}return!!S}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(C,$){var S=r.util.clone(r.languages[C]);for(var M in $)S[M]=$[M];return S},insertBefore:function(C,$,S,M){M=M||r.languages;var D=M[C],E={};for(var O in D)if(D.hasOwnProperty(O)){if(O==$)for(var F in S)S.hasOwnProperty(F)&&(E[F]=S[F]);S.hasOwnProperty(O)||(E[O]=D[O])}var L=M[C];return M[C]=E,r.languages.DFS(r.languages,function(H,j){j===L&&H!=C&&(this[H]=E)}),E},DFS:function C($,S,M,D){D=D||{};var E=r.util.objId;for(var O in $)if($.hasOwnProperty(O)){S.call($,O,$[O],M||O);var F=$[O],L=r.util.type(F);L==="Object"&&!D[E(F)]?(D[E(F)]=!0,C(F,S,null,D)):L==="Array"&&!D[E(F)]&&(D[E(F)]=!0,C(F,S,O,D))}}},plugins:{},highlightAll:function(C,$){r.highlightAllUnder(document,C,$)},highlightAllUnder:function(C,$,S){var M={callback:S,container:C,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var D=0,E;E=M.elements[D++];)r.highlightElement(E,$===!0,M.callback)},highlightElement:function(C,$,S){var M=r.util.getLanguage(C),D=r.languages[M];r.util.setLanguage(C,M);var E=C.parentElement;E&&E.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(E,M);var O=C.textContent,F={element:C,language:M,grammar:D,code:O};function L(j){F.highlightedCode=j,r.hooks.run("before-insert",F),F.element.innerHTML=F.highlightedCode,r.hooks.run("after-highlight",F),r.hooks.run("complete",F),S&&S.call(F.element)}if(r.hooks.run("before-sanity-check",F),E=F.element.parentElement,E&&E.nodeName.toLowerCase()==="pre"&&!E.hasAttribute("tabindex")&&E.setAttribute("tabindex","0"),!F.code){r.hooks.run("complete",F),S&&S.call(F.element);return}if(r.hooks.run("before-highlight",F),!F.grammar){L(r.util.encode(F.code));return}if($&&i.Worker){var H=new Worker(r.filename);H.onmessage=function(j){L(j.data)},H.postMessage(JSON.stringify({language:F.language,code:F.code,immediateClose:!0}))}else L(r.highlight(F.code,F.grammar,F.language))},highlight:function(C,$,S){var M={code:C,grammar:$,language:S};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(C,$){var S=$.rest;if(S){for(var M in S)$[M]=S[M];delete $.rest}var D=new c;return d(D,D.head,C),f(C,D,$,D.head,0),g(D)},hooks:{all:{},add:function(C,$){var S=r.hooks.all;S[C]=S[C]||[],S[C].push($)},run:function(C,$){var S=r.hooks.all[C];if(!(!S||!S.length))for(var M=0,D;D=S[M++];)D($)}},Token:a};i.Prism=r;function a(C,$,S,M){this.type=C,this.content=$,this.alias=S,this.length=(M||"").length|0}a.stringify=function C($,S){if(typeof $=="string")return $;if(Array.isArray($)){var M="";return $.forEach(function(L){M+=C(L,S)}),M}var D={type:$.type,content:C($.content,S),tag:"span",classes:["token",$.type],attributes:{},language:S},E=$.alias;E&&(Array.isArray(E)?Array.prototype.push.apply(D.classes,E):D.classes.push(E)),r.hooks.run("wrap",D);var O="";for(var F in D.attributes)O+=" "+F+'="'+(D.attributes[F]||"").replace(/"/g,""")+'"';return"<"+D.tag+' class="'+D.classes.join(" ")+'"'+O+">"+D.content+"</"+D.tag+">"};function u(C,$,S,M){C.lastIndex=$;var D=C.exec(S);if(D&&M&&D[1]){var E=D[1].length;D.index+=E,D[0]=D[0].slice(E)}return D}funLine truncated
|
||||
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(F+1))}y.textContent=D,t.highlightElement(y)},function(D){b.setAttribute(r,f),y.textContent=D})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),C=0,$;$=y[C++];)t.highlightElement($)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(r_);const Us=r_.exports;var gw={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(l,o){for(var r in o)o.hasOwnProperty(r)&&(l[r]=o[r]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(o,r){return r.toUpperCase()})}function s(l){for(var o=0,r=0;r<l.length;++r)l.charCodeAt(r)==" ".charCodeAt(0)&&(o+=3);return l.length+o}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,o){o=e(this.defaults,o);for(var r in o){var a=i(r);r!=="normalize"&&a!=="setDefaults"&&o[r]&&this[a]&&(l=this[a].call(this,l,o[r]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,o){return o=o|0||4,l.replace(/\t/g,new Array(++o).join(" "))},spacesToTabs:function(l,o){return o=o|0||4,l.replace(RegExp(" {"+o+"}","g")," ")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var o=l.match(/^[^\S\n\r]*(?=\S)/gm);return!o||!o[0].length||(o.sort(function(r,a){return r.length-a.length}),!o[0].length)?l:l.replace(RegExp("^"+o[0],"gm"),"")},indent:function(l,o){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++o).join(" ")+"$&")},breakLines:function(l,o){o=o===!0?80:o|0||80;for(var r=l.split(`
|
||||
`),a=0;a<r.length;++a)if(!(s(r[a])<=o)){for(var u=r[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>o&&(u[c]=`
|
||||
`+u[c],f=d)}r[a]=u.join("")}return r.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(l){var o=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=o.normalize(l.code,l.settings);return}var r=l.element.parentNode;if(!(!l.code||!r||r.nodeName.toLowerCase()!=="pre")){for(var a=r.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var m=a[d];m==l.element?c=!0:m.nodeName==="#text"&&(c?f+=m.nodeValue:u+=m.nodeValue,r.removeChild(m),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=o.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=o.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(gw);function _w(n){let e,t;return{c(){e=_("div"),t=_("code"),h(t,"class","svelte-tv7jme"),h(e,"class","code-wrapper prism-light svelte-tv7jme")},m(i,s){w(i,e,s),p(e,t),t.innerHTML=n[0]},p(i,[s]){s&1&&(t.innerHTML=i[0])},i:oe,o:oe,d(i){i&&k(e)}}}function bw(n,e,t){let{content:i=""}=e,{language:s="javascript"}=e,l="";function o(r){return r=typeof r=="string"?r:"",r=Us.plugins.NormalizeWhitespace.normalize(r,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Us.highlight(r,Us.languages[s]||Us.languages.javascript,s)}return n.$$set=r=>{"content"in r&&t(1,i=r.content),"language"in r&&t(2,s=r.language)},n.$$.update=()=>{n.$$.dirty&2&&typeof Us<"u"&&i&&t(0,l=o(i))},[l,i,s]}class ln extends Fe{constructor(e){super(),Le(this,e,bw,_w,Pe,{content:1,language:2})}}const vw=n=>({}),ec=n=>({}),yw=n=>({}),tc=n=>({});function nc(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$=n[4]&&!n[2]&&ic(n);const S=n[18].header,M=On(S,n,n[17],tc);let D=n[4]&&n[2]&&sc(n);const E=n[18].default,O=On(E,n,n[17],null),F=n[18].footer,L=On(F,n,n[17],ec);return{c(){e=_("div"),t=_("div"),s=T(),l=_("div"),o=_("div"),$&&$.c(),r=T(),M&&M.c(),a=T(),D&&D.c(),u=T(),f=_("div"),O&&O.c(),c=T(),d=_("div"),L&&L.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(d,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),ee(l,"popup",n[2]),h(e,"class","overlay-panel-container"),ee(e,"padded",n[2]),ee(e,"active",n[0])},m(H,j){w(H,e,j),p(e,t),p(e,s),p(e,l),p(l,o),$&&$.m(o,null),p(o,r),M&&M.m(o,null),p(o,a),D&&D.m(o,null),p(l,u),p(l,f),O&&O.m(f,null),n[20](f),p(l,c),p(l,d),L&&L.m(d,null),b=!0,y||(C=[X(t,"click",Qt(n[19])),X(f,"scroll",n[21])],y=!0)},p(H,j){n=H,n[4]&&!n[2]?$?$.p(n,j):($=ic(n),$.c(),$.m(o,r)):$&&($.d(1),$=null),M&&M.p&&(!b||j&131072)&&An(M,S,n,n[17],b?En(S,n[17],j,yw):Pn(n[17]),tc),n[4]&&n[2]?D?D.p(n,j):(D=sc(n),D.c(),D.m(o,null)):D&&(D.d(1),D=null),O&&O.p&&(!b||j&131072)&&An(O,E,n,n[17],b?En(E,n[17],j,null):Pn(n[17]),null),L&&L.p&&(!b||j&131072)&&An(L,F,n,n[17],b?En(F,n[17],j,vw):Pn(n[17]),ec),(!b||j&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),j&262&&ee(l,"popup",n[2]),j&4&&ee(e,"padded",n[2]),j&1&&ee(e,"active",n[0])},i(H){b||(Lt(()=>{i||(i=at(t,bo,{duration:gs,opacity:0},!0)),i.run(1)}),A(M,H),A(O,H),A(L,H),Lt(()=>{v&&v.end(1),g=Xp(l,Un,n[2]?{duration:gs,y:-10}:{duration:gs,x:50}),g.start()}),b=!0)},o(H){i||(i=at(t,bo,{duration:gs,opacity:0},!1)),i.run(0),P(M,H),P(O,H),P(L,H),g&&g.invalidate(),v=Qp(l,Un,n[2]?{duration:gs,y:10}:{duration:gs,x:50}),b=!1},d(H){H&&k(e),H&&i&&i.end(),$&&$.d(),M&&M.d(H),D&&D.d(),O&&O.d(H),n[20](null),L&&L.d(H),H&&v&&v.end(),y=!1,st(C)}}}function ic(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-close-line"></i>',h(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=X(e,"click",Qt(n[5])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function sc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<i class="ri-close-line txt-lg"></i>',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-secondary btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=X(e,"click",Qt(n[5])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function kw(n){let e,t,i,s,l=n[0]&&nc(n);return{c(){e=_("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper")},m(o,r){w(o,e,r),l&&l.m(e,null),n[22](e),t=!0,i||(s=[X(window,"resize",n[10]),X(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=nc(o),l.c(),A(l,1),l.m(e,null)):l&&(De(),P(l,1,1,()=>{l=null}),Oe())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&k(e),l&&l.d(),n[22](null),i=!1,st(s)}}}let Zi;function a_(){return Zi=Zi||document.querySelector(".overlays"),Zi||(Zi=document.createElement("div"),Zi.classList.add("overlays"),document.body.appendChild(Zi)),Zi}let gs=150;function lc(){return 1e3+a_().querySelectorAll(".overlay-panel-container.active").length}function ww(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{bef
Line truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]))&&h(e,"for",l);const C={};y&16&&(C.id=b[4]),y&1&&(C.disabled=!Y.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,C.value=b[0].exceptDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function MS(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[3](b)}let v={id:n[4]+".options.onlyDomains",disabled:!Y.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new fs({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[4]+".options.onlyDomains"),h(f,"class","help-block")},m(b,y){w(b,e,y),p(e,t),p(e,i),p(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=et(Et.call(null,s,{text:`List of domains that are ONLY allowed.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]+".options.onlyDomains"))&&h(e,"for",l);const C={};y&16&&(C.id=b[4]+".options.onlyDomains"),y&1&&(C.disabled=!Y.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,C.value=b[0].onlyDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function TS(n){let e,t,i,s,l,o,r;return i=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[CS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[MS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid")},m(a,u){w(a,e,u),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(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&&k(e),z(i),z(o)}}}function DS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class c_ extends Fe{constructor(e){super(),Le(this,e,DS,TS,Pe,{key:1,options:0})}}function OS(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new c_({props:r}),he.push(()=>Re(e,"key",l)),he.push(()=>Re(e,"options",o)),{c(){B(e.$$.fragment)},m(a,u){V(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],He(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],He(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){z(e,a)}}}function ES(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class AS extends Fe{constructor(e){super(),Le(this,e,ES,OS,Pe,{key:0,options:1})}}var vr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ys={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},gl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to togg
Line truncated
|
||||
<span class='flatpickr-weekday'>
|
||||
`+I.join("</span><span class='flatpickr-weekday'>")+`
|
||||
</span>
|
||||
`}}function fe(){t.calendarContainer.classList.add("hasWeeks");var N=Ot("div","flatpickr-weekwrapper");N.appendChild(Ot("span","flatpickr-weekday",t.l10n.weekAbbreviation));var I=Ot("div","flatpickr-weeks");return N.appendChild(I),{weekWrapper:N,weekNumbers:I}}function ke(N,I){I===void 0&&(I=!0);var q=I?N:N-t.currentMonth;q<0&&t._hidePrevMonthArrow===!0||q>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=q,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ge("onYearChange"),Q()),j(),Ge("onMonthChange"),Ht())}function le(N,I){if(N===void 0&&(N=!0),I===void 0&&(I=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,I===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var q=Sr(t.config),ne=q.hours,Te=q.minutes,Ae=q.seconds;m(ne,Te,Ae)}t.redraw(),N&&Ge("onChange")}function ue(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ge("onClose")}function Me(){t.config!==void 0&&Ge("onDestroy");for(var N=t._handlers.length;N--;)t._handlers[N].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var I=t.calendarContainer.parentNode;if(I.lastChild&&I.removeChild(I.lastChild),I.parentNode){for(;I.firstChild;)I.parentNode.insertBefore(I.firstChild,I);I.parentNode.removeChild(I)}}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(q){try{delete t[q]}catch{}})}function Z(N){return t.calendarContainer.contains(N)}function be(N){if(t.isOpen&&!t.config.inline){var I=$n(N),q=Z(I),ne=I===t.input||I===t.altInput||t.element.contains(I)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),Te=!ne&&!q&&!Z(N.relatedTarget),Ae=!t.config.ignoredFocusElements.some(function(Qe){return Qe.contains(I)});Te&&Ae&&(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 x(N){if(!(!N||t.config.minDate&&N<t.config.minDate.getFullYear()||t.config.maxDate&&N>t.config.maxDate.getFullYear())){var I=N,q=t.currentYear!==I;t.currentYear=I||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)),q&&(t.redraw(),Ge("onYearChange"),Q())}}function G(N,I){var q;I===void 0&&(I=!0);var ne=t.parseDate(N,void 0,I);if(t.config.minDate&&ne&&Cn(ne,t.config.minDate,I!==void 0?I:!t.minDateHasTime)<0||t.config.maxDate&&ne&&Cn(ne,t.config.maxDate,I!==void 0?I:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(ne===void 0)return!1;for(var Te=!!t.config.enable,Ae=(q=t.config.enable)!==null&&q!==void 0?q:t.config.disable,Qe=0,Ue=void 0;Qe<Ae.length;Qe++){if(Ue=Ae[Qe],typeof Ue=="function"&&Ue(ne))return Te;if(Ue instanceof Date&&ne!==void 0&&Ue.getTime()===ne.getTime())return Te;if(typeof Ue=="string"){var xe=t.parseDate(Ue,void 0,!0);return xe&&xe.getTime()===ne.getTime()?Te:!Te}else if(typeof Ue=="object"&&ne!==void 0&&Ue.from&&Ue.to&&ne.getTime()>=Ue.from.getTime()&&ne.getTime()<=Ue.to.getTime())return Te}return!Te}function _e(N){return t.daysContainer!==void 0?N.className.indexOf("hidden")===-1&&N.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(N):!1}function je(N){var I=N.target===t._input,q=t._input.value.trimEnd()!==Tt();I&&q&&!(N.relatedTarget&&Z(N.relatedTarget))&&t.setDate(t._input.value,!0,N.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ne(N){var I=$n(N)
Line truncated
|
||||
`),d=_("span"),m=_("span"),m.textContent="Choose presets",g=T(),B(v.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[10]),h(m,"class","txt link-primary"),h(d,"class","inline-flex"),h(f,"class","help-block")},m(M,D){w(M,e,D),p(e,t),p(e,i),p(e,s),w(M,o,D),V(r,M,D),w(M,u,D),w(M,f,D),p(f,c),p(f,d),p(d,m),p(d,g),V(v,d,null),b=!0,y||(C=et(Et.call(null,s,{text:`Allow files ONLY with the listed mime types.
|
||||
Leave empty for no restriction.`,position:"top"})),y=!0)},p(M,D){(!b||D&1024&&l!==(l=M[10]))&&h(e,"for",l);const E={};D&1024&&(E.id=M[10]),!a&&D&1&&(a=!0,E.value=M[0].mimeTypes,He(()=>a=!1)),r.$set(E);const O={};D&2049&&(O.$$scope={dirty:D,ctx:M}),v.$set(O)},i(M){b||(A(r.$$.fragment,M),A(v.$$.fragment,M),b=!0)},o(M){P(r.$$.fragment,M),P(v.$$.fragment,M),b=!1},d(M){M&&k(e),M&&k(o),z(r,M),M&&k(u),M&&k(f),z(v),y=!1,C()}}}function s3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[9](b)}let v={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(v.value=n[0].thumbs),r=new fs({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[10]),h(f,"class","help-block")},m(b,y){w(b,e,y),p(e,t),p(e,i),p(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=et(Et.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(b,y){(!c||y&1024&&l!==(l=b[10]))&&h(e,"for",l);const C={};y&1024&&(C.id=b[10]),!a&&y&1&&(a=!0,C.value=b[0].thumbs,He(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function l3(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return i=new Ie({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[e3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[t3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[i3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[s3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(a,"class","col-sm-12"),h(c,"class","col-sm-12"),h(e,"class","grid")},m(g,v){w(g,e,v),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),p(e,r),p(e,a),V(u,a,null),p(e,f),p(e,c),V(d,c,null),m=!0},p(g,[v]){const b={};v&2&&(b.name="schema."+g[1]+".options.maxSize"),v&3073&&(b.$$scope={dirty:v,ctx:g}),i.$set(b);const y={};v&2&&(y.name="schema."+g[1]+".options.maxSelect"),v&3073&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const C={};v&2&&(C.name="schema."+g[1]+".options.mimeTypes"),v&3073&&(C.$$scope={dirty:v,ctx:g}),u.$set(C);const $={};v&2&&($.name="schema."+g[1]+".options.thumbs"),v&3073&&($.$$scope={dirty:v,ctx:g}),d.$set($)},i(g){m||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),m=!0)},o(g){P(i.$$.fragment,g),P(o.$$.fragment,g),P(u.$$.fragment,g),P(d.$$.fragment,g),m=!1},d(g){g&&k(e),z(i),z(o),z(u),z(d)}}}function o3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=It(this.value),t(0,s)}function o(){s.maxSelect=It(this.value),t(0,s)}function r(m){n.$$.not_equal(s.mimeTypes,m)&&(s.mimeTypes=m,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(m){n.$$.not_equal(s.thumbs,m)&&(s.thumbs=m,t(0,s))}return n.$$set=m=>{"key"in m&&t(1,i=m.key),"options"in m&&t(0,s=m.options)},n.$$.update=()=>{n.$$.dirty&1&&Y.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class r3 extends Fe{constructor(e){super(),Le(this,e,o3,l3,Pe,{key:1,options:0})}}function a3(n){let e,t,i,s,l,o,r;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new us({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=R("Collection"),s=T(),B(l.$$.fragment),h(e,"for",i=n[9])},m(f,c){w(f,e,c),p(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&512&&i!==(i=f[9]))&&h(e,"for",i);const d={};c&8&&(d.searchable=f[3].length>5),c&4&&(d.selectPlaceholder=f[2]?"Loading...":"Select collection"),c&8&&(d.items=f[3]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,He(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=
Line truncated
|
||||
form-field
|
||||
required
|
||||
`+(n[5]?"":"invalid")+`
|
||||
`+(n[0].id&&n[0].system?"disabled":"")+`
|
||||
`,name:"schema."+n[1]+".name",$$slots:{default:[y3,({uniqueId:j})=>({38:j}),({uniqueId:j})=>[0,j?128:0]]},$$scope:{ctx:n}}});const E=[A3,E3,O3,D3,T3,M3,C3,$3,S3,w3,k3],O=[];function F(j,Q){return j[0].type==="text"?0:j[0].type==="number"?1:j[0].type==="bool"?2:j[0].type==="email"?3:j[0].type==="url"?4:j[0].type==="date"?5:j[0].type==="select"?6:j[0].type==="json"?7:j[0].type==="file"?8:j[0].type==="relation"?9:j[0].type==="user"?10:-1}~(f=F(n))&&(c=O[f]=E[f](n)),g=new Ie({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[P3,({uniqueId:j})=>({38:j}),({uniqueId:j})=>[0,j?128:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Fc(n),H=!n[0].toDelete&&Ic(n);return{c(){e=_("form"),t=_("div"),i=_("div"),B(s.$$.fragment),l=T(),o=_("div"),B(r.$$.fragment),a=T(),u=_("div"),c&&c.c(),d=T(),m=_("div"),B(g.$$.fragment),v=T(),b=_("div"),L&&L.c(),y=T(),H&&H.c(),C=T(),$=_("input"),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(u,"class","col-sm-12 hidden-empty"),h(m,"class","col-sm-4 flex"),h(b,"class","col-sm-4 flex"),h(t,"class","grid"),h($,"type","submit"),h($,"class","hidden"),h($,"tabindex","-1"),h(e,"class","field-form")},m(j,Q){w(j,e,Q),p(e,t),p(t,i),V(s,i,null),p(t,l),p(t,o),V(r,o,null),p(t,a),p(t,u),~f&&O[f].m(u,null),p(t,d),p(t,m),V(g,m,null),p(t,v),p(t,b),L&&L.m(b,null),p(t,y),H&&H.m(t,null),p(e,C),p(e,$),S=!0,M||(D=X(e,"submit",Qt(n[31])),M=!0)},p(j,Q){const ie={};Q[0]&1&&(ie.class="form-field required "+(j[0].id?"disabled":"")),Q[0]&2&&(ie.name="schema."+j[1]+".type"),Q[0]&1|Q[1]&384&&(ie.$$scope={dirty:Q,ctx:j}),s.$set(ie);const U={};Q[0]&33&&(U.class=`
|
||||
form-field
|
||||
required
|
||||
`+(j[5]?"":"invalid")+`
|
||||
`+(j[0].id&&j[0].system?"disabled":"")+`
|
||||
`),Q[0]&2&&(U.name="schema."+j[1]+".name"),Q[0]&33|Q[1]&384&&(U.$$scope={dirty:Q,ctx:j}),r.$set(U);let K=f;f=F(j),f===K?~f&&O[f].p(j,Q):(c&&(De(),P(O[K],1,1,()=>{O[K]=null}),Oe()),~f?(c=O[f],c?c.p(j,Q):(c=O[f]=E[f](j),c.c()),A(c,1),c.m(u,null)):c=null);const W={};Q[0]&1|Q[1]&384&&(W.$$scope={dirty:Q,ctx:j}),g.$set(W),j[0].type!=="file"?L?(L.p(j,Q),Q[0]&1&&A(L,1)):(L=Fc(j),L.c(),A(L,1),L.m(b,null)):L&&(De(),P(L,1,1,()=>{L=null}),Oe()),j[0].toDelete?H&&(De(),P(H,1,1,()=>{H=null}),Oe()):H?(H.p(j,Q),Q[0]&1&&A(H,1)):(H=Ic(j),H.c(),A(H,1),H.m(t,null))},i(j){S||(A(s.$$.fragment,j),A(r.$$.fragment,j),A(c),A(g.$$.fragment,j),A(L),A(H),S=!0)},o(j){P(s.$$.fragment,j),P(r.$$.fragment,j),P(c),P(g.$$.fragment,j),P(L),P(H),S=!1},d(j){j&&k(e),z(s),z(r),~f&&O[f].d(),z(g),L&&L.d(),H&&H.d(),M=!1,D()}}}function Rc(n){let e,t,i,s,l=n[0].system&&Hc(),o=!n[0].id&&jc(n),r=n[0].required&&qc(),a=n[0].unique&&Vc();return{c(){e=_("div"),l&&l.c(),t=T(),o&&o.c(),i=T(),r&&r.c(),s=T(),a&&a.c(),h(e,"class","inline-flex")},m(u,f){w(u,e,f),l&&l.m(e,null),p(e,t),o&&o.m(e,null),p(e,i),r&&r.m(e,null),p(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Hc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=jc(u),o.c(),o.m(e,i)),u[0].required?r||(r=qc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=Vc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Hc(n){let e;return{c(){e=_("span"),e.textContent="System",h(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jc(n){let e;return{c(){e=_("span"),e.textContent="New",h(e,"class","label"),ee(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&257&&ee(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&k(e)}}}function qc(n){let e;return{c(){e=_("span"),e.textContent="Required",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Vc(n){let e;return{c(){e=_("span"),e.textContent="Unique",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function zc(n){let e,t,i,s,l;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=et(Et.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Lt(()=>{t||(t=at(e,Wn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=at(e,Wn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Bc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",ni(n[15])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function N3(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,m,g,v,b,y=!n[0].toDelete&&Rc(n),C=n[7]&&!n[0].system&&zc(),$=n[0].toDelete&&Bc(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=T(),o=_("strong"),a=R(r),f=T(),y&&y.c(),c=T(),d=_("div"),m=T(),C&&C.c(),g=T(),$&&$.c(),v=lt(),h(i,"class",s=Ka(Y.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),h(t,"class","icon field-type"),h(o,"class","title field-name svelte-1tpxlm5"),h(o,"title",u=n[0].name),ee(o,"txt-strikethrough",n[0].toDelete),h(e,"class","inline-flex"),h(d,"class","flex-fill")},m(S,M){w(S,e,M),p(e,t),p(t,i),p(e,l),p(e,o),p(o,a),w(S,f,M),y&&y.m(S,M),w(S,c,M),w(S,d,M),w(S,m,M),C&&C.m(S,M),w(S,g,M),$&&$.m(S,M),w(S,v,M),b=!0},p(S,M){(!b||M[0]&1&&s!==(s=Ka(Y.getFieldTypeIcon(S[0].type))+" svelte-1tpxlm5"))&&h(i,"class",s),(!b||M[0]&1)&&r!==(r=(S[0].name||"-")+"")&&me(a,r),(!b||M[0]&1&&u!==(u=S[0].name))&&h(o,"title",u),M[0]&1&&ee(o,"txt-strikethrough",S[0].toDelete),S[0].toDelete?y&&(y.d(1),y=null):y?y.p(S,M):(y=Rc(S),y.c(),y.m(c.parentNode,c)),S[7]&&!S[0].system?C?M[0]&129&&A(C,1):(C=zc(),C.c(),A(C,1),C.m(g.parentNode,g)):C&&(De(),P(C,1,1,()=>{C=null}),Oe()),S[0].toDelete?$?$.p(S,M):($=Bc(S),$.c(),$.m(v.parentNode,v)):$&&($.d(1),$=null)},i(S){b||(A(C),b=!0)},o(S){P(C),b=!1},d(S){S&&k(e),S&&k(f),y&&y.d(S),S&&k(c),S&&k(d),S&&k(m),C&&C.d(S),S&&k(g),$&&$.d(S),S&&k(v)}}}function R3(n){let e,t,i={single:!0,interactive:n[8],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[N3],default:[I3]},$$scope:{ctx:n}};return e=new za({props:i}),n[32](e),e.$on("expand",n[33]),e.$on("collapse",n[34]),e.$on("toggle",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&256&&(o.interactive=s[8]),l[0]&5&&(o.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&483|l[1]&256&&(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[32](null),z(e,s)}}}function H3(n,e,t){let i,s,l,o,r;qt(n,rs,Z=>t(14,r=Z));const a=hn();let{key:u="0"}=e,{field:f=new Sn}=e,{disabled:c=!1}=e,{excludeNames:d=[]}=e,m,g=f.type;function v(){m==null||m.expand()}function b(){m==null||m.collapse()}function y(){f.id?t(0,f.toDelete=!0,f):(b(),a("remove"))}function C(Z){if(Z=(""+Z).toLowerCase(),!Z)return!1;for(const be of d)i
Line truncated
|
||||
<code>@request.query.*</code>
|
||||
<code>@request.data.*</code>
|
||||
<code>@request.user.*</code>`,$=T(),S=_("hr"),M=T(),D=_("p"),D.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",E=T(),O=_("div"),O.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",F=T(),L=_("hr"),H=T(),j=_("p"),j.innerHTML=`Example rule:
|
||||
<br/>
|
||||
<code>@request.user.id!="" && created>"2022-01-01 00:00:00"</code>`,h(s,"class","m-b-0"),h(o,"class","inline-flex flex-gap-5"),h(g,"class","m-t-10 m-b-5"),h(b,"class","m-b-0"),h(C,"class","inline-flex flex-gap-5"),h(S,"class","m-t-10 m-b-5"),h(D,"class","m-b-0"),h(O,"class","inline-flex flex-gap-5"),h(L,"class","m-t-10 m-b-5"),h(i,"class","content"),h(t,"class","alert alert-warning m-0")},m(W,J){w(W,e,J),p(e,t),p(t,i),p(i,s),p(i,l),p(i,o),p(o,r),p(o,a),p(o,u),p(o,f),p(o,c),p(o,d);for(let se=0;se<K.length;se+=1)K[se].m(o,null);p(i,m),p(i,g),p(i,v),p(i,b),p(i,y),p(i,C),p(i,$),p(i,S),p(i,M),p(i,D),p(i,E),p(i,O),p(i,F),p(i,L),p(i,H),p(i,j),ie=!0},p(W,J){if(J&1){U=W[0].schema;let se;for(se=0;se<U.length;se+=1){const fe=Kc(W,U,se);K[se]?K[se].p(fe,J):(K[se]=Jc(fe),K[se].c(),K[se].m(o,null))}for(;se<K.length;se+=1)K[se].d(1);K.length=U.length}},i(W){ie||(W&&Lt(()=>{Q||(Q=at(e,on,{duration:150},!0)),Q.run(1)}),ie=!0)},o(W){W&&(Q||(Q=at(e,on,{duration:150},!1)),Q.run(0)),ie=!1},d(W){W&&k(e),Bn(K,W),W&&Q&&Q.end()}}}function B3(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=R(t)},m(s,l){w(s,e,l),p(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&me(i,t)},d(s){s&&k(e)}}}function U3(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=R(t),s=R(".*")},m(l,o){w(l,e,o),p(e,i),p(e,s)},p(l,o){o&1&&t!==(t=l[19].name+"")&&me(i,t)},d(l){l&&k(e)}}}function Jc(n){let e;function t(l,o){return l[19].type==="relation"||l[19].type==="user"?U3:B3}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function W3(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const o=r=>r[14];for(let r=0;r<l.length;r+=1){let a=Yc(n,l,r),u=o(a);t.set(u,e[r]=Gc(u,a))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();i=lt()},m(r,a){for(let u=0;u<e.length;u+=1)e[u].m(r,a);w(r,i,a),s=!0},p(r,a){a&262235&&(l=Object.entries(r[6]),De(),e=dt(e,a,o,1,r,l,t,i.parentNode,Bt,Gc,i,Yc),Oe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(r){for(let a=0;a<e.length;a+=1)P(e[a]);s=!1},d(r){for(let a=0;a<e.length;a+=1)e[a].d(r);r&&k(i)}}}function Y3(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',h(e,"class","txt-center")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function K3(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',h(e,"type","button"),h(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[et(Et.call(null,e,"Lock and set to Admins only")),X(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,st(i)}}}function Z3(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',h(e,"type","button"),h(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[et(Et.call(null,e,"Unlock and set custom rule")),X(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,st(i)}}}function J3(n){let e;return{c(){e=R("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function G3(n){let e;return{c(){e=R("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function X3(n){let e,t=n[15]+"",i,s,l=Ei(n[0][n[14]])?"Admins only":"Custom rule",o,r,a,u,f=n[14],c,d,m,g,v,b,y;function C(){return n[10](n[14])}const $=()=>n[11](u,f),S=()=>n[11](null,f);function M(H){n[12](H,n[14])}var D=n[4];function E(H){let j={baseCollection:H[0],disabled:Ei(H[0][H[14]])};return H[0][H[14]]!==void 0&&(j.value=H[0][H[14]]),{props:j}}D&&(u=new D(E(n)),$(),he.push(()=>Re(u,"value",M)));function O(H,j){return j&1&&(g=null),g==null&&(g=!!Ei(H[0][H[14]])),g?G3:J3}let F=O(n,-1),L=F(n);return{c(){e=_("label"),i=R(t),s=R(" - "),o=R(l),a=T(),u&&B(u.$$.fragment),d=T(),m=_("div"),L.c(),h(e,"for",r=n[18]),h(m,"class","help-block")},m(H,j){w(H,e,j),p(e,i),p(e,s),p(e,o),w(H,a,j),u&&V(u,H,j),w(H,d,j),w(H,m,j),L.m(m,null),v=!0,b||(y=X(e,"click",C),b=!0)},p(H,j){n=H,(!v||j&1)&&l!==(l=Ei(n[0][n[14]])?"Admins only":"Custom rule")&&me(o,l),(!v||j&262144&&r!==(r=n[18]))&&h(e,"for",r),f!==n[14]&&(S(),f=n[14],$());const Q={};if(j&1&&(Q.baseCollection=n[0]),j&1&&(Q.disabled=Ei(n[0][n[14]])),!c&&j&65&&(c=!0,Q.value=n[0][n[14]],He(()=>c=!1)),D!==(D=n[4])){if(u){De();const ie=u;P(ie.$$.fragment,1,0,()=>{z(ie,1)}),Oe()}D?(u=new D(E(n)),$(),he.push(()=>Re(u,"value",M)),B(u.$$.fragment),A(u.$$.fragment,1),V(u,d.parentNode,d)):u=null}else D&&u.$set(Q);F!==(F=O(n,j))&&(L.d(1),L=F(n),L&&(L.c(),L.m(m,null)))},i(H){v||(u&&A(u.$$.fragment,H),v=!0)},o(H){u&&P(u.$$.fragment,H),v=!1},d(H){H&&k(e),H&&k(a),S(),u&&z(u,H),H&&k(d),H&&k(m),L.d(),b=!1,y()}}}function Gc(n,e){let t,i,s,l,o,r,a,u;function f(m,g){return g&1&&(l=null),l==null&&(l=!!Ei(m[0][m[14]])),l?Z3:K3}let c=f(e,-1),d=c(e);return r=new Ie({props:{class:"form-field rule-field m-0 "+(Ei(e[0][e[14]])?"disabled":""),name:e[14Line truncated
|
||||
<a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
|
||||
</a>.`,s=T(),l=_("span"),r=R(o),a=T(),b&&b.c(),u=T(),c.c(),d=lt(),h(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),h(t,"class","flex"),h(e,"class","block m-b-base")},m(S,M){w(S,e,M),p(e,t),p(t,i),p(t,s),p(t,l),p(l,r),p(e,a),b&&b.m(e,null),w(S,u,M),C[f].m(S,M),w(S,d,M),m=!0,g||(v=X(l,"click",n[7]),g=!0)},p(S,[M]){(!m||M&4)&&o!==(o=S[2]?"Hide available fields":"Show available fields")&&me(r,o),S[2]?b?(b.p(S,M),M&4&&A(b,1)):(b=Zc(S),b.c(),A(b,1),b.m(e,null)):b&&(De(),P(b,1,1,()=>{b=null}),Oe());let D=f;f=$(S),f===D?C[f].p(S,M):(De(),P(C[D],1,1,()=>{C[D]=null}),Oe(),c=C[f],c?c.p(S,M):(c=C[f]=y[f](S),c.c()),A(c,1),c.m(d.parentNode,d))},i(S){m||(A(b),A(c),m=!0)},o(S){P(b),P(c),m=!1},d(S){S&&k(e),b&&b.d(),S&&k(u),C[f].d(S),S&&k(d),g=!1,v()}}}function Ei(n){return n===null}function x3(n,e,t){let{collection:i=new Fn}=e,s={},l=!1,o={},r,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,r=(await Qi(()=>import("./FilterAutocompleteInput.22ad58b4.js"),[])).default)}catch(y){console.warn(y),t(4,r=null)}t(5,a=!1)}Jn(()=>{f()});const c=()=>t(2,l=!l),d=async y=>{var C;t(0,i[y]=s[y]||"",i),await di(),(C=o[y])==null||C.focus()},m=y=>{t(1,s[y]=i[y],s),t(0,i[y]=null,i)},g=y=>{var C;return(C=o[y])==null?void 0:C.focus()};function v(y,C){he[y?"unshift":"push"](()=>{o[C]=y,t(3,o)})}function b(y,C){n.$$.not_equal(i[C],y)&&(i[C]=y,t(0,i))}return n.$$set=y=>{"collection"in y&&t(0,i=y.collection)},[i,s,l,o,r,a,u,c,d,m,g,v,b]}class e$ extends Fe{constructor(e){super(),Le(this,e,x3,Q3,Pe,{collection:0})}}function Xc(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qc(n,e,t){const i=n.slice();return i[14]=e[t],i}function xc(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ed(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=R(`Renamed collection
|
||||
`),s=_("strong"),o=R(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=R(c),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")},m(m,g){w(m,e,g),p(e,t),p(t,i),p(t,s),p(s,o),p(t,r),p(t,a),p(t,u),p(t,f),p(f,d)},p(m,g){g&2&&l!==(l=m[1].originalName+"")&&me(o,l),g&2&&c!==(c=m[1].name+"")&&me(d,c)},d(m){m&&k(e)}}}function td(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=R(`Renamed field
|
||||
`),s=_("strong"),o=R(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=R(c),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")},m(m,g){w(m,e,g),p(e,t),p(t,i),p(t,s),p(s,o),p(t,r),p(t,a),p(t,u),p(t,f),p(f,d)},p(m,g){g&16&&l!==(l=m[14].originalName+"")&&me(o,l),g&16&&c!==(c=m[14].name+"")&&me(d,c)},d(m){m&&k(e)}}}function nd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=_("li"),t=R("Removed field "),i=_("span"),l=R(s),o=T(),h(i,"class","txt-bold"),h(e,"class","txt-danger")},m(r,a){w(r,e,a),p(e,t),p(e,i),p(i,l),p(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&me(l,s)},d(r){r&&k(e)}}}function t$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[3].length&&xc(),g=n[5]&&ed(n),v=n[4],b=[];for(let $=0;$<v.length;$+=1)b[$]=td(Qc(n,v,$));let y=n[3],C=[];for(let $=0;$<y.length;$+=1)C[$]=nd(Xc(n,y,$));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=T(),s=_("div"),l=_("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to
|
||||
update it manually!`,o=T(),m&&m.c(),r=T(),a=_("h6"),a.textContent="Changes:",u=T(),f=_("ul"),g&&g.c(),c=T();for(let $=0;$<b.length;$+=1)b[$].c();d=T();for(let $=0;$<C.length;$+=1)C[$].c();h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning"),h(f,"class","changes-list svelte-1ghly2p")},m($,S){w($,e,S),p(e,t),p(e,i),p(e,s),p(s,l),p(s,o),m&&m.m(s,null),w($,r,S),w($,a,S),w($,u,S),w($,f,S),g&&g.m(f,null),p(f,c);for(let M=0;M<b.length;M+=1)b[M].m(f,null);p(f,d);for(let M=0;M<C.length;M+=1)C[M].m(f,null)},p($,S){if($[3].length?m||(m=xc(),m.c(),m.m(s,null)):m&&(m.d(1),m=null),$[5]?g?g.p($,S):(g=ed($),g.c(),g.m(f,c)):g&&(g.d(1),g=null),S&16){v=$[4];let M;for(M=0;M<v.length;M+=1){const D=Qc($,v,M);b[M]?b[M].p(D,S):(b[M]=td(D),b[M].c(),b[M].m(f,d))}for(;M<b.length;M+=1)b[M].d(1);b.length=v.length}if(S&8){y=$[3];let M;for(M=0;M<y.length;M+=1){const D=Xc($,y,M);C[M]?C[M].p(D,S):(C[M]=nd(D),C[M].c(),C[M].m(f,null))}for(;M<C.length;M+=1)C[M].d(1);C.length=y.length}},d($){$&&k(e),m&&m.d(),$&&k(r),$&&k(a),$&&k(u),$&&k(f),g&&g.d(),Bn(b,$),Bn(C,$)}}}function n$(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function i$(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=T(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-secondary"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[X(e,"click",n[8]),X(i,"click",n[9])],s=!0)},p:oe,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,st(l)}}}function s$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[i$],header:[n$],default:[t$]},$$scope:{ctx:n}};return e=new Ci({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(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),z(e,s)}}}function l$(n,e,t){let i,s,l;const o=hn();let r,a;async function u(y){t(1,a=y),await di(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),m=()=>c();function g(y){he[y?"unshift":"push"](()=>{r=y,t(2,r)})}function v(y){pt.call(this,n,y)}function b(y){pt.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,m,g,v,b]}class o$ extends Fe{constructor(e){super(),Le(this,e,l$,s$,Pe,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function id(n){let e,t,i,s;function l(r){n[26](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new e$({props:o}),he.push(()=>Re(t,"collection",l)),{c(){e=_("div"),B(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],He(()=>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&&k(e),z(t)}}}function r$(n){let e,t,i,s,l,o;function r(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new z3({props:a}),he.push(()=>Re(i,"collection",r));let u=n[9]===_l&&id(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),l=T(),u&&u.c(),h(t,"class","tab-item"),ee(t,"active",n[9]===ss),h(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),p(e,t),V(i,t,null),p(e,l),u&&u.m(e,null),o=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],He(()=>s=!1)),i.$set(d),c[0]&512&&ee(t,"active",f[9]===ss),f[9]===_l?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=id(f),u.c(),A(u,1),u.m(e,null)):u&&(De(),P(u,1,1,()=>{u=null}),Oe())},i(f){o||(A(i.$$.fragment,f),A(u),o=!0)},o(f){P(i.$$.fragment,f),P(u),o=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function sd(n){let e,t,i,s,l,o,r;return o=new qi({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[a$]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=T(),i=_("button"),s=_("i"),l=T(),B(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),p(i,s),p(i,l),V(o,i,null),r=!0},p(a,u){const f={};u[1]&256&&(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&&k(e),a&&k(t),a&&k(i),z(o)}}}function a$(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[20]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function ld(n){let e;return{c(){e=_("div"),e.textContent="System collection",h(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function u$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=n[2].system&&ld();return{c(){e=_("label"),t=R("Name"),s=T(),l=_("input"),u=T(),m&&m.c(),f=lt(),h(e,"for",i=n[38]),h(l,"type","text"),h(l,"id",o=n[38]),l.required=!0,l.disabled=n[11],h(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,h(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,v){w(g,e,v),p(e,t),w(g,s,v),w(g,l,v),w(g,u,v),m&&m.m(g,v),w(g,f,v),n[2].isNew&&l.focus(),c||(d=X(l,"input",n[21]),c=!0)},p(g,v){v[1]&128&&i!==(i=g[38])&&h(e,"for",i),v[1]&128&&o!==(o=g[38])&&h(l,"id",o),v[0]&2048&&(l.disabled=g[11]),v[0]&4&&r!==(r=g[2].isNew)&&(l.autofocus=r),v[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?m||(m=ld(),m.c(),m.m(f.parentNode,f)):m&&(m.d(1),m=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),m&&m.d(g),g&&k(f),c=!1,d()}}}function od(n){let e,t,i,s,l,o;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=et(t=Et.call(null,e,n[12])),l=!0)},p(r,a){t&&Zn(t.update)&&a[0]&4096&&t.update.call(null,r[12])},i(r){s||(r&&Lt(()=>{i||(i=at(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=at(e,Wn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function rd(n){let e,t,i,s,l;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=et(Et.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Lt(()=>{t||(t=at(e,Wn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=at(e,Wn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function f$(n){var H,j,Q,ie,U,K;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,g,v=!Y.isEmpty((H=n[4])==null?void 0:H.schema),b,y,C,$,S=!Y.isEmpty((j=n[4])==null?void 0:j.listRule)||!Y.isEmpty((Q=n[4])==null?void 0:Q.viewRule)||!Y.isEmpty((ie=n[4])==null?void 0:ie.createRule)||!Y.isEmpty((U=n[4])==null?void 0:U.updateRule)||!Y.isEmpty((K=n[4])==null?void 0:K.deleteRule),M,D,E,O=!n[2].isNew&&!n[2].system&&sd(n);r=new Ie({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[u$,({uniqueId:W})=>({38:W}),({uniqueId:W})=>[0,W?128:0]]},$$scope:{ctx:n}}});let F=v&&od(n),L=S&&rd();return{c(){e=_("h4"),i=R(t),s=T(),O&&O.c(),l=T(),o=_("form"),B(r.$$.fragment),a=T(),u=_("input"),f=T(),c=_("div"),d=_("button"),m=_("span"),m.textContent="Fields",g=T(),F&&F.c(),b=T(),y=_("button"),C=_("span"),C.textContent="API Rules",$=T(),L&&L.c(),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(m,"class","txt"),h(d,"type","button"),h(d,"class","tab-item"),ee(d,"active",n[9]===ss),h(C,"class","txt"),h(y,"type","button"),h(y,"class","tab-item"),ee(y,"active",n[9]===_l),h(c,"class","tabs-header stretched")},m(W,J){w(W,e,J),p(e,i),w(W,s,J),O&&O.m(W,J),w(W,l,J),w(W,o,J),V(r,o,null),p(o,a),p(o,u),w(W,f,J),w(W,c,J),p(c,d),p(d,m),p(d,g),F&&F.m(d,null),p(c,b),p(c,y),p(y,C),p(y,$),L&&L.m(y,null),M=!0,D||(E=[X(o,"submit",Qt(n[22])),X(d,"click",n[23]),X(y,"click",n[24])],D=!0)},p(W,J){var fe,ke,le,ue,Me,Z;(!M||J[0]&4)&&t!==(t=W[2].isNew?"New collection":"Edit collection")&&me(i,t),!W[2].isNew&&!W[2].system?O?(O.p(W,J),J[0]&4&&A(O,1)):(O=sd(W),O.c(),A(O,1),O.m(l.parentNode,l)):O&&(De(),P(O,1,1,()=>{O=null}),Oe());const se={};J[0]&2048&&(se.class="form-field required m-b-0 "+(W[11]?"disabled":"")),J[0]&2052|J[1]&384&&(se.$$scope={dirty:J,ctx:W}),r.$set(se),J[0]&16&&(v=!Y.isEmpty((fe=W[4])==null?void 0:fe.schema)),v?F?(F.p(W,J),J[0]&16&&A(F,1)):(F=od(W),F.c(),A(F,1),F.m(d,null)):F&&(De(),P(F,1,1,()=>{F=null}),Oe()),J[0]&512&&ee(d,"active",W[9]===ss),J[0]&16&&(S=!Y.isEmpty((ke=W[4])==null?void 0:ke.listRule)||!Y.isEmpty((le=W[4])==null?void 0:le.viewRule)||!Y.isEmpty((ue=W[4])==null?void 0:ue.createRule)||!Y.isEmpty((Me=W[4])==null?void 0:Me.updateRule)||!Y.isEmpty((Z=W[4])==null?void 0:Z.deleteRule)),S?L?J[0]&16&&A(L,1):(L=rd(),L.c(),A(L,1),L.m(y,null)):L&&(De(),P(L,1,1,()=>{L=null}),Oe()),J[0]&512&&ee(y,"active",W[9]===_l)},i(W){M||(A(O),A(r.$$.fragment,W),A(F),A(L),M=!0)},o(W){P(O),P(r.$$.fragment,W),P(F),P(L),M=!1},d(W){W&&k(e),W&&k(s),O&&O.d(W),W&&k(l),W&&k(o),z(r),W&&k(f),W&&k(c),F&&F.d(),L&&L.d(),D=!1,st(E)}}}function c$(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=R(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-secondary"),e.disabled=n[7],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ee(s,"btn-loading",n[7])},m(c,d){w(c,e,d),p(e,t),w(c,i,d),w(c,s,d),p(s,l),p(l,r),u||(f=[X(e,"click",n[18]),X(s,"click",nLine truncated
|
||||
<span class="txt">New collection</span>`,y=T(),B(C.$$.fragment),h(l,"type","button"),h(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),ee(l,"hidden",!n[4]),h(s,"class","form-field-addon"),h(r,"type","text"),h(r,"placeholder","Search collections..."),h(i,"class","form-field search"),ee(i,"active",n[4]),h(t,"class","sidebar-header"),h(u,"class","m-t-5 m-b-xs"),h(c,"class","sidebar-content"),h(b,"type","button"),h(b,"class","btn btn-block btn-outline"),h(v,"class","sidebar-footer"),h(e,"class","page-sidebar collection-sidebar")},m(L,H){w(L,e,H),p(e,t),p(t,i),p(i,s),p(s,l),p(i,o),p(i,r),$e(r,n[0]),p(e,a),p(e,u),p(e,f),p(e,c);for(let j=0;j<d.length;j+=1)d[j].m(c,null);O&&O.m(c,null),p(e,g),p(e,v),p(v,b),w(L,y,H),V(C,L,H),$=!0,S||(M=[X(l,"click",n[8]),X(r,"input",n[9]),X(b,"click",n[11])],S=!0)},p(L,[H]){H&16&&ee(l,"hidden",!L[4]),H&1&&r.value!==L[0]&&$e(r,L[0]),H&16&&ee(i,"active",L[4]),H&106&&(D=L[3],d=dt(d,H,E,1,L,D,m,c,cn,cd,null,ad),!D.length&&O?O.p(L,H):D.length?O&&(O.d(1),O=null):(O=ud(L),O.c(),O.m(c,null)));const j={};C.$set(j)},i(L){$||(A(C.$$.fragment,L),$=!0)},o(L){P(C.$$.fragment,L),$=!1},d(L){L&&k(e);for(let H=0;H<d.length;H+=1)d[H].d();O&&O.d(),L&&k(y),n[12](null),z(C,L),S=!1,st(M)}}}function _$(n,e,t){let i,s,l,o,r;qt(n,ui,b=>t(5,o=b)),qt(n,Ms,b=>t(7,r=b));let a,u="";function f(b){wn(ui,o=b,o)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const m=b=>f(b),g=()=>a==null?void 0:a.show();function v(b){he[b?"unshift":"push"](()=>{a=b,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=r.filter(b=>b.name!="profiles"&&(b.id==u||b.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,o,f,r,c,d,m,g,v]}class b$ extends Fe{constructor(e){super(),Le(this,e,_$,g$,Pe,{})}}function v$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$,S,M,D,E,O,F,L,H,j,Q,ie,U,K,W,J,se,fe,ke,le,ue,Me,Z,be,x,G,_e,je,Ne,qe,ae,re,ve,Je;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
|
||||
<code><span class="txt-success">OPERAND</span>
|
||||
<span class="txt-danger">OPERATOR</span>
|
||||
<span class="txt-success">OPERAND</span></code>, where:`,t=T(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
|
||||
quoted), number, null, true, false`,l=T(),o=_("li"),r=_("code"),r.textContent="OPERATOR",a=R(` - is one of:
|
||||
`),u=_("br"),f=T(),c=_("ul"),d=_("li"),m=_("code"),m.textContent="=",g=T(),v=_("span"),v.textContent="Equal",b=T(),y=_("li"),C=_("code"),C.textContent="!=",$=T(),S=_("span"),S.textContent="NOT equal",M=T(),D=_("li"),E=_("code"),E.textContent=">",O=T(),F=_("span"),F.textContent="Greater than",L=T(),H=_("li"),j=_("code"),j.textContent=">=",Q=T(),ie=_("span"),ie.textContent="Greater than or equal",U=T(),K=_("li"),W=_("code"),W.textContent="<",J=T(),se=_("span"),se.textContent="Less than or equal",fe=T(),ke=_("li"),le=_("code"),le.textContent="<=",ue=T(),Me=_("span"),Me.textContent="Less than or equal",Z=T(),be=_("li"),x=_("code"),x.textContent="~",G=T(),_e=_("span"),_e.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
|
||||
match)`,je=T(),Ne=_("li"),qe=_("code"),qe.textContent="!~",ae=T(),re=_("span"),re.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ve=T(),Je=_("p"),Je.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,h(r,"class","txt-danger"),h(m,"class","filter-op svelte-1w7s5nw"),h(v,"class","txt-hint"),h(C,"class","filter-op svelte-1w7s5nw"),h(S,"class","txt-hint"),h(E,"class","filter-op svelte-1w7s5nw"),h(F,"class","txt-hint"),h(j,"class","filter-op svelte-1w7s5nw"),h(ie,"class","txt-hint"),h(W,"class","filter-op svelte-1w7s5nw"),h(se,"class","txt-hint"),h(le,"class","filter-op svelte-1w7s5nw"),h(Me,"class","txt-hint"),h(x,"class","filter-op svelte-1w7s5nw"),h(_e,"class","txt-hint"),h(qe,"class","filter-op svelte-1w7s5nw"),h(re,"class","txt-hint")},m(nt,ut){w(nt,e,ut),w(nt,t,ut),w(nt,i,ut),p(i,s),p(i,l),p(i,o),p(o,r),p(o,a),p(o,u),p(o,f),p(o,c),p(c,d),p(d,m),p(d,g),p(d,v),p(c,b),p(c,y),p(y,C),p(y,$),p(y,S),p(c,M),p(c,D),p(D,E),p(D,O),p(D,F),p(c,L),p(c,H),p(H,j),p(H,Q),p(H,ie),p(c,U),p(c,K),p(K,W),p(K,J),p(K,se),p(c,fe),p(c,ke),p(ke,le),p(ke,ue),p(ke,Me),p(c,Z),p(c,be),p(be,x),p(be,G),p(be,_e),p(c,je),p(c,Ne),p(Ne,qe),p(Ne,ae),p(Ne,re),w(nt,ve,ut),w(nt,Je,ut)},p:oe,i:oe,o:oe,d(nt){nt&&k(e),nt&&k(t),nt&&k(i),nt&&k(ve),nt&&k(Je)}}}class y$ extends Fe{constructor(e){super(),Le(this,e,null,v$,Pe,{})}}function dd(n,e,t){const i=n.slice();return i[8]=e[t],i}function hd(n,e,t){const i=n.slice();return i[8]=e[t],i}function pd(n,e,t){const i=n.slice();return i[13]=e[t],i}function md(n,e,t){const i=n.slice();return i[13]=e[t],i}function gd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function _d(n,e){let t,i=e[13].lang+"",s,l,o,r;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&me(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),o=!1,r()}}}function bd(n,e){let t,i,s,l;return i=new ln({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&16&&(a.content=e[13].code),i.$set(a),r&24&&ee(t,"active",e[3]===e[13].lang)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function vd(n,e){let t,i=e[8].code+"",s,l,o,r;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("div"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),o=!1,r()}}}function yd(n,e){let t,i,s,l;return i=new ln({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o,r&36&&ee(t,"active",e[2]===e[8].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function k$(n){let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y=n[0].name+"",C,$,S,M,D,E,O,F=[],L=new Map,H,j,Q=[],ie=new Map,U,K,W,J,se,fe,ke,le,ue,Me,Z,be,x,G,_e,je,Ne,qe,ae,re,ve,Je,nt,ut,ot,Xe,ge,pe,Ve,mt,te,ye,Ke,ft,St,$t,Nt,Ft,Ct,Yt,Ge,Mt,ct,Rt,Ht,Tt,ht,Ut,it,N,I,q,ne,Te,Ae,Qe,Ue,xe,ze,Ye=[],gt=new Map,de,we,Ze=[],In=new Map,Gn,ce=n[1]&&gd(),Ee=n[4];const rt=Ce=>Ce[13].lang;for(let Ce=0;Ce<Ee.length;Ce+=1){let We=md(n,Ee,Ce),jt=rt(We);L.set(jt,F[Ce]=_d(jt,We))}let Vi=n[4];const El=Ce=>Ce[13].lang;for(let Ce=0;Ce<Vi.length;Ce+=1){let We=pd(n,Vi,Ce),jt=El(We);ie.set(jt,Q[Ce]=bd(jt,We))}ot=new ln({props:{content:`
|
||||
// DESC by created and ASC by id
|
||||
?sort=-created,id
|
||||
`}}),ft=new ln({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),$t=new y$({}),Ht=new ln({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let cs=n[5];const Al=Ce=>Ce[8].code;for(let Ce=0;Ce<cs.length;Ce+=1){let We=hd(n,cs,Ce),jt=Al(We);gt.set(jt,Ye[Ce]=vd(jt,We))}let zi=n[5];const Pl=Ce=>Ce[8].code;for(let Ce=0;Ce<zi.length;Ce+=1){let We=dd(n,zi,Ce),jt=Pl(We);In.set(jt,Ze[Ce]=yd(jt,We))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records"),c=T(),ce&&ce.c(),d=T(),m=_("div"),g=_("p"),v=R("Fetch a paginated "),b=_("strong"),C=R(y),$=R(" records list."),S=T(),M=_("div"),M.textContent="Client SDKs example",D=T(),E=_("div"),O=_("div");for(let Ce=0;Ce<F.length;Ce+=1)F[Ce].c();H=T(),j=_("div");for(let Ce=0;Ce<Q.length;Ce+=1)Q[Ce].c();U=T(),K=_("div"),K.textContent="Query parameters",W=T(),J=_("table"),se=_("thead"),se.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,fe=T(),ke=_("tbody"),le=_("tr"),le.innerHTML=`<td>page</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,ue=T(),Me=_("tr"),Me.innerHTML=`<td>perPage</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>Specify the max returned records per page (default to 30).</td>`,Z=T(),be=_("tr"),x=_("td"),x.textContent="sort",G=T(),_e=_("td"),_e.innerHTML='<span class="label">String</span>',je=T(),Ne=_("td"),qe=R("Specify the records order attribute(s). "),ae=_("br"),re=R(`
|
||||
Add `),ve=_("code"),ve.textContent="-",Je=R(" / "),nt=_("code"),nt.textContent="+",ut=R(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),B(ot.$$.fragment),Xe=T(),ge=_("tr"),pe=_("td"),pe.textContent="filter",Ve=T(),mt=_("td"),mt.innerHTML='<span class="label">String</span>',te=T(),ye=_("td"),Ke=R(`Filter the returned records. Ex.:
|
||||
`),B(ft.$$.fragment),St=T(),B($t.$$.fragment),Nt=T(),Ft=_("tr"),Ct=_("td"),Ct.textContent="expand",Yt=T(),Ge=_("td"),Ge.innerHTML='<span class="label">String</span>',Mt=T(),ct=_("td"),Rt=R(`Auto expand record relations. Ex.:
|
||||
`),B(Ht.$$.fragment),Tt=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),ht=_("br"),Ut=R(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),it=_("code"),it.textContent="@expand",N=R(" property (eg. "),I=_("code"),I.textContent='"@expand": {"rel1": {...}, ...}',q=R(`). Only the
|
||||
relations that the user has permissions to `),ne=_("strong"),ne.textContent="view",Te=R(" will be expanded."),Ae=T(),Qe=_("div"),Qe.textContent="Responses",Ue=T(),xe=_("div"),ze=_("div");for(let Ce=0;Ce<Ye.length;Ce+=1)Ye[Ce].c();de=T(),we=_("div");for(let Ce=0;Ce<Ze.length;Ce+=1)Ze[Ce].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-info"),h(m,"class","content m-b-base"),h(M,"class","section-title"),h(O,"class","tabs-header compact left"),h(j,"class","tabs-content"),h(E,"class","tabs m-b-lg"),h(K,"class","section-title"),h(J,"class","table-compact table-border m-b-lg"),h(Qe,"class","section-title"),h(ze,"class","tabs-header compact left"),h(we,"class","tabs-content"),h(xe,"class","tabs")},m(Ce,We){w(Ce,e,We),p(e,t),p(e,i),p(e,s),p(s,l),p(l,o),p(l,r),p(r,u),p(l,f),p(e,c),ce&&ce.m(e,null),w(Ce,d,We),w(Ce,m,We),p(m,g),p(g,v),p(g,b),p(b,C),p(g,$),w(Ce,S,We),w(Ce,M,We),w(Ce,D,We),w(Ce,E,We),p(E,O);for(let jt=0;jt<F.length;jt+=1)F[jt].m(O,null);p(E,H),p(E,j);for(let jt=0;jt<Q.length;jt+=1)Q[jt].m(j,null);w(Ce,U,We),w(Ce,K,We),w(Ce,W,We),w(Ce,J,We),p(J,se),p(J,fe),p(J,ke),p(ke,le),p(ke,ue),p(ke,Me),p(ke,Z),p(ke,be),p(be,x),p(be,G),p(be,_e),p(be,je),p(be,Ne),p(Ne,qe),p(Ne,ae),p(Ne,re),p(Ne,ve),p(Ne,Je),p(Ne,nt),p(Ne,ut),V(ot,Ne,null),p(ke,Xe),p(ke,ge),p(ge,pe),p(ge,Ve),p(ge,mt),p(ge,te),p(ge,ye),p(ye,Ke),V(ft,ye,null),p(ye,St),V($t,ye,null),p(ke,Nt),p(ke,Ft),p(Ft,Ct),p(Ft,Yt),p(Ft,Ge),p(Ft,Mt),p(Ft,ct),p(ct,Rt),V(Ht,ct,null),p(ct,Tt),p(ct,ht),p(ct,Ut),p(ct,it),p(ct,N),p(ct,I),p(ct,q),p(ct,ne),p(ct,Te),w(Ce,Ae,We),w(Ce,Qe,We),w(Ce,Ue,We),w(Ce,xe,We),p(xe,ze);for(let jt=0;jt<Ye.length;jt+=1)Ye[jt].m(ze,null);p(xe,de),p(xe,we);for(let jt=0;jt<Ze.length;jt+=1)Ze[jt].m(we,null);Gn=!0},p(Ce,[We]){(!Gn||We&1)&&a!==(a=Ce[0].name+"")&&me(u,a),Ce[1]?ce||(ce=gd(),ce.c(),ce.m(e,null)):ce&&(ce.d(1),ce=null),(!Gn||We&1)&&y!==(y=Ce[0].name+"")&&me(C,y),We&24&&(Ee=Ce[4],F=dt(F,We,rt,1,Ce,Ee,L,O,cn,_d,null,md)),We&24&&(Vi=Ce[4],De(),Q=dt(Q,We,El,1,Ce,Vi,ie,j,Bt,bd,null,pd),Oe()),We&36&&(cs=Ce[5],Ye=dt(Ye,We,Al,1,Ce,cs,gt,ze,cn,vd,null,hd)),We&36&&(zi=Ce[5],De(),Ze=dt(Ze,We,Pl,1,Ce,zi,In,we,Bt,yd,null,dd),Oe())},i(Ce){if(!Gn){for(let We=0;We<Vi.length;We+=1)A(Q[We]);A(ot.$$.fragment,Ce),A(ft.$$.fragment,Ce),A($t.$$.fragment,Ce),A(Ht.$$.fragment,Ce);for(let We=0;We<zi.length;We+=1)A(Ze[We]);Gn=!0}},o(Ce){for(let We=0;We<Q.length;We+=1)P(Q[We]);P(ot.$$.fragment,Ce),P(ft.$$.fragment,Ce),P($t.$$.fragment,Ce),P(Ht.$$.fragment,Ce);for(let We=0;We<Ze.length;We+=1)P(Ze[We]);Gn=!1},d(Ce){Ce&&k(e),ce&&ce.d(),Ce&&k(d),Ce&&k(m),Ce&&k(S),Ce&&k(M),Ce&&k(D),Ce&&k(E);for(let We=0;We<F.length;We+=1)F[We].d();for(let We=0;We<Q.length;We+=1)Q[We].d();Ce&&k(U),Ce&&k(K),Ce&&k(W),Ce&&k(J),z(ot),z(ft),z($t),z(Ht),Ce&&k(Ae),Ce&&k(Qe),Ce&&k(Ue),Ce&&k(xe);for(let We=0;We<Ye.length;We+=1)Ye[We].d();for(let We=0;We<Ze.length;We+=1)Ze[We].d()}}}function w$(n,e,t){let i,{collection:s=new Fn}=e,l=200,o="JavaScript",r=[],a=[];const u=c=>t(3,o=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.listRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(r.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[Y.dummyCollectionRecord(s),Y.dummyCollectionRecord(s)]},null,2)}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${Se.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.Records.getList("${s==null?void 0:s.name}", 1, 50, {
|
||||
filter: "created >= '2022-01-01 00:00:00'",
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.Records.getFullList("${s==null?void 0:s.name}", 200 /* batch size */, {
|
||||
sort: "-created",
|
||||
});
|
||||
`}])},[s,i,l,o,a,r,u,f]}class S$ extends Fe{constructor(e){super(),Le(this,e,w$,k$,Pe,{collection:0})}}function kd(n,e,t){const i=n.slice();return i[8]=e[t],i}function wd(n,e,t){const i=n.slice();return i[8]=e[t],i}function Sd(n,e,t){const i=n.slice();return i[13]=e[t],i}function $d(n,e,t){const i=n.slice();return i[13]=e[t],i}function Cd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Md(n,e){let t,i=e[13].lang+"",s,l,o,r;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&me(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),o=!1,r()}}}function Td(n,e){let t,i,s,l;return i=new ln({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&16&&(a.content=e[13].code),i.$set(a),r&24&&ee(t,"active",e[3]===e[13].lang)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function Dd(n,e){let t,i=e[8].code+"",s,l,o,r;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),o=!1,r()}}}function Od(n,e){let t,i,s,l;return i=new ln({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o,r&36&&ee(t,"active",e[2]===e[8].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function $$(n){let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y,C=n[0].name+"",$,S,M,D,E,O,F,L=[],H=new Map,j,Q,ie=[],U=new Map,K,W,J,se,fe,ke,le,ue,Me,Z,be,x,G,_e,je,Ne,qe,ae,re,ve,Je,nt,ut,ot,Xe,ge,pe,Ve,mt,te,ye,Ke,ft,St=[],$t=new Map,Nt,Ft,Ct=[],Yt=new Map,Ge,Mt=n[1]&&Cd(),ct=n[4];const Rt=I=>I[13].lang;for(let I=0;I<ct.length;I+=1){let q=$d(n,ct,I),ne=Rt(q);H.set(ne,L[I]=Md(ne,q))}let Ht=n[4];const Tt=I=>I[13].lang;for(let I=0;I<Ht.length;I+=1){let q=Sd(n,Ht,I),ne=Tt(q);U.set(ne,ie[I]=Td(ne,q))}re=new ln({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let ht=n[5];const Ut=I=>I[8].code;for(let I=0;I<ht.length;I+=1){let q=wd(n,ht,I),ne=Ut(q);$t.set(ne,St[I]=Dd(ne,q))}let it=n[5];const N=I=>I[8].code;for(let I=0;I<it.length;I+=1){let q=kd(n,it,I),ne=N(q);Yt.set(ne,Ct[I]=Od(ne,q))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records/"),c=_("strong"),c.textContent=":id",d=T(),Mt&&Mt.c(),m=T(),g=_("div"),v=_("p"),b=R("Fetch a single "),y=_("strong"),$=R(C),S=R(" record."),M=T(),D=_("div"),D.textContent="Client SDKs example",E=T(),O=_("div"),F=_("div");for(let I=0;I<L.length;I+=1)L[I].c();j=T(),Q=_("div");for(let I=0;I<ie.length;I+=1)ie[I].c();K=T(),W=_("div"),W.textContent="Path Parameters",J=T(),se=_("table"),se.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to view.</td></tr></tbody>`,fe=T(),ke=_("div"),ke.textContent="Query parameters",le=T(),ue=_("table"),Me=_("thead"),Me.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,Z=T(),be=_("tbody"),x=_("tr"),G=_("td"),G.textContent="expand",_e=T(),je=_("td"),je.innerHTML='<span class="label">String</span>',Ne=T(),qe=_("td"),ae=R(`Auto expand record relations. Ex.:
|
||||
`),B(re.$$.fragment),ve=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),Je=_("br"),nt=R(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),ut=_("code"),ut.textContent="@expand",ot=R(" property (eg. "),Xe=_("code"),Xe.textContent='"@expand": {"rel1": {...}, ...}',ge=R(`). Only the
|
||||
relations that the user has permissions to `),pe=_("strong"),pe.textContent="view",Ve=R(" will be expanded."),mt=T(),te=_("div"),te.textContent="Responses",ye=T(),Ke=_("div"),ft=_("div");for(let I=0;I<St.length;I+=1)St[I].c();Nt=T(),Ft=_("div");for(let I=0;I<Ct.length;I+=1)Ct[I].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-info"),h(g,"class","content m-b-base"),h(D,"class","section-title"),h(F,"class","tabs-header compact left"),h(Q,"class","tabs-content"),h(O,"class","tabs m-b-lg"),h(W,"class","section-title"),h(se,"class","table-compact table-border m-b-lg"),h(ke,"class","section-title"),h(ue,"class","table-compact table-border m-b-lg"),h(te,"class","section-title"),h(ft,"class","tabs-header compact left"),h(Ft,"class","tabs-content"),h(Ke,"class","tabs")},m(I,q){w(I,e,q),p(e,t),p(e,i),p(e,s),p(s,l),p(l,o),p(l,r),p(r,u),p(l,f),p(l,c),p(e,d),Mt&&Mt.m(e,null),w(I,m,q),w(I,g,q),p(g,v),p(v,b),p(v,y),p(y,$),p(v,S),w(I,M,q),w(I,D,q),w(I,E,q),w(I,O,q),p(O,F);for(let ne=0;ne<L.length;ne+=1)L[ne].m(F,null);p(O,j),p(O,Q);for(let ne=0;ne<ie.length;ne+=1)ie[ne].m(Q,null);w(I,K,q),w(I,W,q),w(I,J,q),w(I,se,q),w(I,fe,q),w(I,ke,q),w(I,le,q),w(I,ue,q),p(ue,Me),p(ue,Z),p(ue,be),p(be,x),p(x,G),p(x,_e),p(x,je),p(x,Ne),p(x,qe),p(qe,ae),V(re,qe,null),p(qe,ve),p(qe,Je),p(qe,nt),p(qe,ut),p(qe,ot),p(qe,Xe),p(qe,ge),p(qe,pe),p(qe,Ve),w(I,mt,q),w(I,te,q),w(I,ye,q),w(I,Ke,q),p(Ke,ft);for(let ne=0;ne<St.length;ne+=1)St[ne].m(ft,null);p(Ke,Nt),p(Ke,Ft);for(let ne=0;ne<Ct.length;ne+=1)Ct[ne].m(Ft,null);Ge=!0},p(I,[q]){(!Ge||q&1)&&a!==(a=I[0].name+"")&&me(u,a),I[1]?Mt||(Mt=Cd(),Mt.c(),Mt.m(e,null)):Mt&&(Mt.d(1),Mt=null),(!Ge||q&1)&&C!==(C=I[0].name+"")&&me($,C),q&24&&(ct=I[4],L=dt(L,q,Rt,1,I,ct,H,F,cn,Md,null,$d)),q&24&&(Ht=I[4],De(),ie=dt(ie,q,Tt,1,I,Ht,U,Q,Bt,Td,null,Sd),Oe()),q&36&&(ht=I[5],St=dt(St,q,Ut,1,I,ht,$t,ft,cn,Dd,null,wd)),q&36&&(it=I[5],De(),Ct=dt(Ct,q,N,1,I,it,Yt,Ft,Bt,Od,null,kd),Oe())},i(I){if(!Ge){for(let q=0;q<Ht.length;q+=1)A(ie[q]);A(re.$$.fragment,I);for(let q=0;q<it.length;q+=1)A(Ct[q]);Ge=!0}},o(I){for(let q=0;q<ie.length;q+=1)P(ie[q]);P(re.$$.fragment,I);for(let q=0;q<Ct.length;q+=1)P(Ct[q]);Ge=!1},d(I){I&&k(e),Mt&&Mt.d(),I&&k(m),I&&k(g),I&&k(M),I&&k(D),I&&k(E),I&&k(O);for(let q=0;q<L.length;q+=1)L[q].d();for(let q=0;q<ie.length;q+=1)ie[q].d();I&&k(K),I&&k(W),I&&k(J),I&&k(se),I&&k(fe),I&&k(ke),I&&k(le),I&&k(ue),z(re),I&&k(mt),I&&k(te),I&&k(ye),I&&k(Ke);for(let q=0;q<St.length;q+=1)St[q].d();for(let q=0;q<Ct.length;q+=1)Ct[q].d()}}}function C$(n,e,t){let i,{collection:s=new Fn}=e,l=200,o="JavaScript",r=[],a=[];const u=c=>t(3,o=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.viewRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(r.push({code:200,body:JSON.stringify(Y.dummyCollectionRecord(s),null,2)}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${Se.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
const record = await client.Records.getOne("${s==null?void 0:s.name}", "RECORD_ID", {
|
||||
expand: "some_relation"
|
||||
});
|
||||
`}])},[s,i,l,o,a,r,u,f]}class M$ extends Fe{constructor(e){super(),Le(this,e,C$,$$,Pe,{collection:0})}}function Ed(n,e,t){const i=n.slice();return i[8]=e[t],i}function Ad(n,e,t){const i=n.slice();return i[8]=e[t],i}function Pd(n,e,t){const i=n.slice();return i[13]=e[t],i}function Ld(n,e,t){const i=n.slice();return i[16]=e[t],i}function Fd(n,e,t){const i=n.slice();return i[16]=e[t],i}function Id(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Nd(n,e){let t,i=e[16].lang+"",s,l,o,r;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&me(s,i),f&20&&ee(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),o=!1,r()}}}function Rd(n,e){let t,i,s,l;return i=new ln({props:{content:e[16].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&16&&(a.content=e[16].code),i.$set(a),r&20&&ee(t,"active",e[2]===e[16].lang)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function T$(n){let e;return{c(){e=_("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function D$(n){let e;return{c(){e=_("span"),e.textContent="Required",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function O$(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("User "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function E$(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("Relation record "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function A$(n){let e,t,i,s,l;return{c(){e=R("FormData object."),t=_("br"),i=R(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=R(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:oe,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function P$(n){let e;return{c(){e=R("URL address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function L$(n){let e;return{c(){e=R("Email address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function F$(n){let e;return{c(){e=R("JSON array or object.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function I$(n){let e;return{c(){e=R("Number value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function N$(n){let e;return{c(){e=R("Plain text value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Hd(n,e){let t,i,s,l,o,r=e[13].name+"",a,u,f,c,d=Y.getFieldValueType(e[13])+"",m,g,v,b;function y(E,O){return E[13].required?D$:T$}let C=y(e),$=C(e);function S(E,O){if(E[13].type==="text")return N$;if(E[13].type==="number")return I$;if(E[13].type==="json")return F$;if(E[13].type==="email")return L$;if(E[13].type==="url")return P$;if(E[13].type==="file")return A$;if(E[13].type==="relation")return E$;if(E[13].type==="user")return O$}let M=S(e),D=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),$.c(),l=T(),o=_("span"),a=R(r),u=T(),f=_("td"),c=_("span"),m=R(d),g=T(),v=_("td"),D&&D.c(),b=T(),h(s,"class","inline-flex"),h(c,"class","label"),this.first=t},m(E,O){w(E,t,O),p(t,i),p(i,s),$.m(s,null),p(s,l),p(s,o),p(o,a),p(t,u),p(t,f),p(f,c),p(c,m),p(t,g),p(t,v),D&&D.m(v,null),p(t,b)},p(E,O){e=E,C!==(C=y(e))&&($.d(1),$=C(e),$&&($.c(),$.m(s,l))),O&1&&r!==(r=e[13].name+"")&&me(a,r),O&1&&d!==(d=Y.getFieldValueType(e[13])+"")&&me(m,d),M===(M=S(e))&&D?D.p(e,O):(D&&D.d(1),D=M&&M(e),D&&(D.c(),D.m(v,null)))},d(E){E&&k(t),$.d(),D&&D.d()}}}function jd(n,e){let t,i=e[8].code+"",s,l,o,r;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&me(s,i),f&10&&ee(t,"active",e[1]===e[8].code)},d(u){u&&k(t),o=!1,r()}}}function qd(n,e){let t,i,s,l;return i=new ln({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&8&&(a.content=e[8].body),i.$set(a),r&10&&ee(t,"active",e[1]===e[8].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function R$(n){var gt;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y=n[0].name+"",C,$,S,M,D,E,O,F,L,H,j,Q=[],ie=new Map,U,K,W=[],J=new Map,se,fe,ke,le,ue,Me,Z,be=[],x=new Map,G,_e,je,Ne,qe,ae,re,ve,Je,nt,ut,ot,Xe,ge,pe,Ve,mt,te,ye,Ke,ft,St,$t,Nt,Ft,Ct,Yt,Ge,Mt,ct=[],Rt=new Map,Ht,Tt,ht=[],Ut=new Map,it,N=n[5]&&Id(),I=n[4];const q=de=>de[16].lang;for(let de=0;de<I.length;de+=1){let we=Fd(n,I,de),Ze=q(we);ie.set(Ze,Q[de]=Nd(Ze,we))}let ne=n[4];const Te=de=>de[16].lang;for(let de=0;de<ne.length;de+=1){let we=Ld(n,ne,de),Ze=Te(we);J.set(Ze,W[de]=Rd(Ze,we))}let Ae=(gt=n[0])==null?void 0:gt.schema;const Qe=de=>de[13].name;for(let de=0;de<Ae.length;de+=1){let we=Pd(n,Ae,de),Ze=Qe(we);x.set(Ze,be[de]=Hd(Ze,we))}pe=new ln({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let Ue=n[3];const xe=de=>de[8].code;for(let de=0;de<Ue.length;de+=1){let we=Ad(n,Ue,de),Ze=xe(we);Rt.set(Ze,ct[de]=jd(Ze,we))}let ze=n[3];const Ye=de=>de[8].code;for(let de=0;de<ze.length;de+=1){let we=Ed(n,ze,de),Ze=Ye(we);Ut.set(Ze,ht[de]=qd(Ze,we))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records"),c=T(),N&&N.c(),d=T(),m=_("div"),g=_("p"),v=R("Create a new "),b=_("strong"),C=R(y),$=R(" record."),S=T(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,D=T(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",O=T(),F=_("div"),F.textContent="Client SDKs example",L=T(),H=_("div"),j=_("div");for(let de=0;de<Q.length;de+=1)Q[de].c();U=T(),K=_("div");for(let de=0;de<W.length;de+=1)W[de].c();se=T(),fe=_("div"),fe.textContent="Body Parameters",ke=T(),le=_("table"),ue=_("thead"),ue.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,Me=T(),Z=_("tbody");for(let de=0;de<be.length;de+=1)be[de].c();G=T(),_e=_("div"),_e.textContent="Query parameters",je=T(),Ne=_("table"),qe=_("thead"),qe.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,ae=T(),re=_("tbody"),ve=_("tr"),Je=_("td"),Je.textContent="expand",nt=T(),ut=_("td"),ut.innerHTML='<span class="label">String</span>',ot=T(),Xe=_("td"),ge=R(`Auto expand relations when returning the created record. Ex.:
|
||||
`),B(pe.$$.fragment),Ve=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),mt=_("br"),te=R(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),ye=_("code"),ye.textContent="@expand",Ke=R(" property (eg. "),ft=_("code"),ft.textContent='"@expand": {"rel1": {...}, ...}',St=R(`). Only the
|
||||
relations that the user has permissions to `),$t=_("strong"),$t.textContent="view",Nt=R(" will be expanded."),Ft=T(),Ct=_("div"),Ct.textContent="Responses",Yt=T(),Ge=_("div"),Mt=_("div");for(let de=0;de<ct.length;de+=1)ct[de].c();Ht=T(),Tt=_("div");for(let de=0;de<ht.length;de+=1)ht[de].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-success"),h(m,"class","content m-b-base"),h(F,"class","section-title"),h(j,"class","tabs-header compact left"),h(K,"class","tabs-content"),h(H,"class","tabs m-b-lg"),h(fe,"class","section-title"),h(le,"class","table-compact table-border m-b-lg"),h(_e,"class","section-title"),h(Ne,"class","table-compact table-border m-b-lg"),h(Ct,"class","section-title"),h(Mt,"class","tabs-header compact left"),h(Tt,"class","tabs-content"),h(Ge,"class","tabs")},m(de,we){w(de,e,we),p(e,t),p(e,i),p(e,s),p(s,l),p(l,o),p(l,r),p(r,u),p(l,f),p(e,c),N&&N.m(e,null),w(de,d,we),w(de,m,we),p(m,g),p(g,v),p(g,b),p(b,C),p(g,$),p(m,S),p(m,M),p(m,D),p(m,E),w(de,O,we),w(de,F,we),w(de,L,we),w(de,H,we),p(H,j);for(let Ze=0;Ze<Q.length;Ze+=1)Q[Ze].m(j,null);p(H,U),p(H,K);for(let Ze=0;Ze<W.length;Ze+=1)W[Ze].m(K,null);w(de,se,we),w(de,fe,we),w(de,ke,we),w(de,le,we),p(le,ue),p(le,Me),p(le,Z);for(let Ze=0;Ze<be.length;Ze+=1)be[Ze].m(Z,null);w(de,G,we),w(de,_e,we),w(de,je,we),w(de,Ne,we),p(Ne,qe),p(Ne,ae),p(Ne,re),p(re,ve),p(ve,Je),p(ve,nt),p(ve,ut),p(ve,ot),p(ve,Xe),p(Xe,ge),V(pe,Xe,null),p(Xe,Ve),p(Xe,mt),p(Xe,te),p(Xe,ye),p(Xe,Ke),p(Xe,ft),p(Xe,St),p(Xe,$t),p(Xe,Nt),w(de,Ft,we),w(de,Ct,we),w(de,Yt,we),w(de,Ge,we),p(Ge,Mt);for(let Ze=0;Ze<ct.length;Ze+=1)ct[Ze].m(Mt,null);p(Ge,Ht),p(Ge,Tt);for(let Ze=0;Ze<ht.length;Ze+=1)ht[Ze].m(Tt,null);it=!0},p(de,[we]){var Ze;(!it||we&1)&&a!==(a=de[0].name+"")&&me(u,a),de[5]?N||(N=Id(),N.c(),N.m(e,null)):N&&(N.d(1),N=null),(!it||we&1)&&y!==(y=de[0].name+"")&&me(C,y),we&20&&(I=de[4],Q=dt(Q,we,q,1,de,I,ie,j,cn,Nd,null,Fd)),we&20&&(ne=de[4],De(),W=dt(W,we,Te,1,de,ne,J,K,Bt,Rd,null,Ld),Oe()),we&1&&(Ae=(Ze=de[0])==null?void 0:Ze.schema,be=dt(be,we,Qe,1,de,Ae,x,Z,cn,Hd,null,Pd)),we&10&&(Ue=de[3],ct=dt(ct,we,xe,1,de,Ue,Rt,Mt,cn,jd,null,Ad)),we&10&&(ze=de[3],De(),ht=dt(ht,we,Ye,1,de,ze,Ut,Tt,Bt,qd,null,Ed),Oe())},i(de){if(!it){for(let we=0;we<ne.length;we+=1)A(W[we]);A(pe.$$.fragment,de);for(let we=0;we<ze.length;we+=1)A(ht[we]);it=!0}},o(de){for(let we=0;we<W.length;we+=1)P(W[we]);P(pe.$$.fragment,de);for(let we=0;we<ht.length;we+=1)P(ht[we]);it=!1},d(de){de&&k(e),N&&N.d(),de&&k(d),de&&k(m),de&&k(O),de&&k(F),de&&k(L),de&&k(H);for(let we=0;we<Q.length;we+=1)Q[we].d();for(let we=0;we<W.length;we+=1)W[we].d();de&&k(se),de&&k(fe),de&&k(ke),de&&k(le);for(let we=0;we<be.length;we+=1)be[we].d();de&&k(G),de&&k(_e),de&&k(je),de&&k(Ne),z(pe),de&&k(Ft),de&&k(Ct),de&&k(Yt),de&&k(Ge);for(let we=0;we<ct.length;we+=1)ct[we].d();for(let we=0;we<ht.length;we+=1)ht[we].d()}}}function H$(n,e,t){let i,{collection:s=new Fn}=e,l=200,o="JavaScript",r=[],a=[];const u=c=>t(2,o=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.createRule)===null),n.$$.dirty&1&&t(3,r=[{code:200,body:JSON.stringify(Y.dummyCollectionRecord(s),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to create record.",
|
||||
"data": {
|
||||
"${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${Se.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.create("${s==null?void 0:s.name}", data);
|
||||
`}])},[s,l,o,r,a,i,u,f]}class j$ extends Fe{constructor(e){super(),Le(this,e,H$,R$,Pe,{collection:0})}}function Vd(n,e,t){const i=n.slice();return i[8]=e[t],i}function zd(n,e,t){const i=n.slice();return i[8]=e[t],i}function Bd(n,e,t){const i=n.slice();return i[13]=e[t],i}function Ud(n,e,t){const i=n.slice();return i[16]=e[t],i}function Wd(n,e,t){const i=n.slice();return i[16]=e[t],i}function Yd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Kd(n,e){let t,i=e[16].lang+"",s,l,o,r;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&me(s,i),f&20&&ee(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),o=!1,r()}}}function Zd(n,e){let t,i,s,l;return i=new ln({props:{content:e[16].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&16&&(a.content=e[16].code),i.$set(a),r&20&&ee(t,"active",e[2]===e[16].lang)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function q$(n){let e;return{c(){e=_("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function V$(n){let e;return{c(){e=_("span"),e.textContent="Required",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function z$(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("User "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function B$(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("Relation record "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function U$(n){let e,t,i,s,l;return{c(){e=R("FormData object."),t=_("br"),i=R(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=R(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:oe,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function W$(n){let e;return{c(){e=R("URL address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Y$(n){let e;return{c(){e=R("Email address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function K$(n){let e;return{c(){e=R("JSON array or object.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Z$(n){let e;return{c(){e=R("Number value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function J$(n){let e;return{c(){e=R("Plain text value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Jd(n,e){let t,i,s,l,o,r=e[13].name+"",a,u,f,c,d=Y.getFieldValueType(e[13])+"",m,g,v,b;function y(E,O){return E[13].required?V$:q$}let C=y(e),$=C(e);function S(E,O){if(E[13].type==="text")return J$;if(E[13].type==="number")return Z$;if(E[13].type==="json")return K$;if(E[13].type==="email")return Y$;if(E[13].type==="url")return W$;if(E[13].type==="file")return U$;if(E[13].type==="relation")return B$;if(E[13].type==="user")return z$}let M=S(e),D=M&&M(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),$.c(),l=T(),o=_("span"),a=R(r),u=T(),f=_("td"),c=_("span"),m=R(d),g=T(),v=_("td"),D&&D.c(),b=T(),h(s,"class","inline-flex"),h(c,"class","label"),this.first=t},m(E,O){w(E,t,O),p(t,i),p(i,s),$.m(s,null),p(s,l),p(s,o),p(o,a),p(t,u),p(t,f),p(f,c),p(c,m),p(t,g),p(t,v),D&&D.m(v,null),p(t,b)},p(E,O){e=E,C!==(C=y(e))&&($.d(1),$=C(e),$&&($.c(),$.m(s,l))),O&1&&r!==(r=e[13].name+"")&&me(a,r),O&1&&d!==(d=Y.getFieldValueType(e[13])+"")&&me(m,d),M===(M=S(e))&&D?D.p(e,O):(D&&D.d(1),D=M&&M(e),D&&(D.c(),D.m(v,null)))},d(E){E&&k(t),$.d(),D&&D.d()}}}function Gd(n,e){let t,i=e[8].code+"",s,l,o,r;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&me(s,i),f&10&&ee(t,"active",e[1]===e[8].code)},d(u){u&&k(t),o=!1,r()}}}function Xd(n,e){let t,i,s,l;return i=new ln({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&8&&(a.content=e[8].body),i.$set(a),r&10&&ee(t,"active",e[1]===e[8].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function G$(n){var Gn;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y,C=n[0].name+"",$,S,M,D,E,O,F,L,H,j,Q,ie=[],U=new Map,K,W,J=[],se=new Map,fe,ke,le,ue,Me,Z,be,x,G,_e,je,Ne=[],qe=new Map,ae,re,ve,Je,nt,ut,ot,Xe,ge,pe,Ve,mt,te,ye,Ke,ft,St,$t,Nt,Ft,Ct,Yt,Ge,Mt,ct,Rt,Ht,Tt,ht,Ut=[],it=new Map,N,I,q=[],ne=new Map,Te,Ae=n[5]&&Yd(),Qe=n[4];const Ue=ce=>ce[16].lang;for(let ce=0;ce<Qe.length;ce+=1){let Ee=Wd(n,Qe,ce),rt=Ue(Ee);U.set(rt,ie[ce]=Kd(rt,Ee))}let xe=n[4];const ze=ce=>ce[16].lang;for(let ce=0;ce<xe.length;ce+=1){let Ee=Ud(n,xe,ce),rt=ze(Ee);se.set(rt,J[ce]=Zd(rt,Ee))}let Ye=(Gn=n[0])==null?void 0:Gn.schema;const gt=ce=>ce[13].name;for(let ce=0;ce<Ye.length;ce+=1){let Ee=Bd(n,Ye,ce),rt=gt(Ee);qe.set(rt,Ne[ce]=Jd(rt,Ee))}Ke=new ln({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let de=n[3];const we=ce=>ce[8].code;for(let ce=0;ce<de.length;ce+=1){let Ee=zd(n,de,ce),rt=we(Ee);it.set(rt,Ut[ce]=Gd(rt,Ee))}let Ze=n[3];const In=ce=>ce[8].code;for(let ce=0;ce<Ze.length;ce+=1){let Ee=Vd(n,Ze,ce),rt=In(Ee);ne.set(rt,q[ce]=Xd(rt,Ee))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records/"),c=_("strong"),c.textContent=":id",d=T(),Ae&&Ae.c(),m=T(),g=_("div"),v=_("p"),b=R("Update a single "),y=_("strong"),$=R(C),S=R(" record."),M=T(),D=_("p"),D.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,E=T(),O=_("p"),O.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",F=T(),L=_("div"),L.textContent="Client SDKs example",H=T(),j=_("div"),Q=_("div");for(let ce=0;ce<ie.length;ce+=1)ie[ce].c();K=T(),W=_("div");for(let ce=0;ce<J.length;ce+=1)J[ce].c();fe=T(),ke=_("div"),ke.textContent="Path parameters",le=T(),ue=_("table"),ue.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to update.</td></tr></tbody>`,Me=T(),Z=_("div"),Z.textContent="Body Parameters",be=T(),x=_("table"),G=_("thead"),G.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,_e=T(),je=_("tbody");for(let ce=0;ce<Ne.length;ce+=1)Ne[ce].c();ae=T(),re=_("div"),re.textContent="Query parameters",ve=T(),Je=_("table"),nt=_("thead"),nt.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,ut=T(),ot=_("tbody"),Xe=_("tr"),ge=_("td"),ge.textContent="expand",pe=T(),Ve=_("td"),Ve.innerHTML='<span class="label">String</span>',mt=T(),te=_("td"),ye=R(`Auto expand relations when returning the updated record. Ex.:
|
||||
`),B(Ke.$$.fragment),ft=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),St=_("br"),$t=R(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Nt=_("code"),Nt.textContent="@expand",Ft=R(" property (eg. "),Ct=_("code"),Ct.textContent='"@expand": {"rel1": {...}, ...}',Yt=R(`). Only the
|
||||
relations that the user has permissions to `),Ge=_("strong"),Ge.textContent="view",Mt=R(" will be expanded."),ct=T(),Rt=_("div"),Rt.textContent="Responses",Ht=T(),Tt=_("div"),ht=_("div");for(let ce=0;ce<Ut.length;ce+=1)Ut[ce].c();N=T(),I=_("div");for(let ce=0;ce<q.length;ce+=1)q[ce].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-warning"),h(g,"class","content m-b-base"),h(L,"class","section-title"),h(Q,"class","tabs-header compact left"),h(W,"class","tabs-content"),h(j,"class","tabs m-b-lg"),h(ke,"class","section-title"),h(ue,"class","table-compact table-border m-b-lg"),h(Z,"class","section-title"),h(x,"class","table-compact table-border m-b-lg"),h(re,"class","section-title"),h(Je,"class","table-compact table-border m-b-lg"),h(Rt,"class","section-title"),h(ht,"class","tabs-header compact left"),h(I,"class","tabs-content"),h(Tt,"class","tabs")},m(ce,Ee){w(ce,e,Ee),p(e,t),p(e,i),p(e,s),p(s,l),p(l,o),p(l,r),p(r,u),p(l,f),p(l,c),p(e,d),Ae&&Ae.m(e,null),w(ce,m,Ee),w(ce,g,Ee),p(g,v),p(v,b),p(v,y),p(y,$),p(v,S),p(g,M),p(g,D),p(g,E),p(g,O),w(ce,F,Ee),w(ce,L,Ee),w(ce,H,Ee),w(ce,j,Ee),p(j,Q);for(let rt=0;rt<ie.length;rt+=1)ie[rt].m(Q,null);p(j,K),p(j,W);for(let rt=0;rt<J.length;rt+=1)J[rt].m(W,null);w(ce,fe,Ee),w(ce,ke,Ee),w(ce,le,Ee),w(ce,ue,Ee),w(ce,Me,Ee),w(ce,Z,Ee),w(ce,be,Ee),w(ce,x,Ee),p(x,G),p(x,_e),p(x,je);for(let rt=0;rt<Ne.length;rt+=1)Ne[rt].m(je,null);w(ce,ae,Ee),w(ce,re,Ee),w(ce,ve,Ee),w(ce,Je,Ee),p(Je,nt),p(Je,ut),p(Je,ot),p(ot,Xe),p(Xe,ge),p(Xe,pe),p(Xe,Ve),p(Xe,mt),p(Xe,te),p(te,ye),V(Ke,te,null),p(te,ft),p(te,St),p(te,$t),p(te,Nt),p(te,Ft),p(te,Ct),p(te,Yt),p(te,Ge),p(te,Mt),w(ce,ct,Ee),w(ce,Rt,Ee),w(ce,Ht,Ee),w(ce,Tt,Ee),p(Tt,ht);for(let rt=0;rt<Ut.length;rt+=1)Ut[rt].m(ht,null);p(Tt,N),p(Tt,I);for(let rt=0;rt<q.length;rt+=1)q[rt].m(I,null);Te=!0},p(ce,[Ee]){var rt;(!Te||Ee&1)&&a!==(a=ce[0].name+"")&&me(u,a),ce[5]?Ae||(Ae=Yd(),Ae.c(),Ae.m(e,null)):Ae&&(Ae.d(1),Ae=null),(!Te||Ee&1)&&C!==(C=ce[0].name+"")&&me($,C),Ee&20&&(Qe=ce[4],ie=dt(ie,Ee,Ue,1,ce,Qe,U,Q,cn,Kd,null,Wd)),Ee&20&&(xe=ce[4],De(),J=dt(J,Ee,ze,1,ce,xe,se,W,Bt,Zd,null,Ud),Oe()),Ee&1&&(Ye=(rt=ce[0])==null?void 0:rt.schema,Ne=dt(Ne,Ee,gt,1,ce,Ye,qe,je,cn,Jd,null,Bd)),Ee&10&&(de=ce[3],Ut=dt(Ut,Ee,we,1,ce,de,it,ht,cn,Gd,null,zd)),Ee&10&&(Ze=ce[3],De(),q=dt(q,Ee,In,1,ce,Ze,ne,I,Bt,Xd,null,Vd),Oe())},i(ce){if(!Te){for(let Ee=0;Ee<xe.length;Ee+=1)A(J[Ee]);A(Ke.$$.fragment,ce);for(let Ee=0;Ee<Ze.length;Ee+=1)A(q[Ee]);Te=!0}},o(ce){for(let Ee=0;Ee<J.length;Ee+=1)P(J[Ee]);P(Ke.$$.fragment,ce);for(let Ee=0;Ee<q.length;Ee+=1)P(q[Ee]);Te=!1},d(ce){ce&&k(e),Ae&&Ae.d(),ce&&k(m),ce&&k(g),ce&&k(F),ce&&k(L),ce&&k(H),ce&&k(j);for(let Ee=0;Ee<ie.length;Ee+=1)ie[Ee].d();for(let Ee=0;Ee<J.length;Ee+=1)J[Ee].d();ce&&k(fe),ce&&k(ke),ce&&k(le),ce&&k(ue),ce&&k(Me),ce&&k(Z),ce&&k(be),ce&&k(x);for(let Ee=0;Ee<Ne.length;Ee+=1)Ne[Ee].d();ce&&k(ae),ce&&k(re),ce&&k(ve),ce&&k(Je),z(Ke),ce&&k(ct),ce&&k(Rt),ce&&k(Ht),ce&&k(Tt);for(let Ee=0;Ee<Ut.length;Ee+=1)Ut[Ee].d();for(let Ee=0;Ee<q.length;Ee+=1)q[Ee].d()}}}function X$(n,e,t){let i,{collection:s=new Fn}=e,l=200,o="JavaScript",r=[],a=[];const u=c=>t(2,o=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.updateRule)===null),n.$$.dirty&1&&t(3,r=[{code:200,body:JSON.stringify(Y.dummyCollectionRecord(s),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to update record.",
|
||||
"data": {
|
||||
"${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${Se.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.update("${s==null?void 0:s.name}", "RECORD_ID", data);
|
||||
`}])},[s,l,o,r,a,i,u,f]}class Q$ extends Fe{constructor(e){super(),Le(this,e,X$,G$,Pe,{collection:0})}}function Qd(n,e,t){const i=n.slice();return i[8]=e[t],i}function xd(n,e,t){const i=n.slice();return i[8]=e[t],i}function eh(n,e,t){const i=n.slice();return i[13]=e[t],i}function th(n,e,t){const i=n.slice();return i[13]=e[t],i}function nh(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ih(n,e){let t,i=e[13].lang+"",s,l,o,r;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&me(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),o=!1,r()}}}function sh(n,e){let t,i,s,l;return i=new ln({props:{content:e[13].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&16&&(a.content=e[13].code),i.$set(a),r&24&&ee(t,"active",e[3]===e[13].lang)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function lh(n,e){let t,i=e[8].code+"",s,l,o,r;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),o=!1,r()}}}function oh(n,e){let t,i,s,l;return i=new ln({props:{content:e[8].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o,r&36&&ee(t,"active",e[2]===e[8].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function x$(n){let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,m,g,v,b,y,C=n[0].name+"",$,S,M,D,E,O,F,L=[],H=new Map,j,Q,ie=[],U=new Map,K,W,J,se,fe,ke,le,ue,Me,Z=[],be=new Map,x,G,_e=[],je=new Map,Ne,qe=n[1]&&nh(),ae=n[4];const re=ge=>ge[13].lang;for(let ge=0;ge<ae.length;ge+=1){let pe=th(n,ae,ge),Ve=re(pe);H.set(Ve,L[ge]=ih(Ve,pe))}let ve=n[4];const Je=ge=>ge[13].lang;for(let ge=0;ge<ve.length;ge+=1){let pe=eh(n,ve,ge),Ve=Je(pe);U.set(Ve,ie[ge]=sh(Ve,pe))}let nt=n[5];const ut=ge=>ge[8].code;for(let ge=0;ge<nt.length;ge+=1){let pe=xd(n,nt,ge),Ve=ut(pe);be.set(Ve,Z[ge]=lh(Ve,pe))}let ot=n[5];const Xe=ge=>ge[8].code;for(let ge=0;ge<ot.length;ge+=1){let pe=Qd(n,ot,ge),Ve=Xe(pe);je.set(Ve,_e[ge]=oh(Ve,pe))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records/"),c=_("strong"),c.textContent=":id",d=T(),qe&&qe.c(),m=T(),g=_("div"),v=_("p"),b=R("Delete a single "),y=_("strong"),$=R(C),S=R(" record."),M=T(),D=_("div"),D.textContent="Client SDKs example",E=T(),O=_("div"),F=_("div");for(let ge=0;ge<L.length;ge+=1)L[ge].c();j=T(),Q=_("div");for(let ge=0;ge<ie.length;ge+=1)ie[ge].c();K=T(),W=_("div"),W.textContent="Path parameters",J=T(),se=_("table"),se.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to delete.</td></tr></tbody>`,fe=T(),ke=_("div"),ke.textContent="Responses",le=T(),ue=_("div"),Me=_("div");for(let ge=0;ge<Z.length;ge+=1)Z[ge].c();x=T(),G=_("div");for(let ge=0;ge<_e.length;ge+=1)_e[ge].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-danger"),h(g,"class","content m-b-base"),h(D,"class","section-title"),h(F,"class","tabs-header compact left"),h(Q,"class","tabs-content"),h(O,"class","tabs m-b-lg"),h(W,"class","section-title"),h(se,"class","table-compact table-border m-b-lg"),h(ke,"class","section-title"),h(Me,"class","tabs-header compact left"),h(G,"class","tabs-content"),h(ue,"class","tabs")},m(ge,pe){w(ge,e,pe),p(e,t),p(e,i),p(e,s),p(s,l),p(l,o),p(l,r),p(r,u),p(l,f),p(l,c),p(e,d),qe&&qe.m(e,null),w(ge,m,pe),w(ge,g,pe),p(g,v),p(v,b),p(v,y),p(y,$),p(v,S),w(ge,M,pe),w(ge,D,pe),w(ge,E,pe),w(ge,O,pe),p(O,F);for(let Ve=0;Ve<L.length;Ve+=1)L[Ve].m(F,null);p(O,j),p(O,Q);for(let Ve=0;Ve<ie.length;Ve+=1)ie[Ve].m(Q,null);w(ge,K,pe),w(ge,W,pe),w(ge,J,pe),w(ge,se,pe),w(ge,fe,pe),w(ge,ke,pe),w(ge,le,pe),w(ge,ue,pe),p(ue,Me);for(let Ve=0;Ve<Z.length;Ve+=1)Z[Ve].m(Me,null);p(ue,x),p(ue,G);for(let Ve=0;Ve<_e.length;Ve+=1)_e[Ve].m(G,null);Ne=!0},p(ge,[pe]){(!Ne||pe&1)&&a!==(a=ge[0].name+"")&&me(u,a),ge[1]?qe||(qe=nh(),qe.c(),qe.m(e,null)):qe&&(qe.d(1),qe=null),(!Ne||pe&1)&&C!==(C=ge[0].name+"")&&me($,C),pe&24&&(ae=ge[4],L=dt(L,pe,re,1,ge,ae,H,F,cn,ih,null,th)),pe&24&&(ve=ge[4],De(),ie=dt(ie,pe,Je,1,ge,ve,U,Q,Bt,sh,null,eh),Oe()),pe&36&&(nt=ge[5],Z=dt(Z,pe,ut,1,ge,nt,be,Me,cn,lh,null,xd)),pe&36&&(ot=ge[5],De(),_e=dt(_e,pe,Xe,1,ge,ot,je,G,Bt,oh,null,Qd),Oe())},i(ge){if(!Ne){for(let pe=0;pe<ve.length;pe+=1)A(ie[pe]);for(let pe=0;pe<ot.length;pe+=1)A(_e[pe]);Ne=!0}},o(ge){for(let pe=0;pe<ie.length;pe+=1)P(ie[pe]);for(let pe=0;pe<_e.length;pe+=1)P(_e[pe]);Ne=!1},d(ge){ge&&k(e),qe&&qe.d(),ge&&k(m),ge&&k(g),ge&&k(M),ge&&k(D),ge&&k(E),ge&&k(O);for(let pe=0;pe<L.length;pe+=1)L[pe].d();for(let pe=0;pe<ie.length;pe+=1)ie[pe].d();ge&&k(K),ge&&k(W),ge&&k(J),ge&&k(se),ge&&k(fe),ge&&k(ke),ge&&k(le),ge&&k(ue);for(let pe=0;pe<Z.length;pe+=1)Z[pe].d();for(let pe=0;pe<_e.length;pe+=1)_e[pe].d()}}}function eC(n,e,t){let i,{collection:s=new Fn}=e,l=204,o="JavaScript",r=[],a=[];const u=c=>t(3,o=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.deleteRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(r.push({code:204,body:`
|
||||
null
|
||||
`}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${Se.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
await client.Records.delete("${s==null?void 0:s.name}", "RECORD_ID");
|
||||
`}])},[s,i,l,o,a,r,u,f]}class tC extends Fe{constructor(e){super(),Le(this,e,eC,x$,Pe,{collection:0})}}function rh(n,e,t){const i=n.slice();return i[4]=e[t],i}function ah(n,e,t){const i=n.slice();return i[4]=e[t],i}function uh(n,e){let t,i=e[4].lang+"",s,l,o,r;function a(){return e[3](e[4])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),ee(t,"active",e[1]===e[4].lang),this.first=t},m(u,f){w(u,t,f),p(t,s),p(t,l),o||(r=X(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[4].lang+"")&&me(s,i),f&6&&ee(t,"active",e[1]===e[4].lang)},d(u){u&&k(t),o=!1,r()}}}function fh(n,e){let t,i,s,l;return i=new ln({props:{content:e[4].code}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),ee(t,"active",e[1]===e[4].lang),this.first=t},m(o,r){w(o,t,r),V(i,t,null),p(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[4].code),i.$set(a),r&6&&ee(t,"active",e[1]===e[4].lang)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function nC(n){let e,t,i,s,l,o,r,a,u=[],f=new Map,c,d,m=[],g=new Map,v,b,y,C,$,S=n[2];const M=O=>O[4].lang;for(let O=0;O<S.length;O+=1){let F=ah(n,S,O),L=M(F);f.set(L,u[O]=uh(L,F))}let D=n[2];const E=O=>O[4].lang;for(let O=0;O<D.length;O+=1){let F=rh(n,D,O),L=E(F);g.set(L,m[O]=fh(L,F))}return C=new ln({props:{content:JSON.stringify({action:"create",record:Y.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong>
|
||||
<div class="content"><p>/api/realtime</p></div>`,t=T(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
|
||||
<p>Events are send for <strong>create</strong>, <strong>update</strong>
|
||||
and <strong>delete</strong> record operations (see "Event data format" section below).</p>
|
||||
<div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div>
|
||||
<div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p>
|
||||
<p>When you subscribe to a <strong>single record</strong>, the collection's
|
||||
<strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p>
|
||||
<p>When you subscribe to an <strong>entire collection</strong>, the collection's
|
||||
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p></div></div>`,s=T(),l=_("div"),l.textContent="Client SDKs example",o=T(),r=_("div"),a=_("div");for(let O=0;O<u.length;O+=1)u[O].c();c=T(),d=_("div");for(let O=0;O<m.length;O+=1)m[O].c();v=T(),b=_("div"),b.textContent="Event data format",y=T(),B(C.$$.fragment),h(e,"class","alert"),h(i,"class","content m-b-base"),h(l,"class","section-title"),h(a,"class","tabs-header compact left"),h(d,"class","tabs-content"),h(r,"class","tabs m-b-base"),h(b,"class","section-title")},m(O,F){w(O,e,F),w(O,t,F),w(O,i,F),w(O,s,F),w(O,l,F),w(O,o,F),w(O,r,F),p(r,a);for(let L=0;L<u.length;L+=1)u[L].m(a,null);p(r,c),p(r,d);for(let L=0;L<m.length;L+=1)m[L].m(d,null);w(O,v,F),w(O,b,F),w(O,y,F),V(C,O,F),$=!0},p(O,[F]){F&6&&(S=O[2],u=dt(u,F,M,1,O,S,f,a,cn,uh,null,ah)),F&6&&(D=O[2],De(),m=dt(m,F,E,1,O,D,g,d,Bt,fh,null,rh),Oe());const L={};F&1&&(L.content=JSON.stringify({action:"create",record:Y.dummyCollectionRecord(O[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),C.$set(L)},i(O){if(!$){for(let F=0;F<D.length;F+=1)A(m[F]);A(C.$$.fragment,O),$=!0}},o(O){for(let F=0;F<m.length;F+=1)P(m[F]);P(C.$$.fragment,O),$=!1},d(O){O&&k(e),O&&k(t),O&&k(i),O&&k(s),O&&k(l),O&&k(o),O&&k(r);for(let F=0;F<u.length;F+=1)u[F].d();for(let F=0;F<m.length;F+=1)m[F].d();O&&k(v),O&&k(b),O&&k(y),z(C,O)}}}function iC(n,e,t){let{collection:i=new Fn}=e,s="JavaScript",l=[];const o=r=>t(1,s=r.lang);return n.$$set=r=>{"collection"in r&&t(0,i=r.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=[{lang:"JavaScript",code:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${Se.baseUrl}");
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.Users.authViaEmail("test@example.com", "123456");
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.Realtime.subscribe("${i==null?void 0:i.name}", function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.Realtime.subscribe("${i==null?void 0:i.name}/RECORD_ID", function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.Realtime.unsubscribe() // remove all subscriptions
|
||||
client.Realtime.unsubscribe("${i==null?void 0:i.name}") // remove the collection subscription
|
||||
client.Realtime.unsubscribe("${i==null?void 0:i.name}/RECORD_ID") // remove the record subscription
|
||||
`}])},[i,s,l,o]}class sC extends Fe{constructor(e){super(),Le(this,e,iC,nC,Pe,{collection:0})}}function ch(n,e,t){const i=n.slice();return i[14]=e[t],i}function dh(n,e,t){const i=n.slice();return i[14]=e[t],i}function hh(n){let e,t,i,s;var l=n[14].component;function o(r){return{props:{collection:r[3]}}}return l&&(t=new l(o(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=T(),h(e,"class","tab-item active")},m(r,a){w(r,e,a),t&&V(t,e,null),p(e,i),s=!0},p(r,a){const u={};if(a&8&&(u.collection=r[3]),l!==(l=r[14].component)){if(t){De();const f=t;P(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(t=new l(o(r)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(r){s||(t&&A(t.$$.fragment,r),s=!0)},o(r){t&&P(t.$$.fragment,r),s=!1},d(r){r&&k(e),t&&z(t)}}}function ph(n,e){let t,i,s,l=e[4]===e[14].id&&hh(e);return{key:n,first:null,c(){t=lt(),l&&l.c(),i=lt(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[4]===e[14].id?l?(l.p(e,r),r&16&&A(l,1)):(l=hh(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(De(),P(l,1,1,()=>{l=null}),Oe())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function lC(n){let e,t=[],i=new Map,s,l=n[5];const o=r=>r[14].id;for(let r=0;r<l.length;r+=1){let a=ch(n,l,r),u=o(a);i.set(u,t[r]=ph(u,a))}return{c(){e=_("div");for(let r=0;r<t.length;r+=1)t[r].c();h(e,"class","tabs-content")},m(r,a){w(r,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(r,a){a&56&&(l=r[5],De(),t=dt(t,a,o,1,r,l,i,e,Bt,ph,null,ch),Oe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(r){for(let a=0;a<t.length;a+=1)P(t[a]);s=!1},d(r){r&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function mh(n,e){let t,i,s=e[14].label+"",l,o,r,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=R(s),o=T(),h(i,"class","txt"),h(t,"tabindex","0"),h(t,"class","tab-item"),ee(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),p(t,i),p(i,l),p(t,o),r||(a=[X(t,"click",u),X(t,"keydown",Wp(f))],r=!0)},p(c,d){e=c,d&48&&ee(t,"active",e[4]===e[14].id)},d(c){c&&k(t),r=!1,st(a)}}}function oC(n){let e,t,i=n[3].name+"",s,l,o,r,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let m=dh(n,f,d),g=c(m);u.set(g,a[d]=mh(g,m))}return{c(){e=_("h4"),t=_("strong"),s=R(i),l=R(" records API"),o=T(),r=_("div");for(let d=0;d<a.length;d+=1)a[d].c();h(r,"class","tabs-header stretched")},m(d,m){w(d,e,m),p(e,t),p(t,s),p(e,l),w(d,o,m),w(d,r,m);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(d,m){m&8&&i!==(i=d[3].name+"")&&me(s,i),m&114&&(f=d[5],a=dt(a,m,c,1,d,f,u,r,cn,mh,null,dh))},d(d){d&&k(e),d&&k(o),d&&k(r);for(let m=0;m<a.length;m+=1)a[m].d()}}}function rC(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',h(e,"type","button"),h(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[8]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function aC(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[rC],header:[oC],default:[lC]},$$scope:{ctx:n}};return e=new Ci({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&524312&&(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[11](null),z(e,s)}}}function uC(n,e,t){const i=[{id:"list",label:"List",component:S$},{id:"view",label:"View",component:M$},{id:"create",label:"Create",component:j$},{id:"update",label:"Update",component:Q$},{id:"delete",label:"Delete",component:tC},{id:"realtime",label:"Realtime",component:sC}];let s,l=new Fn,o=i[0].id;function r(y){return t(3,l=y),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(y){t(4,o=y)}function f(y,C){(y.code==="Enter"||y.code==="Space")&&(y.preventDefault(),u(C))}const c=()=>a(),d=y=>u(y.id),m=(y,C)=>f(C,y.id);function g(y){he[y?"unshift":"push"](()=>{s=y,t(2,s)})}function v(y){pt.call(this,n,y)}function b(y){pt.call(this,n,y)}return[a,u,s,l,o,i,f,r,c,d,m,g,v,b]}class fC extends Fe{constructor(e){super(),Le(this,e,uC,aC,Pe,{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 cC(n){let e,t,i,s=[n[3]],l={};for(let o=0;o<s.length;o+=1)l=_t(l,s[o]);return{c(){e=_("textarea"),fi(e,l),ee(e,"svelte-1x1pbts",!0)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[5](e),$e(e,n[0]),t||(i=[X(e,"input",n[6]),X(e,"keydown",n[2])],t=!0)},p(o,[r]){fi(e,l=bn(s,[r&8&&o[3]])),r&1&&$e(e,o[0]),ee(e,"svelte-1x1pbts",!0)},i:oe,o:oe,d(o){o&&k(e),n[5](null),t=!1,st(i)}}}function dC(n,e,t){const i=["value","maxHeight"];let s=tn(e,i),{value:l=""}=e,{maxHeight:o=200}=e,r,a;function u(){clearTimeout(a),a=setTimeout(()=>{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)){m.preventDefault();const g=r.closest("form");g
Line truncated
|
||||
<span class="txt">Upload new file</span>`,h(t,"type","file"),h(t,"class","hidden"),t.multiple=n[5],h(s,"type","button"),h(s,"class","btn btn-secondary btn-sm btn-block"),h(e,"class","list-item btn-list-item")},m(r,a){w(r,e,a),p(e,t),n[16](t),p(e,i),p(e,s),l||(o=[X(t,"change",n[17]),X(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&k(e),n[16](null),l=!1,st(o)}}}function u4(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,m,g,v,b=n[4];const y=D=>D[25];for(let D=0;D<b.length;D+=1){let E=bh(n,b,D),O=y(E);d.set(O,c[D]=vh(O,E))}let C=n[0],$=[];for(let D=0;D<C.length;D+=1)$[D]=yh(_h(n,C,D));const S=D=>P($[D],1,1,()=>{$[D]=null});let M=!n[8]&&kh(n);return{c(){e=_("label"),t=_("i"),s=T(),l=_("span"),r=R(o),u=T(),f=_("div");for(let D=0;D<c.length;D+=1)c[D].c();m=T();for(let D=0;D<$.length;D+=1)$[D].c();g=T(),M&&M.c(),h(t,"class",i=Y.getFieldTypeIcon(n[3].type)),h(l,"class","txt"),h(e,"for",a=n[21]),h(f,"class","files-list")},m(D,E){w(D,e,E),p(e,t),p(e,s),p(e,l),p(l,r),w(D,u,E),w(D,f,E);for(let O=0;O<c.length;O+=1)c[O].m(f,null);p(f,m);for(let O=0;O<$.length;O+=1)$[O].m(f,null);p(f,g),M&&M.m(f,null),n[19](f),v=!0},p(D,E){if((!v||E&8&&i!==(i=Y.getFieldTypeIcon(D[3].type)))&&h(t,"class",i),(!v||E&8)&&o!==(o=D[3].name+"")&&me(r,o),(!v||E&2097152&&a!==(a=D[21]))&&h(e,"for",a),E&1558&&(b=D[4],De(),c=dt(c,E,y,1,D,b,d,f,Bt,vh,m,bh),Oe()),E&2049){C=D[0];let O;for(O=0;O<C.length;O+=1){const F=_h(D,C,O);$[O]?($[O].p(F,E),A($[O],1)):($[O]=yh(F),$[O].c(),A($[O],1),$[O].m(f,g))}for(De(),O=C.length;O<$.length;O+=1)S(O);Oe()}D[8]?M&&(M.d(1),M=null):M?M.p(D,E):(M=kh(D),M.c(),M.m(f,null))},i(D){if(!v){for(let E=0;E<b.length;E+=1)A(c[E]);for(let E=0;E<C.length;E+=1)A($[E]);v=!0}},o(D){for(let E=0;E<c.length;E+=1)P(c[E]);$=$.filter(Boolean);for(let E=0;E<$.length;E+=1)P($[E]);v=!1},d(D){D&&k(e),D&&k(u),D&&k(f);for(let E=0;E<c.length;E+=1)c[E].d();Bn($,D),M&&M.d(),n[19](null)}}}function f4(n){let e,t;return e=new Ie({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[u4,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function c4(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new Sn}=e,c,d;function m(O){Y.removeByValue(u,O),t(1,u)}function g(O){Y.pushUnique(u,O),t(1,u)}function v(O){Y.isEmpty(a[O])||a.splice(O,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=O=>m(O),C=O=>g(O),$=O=>v(O);function S(O){he[O?"unshift":"push"](()=>{c=O,t(6,c)})}const M=()=>{for(let O of c.files)a.push(O);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function E(O){he[O?"unshift":"push"](()=>{d=O,t(7,d)})}return n.$$set=O=>{"record"in O&&t(2,o=O.record),"value"in O&&t(12,r=O.value),"uploadedFiles"in O&&t(0,a=O.uploadedFiles),"deletedFileIndexes"in O&&t(1,u=O.deletedFileIndexes),"field"in O&&t(3,f=O.field)},n.$$.update=()=>{var O,F;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=Y.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=Y.toArray(u))),n.$$.dirty&8&&t(5,i=((O=f.options)==null?void 0:O.maxSelect)>1),n.$$.dirty&4128&&Y.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=Y.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((F=f.options)==null?void 0:F.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,m,g,v,r,y,C,$,S,M,D,E]}class d4 extends Fe{constructor(e){super(),Le(this,e,c4,f4,Pe,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function wh(n){let e,t;return{c(){e=_("small"),t=R(n[1]),h(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),p(e,t)},p(i,s){s&2&&me(t,i[1])},d(i){i&&k(e)}}}function h4(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&wh(n);return{c(){e=_("i"),i=T(),s=_("div"),l=_("div"),r=R(o),a=T(),c&&c.c(),h(e,"class","ri-information-line link-hint"),h(l,"class","block txt-ellipsis"),h(s,"class","content svelte-1gjwqyd")},m(d,m){w(d,e,m),w(d,i,m),w(d,s,m),p(s,l),p(l,r),p(s,a),c&&c.m(s,null),u||(f=et(t=Et.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[m]){t&&Zn(t.update)&&m&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),m&1&&o!==(o=d[0].id+"")&&me(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,m):(c=wh(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:oe,o:oe,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function p4(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["name","title","label","key","email","heading","content",...ObjectLine truncated
|
||||
`,h(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function I4(n){let e,t,i;function s(o){n[31](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new L4({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function N4(n){let e,t,i;function s(o){n[30](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new S4({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function R4(n){let e,t,i,s,l;function o(f){n[27](f,n[40])}function r(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new d4({props:u}),he.push(()=>Re(e,"value",o)),he.push(()=>Re(e,"uploadedFiles",r)),he.push(()=>Re(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],He(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],He(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],He(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function H4(n){let e,t,i;function s(o){n[26](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new WC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function j4(n){let e,t,i;function s(o){n[25](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new VC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function q4(n){let e,t,i;function s(o){n[24](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new RC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function V4(n){let e,t,i;function s(o){n[23](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new LC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function z4(n){let e,t,i;function s(o){n[22](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new OC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function B4(n){let e,t,i;function s(o){n[21](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new CC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function U4(n){let e,t,i;function s(o){n[20](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new kC({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],He(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function W4(n){let e,t,i;function s(o){n[19](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new _C({props:l}),he.push(()=>Re(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;
Line truncated
|
||||
<span class="txt">Delete</span>`,h(e,"tabindex","0"),h(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Z4(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",o,r,a,u,f,c=!n[2].isNew&&n[10]&&Ah(n);return{c(){e=_("h4"),i=R(t),s=T(),o=R(l),r=R(" record"),a=T(),c&&c.c(),u=lt()},m(d,m){w(d,e,m),p(e,i),p(e,s),p(e,o),p(e,r),w(d,a,m),c&&c.m(d,m),w(d,u,m),f=!0},p(d,m){(!f||m[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&me(i,t),(!f||m[0]&1)&&l!==(l=d[0].name+"")&&me(o,l),!d[2].isNew&&d[10]?c?(c.p(d,m),m[0]&1028&&A(c,1)):(c=Ah(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(De(),P(c,1,1,()=>{c=null}),Oe())},i(d){f||(A(c),f=!0)},o(d){P(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function J4(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=R(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-secondary"),e.disabled=n[7],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[11]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[9]||n[7],ee(s,"btn-loading",n[7])},m(c,d){w(c,e,d),p(e,t),w(c,i,d),w(c,s,d),p(s,l),p(l,r),u||(f=X(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&me(r,o),d[0]&640&&a!==(a=!c[9]||c[7])&&(s.disabled=a),d[0]&128&&ee(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function G4(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[J4],header:[Z4],default:[Y4]},$$scope:{ctx:n}};return e=new Ci({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&288&&(o.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(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[33](null),z(e,s)}}}function Ph(n){return JSON.stringify(n)}function X4(n,e,t){let i,s,l,o;const r=hn(),a="record_"+Y.randomString(5);let{collection:u}=e,f,c=null,d=new fo,m=!1,g=!1,v={},b={},y="";function C(x){return S(x),t(8,g=!0),f==null?void 0:f.show()}function $(){return f==null?void 0:f.hide()}async function S(x){Ri({}),c=x||{},t(2,d=x!=null&&x.clone?x.clone():new fo),t(3,v={}),t(4,b={}),await di(),t(15,y=Ph(d))}function M(){if(m||!l)return;t(7,m=!0);const x=E();let G;d.isNew?G=Se.Records.create(u==null?void 0:u.id,x):G=Se.Records.update(u==null?void 0:u.id,d.id,x),G.then(async _e=>{_n(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),$(),r("save",_e)}).catch(_e=>{Se.errorResponseHandler(_e)}).finally(()=>{t(7,m=!1)})}function D(){!(c!=null&&c.id)||Si("Do you really want to delete the selected record?",()=>Se.Records.delete(c["@collectionId"],c.id).then(()=>{$(),_n("Successfully deleted record."),r("delete",c)}).catch(x=>{Se.errorResponseHandler(x)}))}function E(){const x=(d==null?void 0:d.export())||{},G=new FormData,_e={};for(const je of(u==null?void 0:u.schema)||[])_e[je.name]=je;for(const je in x)!_e[je]||(typeof x[je]>"u"&&(x[je]=null),Y.addValueToFormData(G,je,x[je]));for(const je in v){const Ne=Y.toArray(v[je]);for(const qe of Ne)G.append(je,qe)}for(const je in b){const Ne=Y.toArray(b[je]);for(const qe of Ne)G.append(je+"."+qe,"")}return G}const O=()=>$(),F=()=>D();function L(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function H(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function j(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function Q(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function ie(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function U(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function K(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function W(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function J(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function se(x,G){n.$$.not_equal(v[G.name],x)&&(v[G.name]=x,t(3,v))}function fe(x,G){n.$$.not_equal(b[G.name],x)&&(b[G.name]=x,t(4,b))}function ke(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}function le(x,G){n.$$.not_equal(d[G.name],x)&&(d[G.name]=x,t(2,d))}const ue=()=>s&&g?(Si("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),$()}),!1):!0;function Me(x){he[x?"unshift":"push"](()=>{f=x,t(6,f)})}function Z(x){pt.call(this,n,x)}function be(x){pt.call(this,n,x)}return n.$$set=x=>{"collection"in x&&t(0,u=x.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=Y.hasNonEmptyProps(v)||Y.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||y!=Ph(d)),n.$$.dirty[0]&36&&t(9,l=d.isNew||s),n.$$.dirty[0]&1&&t(10,o=(u==null?void 0:u.name)!=="profiles")},[u,$,d,v,b,s,f,m,g,l,o,a,M,D,C,y,i,O,F,L,H,j,Q,ie,U,K,W,J,se,fe,ke,le,ue,Me,Z,be]}class m_ extends Fe{constructor(e){super(),Le(this,e,X4,G4,Pe,{collection:0,show:14,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[1Line truncated
|
||||
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Uh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[28]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Wh(n,e){let t,i,s;return i=new g_({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8&&(r.record=e[35]),o[0]&2048&&(r.field=e[38]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Yh(n,e){let t,i,s,l,o,r,a,u,f,c,d,m,g,v=[],b=new Map,y,C,$,S,M,D,E,O,F,L,H,j;function Q(){return e[25](e[35])}m=new Zo({props:{id:e[35].id}});let ie=e[11];const U=J=>J[38].name;for(let J=0;J<ie.length;J+=1){let se=qh(e,ie,J),fe=U(se);b.set(fe,v[J]=Wh(fe,se))}$=new wi({props:{date:e[35].created}}),D=new wi({props:{date:e[35].updated}});function K(){return e[26](e[35])}function W(...J){return e[27](e[35],...J)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=T(),u=_("label"),c=T(),d=_("td"),B(m.$$.fragment),g=T();for(let J=0;J<v.length;J+=1)v[J].c();y=T(),C=_("td"),B($.$$.fragment),S=T(),M=_("td"),B(D.$$.fragment),E=T(),O=_("td"),O.innerHTML='<i class="ri-arrow-right-line"></i>',F=T(),h(l,"type","checkbox"),h(l,"id",o="checkbox_"+e[35].id),l.checked=r=e[5][e[35].id],h(u,"for",f="checkbox_"+e[35].id),h(s,"class","form-field"),h(i,"class","bulk-select-col min-width"),h(d,"class","col-type-text col-field-id"),h(C,"class","col-type-date col-field-created"),h(M,"class","col-type-date col-field-updated"),h(O,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(J,se){w(J,t,se),p(t,i),p(i,s),p(s,l),p(s,a),p(s,u),p(t,c),p(t,d),V(m,d,null),p(t,g);for(let fe=0;fe<v.length;fe+=1)v[fe].m(t,null);p(t,y),p(t,C),V($,C,null),p(t,S),p(t,M),V(D,M,null),p(t,E),p(t,O),p(t,F),L=!0,H||(j=[X(l,"change",Q),X(s,"click",ni(e[19])),X(t,"click",K),X(t,"keydown",W)],H=!0)},p(J,se){e=J,(!L||se[0]&8&&o!==(o="checkbox_"+e[35].id))&&h(l,"id",o),(!L||se[0]&40&&r!==(r=e[5][e[35].id]))&&(l.checked=r),(!L||se[0]&8&&f!==(f="checkbox_"+e[35].id))&&h(u,"for",f);const fe={};se[0]&8&&(fe.id=e[35].id),m.$set(fe),se[0]&2056&&(ie=e[11],De(),v=dt(v,se,U,1,e,ie,b,t,Bt,Wh,y,qh),Oe());const ke={};se[0]&8&&(ke.date=e[35].created),$.$set(ke);const le={};se[0]&8&&(le.date=e[35].updated),D.$set(le)},i(J){if(!L){A(m.$$.fragment,J);for(let se=0;se<ie.length;se+=1)A(v[se]);A($.$$.fragment,J),A(D.$$.fragment,J),L=!0}},o(J){P(m.$$.fragment,J);for(let se=0;se<v.length;se+=1)P(v[se]);P($.$$.fragment,J),P(D.$$.fragment,J),L=!1},d(J){J&&k(t),z(m);for(let se=0;se<v.length;se+=1)v[se].d();z($),z(D),H=!1,st(j)}}}function Kh(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),o=R(n[4]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),p(e,t),p(e,s),p(e,l),p(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&me(s,i),a[0]&16&&me(o,r[4])},d(r){r&&k(e)}}}function Zh(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=R("Load more ("),o=R(l),r=R(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[8]),ee(t,"btn-disabled",n[8]),h(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),p(e,t),p(t,i),p(i,s),p(i,o),p(i,r),a||(u=X(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&me(o,l),c[0]&256&&ee(t,"btn-loading",f[8]),c[0]&256&&ee(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Jh(n){let e,t,i,s,l,o,r=n[6]===1?"record":"records",a,u,f,c,d,m,g,v,b,y,C;return{c(){e=_("div"),t=_("div"),i=R("Selected "),s=_("strong"),l=R(n[6]),o=T(),a=R(r),u=T(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=T(),d=_("div"),m=T(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',h(t,"class","txt"),h(f,"type","button"),h(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ee(f,"btn-disabled",n[9]),h(d,"class","flex-fill"),h(g,"type","button"),h(g,"class","btn btn-sm btn-secondary btn-danger"),ee(g,"btn-loading",n[9]),ee(g,"btn-disabled",n[9]),h(e,"class","bulkbar")},m($,S){w($,e,S),p(e,t),p(t,i),p(t,s),p(s,l),p(t,o),p(t,a),p(e,u),p(e,f),p(e,c),p(e,d),p(e,m),p(e,g),b=!0,y||(C=[X(f,"click",n[30]),X(g,"click",n[31])],y=!0)},p($,S){(!b||S[0]&64)&&me(l,$[6]),(!b||S[0]&64)&&r!==(r=$[6]===1?"record":"records")&&me(a,r),S[0]&512&&ee(f,"btn-disabled",$[9]),S[0]&512&&ee(g,"btn-loading",$[9]),S[0]&512&&ee(g,"btn-disabled",$[9])},i($){b||($&&Lt(()=>{v||(v=at(e,Un,{duration:150,y:5},!0)),v.run(1)}),b=!0)},o($){$&&(v||(v=at(e,Un,{duration:150,y:5},!1)),v.run(0)),b=!1},d($){$&&k(e),$&&v&&v.end(),y=!1,st(C)}}}function vM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v=[],b=new Map,y,C,$,S,M,D,E,O,F,L,H=[],j=new Map,Q,ie,U,K,W,J,se;function fe(re){n[21](re)}let ke={class:"col-type-text col
Line truncated
|
||||
<span class="txt">API Preview</span>`,C=T(),$=_("button"),$.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New record</span>`,S=T(),B(M.$$.fragment),D=T(),B(E.$$.fragment),h(o,"class","breadcrumb-item"),h(a,"class","breadcrumb-item"),h(l,"class","breadcrumbs"),h(d,"type","button"),h(d,"class","btn btn-secondary btn-circle"),h(y,"type","button"),h(y,"class","btn btn-outline"),h($,"type","button"),h($,"class","btn btn-expanded"),h(b,"class","btns-group"),h(s,"class","page-header"),h(i,"class","page-wrapper")},m(K,W){V(e,K,W),w(K,t,W),w(K,i,W),p(i,s),p(s,l),p(l,o),p(l,r),p(l,a),p(a,f),p(s,c),p(s,d),p(s,m),V(g,s,null),p(s,v),p(s,b),p(b,y),p(b,C),p(b,$),p(i,S),V(M,i,null),p(i,D),V(E,i,null),L=!0,H||(j=[et(Et.call(null,d,{text:"Edit collection",position:"right"})),X(d,"click",n[12]),X(y,"click",n[14]),X($,"click",n[15])],H=!0)},p(K,W){(!L||W&4)&&u!==(u=K[2].name+"")&&me(f,u);const J={};W&1&&(J.value=K[0]),W&4&&(J.autocompleteCollection=K[2]),M.$set(J);const se={};W&4&&(se.collection=K[2]),!O&&W&1&&(O=!0,se.filter=K[0],He(()=>O=!1)),!F&&W&2&&(F=!0,se.sort=K[1],He(()=>F=!1)),E.$set(se)},i(K){L||(A(e.$$.fragment,K),A(g.$$.fragment,K),A(M.$$.fragment,K),A(E.$$.fragment,K),L=!0)},o(K){P(e.$$.fragment,K),P(g.$$.fragment,K),P(M.$$.fragment,K),P(E.$$.fragment,K),L=!1},d(K){z(e,K),K&&k(t),K&&k(i),z(g),z(M),n[17](null),z(E),H=!1,st(j)}}}function SM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=T(),s=_("h1"),s.textContent="Create your first collection to add records!",l=T(),o=_("button"),o.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">Create new collection</span>`,h(t,"class","icon"),h(s,"class","m-b-10"),h(o,"type","button"),h(o,"class","btn btn-expanded-lg btn-lg"),h(e,"class","placeholder-section m-b-base")},m(u,f){w(u,e,f),p(e,t),p(e,i),p(e,s),p(e,l),p(e,o),r||(a=X(o,"click",n[11]),r=!0)},p:oe,i:oe,o:oe,d(u){u&&k(e),r=!1,a()}}}function $M(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading collections...</h1>`,h(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function CM(n){let e,t,i,s,l,o,r,a,u;const f=[$M,SM,wM],c=[];function d(b,y){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let m={};s=new Ua({props:m}),n[21](s);let g={};o=new fC({props:g}),n[22](o);let v={collection:n[2]};return a=new m_({props:v}),n[23](a),a.$on("save",n[24]),a.$on("delete",n[25]),{c(){t.c(),i=T(),B(s.$$.fragment),l=T(),B(o.$$.fragment),r=T(),B(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),V(s,b,y),w(b,l,y),V(o,b,y),w(b,r,y),V(a,b,y),u=!0},p(b,[y]){let C=e;e=d(b),e===C?c[e].p(b,y):(De(),P(c[C],1,1,()=>{c[C]=null}),Oe(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const $={};s.$set($);const S={};o.$set(S);const M={};y&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[21](null),z(s,b),b&&k(l),n[22](null),z(o,b),b&&k(r),n[23](null),z(a,b)}}}function MM(n,e,t){var K;let i,s,l,o,r;qt(n,ui,W=>t(2,s=W)),qt(n,Ms,W=>t(10,l=W)),qt(n,nn,W=>t(26,o=W)),qt(n,ea,W=>t(8,r=W));const a=Y.getQueryParams((K=window.location)==null?void 0:K.href);wn(nn,o="Collections",o);let u,f,c,d,m=a.filter||"",g=a.sort||"-created",v=a.collectionId;function b(){t(9,v=s.id),t(1,g="-created"),t(0,m="")}jw(v);const y=()=>u==null?void 0:u.show(),C=()=>u==null?void 0:u.show(s),$=()=>d==null?void 0:d.load(),S=()=>f==null?void 0:f.show(s),M=()=>c==null?void 0:c.show(),D=W=>t(0,m=W.detail);function E(W){he[W?"unshift":"push"](()=>{d=W,t(6,d)})}function O(W){m=W,t(0,m)}function F(W){g=W,t(1,g)}const L=W=>c==null?void 0:c.show(W==null?void 0:W.detail);function H(W){he[W?"unshift":"push"](()=>{u=W,t(3,u)})}function j(W){he[W?"unshift":"push"](()=>{f=W,t(4,f)})}function Q(W){he[W?"unshift":"push"](()=>{c=W,t(5,c)})}const ie=()=>d==null?void 0:d.load(),U=()=>d==null?void 0:d.load();return n.$$.update=()=>{n.$$.dirty&1024&&t(7,i=l.filter(W=>W.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&v!=s.id&&b(),n.$$.dirty&7&&(g||m||(s==null?void 0:s.id))&&Y.replaceClientQueryParams({collectionId:s==null?void 0:s.id,filter:m,sort:g})},[m,g,s,u,f,c,d,i,r,v,l,y,C,$,S,M,D,E,O,F,L,H,j,Q,ie,U]}class TM extends Fe{constructor(e){super(),Le(this,e,MM,CM,Pe,{})}}function Gh(n){let e,t;return e=new Ie({props:{class:"form-field disabled",name:"id",$$slots:{default:[DM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(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){z(e,i)}}}function DM(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[31]),h(r,"type","text"),h(r,"id",a=n[31]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),p(e,t),p(e,i),p(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&h(e,"for",l),c[1]&1&&a!==(a=f[31])&&h(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function Xh(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',h(e,"class","form-field-addon txt-success")},m(s,l){w(s,e,l),t||(i=et(Et.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function OM(n){let e,t,i,s,l,o,r,a,u,f,c,d=n[1].verified&&Xh();return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),d&&d.c(),r=T(),a=_("input"),h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[31]),h(a,"type","email"),h(a,"autocomplete","off"),h(a,"id",u=n[31]),a.required=!0},m(m,g){w(m,e,g),p(e,t),p(e,i),p(e,s),w(m,o,g),d&&d.m(m,g),w(m,r,g),w(m,a,g),$e(a,n[2]),f||(c=X(a,"input",n[19]),f=!0)},p(m,g){g[1]&1&&l!==(l=m[31])&&h(e,"for",l),m[1].verified?d||(d=Xh(),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=m[31])&&h(a,"id",u),g[0]&4&&a.value!==m[2]&&$e(a,m[2])},d(m){m&&k(e),m&&k(o),d&&d.d(m),m&&k(r),m&&k(a),f=!1,c()}}}function Qh(n){let e,t;return e=new Ie({props:{class:"form-field form-field-toggle",$$slots:{default:[EM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&8|s[1]&3&&(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){z(e,i)}}}function EM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[31]),h(s,"for",o=n[31])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),p(s,l),r||(a=X(e,"change",n[20]),r=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&h(e,"id",t),f[0]&8&&(e.checked=u[3]),f[1]&1&&o!==(o=u[31])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function xh(n){let e,t,i,s,l,o,r,a,u;return s=new Ie({props:{classLine truncated
|
||||
<span class="txt">Send verification email</span>`,h(e,"type","button"),h(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[16]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function NM(n){let e,t,i,s,l=!n[1].verified&&np(n);return{c(){l&&l.c(),e=T(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,h(t,"type","button"),h(t,"class","dropdown-item")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),i||(s=X(t,"click",n[17]),i=!0)},p(o,r){o[1].verified?l&&(l.d(1),l=null):l?l.p(o,r):(l=np(o),l.c(),l.m(e.parentNode,e))},d(o){l&&l.d(o),o&&k(e),o&&k(t),i=!1,s()}}}function RM(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&tp(n);return{c(){m&&m.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=R(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-secondary"),t.disabled=n[5],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[5],ee(l,"btn-loading",n[5])},m(g,v){m&&m.m(g,v),w(g,e,v),w(g,t,v),p(t,i),w(g,s,v),w(g,l,v),p(l,o),p(o,a),f=!0,c||(d=X(t,"click",n[18]),c=!0)},p(g,v){g[1].isNew?m&&(De(),P(m,1,1,()=>{m=null}),Oe()):m?(m.p(g,v),v[0]&2&&A(m,1)):(m=tp(g),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||v[0]&32)&&(t.disabled=g[5]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&me(a,r),(!f||v[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),v[0]&32&&ee(l,"btn-loading",g[5])},i(g){f||(A(m),f=!0)},o(g){P(m),f=!1},d(g){m&&m.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function HM(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[RM],header:[IM],default:[FM]},$$scope:{ctx:n}};return e=new Ci({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1088&&(o.beforeHide=s[24]),l[0]&1966|l[1]&2&&(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[25](null),z(e,s)}}}function jM(n,e,t){let i;const s=hn(),l="user_"+Y.randomString(5);let o,r=new co,a=!1,u=!1,f="",c="",d="",m=!1,g=!0;function v(J){return y(J),t(6,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(J){Ri({}),t(1,r=J!=null&&J.clone?J.clone():new co),C()}function C(){t(3,m=!1),t(9,g=!0),t(2,f=(r==null?void 0:r.email)||""),t(7,c=""),t(8,d="")}function $(){if(a||!i)return;t(5,a=!0);const J={email:f};(r.isNew||m)&&(J.password=c,J.passwordConfirm=d);let se;r.isNew?se=Se.Users.create(J):se=Se.Users.update(r.id,J),se.then(async fe=>{g&&M(!1),t(6,u=!1),b(),_n(r.isNew?"Successfully created user.":"Successfully updated user."),s("save",fe)}).catch(fe=>{Se.errorResponseHandler(fe)}).finally(()=>{t(5,a=!1)})}function S(){!(r!=null&&r.id)||Si("Do you really want to delete the selected user?",()=>Se.Users.delete(r.id).then(()=>{t(6,u=!1),b(),_n("Successfully deleted user."),s("delete",r)}).catch(J=>{Se.errorResponseHandler(J)}))}function M(J=!0){return Se.Users.requestVerification(r.isNew?f:r.email).then(()=>{t(6,u=!1),b(),J&&_n(`Successfully sent verification email to ${r.email}.`)}).catch(se=>{Se.errorResponseHandler(se)})}const D=()=>M(),E=()=>S(),O=()=>b();function F(){f=this.value,t(2,f)}function L(){m=this.checked,t(3,m)}function H(){c=this.value,t(7,c)}function j(){d=this.value,t(8,d)}function Q(){g=this.checked,t(9,g)}const ie=()=>i&&u?(Si("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),b()}),!1):!0;function U(J){he[J?"unshift":"push"](()=>{o=J,t(4,o)})}function K(J){pt.call(this,n,J)}function W(J){pt.call(this,n,J)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=r.isNew&&f!=""||m||f!==r.email)},[b,r,f,m,o,a,u,c,d,g,i,l,$,S,M,v,D,E,O,F,L,H,j,Q,ie,U,K,W]}class qM extends Fe{constructor(e){super(),Le(this,e,jM,HM,Pe,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function ip(n,e,t){const i=n.slice();return i[39]=e[t],i}function sp(n,e,t){const i=n.slice();return i[42]=e[t],i}function lp(n,e,t){const i=n.slice();return i[42]=e[t],i}function VM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$,S,M,D,E,O,F,L,H=[],j=new Map,Q,ie,U,K,W,J,se,fe,ke,le,ue=[],Me=new Map,Z,be,x,G,_e;u=new zo({}),u.$on("refresh",n[17]),v=new Vo({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),v.$on("submit",n[19]);function je(te){n[20](te)}let Ne={class:"col-type-text col-field-id",name:"id",$$slots:{default:[BM]},$$scope:{ctx:n}};n[4]!==void 0&&(Ne.sort=n[4]),M=new rn({props:Ne}),he.push(()=>Re(M,"sort",je));function qe(te){n[21](te)}let ae={class:"col-type-email col-field-email",name:"email",$$slots:{default:[UM]},$$scope:{ctx:n}};n[4]!==void 0&&(ae.sort=n[4]),O=new rn({props:ae}),he.push(()=>Re(O,"sort",qe));let re=n[12];const ve=te=>te[42].name;for(let te=0;te<re.length;te+=1){let ye=lp(n,re,te),Ke=ve(ye);j.set(Ke,H[te]=op(Ke,ye))}function Je(te){n[22](te)}let nt={class:"col-type-date col-field-created",name:"created",$$slots:{default:[WM]},$$scope:{ctx:n}};n[4]!==void 0&&(nt.sort=n[4]),ie=new rn({props:nt}),he.push(()=>Re(ie,"sort",Je));function ut(te){n[23](te)}let ot={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[YM]},$$scope:{ctx:n}};n[4]!==voiLine truncated
|
||||
<span class="txt">New user</span>`,g=T(),B(v.$$.fragment),b=T(),y=_("div"),C=_("table"),$=_("thead"),S=_("tr"),B(M.$$.fragment),E=T(),B(O.$$.fragment),L=T();for(let te=0;te<H.length;te+=1)H[te].c();Q=T(),B(ie.$$.fragment),K=T(),B(W.$$.fragment),se=T(),fe=_("th"),ke=T(),le=_("tbody");for(let te=0;te<ue.length;te+=1)ue[te].c();pe&&pe.c(),Z=T(),Ve&&Ve.c(),be=T(),mt&&mt.c(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(r,"type","button"),h(r,"class","btn btn-secondary btn-circle"),h(c,"class","flex-fill"),h(m,"type","button"),h(m,"class","btn btn-expanded"),h(t,"class","page-header"),h(fe,"class","col-type-action min-width"),h(C,"class","table"),ee(C,"table-loading",n[10]),h(y,"class","table-wrapper"),h(e,"class","page-wrapper")},m(te,ye){w(te,e,ye),p(e,t),p(t,i),p(i,s),p(s,l),p(t,o),p(t,r),p(t,a),V(u,t,null),p(t,f),p(t,c),p(t,d),p(t,m),p(e,g),V(v,e,null),p(e,b),p(e,y),p(y,C),p(C,$),p($,S),V(M,S,null),p(S,E),V(O,S,null),p(S,L);for(let Ke=0;Ke<H.length;Ke+=1)H[Ke].m(S,null);p(S,Q),V(ie,S,null),p(S,K),V(W,S,null),p(S,se),p(S,fe),p(C,ke),p(C,le);for(let Ke=0;Ke<ue.length;Ke+=1)ue[Ke].m(le,null);pe&&pe.m(le,null),p(e,Z),Ve&&Ve.m(e,null),p(e,be),mt&&mt.m(e,null),x=!0,G||(_e=[et(Et.call(null,r,{text:"Edit profile collection",position:"right"})),X(r,"click",n[16]),X(m,"click",n[18])],G=!0)},p(te,ye){(!x||ye[0]&16384)&&me(l,te[14]);const Ke={};ye[0]&8&&(Ke.value=te[3]),v.$set(Ke);const ft={};ye[1]&65536&&(ft.$$scope={dirty:ye,ctx:te}),!D&&ye[0]&16&&(D=!0,ft.sort=te[4],He(()=>D=!1)),M.$set(ft);const St={};ye[1]&65536&&(St.$$scope={dirty:ye,ctx:te}),!F&&ye[0]&16&&(F=!0,St.sort=te[4],He(()=>F=!1)),O.$set(St),ye[0]&4096&&(re=te[12],H=dt(H,ye,ve,1,te,re,j,S,cn,op,Q,lp));const $t={};ye[1]&65536&&($t.$$scope={dirty:ye,ctx:te}),!U&&ye[0]&16&&(U=!0,$t.sort=te[4],He(()=>U=!1)),ie.$set($t);const Nt={};ye[1]&65536&&(Nt.$$scope={dirty:ye,ctx:te}),!J&&ye[0]&16&&(J=!0,Nt.sort=te[4],He(()=>J=!1)),W.$set(Nt),ye[0]&5450&&(Xe=te[1],De(),ue=dt(ue,ye,ge,1,te,Xe,Me,le,Bt,fp,null,ip),Oe(),!Xe.length&&pe?pe.p(te,ye):Xe.length?pe&&(pe.d(1),pe=null):(pe=rp(te),pe.c(),pe.m(le,null))),ye[0]&1024&&ee(C,"table-loading",te[10]),te[1].length?Ve?Ve.p(te,ye):(Ve=cp(te),Ve.c(),Ve.m(e,be)):Ve&&(Ve.d(1),Ve=null),te[1].length&&te[13]?mt?mt.p(te,ye):(mt=dp(te),mt.c(),mt.m(e,null)):mt&&(mt.d(1),mt=null)},i(te){if(!x){A(u.$$.fragment,te),A(v.$$.fragment,te),A(M.$$.fragment,te),A(O.$$.fragment,te),A(ie.$$.fragment,te),A(W.$$.fragment,te);for(let ye=0;ye<Xe.length;ye+=1)A(ue[ye]);x=!0}},o(te){P(u.$$.fragment,te),P(v.$$.fragment,te),P(M.$$.fragment,te),P(O.$$.fragment,te),P(ie.$$.fragment,te),P(W.$$.fragment,te);for(let ye=0;ye<ue.length;ye+=1)P(ue[ye]);x=!1},d(te){te&&k(e),z(u),z(v),z(M),z(O);for(let ye=0;ye<H.length;ye+=1)H[ye].d();z(ie),z(W);for(let ye=0;ye<ue.length;ye+=1)ue[ye].d();pe&&pe.d(),Ve&&Ve.d(),mt&&mt.d(),G=!1,st(_e)}}}function zM(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading users...</h1>`,h(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function BM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function UM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function op(n,e){let t,i,s,l,o,r,a,u=e[42].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),o=T(),r=_("span"),a=R("profile."),f=R(u),h(s,"class",l=Y.getFieldTypeIcon(e[42].type)),h(r,"class","txt"),h(i,"class","col-header-content"),h(t,"class",c="col-type-"+e[42].type+" col-field-"+e[42].name),h(t,"name",d=e[42].name),this.first=t},m(m,g){w(m,t,g),p(t,i),p(i,s),p(i,o),p(i,r),p(r,a),p(r,f)},p(m,g){e=m,g[0]&4096&&l!==(l=Y.getFieldTypeIcon(e[42].type))&&h(s,"class",l),g[0]&4096&&u!==(u=e[42].name+"")&&me(f,u),g[0]&4096&&c!==(c="col-type-"+e[42].type+" col-field-"+e[42].name)&&h(t,"class",c),g[0]&4096&&d!==(d=e[42].name)&&h(t,"name",d)},d(m){m&&k(t)}}}function WM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function YM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function rp(n){let e;function t(l,o){return l[10]?ZM:KM}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function KM(n){var r;let e,t,i,s,l,o=((r=n[3])==null?void 0:r.length)&&ap(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=T(),o&&o.c(),l=T(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),p(e,t),p(t,i),p(t,s),o&&o.m(t,null),p(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?o?o.p(a,u):(o=ap(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function ZM(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function ap(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[26]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function up(n,e){let t,i,s;return i=new g_({props:{field:e[42],record:e[39].profile||{}}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&4096&&(r.field=e[42]),o[0]&2&&(r.record=e[39].profile||{}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function fp(n,e){let t,i,s,l,o,r,a,u=e[39].email+"",f,c,d,m,g=e[39].verified?"Verified":"Unverified",v,b,y=[],C=new Map,$,S,M,D,E,O,F,L,H,j,Q,ie,U,K,W;s=new Zo({props:{id:e[39].id}});let J=e[12];const se=le=>le[42].name;for(let le=0;le<J.length;le+=1){let ue=sp(e,J,le),Me=se(ue);C.set(Me,y[le]=up(Me,ue))}M=new wi({props:{date:e[39].created}}),O=new wi({props:{date:e[39].updated}});function fe(){return e[24](e[39])}function ke(){return e[25](e[39])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),B(s.$$.fragment),l=T(),o=_("td"),r=_("div"),a=_("span"),f=R(u),d=T(),m=_("span"),v=R(g),b=T();for(let le=0;le<y.length;le+=1)y[le].c();$=T(),S=_("td"),B(M.$$.fragment),D=T(),E=_("td"),B(O.$$.fragment),F=T(),L=_("td"),H=_("button"),H.innerHTML=`<i class="ri-user-settings-line"></i>
|
||||
<span class="txt">Edit user</span>`,j=T(),Q=_("button"),Q.innerHTML=`<i class="ri-profile-line"></i>
|
||||
<span class="txt">Edit profile</span>`,ie=T(),h(i,"class","col-type-text col-field-id"),h(a,"class","txt"),h(a,"title",c=e[39].email),h(m,"class","label"),ee(m,"label-success",e[39].verified),ee(m,"label-warning",!e[39].verified),h(r,"class","inline-flex"),h(o,"class","col-type-email col-field-email"),h(S,"class","col-type-date col-field-created"),h(E,"class","col-type-date col-field-updated"),h(H,"type","button"),h(H,"class","btn btn-sm btn-outline"),h(Q,"type","button"),h(Q,"class","btn btn-sm m-l-10"),h(L,"class","col-type-action min-width"),this.first=t},m(le,ue){w(le,t,ue),p(t,i),V(s,i,null),p(t,l),p(t,o),p(o,r),p(r,a),p(a,f),p(r,d),p(r,m),p(m,v),p(t,b);for(let Me=0;Me<y.length;Me+=1)y[Me].m(t,null);p(t,$),p(t,S),V(M,S,null),p(t,D),p(t,E),V(O,E,null),p(t,F),p(t,L),p(L,H),p(L,j),p(L,Q),p(t,ie),U=!0,K||(W=[X(H,"click",ni(fe)),X(Q,"click",ni(ke))],K=!0)},p(le,ue){e=le;const Me={};ue[0]&2&&(Me.id=e[39].id),s.$set(Me),(!U||ue[0]&2)&&u!==(u=e[39].email+"")&&me(f,u),(!U||ue[0]&2&&c!==(c=e[39].email))&&h(a,"title",c),(!U||ue[0]&2)&&g!==(g=e[39].verified?"Verified":"Unverified")&&me(v,g),ue[0]&2&&ee(m,"label-success",e[39].verified),ue[0]&2&&ee(m,"label-warning",!e[39].verified),ue[0]&4098&&(J=e[12],De(),y=dt(y,ue,se,1,e,J,C,t,Bt,up,$,sp),Oe());const Z={};ue[0]&2&&(Z.date=e[39].created),M.$set(Z);const be={};ue[0]&2&&(be.date=e[39].updated),O.$set(be)},i(le){if(!U){A(s.$$.fragment,le);for(let ue=0;ue<J.length;ue+=1)A(y[ue]);A(M.$$.fragment,le),A(O.$$.fragment,le),U=!0}},o(le){P(s.$$.fragment,le);for(let ue=0;ue<y.length;ue+=1)P(y[ue]);P(M.$$.fragment,le),P(O.$$.fragment,le),U=!1},d(le){le&&k(t),z(s);for(let ue=0;ue<y.length;ue+=1)y[ue].d();z(M),z(O),K=!1,st(W)}}}function cp(n){let e,t,i=n[1].length+"",s,l,o;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),o=R(n[2]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),p(e,t),p(e,s),p(e,l),p(e,o)},p(r,a){a[0]&2&&i!==(i=r[1].length+"")&&me(s,i),a[0]&4&&me(o,r[2])},d(r){r&&k(e)}}}function dp(n){let e,t,i,s,l=n[2]-n[1].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=R("Load more ("),o=R(l),r=R(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[10]),ee(t,"btn-disabled",n[10]),h(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),p(e,t),p(t,i),p(i,s),p(i,o),p(i,r),a||(u=X(t,"click",n[27]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&me(o,l),c[0]&1024&&ee(t,"btn-loading",f[10]),c[0]&1024&&ee(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function JM(n){let e,t,i,s,l,o,r,a,u;const f=[zM,VM],c=[];function d(b,y){return b[11]?0:1}e=d(n),t=c[e]=f[e](n);let m={};s=new qM({props:m}),n[28](s),s.$on("save",n[29]),s.$on("delete",n[30]);let g={};o=new Ua({props:g}),n[31](o),o.$on("save",n[32]);let v={collection:n[5]};return a=new m_({props:v}),n[33](a),a.$on("save",n[34]),{c(){t.c(),i=T(),B(s.$$.fragment),l=T(),B(o.$$.fragment),r=T(),B(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),V(s,b,y),w(b,l,y),V(o,b,y),w(b,r,y),V(a,b,y),u=!0},p(b,y){let C=e;e=d(b),e===C?c[e].p(b,y):(De(),P(c[C],1,1,()=>{c[C]=null}),Oe(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const $={};s.$set($);const S={};o.$set(S);const M={};y[0]&32&&(M.collection=b[5]),a.$set(M)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[28](null),z(s,b),b&&k(l),n[31](null),z(o,b),b&&k(r),n[33](null),z(a,b)}}}function GM(n,e,t){var be;let i,s,l;qt(n,nn,x=>t(14,l=x));const o=Y.getQueryParams((be=window.location)==null?void 0:be.href),r=["id","userId","created","updated"];wn(nn,l="Users",l);let a,u,f,c=[],d=1,m=0,g=!1,v=o.filter||"",b=o.sort||"-created",y=new Fn,C=!1;D();async function $(x=1){return t(10,g=!0),x<=1&&S(),Se.Users.getList(x,50,{sort:b||"-created",filter:v}).then(G=>{t(10,g=!1),t(1,c=c.concat(G.items)),t(9,d=G.page),t(2,m=G.totalItems)}).catch(G=>{G!=null&&G.isAbort||(t(10,g=!1),console.warn(G),S(),Se.errorResponseHandler(G,!1))})}function S(){t(1,c=[]),t(9,d=1),t(2,m=0)}function M(x){const G=c.find(_e=>_e.id===(x==null?void 0:x.userId));G&&(G.profile=x),t(1,c)}async function D(){t(11,C=!0);try{t(5,y=await Se.Collections.getOne("profiles"))}catch(x){Se.errorResponseHandler(x)}t(11,C=!1)}const E=()=>u==null?void 0:u.show(y),O=()=>$(),F=()=>a==null?void 0:a.show(),L=x=>t(3,v=x.detail);function H(x){b=x,t(4,b)}function j(x){b=x,t(4,b)}function Q(x){b=x,t(4,b)}function ie(x){b=x,t(4,b)}const U=x=>a==null?void 0:a.show(x),K=x=>f==null?void 0:f.show(x.profile),W=()=>t(3,v=""),J=()=>$(d+1);function se(x){he[x?"unshift":"push"](()=>{a=x,t(6,a)})}const fe=()=>$(),ke=()=>$();function le(x){he[x?"unshift":"push"](()=>{u=x,t(7,u)})}const ue=x=>t(5,y=x.detail);function Me(x){he[x?"unshift":"push"](()=>{f=x,t(8,f)})}const Z=x=>M(x.detail);return n.$$.update=()=>{var x;n.$$.dirty[0]&24&&b!==-1&&v!==-1&&(Y.replaceClientQueryParamLine truncated
|
||||
<span class="txt">Application</span>`,o=T(),r=_("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
|
||||
<span class="txt">Mail settings</span>`,a=T(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
|
||||
<span class="txt">Files storage</span>`,f=T(),c=_("div"),c.textContent="Authentication",d=T(),m=_("a"),m.innerHTML=`<i class="ri-lock-password-line"></i>
|
||||
<span class="txt">Auth providers</span>`,g=T(),v=_("a"),v.innerHTML=`<i class="ri-key-line"></i>
|
||||
<span class="txt">Token options</span>`,b=T(),y=_("a"),y.innerHTML=`<i class="ri-shield-user-line"></i>
|
||||
<span class="txt">Admins</span>`,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(c,"class","sidebar-title"),h(m,"href","/settings/auth-providers"),h(m,"class","sidebar-list-item"),h(v,"href","/settings/tokens"),h(v,"class","sidebar-list-item"),h(y,"href","/settings/admins"),h(y,"class","sidebar-list-item"),h(t,"class","sidebar-content"),h(e,"class","page-sidebar settings-sidebar")},m(S,M){w(S,e,M),p(e,t),p(t,i),p(t,s),p(t,l),p(t,o),p(t,r),p(t,a),p(t,u),p(t,f),p(t,c),p(t,d),p(t,m),p(t,g),p(t,v),p(t,b),p(t,y),C||($=[et(oi.call(null,l,{path:"/settings"})),et(Tn.call(null,l)),et(oi.call(null,r,{path:"/settings/mail/?.*"})),et(Tn.call(null,r)),et(oi.call(null,u,{path:"/settings/storage/?.*"})),et(Tn.call(null,u)),et(oi.call(null,m,{path:"/settings/auth-providers/?.*"})),et(Tn.call(null,m)),et(oi.call(null,v,{path:"/settings/tokens/?.*"})),et(Tn.call(null,v)),et(oi.call(null,y,{path:"/settings/admins/?.*"})),et(Tn.call(null,y))],C=!0)},p:oe,i:oe,o:oe,d(S){S&&k(e),C=!1,st($)}}}class Ps extends Fe{constructor(e){super(),Le(this,e,null,QM,Pe,{})}}function hp(n,e,t){const i=n.slice();return i[31]=e[t],i}function pp(n){let e,t;return e=new Ie({props:{class:"form-field disabled",name:"id",$$slots:{default:[xM,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|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){z(e,i)}}}function xM(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[30]),h(r,"type","text"),h(r,"id",a=n[30]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),p(e,t),p(e,i),p(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&h(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&h(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function mp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[31])}function u(...f){return n[18](n[31],...f)}return{c(){e=_("figure"),t=_("img"),s=T(),ti(t.src,i="/_/images/avatars/avatar"+n[31]+".svg")||h(t,"src",i),h(t,"alt","Avatar "+n[31]),h(e,"tabindex","0"),h(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,c){w(f,e,c),p(e,t),p(e,s),o||(r=[X(e,"click",a),X(e,"keydown",u)],o=!0)},p(f,c){n=f,c[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&h(e,"class",l)},d(f){f&&k(e),o=!1,st(r)}}}function eT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),r=_("input"),h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[30]),h(r,"type","email"),h(r,"autocomplete","off"),h(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),p(e,t),p(e,i),p(e,s),w(c,o,d),w(c,r,d),$e(r,n[3]),u||(f=X(r,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&h(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&h(r,"id",a),d[0]&8&&r.value!==c[3]&&$e(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function gp(n){let e,t;return e=new Ie({props:{class:"form-field form-field-toggle",$$slots:{default:[tT,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|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){z(e,i)}}}function tT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[30]),h(s,"for",o=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),p(s,l),r||(a=X(e,"change",n[20]),r=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&h(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&o!==(o=u[30])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function _p(n){let e,t,i,s,l,o,r,a,u;return s=new Ie({props:{class:"form-field required",name:"password",$$slots:{default:[nT,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),r=new Ie({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[iT,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=T(),o=_("div"),B(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,c){w(f,e,c),p(e,t),p(t,i),V(s,i,null),p(t,l),p(t,o),V(r,o,null),u=!0},p(f,c){const d={};c[0]&1073742080|c[1]&8&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&1073742336|c[1]&8&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),Lt(()=>{a||(a=at(t,on,{duration:150},!0)),a.run(Line truncated
|
||||
<span class="txt">Delete</span>`,h(e,"type","button"),h(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[15]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function rT(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].isNew&&bp(n);return{c(){m&&m.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=R(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-secondary"),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],ee(l,"btn-loading",n[6])},m(g,v){m&&m.m(g,v),w(g,e,v),w(g,t,v),p(t,i),w(g,s,v),w(g,l,v),p(l,o),p(o,a),f=!0,c||(d=X(t,"click",n[16]),c=!0)},p(g,v){g[1].isNew?m&&(De(),P(m,1,1,()=>{m=null}),Oe()):m?(m.p(g,v),v[0]&2&&A(m,1)):(m=bp(g),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||v[0]&64)&&(t.disabled=g[6]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&me(a,r),(!f||v[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),v[0]&64&&ee(l,"btn-loading",g[6])},i(g){f||(A(m),f=!0)},o(g){P(m),f=!1},d(g){m&&m.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function aT(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[rT],header:[lT],default:[sT]},$$scope:{ctx:n}};return e=new Ci({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[23]),l[0]&1886|l[1]&8&&(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[24](null),z(e,s)}}}function uT(n,e,t){let i;const s=hn(),l="admin_"+Y.randomString(5);let o,r=new ws,a=!1,u=!1,f=0,c="",d="",m="",g=!1;function v(W){return y(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(W){Ri({}),t(1,r=W!=null&&W.clone?W.clone():new ws),C()}function C(){t(4,g=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m="")}function $(){if(a||!i)return;t(6,a=!0);const W={email:c,avatar:f};(r.isNew||g)&&(W.password=d,W.passwordConfirm=m);let J;r.isNew?J=Se.Admins.create(W):J=Se.Admins.update(r.id,W),J.then(async se=>{var fe;t(7,u=!1),b(),_n(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",se),((fe=Se.AuthStore.model)==null?void 0:fe.id)===se.id&&Se.AuthStore.save(Se.AuthStore.token,se)}).catch(se=>{Se.errorResponseHandler(se)}).finally(()=>{t(6,a=!1)})}function S(){!(r!=null&&r.id)||Si("Do you really want to delete the selected admin?",()=>Se.Admins.delete(r.id).then(()=>{t(7,u=!1),b(),_n("Successfully deleted admin."),s("delete",r)}).catch(W=>{Se.errorResponseHandler(W)}))}const M=()=>S(),D=()=>b(),E=W=>t(2,f=W),O=(W,J)=>{(J.code==="Enter"||J.code==="Space")&&(J.preventDefault(),t(2,f=W))};function F(){c=this.value,t(3,c)}function L(){g=this.checked,t(4,g)}function H(){d=this.value,t(8,d)}function j(){m=this.value,t(9,m)}const Q=()=>i&&u?(Si("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function ie(W){he[W?"unshift":"push"](()=>{o=W,t(5,o)})}function U(W){pt.call(this,n,W)}function K(W){pt.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||g||c!==r.email||f!==r.avatar)},[b,r,f,c,g,o,a,u,d,m,i,l,$,S,v,M,D,E,O,F,L,H,j,Q,ie,U,K]}class fT extends Fe{constructor(e){super(),Le(this,e,uT,aT,Pe,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function vp(n,e,t){const i=n.slice();return i[23]=e[t],i}function cT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function dT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function hT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function pT(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),p(e,t),p(e,i),p(e,s)},p:oe,d(l){l&&k(e)}}}function yp(n){let e;function t(l,o){return l[5]?gT:mT}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function mT(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&kp(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=T(),o&&o.c(),l=T(),h(t,"colspan","99"),h(t,"class","txt-cLine truncated
|
||||
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function kp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[17]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function wp(n){let e;return{c(){e=_("span"),e.textContent="You",h(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Sp(n,e){let t,i,s,l,o,r,a,u,f,c,d,m,g=e[23].email+"",v,b,y,C,$,S,M,D,E,O,F,L,H,j;u=new Zo({props:{id:e[23].id}});let Q=e[23].id===e[7].id&&wp();$=new wi({props:{date:e[23].created}}),D=new wi({props:{date:e[23].updated}});function ie(){return e[15](e[23])}function U(...K){return e[16](e[23],...K)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),r=T(),a=_("td"),B(u.$$.fragment),f=T(),Q&&Q.c(),c=T(),d=_("td"),m=_("span"),v=R(g),y=T(),C=_("td"),B($.$$.fragment),S=T(),M=_("td"),B(D.$$.fragment),E=T(),O=_("td"),O.innerHTML='<i class="ri-arrow-right-line"></i>',F=T(),ti(l.src,o="/_/images/avatars/avatar"+(e[23].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(a,"class","col-type-text col-field-id"),h(m,"class","txt txt-ellipsis"),h(m,"title",b=e[23].email),h(d,"class","col-type-email col-field-email"),h(C,"class","col-type-date col-field-created"),h(M,"class","col-type-date col-field-updated"),h(O,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(K,W){w(K,t,W),p(t,i),p(i,s),p(s,l),p(t,r),p(t,a),V(u,a,null),p(a,f),Q&&Q.m(a,null),p(t,c),p(t,d),p(d,m),p(m,v),p(t,y),p(t,C),V($,C,null),p(t,S),p(t,M),V(D,M,null),p(t,E),p(t,O),p(t,F),L=!0,H||(j=[X(t,"click",ie),X(t,"keydown",U)],H=!0)},p(K,W){e=K,(!L||W&16&&!ti(l.src,o="/_/images/avatars/avatar"+(e[23].avatar||0)+".svg"))&&h(l,"src",o);const J={};W&16&&(J.id=e[23].id),u.$set(J),e[23].id===e[7].id?Q||(Q=wp(),Q.c(),Q.m(a,null)):Q&&(Q.d(1),Q=null),(!L||W&16)&&g!==(g=e[23].email+"")&&me(v,g),(!L||W&16&&b!==(b=e[23].email))&&h(m,"title",b);const se={};W&16&&(se.date=e[23].created),$.$set(se);const fe={};W&16&&(fe.date=e[23].updated),D.$set(fe)},i(K){L||(A(u.$$.fragment,K),A($.$$.fragment,K),A(D.$$.fragment,K),L=!0)},o(K){P(u.$$.fragment,K),P($.$$.fragment,K),P(D.$$.fragment,K),L=!1},d(K){K&&k(t),z(u),Q&&Q.d(),z($),z(D),H=!1,st(j)}}}function $p(n){let e,t,i=n[4].length+"",s,l,o=n[4].length+"",r;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),r=R(o),h(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),p(e,t),p(e,s),p(e,l),p(e,r)},p(a,u){u&16&&i!==(i=a[4].length+"")&&me(s,i),u&16&&o!==(o=a[4].length+"")&&me(r,o)},d(a){a&&k(e)}}}function _T(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$,S,M,D,E,O,F,L,H,j,Q,ie,U,K,W,J,se,fe,ke,le,ue,Me=[],Z=new Map,be,x,G,_e,je,Ne;e=new Ps({}),c=new zo({}),c.$on("refresh",n[8]),y=new Vo({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),y.$on("submit",n[10]);function qe(te){n[11](te)}let ae={class:"col-type-text",name:"id",$$slots:{default:[cT]},$$scope:{ctx:n}};n[2]!==void 0&&(ae.sort=n[2]),F=new rn({props:ae}),he.push(()=>Re(F,"sort",qe));function re(te){n[12](te)}let ve={class:"col-type-email col-field-email",name:"email",$$slots:{default:[dT]},$$scope:{ctx:n}};n[2]!==void 0&&(ve.sort=n[2]),j=new rn({props:ve}),he.push(()=>Re(j,"sort",re));function Je(te){n[13](te)}let nt={class:"col-type-date col-field-created",name:"created",$$slots:{default:[hT]},$$scope:{ctx:n}};n[2]!==void 0&&(nt.sort=n[2]),U=new rn({props:nt}),he.push(()=>Re(U,"sort",Je));function ut(te){n[14](te)}let ot={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[pT]},$$scope:{ctx:n}};n[2]!==void 0&&(ot.sort=n[2]),J=new rn({props:ot}),he.push(()=>Re(J,"sort",ut));let Xe=n[4];const ge=te=>te[23].id;for(let te=0;te<Xe.length;te+=1){let ye=vp(n,Xe,te),Ke=ge(ye);Z.set(Ke,Me[te]=Sp(Ke,ye))}let pe=null;Xe.length||(pe=yp(n));let Ve=n[4].length&&$p(n),mt={};return G=new fT({props:mt}),n[18](G),G.$on("save",n[19]),G.$on("delete",n[20]),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),l=_("nav"),o=_("div"),o.textContent="Settings",r=T(),a=_("div"),u=R(n[6]),f=T(),B(c.$$.fragment),d=T(),m=_("div"),g=T(),v=_("button"),v.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New admin</span>`,b=T(),B(y.$$.fragment),C=T(),$=_("div"),S=_("table"),M=_("thead"),D=_("tr"),E=_("th"),O=T(),B(F.$$.fragment),H=T(),B(j.$$.fragment),ie=T(),B(U.$$.fragment),W=T(),B(J.$$.fragment),fe=T(),ke=_("th"),le=T(),ue=_("tbody");for(let te=0;te<Me.length;te+=1)Me[te].c();pe&&pe.c(),be=T(),Ve&&Ve.c(),x=T(),B(G.$$.fragment),h(o,"class","breadcrumb-item"),h(a,"class","breadcrumb-item"),h(l,"class","breadcrumbs"),h(m,"class","flex-fill"),h(v,"type","button"),h(v,"class","btn btn-expanded"),h(s,"class","page-header"),h(E,"class","min-width"),h(ke,"class","col-type-action min-width"),h(S,"class","table"),ee(S,"table-loading",n[5]),h($,"class","table-wrapper"),h(i,"class","page-wrapper")},m(te,ye){V(e,te,ye),w(te,t,ye),w(te,i,ye),p(i,s),p(s,l),p(l,o),p(l,r),p(l,a),p(a,u),p(s,f),V(c,s,null),p(s,d),p(s,m),p(s,g),p(s,v),p(i,b),V(y,i,null),p(i,C),p(i,$),p($,S),p(S,M),p(M,D),p(D,E),p(D,O),V(F,D,null),p(D,H),V(j,D,null),p(D,ie),V(U,D,null),p(D,W),V(J,D,null),p(D,fe),p(D,ke),p(S,le),p(S,ue);for(let Ke=0;Ke<Me.length;Ke+=1)Me[Ke].m(ue,null);pe&&pe.m(ue,null),p(i,be),Ve&&Ve.m(i,null),w(te,x,ye),V(G,te,ye),_e=!0,je||(Ne=X(v,"click",n[9]),je=!0)},p(te,[ye]){(!_e||ye&64)&&me(u,te[6]);const Ke={};ye&2&&(Ke.value=te[1]),y.$set(Ke);const ft={};ye&67108864&&(ft.$$scope={dirty:ye,ctx:te}),!L&&ye&4&&(L=!0,ft.sort=te[2],He(()=>L=!1)),F.$set(ft);const St={};ye&67108864&&(St.$$scope={dirty:ye,ctx:te}),!Q&&ye&4&&(Q=!0,St.sort=te[2],He(()=>Q=!1)),j.$set(St);const $t={};ye&67108864&&($t.$$scope={dirty:ye,ctx:te}),!K&&ye&4&&(K=!0,$t.sort=te[2],He(()=>K=!1)),U.$set($t);const Nt={};ye&67108864&&(Nt.$$scope={dirty:ye,ctx:te}),!se&&ye&4&&(se=!0,Nt.sort=te[2],He(()=>se=!1)),J.$set(Nt),ye&186&&(Xe=te[4],De(),Me=dt(Me,ye,ge,1,te,Xe,Z,ue,Bt,Sp,null,vp),Oe(),!Xe.length&&pe?pe.p(te,ye):Xe.length?pe&&(pe.d(1),pe=null):(pe=yp(te),pe.c(),pe.m(ue,null))),ye&32&&ee(S,"table-loading",te[5]),te[4].length?Ve?Ve.p(te,ye):(Ve=$p(te),Ve.c(),Ve.m(i,null)):Ve&&(Ve.d(1),Ve=null);const Ft={};G.$set(Ft)},i(te){if(!_e){A(e.$$.fragment,te),A(c.$$.fragment,te),A(y.$$.fragment,te),A(F.$$.fragment,te),A(j.$$.fragment,te),A(U.$$.fragment,te),A(J.$$.fragment,te);for(let ye=0;ye<Xe.length;ye+=1)A(Me[ye]);A(G.$$.fragment,te),_e=!0}},o(te){P(e.$$.fragment,te),P(c.$$.fragment,te),P(y.$$.fragment,te),P(F.$$.fragment,te),P(j.$$.fragment,te),P(U.$$.fragment,te),P(J.$$.fragment,te);for(let ye=0;ye<Me.length;ye+=1)P(Me[ye]);P(G.$$.fragment,te),_e=!1},d(te){z(e,te),te&&k(t),te&&k(i),z(c),z(y),z(F),z(j),z(U),z(J);for(let ye=0;ye<Me.length;ye+=1)Me[ye].d();pe&&pe.d(),Ve&&Ve.d(),te&&k(x),n[18](null),z(G,te),je=!1,Ne()}}}function bT(n,e,t){var L;let i,s;qt(n,nn,H=>t(6,i=H)),qt(n,ba,H=>t(7,s=H));const l=Y.getQueryParams((L=window.location)==null?void 0:L.href);wn(nn,i="Admins",i);let o,r=[],a=!1,u=l.filter||"",f=l.sort||"-created";function c(){return t(5,a=!0),t(4,r=[]),Se.Admins.getFullList(100,{sort:f||"-created",filter:u}).then(H=>{t(4,r=H),t(5,a=!1)}).catch(H=>{H!=null&&H.isAbort||(t(5,a=!1),console.warn(H),d(),Se.errorResponseHandler(H,!1))})}function d(){t(4,r=[])}const m=()=>c(),g=()=>o==null?void 0:o.show(),v=H=>t(1,u=H.detail);function b(H){f=H,t(2,f)}function y(H){f=H,t(2,f)}function C(H){f=H,t(2,f)}function $(H){f=H,t(2,f)}const S=H=>o==null?void 0:o.show(H),M=(H,j)=>{(j.code==="Enter"||j.code==="Space")&&(j.preventDefault(),o==null||o.show(H))},D=()=>t(1,u="");function E(H){he[H?"unshift":"push"](()=>{o=H,t(3,o)})}const O=()=>c(),F=()=>c();return n.$$.update=()=>{n.$$.dirty&6&&f!==-1&&u!==-1&&(Y.replaceClientQueryParams({filter:u,sort:f}),c())},[c,u,f,o,r,a,i,s,m,g,v,b,y,C,$,S,M,D,E,O,F]}class vT extends Fe{constructor(e){super(),Le(this,e,bT,_T,Pe,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function yT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Email"),s=T(),l=_("input"),h(e,"for",i=n[7]),h(l,"type","email"),h(l,"id",o=n[7]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0]),l.focus(),r||(a=X(l,"input",n[4]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&h(e,"for",i),f&128&&o!==(o=u[7])&&h(l,"id",o),f&1&&l.value!==u[0]&&$e(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function kT(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=_("label"),t=R("Password"),s=T(),l=_("input"),r=T(),a=_("div"),u=_("a"),u.textContent="Forgotten password?",h(e,"for",i=n[7]),h(l,"type","password"),h(l,"id",o=n[7]),l.required=!0,h(u,"href","/request-password-reset"),h(u,"class","link-hint"),h(a,"class","help-block")},m(d,m){w(d,e,m),p(e,t),w(d,s,m),w(d,l,m),$e(l,n[1]),w(d,r,m),w(d,a,m),p(a,u),f||(c=[X(l,"input",n[5]),et(Tn.call(null,u))],f=!0)},p(d,m){m&128&&i!==(i=d[7])&&h(e,"for",i),m&128&&o!==(o=d[7])&&h(l,"id",o),m&2&&l.value!==d[1]&&$e(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),f=!1,st(c)}}}function wT(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new Ie({props:{class:"form-field required",name:"email",$$slots:{default:[yT,({uniqueId:d})=>({7:d}),({uniqueId:d})=>d?128:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"foLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,h(t,"class","content txt-center m-b-base"),h(a,"type","submit"),h(a,"class","btn btn-lg btn-block btn-next"),ee(a,"btn-disabled",n[2]),ee(a,"btn-loading",n[2]),h(e,"class","block")},m(d,m){w(d,e,m),p(e,t),p(e,i),V(s,e,null),p(e,l),V(o,e,null),p(e,r),p(e,a),u=!0,f||(c=X(e,"submit",Qt(n[3])),f=!0)},p(d,m){const g={};m&385&&(g.$$scope={dirty:m,ctx:d}),s.$set(g);const v={};m&386&&(v.$$scope={dirty:m,ctx:d}),o.$set(v),m&4&&ee(a,"btn-disabled",d[2]),m&4&&ee(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(o),f=!1,c()}}}function ST(n){let e,t;return e=new fg({props:{$$slots:{default:[wT]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&263&&(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){z(e,i)}}}function $T(n,e,t){var f;const i=Y.getQueryParams((f=window.location)==null?void 0:f.href);let s=i.demoEmail||"",l=i.demoPassword||"",o=!1;function r(){if(!o)return t(2,o=!0),Se.Admins.authViaEmail(s,l).then(()=>{Ts("/")}).catch(()=>{lg("Invalid login credentials.")}).finally(()=>{t(2,o=!1)})}function a(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}return[s,l,o,r,a,u]}class CT extends Fe{constructor(e){super(),Le(this,e,$T,ST,Pe,{})}}function MT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C;return i=new Ie({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[DT,({uniqueId:$})=>({14:$}),({uniqueId:$})=>$?16384:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[OT,({uniqueId:$})=>({14:$}),({uniqueId:$})=>$?16384:0]},$$scope:{ctx:n}}}),a=new Ie({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[ET,({uniqueId:$})=>({14:$}),({uniqueId:$})=>$?16384:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),f=_("div"),c=_("div"),d=T(),m=_("button"),g=_("span"),g.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(c,"class","flex-fill"),h(g,"class","txt"),h(m,"type","submit"),h(m,"class","btn btn-expanded"),m.disabled=v=!n[3]||n[2],ee(m,"btn-loading",n[2]),h(f,"class","col-lg-12 flex"),h(e,"class","grid")},m($,S){w($,e,S),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),p(e,r),V(a,e,null),p(e,u),p(e,f),p(f,c),p(f,d),p(f,m),p(m,g),b=!0,y||(C=X(m,"click",n[9]),y=!0)},p($,S){const M={};S&49153&&(M.$$scope={dirty:S,ctx:$}),i.$set(M);const D={};S&49153&&(D.$$scope={dirty:S,ctx:$}),o.$set(D);const E={};S&49153&&(E.$$scope={dirty:S,ctx:$}),a.$set(E),(!b||S&12&&v!==(v=!$[3]||$[2]))&&(m.disabled=v),S&4&&ee(m,"btn-loading",$[2])},i($){b||(A(i.$$.fragment,$),A(o.$$.fragment,$),A(a.$$.fragment,$),b=!0)},o($){P(i.$$.fragment,$),P(o.$$.fragment,$),P(a.$$.fragment,$),b=!1},d($){$&&k(e),z(i),z(o),z(a),y=!1,C()}}}function TT(n){let e;return{c(){e=_("div"),h(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function DT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Application name"),s=T(),l=_("input"),h(e,"for",i=n[14]),h(l,"type","text"),h(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.appName),r||(a=X(l,"input",n[6]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&h(e,"for",i),f&16384&&o!==(o=u[14])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appName&&$e(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function OT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Application url"),s=T(),l=_("input"),h(e,"for",i=n[14]),h(l,"type","text"),h(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.appUrl),r||(a=X(l,"input",n[7]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&h(e,"for",i),f&16384&&o!==(o=u[14])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&$e(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function ET(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Logs max days retention"),s=T(),l=_("input"),h(e,"for",i=n[14]),h(l,"type","number"),h(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].logs.maxDays),r||(a=X(l,"input",n[8]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&h(e,"for",i),f&16384&&o!==(o=u[14])&&h(l,"id",o),f&1&&It(l.value)!==u[0].logs.maxDays&&$e(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function AT(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new Ps({});const m=[TT,MT],g=[];function v(b,y){return b[1]?0:1}return a=v(n),u=g[a]=m[a](n),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div>
|
||||
<div class="breadcrumb-item">Application</div></nav>`,l=T(),o=_("div"),r=_("form"),u.c(),h(s,"class","page-header"),h(r,"class","panel"),h(r,"autocomplete","off"),h(o,"class","wrapper"),h(i,"class","page-wrapper")},m(b,y){V(e,b,y),w(b,t,y),w(b,i,y),p(i,s),p(i,l),p(i,o),p(o,r),g[a].m(r,null),f=!0,c||(d=X(r,"submit",Qt(n[4])),c=!0)},p(b,[y]){let C=a;a=v(b),a===C?g[a].p(b,y):(De(),P(g[C],1,1,()=>{g[C]=null}),Oe(),u=g[a],u?u.p(b,y):(u=g[a]=m[a](b),u.c()),A(u,1),u.m(r,null))},i(b){f||(A(e.$$.fragment,b),A(u),f=!0)},o(b){P(e.$$.fragment,b),P(u),f=!1},d(b){z(e,b),b&&k(t),b&&k(i),g[a].d(),c=!1,d()}}}function PT(n,e,t){let i,s,l;qt(n,_o,y=>t(10,s=y)),qt(n,nn,y=>t(11,l=y)),wn(nn,l="Application settings",l);let o={},r=!1,a=!1,u="";f();async function f(){t(1,r=!0);try{const y=await Se.Settings.getAll()||{};d(y)}catch(y){Se.errorResponseHandler(y)}t(1,r=!1)}async function c(){if(!(a||!i)){t(2,a=!0);try{const y=await Se.Settings.update(Y.filterRedactedProps(o));d(y),_n("Successfully saved application settings.")}catch(y){Se.errorResponseHandler(y)}t(2,a=!1)}}function d(y={}){var C;wn(_o,s=(C=y==null?void 0:y.meta)==null?void 0:C.appName,s),t(0,o={meta:(y==null?void 0:y.meta)||{},logs:(y==null?void 0:y.logs)||{}}),t(5,u=JSON.stringify(o))}function m(){o.meta.appName=this.value,t(0,o)}function g(){o.meta.appUrl=this.value,t(0,o)}function v(){o.logs.maxDays=It(this.value),t(0,o)}const b=()=>c();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=u!=JSON.stringify(o))},[o,r,a,i,c,u,m,g,v,b]}class LT extends Fe{constructor(e){super(),Le(this,e,PT,AT,Pe,{})}}function FT(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=_t(l,s[o]);return{c(){e=_("input"),fi(e,l)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[7](e),$e(e,n[0]),t||(i=X(e,"input",n[8]),t=!0)},p(o,r){fi(e,l=bn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&$e(e,o[0])},d(o){o&&k(e),n[7](null),t=!1,i()}}}function IT(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<r.length;u+=1)a=_t(a,r[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=T(),s=_("input"),h(t,"type","button"),h(t,"class","btn btn-secondary btn-circle"),h(e,"class","form-field-addon"),fi(s,a)},m(u,f){w(u,e,f),p(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[et(Et.call(null,t,{position:"left",text:"Set new value"})),X(t,"click",n[6])],l=!0)},p(u,f){fi(s,a=bn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,st(o)}}}function NT(n){let e;function t(l,o){return l[3]?IT:FT}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function RT(n,e,t){const i=["value","mask"];let s=tn(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await di(),r==null||r.focus()}const f=()=>u();function c(m){he[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=_t(_t({},e),ci(m)),t(5,s=tn(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Wa extends Fe{constructor(e){super(),Le(this,e,RT,NT,Pe,{value:0,mask:1})}}function HT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$,S,M,D,E,O,F,L,H,j,Q;i=new Ie({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[qT,({uniqueId:U})=>({23:U}),({uniqueId:U})=>U?8388608:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[VT,({uniqueId:U})=>({23:U}),({uniqueId:U})=>U?8388608:0]},$$scope:{ctx:n}}}),a=new Ie({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[zT,({uniqueId:U})=>({23:U}),({uniqueId:U})=>U?8388608:0]},$$scope:{ctx:n}}}),f=new Ie({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[BT,({uniqueId:U})=>({23:U}),({uniqueId:U})=>U?8388608:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:{default:[UT,({uniqueId:U})=>({23:U}),({uniqueId:U})=>U?8388608:0]},$$scope:{ctx:n}}}),C=new Ie({props:{class:"form-field form-field-toggle",$$slots:{default:[WT,({uniqueId:U})=>({23:U}),({uniqueId:U})=>U?8388608:0]},$$scope:{ctx:n}}});let ie=n[0].smtp.enabled&&Cp(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),B(f.$$.fragment),c=T(),B(d.$$.fragment),m=T(),g=_("hr"),v=T(),b=_("div"),b.innerHTML=`<p>By default PocketBase uses the OS <code>sendmail</code> command for sending emails.
|
||||
<br/>
|
||||
<strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
|
||||
below.</strong></p>`,y=T(),B(C.$$.fragment),$=T(),ie&&ie.c(),S=T(),M=_("div"),D=_("div"),E=T(),O=_("button"),F=_("span"),F.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid"),h(b,"class","content m-b-sm"),h(D,"class","flex-fill"),h(F,"class","txt"),h(O,"type","submit"),h(O,"class","btn btn-expanded"),O.disabled=L=!n[3]||n[2],ee(O,"btn-loading",n[2]),h(M,"class","flex")},m(U,K){w(U,e,K),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),p(e,r),V(a,e,null),p(e,u),V(f,e,null),p(e,c),V(d,e,null),w(U,m,K),w(U,g,K),w(U,v,K),w(U,b,K),w(U,y,K),V(C,U,K),w(U,$,K),ie&&ie.m(U,K),w(U,S,K),w(U,M,K),p(M,D),p(M,E),p(M,O),p(O,F),H=!0,j||(Q=X(O,"click",n[19]),j=!0)},p(U,K){const W={};K&25165825&&(W.$$scope={dirty:K,ctx:U}),i.$set(W);const J={};K&25165825&&(J.$$scope={dirty:K,ctx:U}),o.$set(J);const se={};K&25165825&&(se.$$scope={dirty:K,ctx:U}),a.$set(se);const fe={};K&25165825&&(fe.$$scope={dirty:K,ctx:U}),f.$set(fe);const ke={};K&25165825&&(ke.$$scope={dirty:K,ctx:U}),d.$set(ke);const le={};K&25165825&&(le.$$scope={dirty:K,ctx:U}),C.$set(le),U[0].smtp.enabled?ie?(ie.p(U,K),K&1&&A(ie,1)):(ie=Cp(U),ie.c(),A(ie,1),ie.m(S.parentNode,S)):ie&&(De(),P(ie,1,1,()=>{ie=null}),Oe()),(!H||K&12&&L!==(L=!U[3]||U[2]))&&(O.disabled=L),K&4&&ee(O,"btn-loading",U[2])},i(U){H||(A(i.$$.fragment,U),A(o.$$.fragment,U),A(a.$$.fragment,U),A(f.$$.fragment,U),A(d.$$.fragment,U),A(C.$$.fragment,U),A(ie),H=!0)},o(U){P(i.$$.fragment,U),P(o.$$.fragment,U),P(a.$$.fragment,U),P(f.$$.fragment,U),P(d.$$.fragment,U),P(C.$$.fragment,U),P(ie),H=!1},d(U){U&&k(e),z(i),z(o),z(a),z(f),z(d),U&&k(m),U&&k(g),U&&k(v),U&&k(b),U&&k(y),z(C,U),U&&k($),ie&&ie.d(U),U&&k(S),U&&k(M),j=!1,Q()}}}function jT(n){let e;return{c(){e=_("div"),h(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function qT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Sender name"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.senderName),r||(a=X(l,"input",n[8]),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&1&&l.value!==u[0].meta.senderName&&$e(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function VT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Sender address"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","email"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].meta.senderAddress),r||(a=X(l,"input",n[9]),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&1&&l.value!==u[0].meta.senderAddress&&$e(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("User verification page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0,h(a,"class","help-block")},m(c,d){w(c,e,d),p(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userVerificationUrl),w(c,r,d),w(c,a,d),u||(f=X(l,"input",n[10]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&h(e,"for",i),d&8388608&&o!==(o=c[23])&&h(l,"id",o),d&1&&l.value!==c[0].meta.userVerificationUrl&&$e(l,c[0].meta.userVerificationUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function BT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("User reset password page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0,h(a,"class","help-block")},m(c,d){w(c,e,d),p(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userResetPasswordUrl),w(c,r,d),w(c,a,d),u||(f=X(l,"input",n[11]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&h(e,"for",i),d&8388608&&o!==(o=c[23])&&h(l,"id",o),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&$e(l,c[0].meta.userResetPasswordUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function UT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("User confirm email change page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
|
||||
parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0,h(a,"class","help-block")},m(c,d){w(c,e,d),p(e,t),w(c,s,d),w(c,l,d),$e(l,n[0].meta.userConfirmEmailChangeUrl),w(c,r,d),w(c,a,d),u||(f=X(l,"input",n[12]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&h(e,"for",i),d&8388608&&o!==(o=c[23])&&h(l,"id",o),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&$e(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function WT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Use SMTP mail server"),h(e,"type","checkbox"),h(e,"id",t=n[23]),e.required=!0,h(s,"for",o=n[23])},m(u,f){w(u,e,f),e.checked=n[0].smtp.enabled,w(u,i,f),w(u,s,f),p(s,l),r||(a=X(e,"change",n[13]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&h(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&8388608&&o!==(o=u[23])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Cp(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$;return i=new Ie({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[YT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[KT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[ZT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field",name:"smtp.username",$$slots:{default:[JT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),v=new Ie({props:{class:"form-field",name:"smtp.password",$$slots:{default:[GT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),m=T(),g=_("div"),B(v.$$.fragment),b=T(),y=_("div"),h(t,"class","col-lg-6"),h(l,"class","col-lg-3"),h(a,"class","col-lg-3"),h(c,"class","col-lg-6"),h(g,"class","col-lg-6"),h(y,"class","col-lg-12"),h(e,"class","grid")},m(S,M){w(S,e,M),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),p(e,r),p(e,a),V(u,a,null),p(e,f),p(e,c),V(d,c,null),p(e,m),p(e,g),V(v,g,null),p(e,b),p(e,y),$=!0},p(S,M){const D={};M&25165825&&(D.$$scope={dirty:M,ctx:S}),i.$set(D);const E={};M&25165825&&(E.$$scope={dirty:M,ctx:S}),o.$set(E);const O={};M&25165825&&(O.$$scope={dirty:M,ctx:S}),u.$set(O);const F={};M&25165825&&(F.$$scope={dirty:M,ctx:S}),d.$set(F);const L={};M&25165825&&(L.$$scope={dirty:M,ctx:S}),v.$set(L)},i(S){$||(A(i.$$.fragment,S),A(o.$$.fragment,S),A(u.$$.fragment,S),A(d.$$.fragment,S),A(v.$$.fragment,S),S&&Lt(()=>{C||(C=at(e,on,{duration:150},!0)),C.run(1)}),$=!0)},o(S){P(i.$$.fragment,S),P(o.$$.fragment,S),P(u.$$.fragment,S),P(d.$$.fragment,S),P(v.$$.fragment,S),S&&(C||(C=at(e,on,{duration:150},!1)),C.run(0)),$=!1},d(S){S&&k(e),z(i),z(o),z(u),z(d),z(v),S&&C&&C.end()}}}function YT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("SMTP server host"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.host),r||(a=X(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&1&&l.value!==u[0].smtp.host&&$e(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function KT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Port"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","number"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.port),r||(a=X(l,"input",n[15]),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&1&&It(l.value)!==u[0].smtp.port&&$e(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function ZT(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[23],items:n[5]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new us({props:u}),he.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=R("TLS Encryption"),s=T(),B(l.$$.fragment),h(e,"for",i=n[23])},m(f,c){w(f,e,c),p(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&8388608&&i!==(i=f[23]))&&h(e,"for",i);const d={};c&8388608&&(d.id=f[23]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,He(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function JT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Username"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23])},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].smtp.username),r||(a=X(l,"input",n[17]),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&1&&l.value!==u[0].smtp.username&&$e(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function GT(n){let e,t,i,s,l,o,r;function a(f){n[18](f)}let u={id:Line truncated
|
||||
the
|
||||
`),r=_("strong"),u=R(a),f=R(`
|
||||
to the
|
||||
`),c=_("strong"),m=R(d),g=R(`.
|
||||
`),v=_("br"),b=R(`
|
||||
There are numerous command line tools that can help you, such as:
|
||||
`),y=_("a"),y.textContent=`rclone
|
||||
`,C=R(`,
|
||||
`),$=_("a"),$.textContent=`s5cmd
|
||||
`,S=R(", etc."),M=T(),D=_("div"),h(i,"class","icon"),h(y,"href","https://github.com/rclone/rclone"),h(y,"target","_blank"),h(y,"rel","noopener"),h(y,"class","txt-bold"),h($,"href","https://github.com/peak/s5cmd"),h($,"target","_blank"),h($,"rel","noopener"),h($,"class","txt-bold"),h(l,"class","content"),h(t,"class","alert alert-warning m-0"),h(D,"class","clearfix m-t-base")},m(F,L){w(F,e,L),p(e,t),p(t,i),p(t,s),p(t,l),p(l,o),p(l,r),p(r,u),p(l,f),p(l,c),p(c,m),p(l,g),p(l,v),p(l,b),p(l,y),p(l,C),p(l,$),p(l,S),p(e,M),p(e,D),O=!0},p(F,L){(!O||L&8)&&a!==(a=F[3]?"S3 storage":"local file system")&&me(u,a),(!O||L&1)&&d!==(d=F[0].enabled?"S3 storage":"local file system")&&me(m,d)},i(F){O||(F&&Lt(()=>{E||(E=at(e,on,{duration:150},!0)),E.run(1)}),O=!0)},o(F){F&&(E||(E=at(e,on,{duration:150},!1)),E.run(0)),O=!1},d(F){F&&k(e),F&&E&&E.end()}}}function Tp(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g,v,b,y,C,$,S,M,D;return i=new Ie({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[iD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[sD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field required",name:"s3.region",$$slots:{default:[lD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),d=new Ie({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[oD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),v=new Ie({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[rD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),C=new Ie({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[aD,({uniqueId:E})=>({19:E}),({uniqueId:E})=>E?524288:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),m=T(),g=_("div"),B(v.$$.fragment),b=T(),y=_("div"),B(C.$$.fragment),$=T(),S=_("div"),h(t,"class","col-lg-12"),h(l,"class","col-lg-6"),h(a,"class","col-lg-6"),h(c,"class","col-lg-6"),h(g,"class","col-lg-6"),h(y,"class","col-lg-12"),h(S,"class","col-lg-12"),h(e,"class","grid")},m(E,O){w(E,e,O),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),p(e,r),p(e,a),V(u,a,null),p(e,f),p(e,c),V(d,c,null),p(e,m),p(e,g),V(v,g,null),p(e,b),p(e,y),V(C,y,null),p(e,$),p(e,S),D=!0},p(E,O){const F={};O&1572865&&(F.$$scope={dirty:O,ctx:E}),i.$set(F);const L={};O&1572865&&(L.$$scope={dirty:O,ctx:E}),o.$set(L);const H={};O&1572865&&(H.$$scope={dirty:O,ctx:E}),u.$set(H);const j={};O&1572865&&(j.$$scope={dirty:O,ctx:E}),d.$set(j);const Q={};O&1572865&&(Q.$$scope={dirty:O,ctx:E}),v.$set(Q);const ie={};O&1572865&&(ie.$$scope={dirty:O,ctx:E}),C.$set(ie)},i(E){D||(A(i.$$.fragment,E),A(o.$$.fragment,E),A(u.$$.fragment,E),A(d.$$.fragment,E),A(v.$$.fragment,E),A(C.$$.fragment,E),E&&Lt(()=>{M||(M=at(e,on,{duration:150},!0)),M.run(1)}),D=!0)},o(E){P(i.$$.fragment,E),P(o.$$.fragment,E),P(u.$$.fragment,E),P(d.$$.fragment,E),P(v.$$.fragment,E),P(C.$$.fragment,E),E&&(M||(M=at(e,on,{duration:150},!1)),M.run(0)),D=!1},d(E){E&&k(e),z(i),z(o),z(u),z(d),z(v),z(C),E&&M&&M.end()}}}function iD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Endpoint"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].endpoint),r||(a=X(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].endpoint&&$e(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function sD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Bucket"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].bucket),r||(a=X(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].bucket&&$e(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function lD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Region"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].region),r||(a=X(l,"input",n[11]),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].region&&$e(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function oD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Access key"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].accessKey),r||(a=X(l,"input",n[12]),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].accessKey&&$e(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}functio
Line truncated
|
||||
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,g=T(),b.c(),h(o,"class","breadcrumb-item"),h(a,"class","breadcrumb-item"),h(l,"class","breadcrumbs"),h(s,"class","page-header"),h(m,"class","content txt-xl m-b-base"),h(d,"class","panel"),h(d,"autocomplete","off"),h(c,"class","wrapper"),h(i,"class","page-wrapper")},m(E,O){V(e,E,O),w(E,t,O),w(E,i,O),p(i,s),p(s,l),p(l,o),p(l,r),p(l,a),p(a,u),p(i,f),p(i,c),p(c,d),p(d,m),p(d,g),M[v].m(d,null),y=!0,C||($=X(d,"submit",Qt(n[16])),C=!0)},p(E,[O]){(!y||O&32)&&me(u,E[5]);let F=v;v=D(E),v===F?M[v].p(E,O):(De(),P(M[F],1,1,()=>{M[F]=null}),Oe(),b=M[v],b?b.p(E,O):(b=M[v]=S[v](E),b.c()),A(b,1),b.m(d,null))},i(E){y||(A(e.$$.fragment,E),A(b),y=!0)},o(E){P(e.$$.fragment,E),P(b),y=!1},d(E){z(e,E),E&&k(t),E&&k(i),M[v].d(),C=!1,$()}}}function fD(n,e,t){let i,s;qt(n,nn,D=>t(5,s=D)),wn(nn,s="Files storage",s);let l={},o=!1,r=!1,a="",u=!1;f();async function f(){t(1,o=!0);try{const D=await Se.Settings.getAll()||{};d(D)}catch(D){Se.errorResponseHandler(D)}t(1,o=!1)}async function c(){if(!(r||!i)){t(2,r=!0);try{const D=await Se.Settings.update(Y.filterRedactedProps({s3:l}));d(D),Ri({}),_n("Successfully saved Files storage settings.")}catch(D){Se.errorResponseHandler(D)}t(2,r=!1)}}function d(D={}){t(0,l=(D==null?void 0:D.s3)||{}),t(3,u=l.enabled),t(7,a=JSON.stringify(l))}function m(){l.enabled=this.checked,t(0,l)}function g(){l.endpoint=this.value,t(0,l)}function v(){l.bucket=this.value,t(0,l)}function b(){l.region=this.value,t(0,l)}function y(){l.accessKey=this.value,t(0,l)}function C(D){n.$$.not_equal(l.secret,D)&&(l.secret=D,t(0,l))}function $(){l.forcePathStyle=this.checked,t(0,l)}const S=()=>c(),M=()=>c();return n.$$.update=()=>{n.$$.dirty&129&&t(4,i=a!=JSON.stringify(l))},[l,o,r,u,i,s,c,a,m,g,v,b,y,C,$,S,M]}class cD extends Fe{constructor(e){super(),Le(this,e,fD,uD,Pe,{})}}function dD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[16]),h(s,"for",o=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),p(s,l),r||(a=X(e,"change",n[8]),r=!0)},p(u,f){f&65536&&t!==(t=u[16])&&h(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&o!==(o=u[16])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Dp(n){let e,t,i,s,l,o,r,a,u,f,c;return i=new Ie({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[hD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),o=new Ie({props:{class:"form-field "+(Y.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[pD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Ie({props:{class:"form-field "+(Y.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[mD,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),h(t,"class","col-sm-12 m-t-sm"),h(l,"class","col-lg-6"),h(a,"class","col-lg-6"),h(e,"class","grid")},m(d,m){w(d,e,m),p(e,t),V(i,t,null),p(e,s),p(e,l),V(o,l,null),p(e,r),p(e,a),V(u,a,null),c=!0},p(d,m){const g={};m&196609&&(g.$$scope={dirty:m,ctx:d}),i.$set(g);const v={};m&1&&(v.class="form-field "+(Y.isEmpty(d[0].onlyDomains)?"":"disabled")),m&196609&&(v.$$scope={dirty:m,ctx:d}),o.$set(v);const b={};m&1&&(b.class="form-field "+(Y.isEmpty(d[0].exceptDomains)?"":"disabled")),m&196609&&(b.$$scope={dirty:m,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),d&&Lt(()=>{f||(f=at(e,on,{duration:150},!0)),f.run(1)}),c=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),d&&(f||(f=at(e,on,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),z(i),z(o),z(u),d&&f&&f.end()}}}function hD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Minimum password length"),s=T(),l=_("input"),h(e,"for",i=n[16]),h(l,"type","number"),h(l,"id",o=n[16]),l.required=!0,h(l,"min","5"),h(l,"max","200")},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].minPasswordLength),r||(a=X(l,"input",n[9]),r=!0)},p(u,f){f&65536&&i!==(i=u[16])&&h(e,"for",i),f&65536&&o!==(o=u[16])&&h(l,"id",o),f&1&&It(l.value)!==u[0].minPasswordLength&&$e(l,u[0].minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function pD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[10](b)}let v={id:n[16],disabled:!Y.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(v.value=n[0].exceptDomains),r=new fs({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[16]),h(f,"class","help-block")},m(b,y){w(b,e,y),p(e,t),p(e,i),p(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=et(Et.call(null,s,{text:`Email domainsLine truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]))&&h(e,"for",l);const C={};y&65536&&(C.id=b[16]),y&1&&(C.disabled=!Y.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,C.value=b[0].exceptDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function mD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function g(b){n[11](b)}let v={id:n[16]+".config.onlyDomains",disabled:!Y.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new fs({props:v}),he.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[16]+".config.onlyDomains"),h(f,"class","help-block")},m(b,y){w(b,e,y),p(e,t),p(e,i),p(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=et(Et.call(null,s,{text:`Email domains that are ONLY allowed to sign up.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]+".config.onlyDomains"))&&h(e,"for",l);const C={};y&65536&&(C.id=b[16]+".config.onlyDomains"),y&1&&(C.disabled=!Y.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,C.value=b[0].onlyDomains,He(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function gD(n){let e,t,i,s;e=new Ie({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[dD,({uniqueId:o})=>({16:o}),({uniqueId:o})=>o?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Dp(n);return{c(){B(e.$$.fragment),t=T(),l&&l.c(),i=lt()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&196609&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&A(l,1)):(l=Dp(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(De(),P(l,1,1,()=>{l=null}),Oe())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){z(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function _D(n){let e;return{c(){e=_("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function bD(n){let e;return{c(){e=_("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Op(n){let e,t,i,s,l;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=et(Et.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Lt(()=>{t||(t=at(e,Wn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=at(e,Wn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function vD(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].enabled?bD:_D}let u=a(n),f=u(n),c=n[2]&&Op();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
|
||||
<span class="txt">Email/Password</span>`,t=T(),f.c(),i=T(),s=_("div"),l=T(),c&&c.c(),o=lt(),h(e,"class","inline-flex"),h(s,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),f.m(d,m),w(d,i,m),w(d,s,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?m&4&&A(c,1):(c=Op(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(De(),P(c,1,1,()=>{c=null}),Oe())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(o)}}}function yD(n){let e,t;const i=[n[3]];let s={$$slots:{header:[vD],default:[gD]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=_t(s,i[l]);return e=new za({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){B(e.$$.fragment)},m(l,o){V(e,l,o),t=!0},p(l,[o]){const r=o&8?bn(i,[hi(l[3])]):{};o&131077&&(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[12](null),z(e,l)}}}function kD(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=tn(e,s),o;qt(n,rs,S=>t(7,o=S));let{config:r={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){r.enabled=this.checked,t(0,r)}function m(){r.minPasswordLength=It(this.value),t(0,r)}function g(S){n.$$.not_equal(r.exceptDomains,S)&&(r.exceptDomains=S,t(0,r))}function v(S){n.$$.not_equal(r.onlyDomains,S)&&(r.onlyDomains=S,t(0,r))}function b(S){he[S?"unshift":"push"](()=>{a=S,t(1,a)})}function y(S){pt.call(this,n,S)}function C(S){pt.call(this,n,S)}function $(S){pt.call(this,n,S)}return n.$$set=S=>{e=_t(_t({},e),ci(S)),t(3,l=tn(e,s)),"config"in S&&t(0,r=S.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!Y.isEmpty(o==null?void 0:o.emailPassword))},[r,a,i,l,u,f,c,o,d,m,g,v,b,y,C,$]}class wD extends Fe{constructor(e){super(),Le(this,e,kD,yD,Pe,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function SD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[22]),h(s,"for",o=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),p(s,l),r||(a=X(e,"change",n[11]),r=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&h(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&o!==(o=u[22])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Ep(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,g;l=new Ie({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[$D,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new Ie({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[CD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new Ie({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[MD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let v=n[4]&&Ap(n);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),B(l.$$.fragment),o=T(),r=_("div"),B(a.$$.fragment),u=T(),f=_("div"),B(c.$$.fragment),d=T(),v&&v.c(),h(t,"class","col-12 spacing"),h(s,"class","col-lg-6"),h(r,"class","col-lg-6"),h(f,"class","col-lg-12"),h(e,"class","grid")},m(b,y){w(b,e,y),p(e,t),p(e,i),p(e,s),V(l,s,null),p(e,o),p(e,r),V(a,r,null),p(e,u),p(e,f),V(c,f,null),p(e,d),v&&v.m(e,null),g=!0},p(b,y){const C={};y&2&&(C.name=b[1]+".clientId"),y&12582913&&(C.$$scope={dirty:y,ctx:b}),l.$set(C);const $={};y&2&&($.name=b[1]+".clientSecret"),y&12582913&&($.$$scope={dirty:y,ctx:b}),a.$set($);const S={};y&2&&(S.name=b[1]+".allowRegistrations"),y&12582913&&(S.$$scope={dirty:y,ctx:b}),c.$set(S),b[4]?v?(v.p(b,y),y&16&&A(v,1)):(v=Ap(b),v.c(),A(v,1),v.m(e,null)):v&&(De(),P(v,1,1,()=>{v=null}),Oe())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(v),b&&Lt(()=>{m||(m=at(e,on,{duration:200},!0)),m.run(1)}),g=!0)},o(b){P(l.$$.fragment,b),P(a.$$.fragment,b),P(c.$$.fragment,b),P(v),b&&(m||(m=at(e,on,{duration:200},!1)),m.run(0)),g=!1},d(b){b&&k(e),z(l),z(a),z(c),v&&v.d(),b&&m&&m.end()}}}function $D(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Client ID"),s=T(),l=_("input"),h(e,"for",i=n[22]),h(l,"type","text"),h(l,"id",o=n[22]),l.required=!0},m(u,f){w(u,e,f),p(e,t),w(u,s,f),w(u,l,f),$e(l,n[0].clientId),r||(a=X(l,"input",n[12]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&h(e,"for",i),f&4194304&&o!==(o=u[22])&&h(l,"id",o),f&1&&l.value!==u[0].clientId&&$e(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function CD(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[22],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new Wa({props:u}),he.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=R("Client Secret"),s=T(),B(l.$$.fragment),h(e,"for",i=n[22])},m(f,c){w(f,e,c),p(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&4194304&&i!==(i=f[22]))&&h(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!o&&c&Line truncated
|
||||
<span class="txt">Manage admins</span>`,t=T(),i=_("hr"),s=T(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i>
|
||||
<span class="txt">Logout</span>`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"tabindex","0"),h(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[et(Tn.call(null,e)),X(l,"click",n[6])],o=!0)},p:oe,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,st(r)}}}function rO(n){var m;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=Y.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((m=n[0])==null?void 0:m.id)&&n[1]&&Hp(n);return o=new R_({props:{routes:KD}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new eO({}),f=new lO({}),{c(){t=T(),i=_("div"),d&&d.c(),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),B(f.$$.fragment),h(l,"class","app-body"),h(i,"class","app-layout")},m(g,v){w(g,t,v),w(g,i,v),d&&d.m(i,null),p(i,s),p(i,l),V(o,l,null),w(g,r,v),V(a,g,v),w(g,u,v),V(f,g,v),c=!0},p(g,[v]){var b;(!c||v&12)&&e!==(e=Y.joinNonEmpty([g[3],g[2],"PocketBase"]," - "))&&(document.title=e),((b=g[0])==null?void 0:b.id)&&g[1]?d?(d.p(g,v),v&3&&A(d,1)):(d=Hp(g),d.c(),A(d,1),d.m(i,s)):d&&(De(),P(d,1,1,()=>{d=null}),Oe())},i(g){c||(A(d),A(o.$$.fragment,g),A(a.$$.fragment,g),A(f.$$.fragment,g),c=!0)},o(g){P(d),P(o.$$.fragment,g),P(a.$$.fragment,g),P(f.$$.fragment,g),c=!1},d(g){g&&k(t),g&&k(i),d&&d.d(),z(o),g&&k(r),z(a,g),g&&k(u),z(f,g)}}}function aO(n,e,t){let i,s,l;qt(n,_o,d=>t(2,i=d)),qt(n,ba,d=>t(0,s=d)),qt(n,nn,d=>t(3,l=d));let o,r=!1;function a(d){var m,g,v,b;((m=d==null?void 0:d.detail)==null?void 0:m.location)!==o&&(t(1,r=!!((v=(g=d==null?void 0:d.detail)==null?void 0:g.userData)!=null&&v.showAppSidebar)),o=(b=d==null?void 0:d.detail)==null?void 0:b.location,wn(nn,l="",l),Ri({}),u_())}function u(){Ts("/")}async function f(){var d;if(!!(s!=null&&s.id))try{const m=await Se.Settings.getAll({$cancelKey:"loadAppName"});wn(_o,i=((d=m==null?void 0:m.meta)==null?void 0:d.appName)||"",i)}catch(m){console.warn("Failed to load app name.",m)}}function c(){Se.logout()}return n.$$.update=()=>{n.$$.dirty&1&&s!=null&&s.id&&f()},[s,r,i,l,a,u,c]}class uO extends Fe{constructor(e){super(),Le(this,e,aO,rO,Pe,{})}}new uO({target:document.getElementById("app")});export{st as A,_n as B,Y as C,Ts as D,lt as E,fg as F,qt as G,Ms as H,hn as I,Fn as J,Jn as K,he as L,Fe as S,P as a,T as b,B as c,z as d,_ as e,h as f,w as g,p as h,Le as i,et as j,De as k,Tn as l,V as m,Oe as n,k as o,Se as p,Ie as q,ee as r,Pe as s,A as t,X as u,Qt as v,R as w,me as x,oe as y,$e as z};
|
||||
Vendored
+620
@@ -0,0 +1,620 @@
|
||||
const Xg=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)}};Xg();function ae(){}const hl=n=>n;function ct(n,e){for(const t in e)n[t]=e[t];return n}function vp(n){return n()}function Ua(){return Object.create(null)}function xe(n){n.forEach(vp)}function zn(n){return typeof n=="function"}function Te(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Al;function Zn(n,e){return Al||(Al=document.createElement("a")),Al.href=e,n===Al.href}function Qg(n){return Object.keys(n).length===0}function yp(n,...e){if(n==null)return ae;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function It(n,e,t){n.$$.on_destroy.push(yp(e,t))}function $n(n,e,t,i){if(n){const s=kp(n,e,t,i);return n[0](s)}}function kp(n,e,t,i){return n[1]&&i?ct(t.ctx.slice(),n[1](i(e))):t.ctx}function Cn(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;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function Mn(n,e,t,i,s,l){if(s){const o=kp(e,t,i,l);n.p(o,s)}}function Tn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function li(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Zt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function Wa(n){return n==null?"":n}function _n(n,e,t){return n.set(t),e}function Ze(n){return n&&zn(n.destroy)?n.destroy:ae}const wp=typeof window<"u";let Eo=wp?()=>window.performance.now():()=>Date.now(),na=wp?n=>requestAnimationFrame(n):ae;const cs=new Set;function Sp(n){cs.forEach(e=>{e.c(n)||(cs.delete(e),e.f())}),cs.size!==0&&na(Sp)}function Ao(n){let e;return cs.size===0&&na(Sp),{promise:new Promise(t=>{cs.add(e={c:n,f:t})}),abort(){cs.delete(e)}}}function m(n,e){n.appendChild(e)}function $p(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function xg(n){const e=_("style");return e_($p(n),e),e.sheet}function e_(n,e){m(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Rn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function R(n){return document.createTextNode(n)}function T(){return R(" ")}function lt(){return R("")}function Q(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Wt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Gn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Cp(n){return function(e){e.target===this&&n.call(this,e)}}function h(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function si(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 At(n){return n===""?null:+n}function t_(n){return Array.from(n.childNodes)}function ge(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function Se(n,e){n.value=e==null?"":e}function Ya(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function le(n,e,t){n.classList[t?"add":"remove"](e)}function Mp(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const oo=new Map;let ro=0;function n_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function i_(n,e){const t={stylesheet:xg(e),rules:{}};return oo.set(n,t),t}function nl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{
|
||||
`;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}}
|
||||
`}const f=u+`100% {${o(t,1-t)}}
|
||||
}`,c=`__svelte_${n_(f)}_${r}`,d=$p(n),{stylesheet:p,rules:g}=oo.get(d)||i_(d,n);g[c]||(g[c]=!0,p.insertRule(`@keyframes ${c} ${f}`,p.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,ro+=1,c}function il(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(", "),ro-=s,ro||s_())}function s_(){na(()=>{ro||(oo.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),oo.clear())})}function l_(n,e,t,i){if(!e)return ae;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return ae;const{delay:l=0,duration:o=300,easing:r=hl,start:a=Eo()+l,end:u=a+o,tick:f=ae,css:c}=t(n,{from:e,to:s},i);let d=!0,p=!1,g;function v(){c&&(g=nl(n,0,1,o,l,r,c)),l||(p=!0)}function b(){c&&il(n,g),d=!1}return Ao(y=>{if(!p&&y>=a&&(p=!0),p&&y>=u&&(f(1,0),b()),!d)return!1;if(p){const C=y-a,M=0+1*r(C/o);f(M,1-M)}return!0}),v(),f(0,1),b}function o_(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,Tp(n,s)}}function Tp(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 sl;function Ws(n){sl=n}function Po(){if(!sl)throw new Error("Function called outside component initialization");return sl}function Bn(n){Po().$$.on_mount.push(n)}function r_(n){Po().$$.after_update.push(n)}function a_(n){Po().$$.on_destroy.push(n)}function rn(){const n=Po();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Mp(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function ut(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const qs=[],me=[],eo=[],Sr=[],Dp=Promise.resolve();let $r=!1;function Op(){$r||($r=!0,Dp.then(Ep))}function oi(){return Op(),Dp}function Dt(n){eo.push(n)}function Fe(n){Sr.push(n)}const Ko=new Set;let Pl=0;function Ep(){const n=sl;do{for(;Pl<qs.length;){const e=qs[Pl];Pl++,Ws(e),u_(e.$$)}for(Ws(null),qs.length=0,Pl=0;me.length;)me.pop()();for(let e=0;e<eo.length;e+=1){const t=eo[e];Ko.has(t)||(Ko.add(t),t())}eo.length=0}while(qs.length);for(;Sr.length;)Sr.pop()();$r=!1,Ko.clear(),Ws(n)}function u_(n){if(n.fragment!==null){n.update(),xe(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Dt)}}let Ds;function ia(){return Ds||(Ds=Promise.resolve(),Ds.then(()=>{Ds=null})),Ds}function Gi(n,e,t){n.dispatchEvent(Mp(`${e?"intro":"outro"}${t}`))}const to=new Set;let ti;function De(){ti={r:0,c:[],p:ti}}function Oe(){ti.r||xe(ti.c),ti=ti.p}function A(n,e){n&&n.i&&(to.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(to.has(n))return;to.add(n),ti.c.push(()=>{to.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const sa={duration:0};function Ap(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&il(n,l)}function u(){const{delay:c=0,duration:d=300,easing:p=hl,tick:g=ae,css:v}=i||sa;v&&(l=nl(n,0,1,d,c,p,v,r++)),g(0,1);const b=Eo()+c,y=b+d;o&&o.abort(),s=!0,Dt(()=>Gi(n,!0,"start")),o=Ao(C=>{if(s){if(C>=y)return g(1,0),Gi(n,!0,"end"),a(),s=!1;if(C>=b){const M=p((C-b)/d);g(M,1-M)}}return s})}let f=!1;return{start(){f||(f=!0,il(n),zn(i)?(i=i(),ia().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Pp(n,e,t){let i=e(n,t),s=!0,l;const o=ti;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=hl,tick:c=ae,css:d}=i||sa;d&&(l=nl(n,1,0,u,a,f,d));const p=Eo()+a,g=p+u;Dt(()=>Gi(n,!1,"start")),Ao(v=>{if(s){if(v>=g)return c(0,1),Gi(n,!1,"end"),--o.r||xe(o.c),!1;if(v>=p){const b=f((v-p)/u);c(1-b,b)}}return s})}return zn(i)?ia().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&il(n,l),s=!1)}}}function ot(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&il(n,a)}function f(d,p){const g=d.b-l;return p*=Math.abs(g),{a:l,b:d.b,d:g,duration:p,start:d.start,end:d.start+p,group:d.group}}function c(d){const{delay:p=0,duration:g=300,easing:v=hl,tick:b=ae,css:y}=s||sa,C={start:Eo()+p,b:d};d||(C.group=ti,ti.r+=1),o||r?r=C:(y&&(u(),a=nl(n,l,d,g,p,v,y)),d&&b(0,1),o=f(C,g),Dt(()=>Gi(n,d,"start")),Ao(M=>{if(r&&M>r.start&&(o=f(r,g),r=null,Gi(n,o.b,"start"),y&&(u(),a=nl(n,l,o.b,o.duration,0,v,s.css))),o){if(M>=o.end)b(l=o.b,1-l),Gi(n,o.b,"end"),r||(o.b?u():--o.group.r||xe(o.group.c)),o=null;else if(M>=o.start){const S=M-o.start;l=o.a+o.d*v(S/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){zn(s)?ia().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function Jn(n,e){n.d(1),e.delete(n.key)}function Gt(n,e){P(n,1,1,()=>{e.delete(n.key)})}function f_(n,e){n.f(),Gt(n,e)}function kt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,p=
Line truncated
|
||||
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=T(),i=_("div"),h(e,"class","block txt-center m-b-lg"),h(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function D0(n){let e,t,i,s,l,o,r,a,u=!n[0]&&Su();const f=n[2].default,c=$n(f,n,n[1],null);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),u&&u.c(),l=T(),c&&c.c(),o=T(),r=_("div"),h(t,"class","flex-fill"),h(s,"class","wrapper wrapper-sm m-b-xl svelte-1wbawr2"),h(r,"class","flex-fill"),h(e,"class","page-wrapper full-page-panel svelte-1wbawr2")},m(d,p){w(d,e,p),m(e,t),m(e,i),m(e,s),u&&u.m(s,null),m(s,l),c&&c.m(s,null),m(e,o),m(e,r),a=!0},p(d,[p]){d[0]?u&&(u.d(1),u=null):u||(u=Su(),u.c(),u.m(s,l)),c&&c.p&&(!a||p&2)&&Mn(c,f,d,d[1],a?Cn(f,d[1],p,null):Tn(d[1]),null)},i(d){a||(A(c,d),a=!0)},o(d){P(c,d),a=!1},d(d){d&&k(e),u&&u.d(),c&&c.d(d)}}}function O0(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(1,s=o.$$scope)},[l,s,i]}class Um extends Ae{constructor(e){super(),Ee(this,e,O0,D0,Te,{nobranding:0})}}function $u(n,e,t){const i=n.slice();return i[11]=e[t],i}const E0=n=>({}),Cu=n=>({uniqueId:n[3]});function A0(n){let e=(n[11]||po)+"",t;return{c(){t=R(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||po)+"")&&ge(t,e)},d(i){i&&k(t)}}}function P0(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||po)+"",t;return{c(){t=R(e)},m(l,o){w(l,t,o)},p(l,o){var r,a;o&4&&e!==(e=(((r=l[11])==null?void 0:r.message)||((a=l[11])==null?void 0:a.code)||po)+"")&&ge(t,e)},d(l){l&&k(t)}}}function Mu(n){let e,t;function i(o,r){return typeof o[11]=="object"?P0:A0}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=T(),h(e,"class","help-block help-block-error")},m(o,r){w(o,e,r),l.m(e,null),m(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&&k(e),l.d()}}}function L0(n){let e,t,i,s,l;const o=n[7].default,r=$n(o,n,n[6],Cu);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Mu($u(n,a,f));return{c(){e=_("div"),r&&r.c(),t=T();for(let f=0;f<u.length;f+=1)u[f].c();h(e,"class",n[0]),le(e,"error",n[2].length)},m(f,c){w(f,e,c),r&&r.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=Q(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&Mn(r,o,f,f[6],i?Cn(o,f[6],c,E0):Tn(f[6]),Cu),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const p=$u(f,a,d);u[d]?u[d].p(p,c):(u[d]=Mu(p),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&h(e,"class",f[0]),c&5&&le(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){P(r,f),i=!1},d(f){f&&k(e),r&&r.d(f),Rn(u,f),n[9](null),s=!1,l()}}}const po="Invalid value";function I0(n,e,t){let i;It(n,ts,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+Y.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Bm(r)}Bn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(g){ut.call(this,n,g)}function p(g){me[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,r=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=Y.toArray(Y.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,p]}class Pe extends Ae{constructor(e){super(),Ee(this,e,I0,L0,Te,{name:4,class:0})}}function F0(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Email"),s=T(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0]),l.focus(),r||(a=Q(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]&&Se(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function N0(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("Password"),s=T(),l=_("input"),r=T(),a=_("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(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Se(l,n[1]),w(c,r,d),w(c,a,d),u||(f=Q(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&h(e,"for",i),d&512&&o!==(o=c[9])&&h(l,"id",o),d&2&&l.value!==c[1]&&Se(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function R0(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Password confirm"),s=T(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[2]),r||(a=Q(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]&&Se(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function H0(n){let e,t,i,s,l,o,r,a,u,f,c,d,p;return s=new Pe({props:{class:"form-field required",name:"email",$$slots:{default:[F0,({uniqueId:g})=>({9:gLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),le(f,"btn-disabled",n[3]),le(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(g,v){w(g,e,v),m(e,t),m(e,i),V(s,e,null),m(e,l),V(o,e,null),m(e,r),V(a,e,null),m(e,u),m(e,f),c=!0,d||(p=Q(e,"submit",Wt(n[4])),d=!0)},p(g,[v]){const b={};v&1537&&(b.$$scope={dirty:v,ctx:g}),s.$set(b);const y={};v&1538&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const C={};v&1540&&(C.$$scope={dirty:v,ctx:g}),a.$set(C),v&8&&le(f,"btn-disabled",g[3]),v&8&&le(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),c=!1},d(g){g&&k(e),z(s),z(o),z(a),d=!1,p()}}}function j0(n,e,t){const i=rn();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ke.Admins.create({email:s,password:l,passwordConfirm:o}),await ke.Admins.authViaEmail(s,l),i("submit")}catch(d){ke.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class q0 extends Ae{constructor(e){super(),Ee(this,e,j0,H0,Te,{})}}function Tu(n){let e,t;return e=new Um({props:{$$slots:{default:[V0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(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){z(e,i)}}}function V0(n){let e,t;return e=new q0({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:ae,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function z0(n){let e,t,i=n[0]&&Tu(n);return{c(){i&&i.c(),e=lt()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Tu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(De(),P(i,1,1,()=>{i=null}),Oe())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function B0(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ke.logout(!1),t(0,i=!0);return}ke.AuthStore.isValid?ks("/collections"):ke.logout()}return[i,async()=>{t(0,i=!1),await oi(),window.location.search=""}]}class U0 extends Ae{constructor(e){super(),Ee(this,e,B0,z0,Te,{})}}const Jt=Qn(""),mo=Qn("");function Ho(n){const e=n-1;return e*e*e+1}function go(n,{delay:e=0,duration:t=400,easing:i=hl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function Hn(n,{delay:e=0,duration:t=400,easing:i=Ho,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px);
|
||||
opacity: ${a-f*d}`}}function xt(n,{delay:e=0,duration:t=400,easing:i=Ho}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:p=>`overflow: hidden;opacity: ${Math.min(p*20,1)*l};height: ${p*o}px;padding-top: ${p*r}px;padding-bottom: ${p*a}px;margin-top: ${p*u}px;margin-bottom: ${p*f}px;border-top-width: ${p*c}px;border-bottom-width: ${p*d}px;`}}function jn(n,{delay:e=0,duration:t=400,easing:i=Ho,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
|
||||
transform: ${a} scale(${1-u*d});
|
||||
opacity: ${r-f*d}
|
||||
`}}function W0(n){let e,t,i,s;return{c(){e=_("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),Se(e,n[7]),i||(s=Q(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]&&Se(e,l[7])},i:ae,o:ae,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Y0(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={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=new o(r(n)),me.push(()=>Le(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=lt()},m(a,u){e&&V(e,a,u),w(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],Fe(()=>t=!1)),o!==(o=a[4])){if(e){De();const c=e;P(c.$$.fragment,1,0,()=>{z(c,1)}),Oe()}o?(e=new o(r(a)),me.push(()=>Le(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),A(e.$$.fragment,1),V(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&&k(i),e&&z(e,a)}}}function Du(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Ou();return{c(){r&&r.c(),e=T(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',h(t,"type","button"),h(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(o=Q(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Ou(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(De(),P(r,1,1,()=>{r=null}),Oe())},i(a){s||(A(r),Dt(()=>{i||(i=ot(t,Hn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),i||(i=ot(t,Hn,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,o()}}}function Ou(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Dt(()=>{t||(t=ot(e,Hn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=ot(e,Hn,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function K0(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[Y0,W0],p=[];function g(b,y){return b[4]&&!b[5]?0:1}o=g(n),r=p[o]=d[o](n);let v=(n[0].length||n[7].length)&&Du(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=T(),r.c(),a=T(),v&&v.c(),h(s,"class","ri-search-line"),h(i,"for",n[8]),h(i,"class","m-l-10 txt-xl"),h(t,"class","searchbar"),h(e,"class","searchbar-wrapper")},m(b,y){w(b,e,y),m(e,t),m(t,i),m(i,s),m(t,l),p[o].m(t,null),m(t,a),v&&v.m(t,null),u=!0,f||(c=[Q(t,"submit",Wt(n[10])),Q(e,"click",Gn(n[11]))],f=!0)},p(b,[y]){let C=o;o=g(b),o===C?p[o].p(b,y):(De(),P(p[C],1,1,()=>{p[C]=null}),Oe(),r=p[o],r?r.p(b,y):(r=p[o]=d[o](b),r.c()),A(r,1),r.m(t,a)),b[0].length||b[7].length?v?(v.p(b,y),y&129&&A(v,1)):(v=Du(b),v.c(),A(v,1),v.m(t,null)):v&&(De(),P(v,1,1,()=>{v=null}),Oe())},i(b){u||(A(r),A(v),u=!0)},o(b){P(r),P(v),u=!1},d(b){b&&k(e),p[o].d(),v&&v.d(),f=!1,xe(c)}}}function Z0(n,e,t){const i=rn(),s="search_"+Y.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new On}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function p($=!0){t(7,d=""),$&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function v(){u||f||(t(5,f=!0),t(4,u=(await Yi(()=>import("./FilterAutocompleteInput.e329ae0a.js"),[])).default),t(5,f=!1))}Bn(()=>{v()});function b($){ut.call(this,n,$)}function y($){d=$,t(7,d),t(0,l)}function C($){me[$?"unshift":"push"](()=>{c=$,t(6,c)})}function M(){d=this.value,t(7,d),t(0,l)}const S=()=>{p(!1),g()};return n.$$set=$=>{"value"in $&&t(0,l=$.value),"placeholder"in $&&t(1,o=$.placeholder),"autocompleteCollection"in $&&t(2,r=$.autocompleteCollection),"extraAutocompleteKeys"in $&&t(3,a=$.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,p,g,b,y,C,M,S]}class jo extends Ae{constructor(e){super(),Ee(this,e,Z0,K0,Te,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Nr,ji;const Rr="app-tooltip";function Eu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Oi(){return ji=ji||document.querySelector("."+Rr),ji||(ji=document.createElement("div"),ji.classList.add(Rr),document.body.appendChild(ji)),ji}function Wm(n,e){let t=Oi();if(!t.classList.contains("active")||!(e!=null&&e.text)){Hr();return}t.textContent=e.text,t.className=Rr+" active",e.class&&t.classList.add(e.class),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.posi
Line truncated
|
||||
<span class="txt">method</span>`,h(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function l1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="url",h(t,"class",Y.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function o1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="referer",h(t,"class",Y.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function r1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="status",h(t,"class",Y.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function a1(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function Pu(n){let e;function t(l,o){return l[6]?f1:u1}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function u1(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Lu(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No logs found.",s=T(),o&&o.c(),l=T(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),o&&o.m(t,null),m(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Lu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function f1(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function Lu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[18]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function Iu(n){let e;return{c(){e=_("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Fu(n,e){var re,de,be;let t,i,s,l=((re=e[21].method)==null?void 0:re.toUpperCase())+"",o,r,a,u,f,c=e[21].url+"",d,p,g,v,b,y,C=(e[21].referer||"N/A")+"",M,S,$,D,O,E=e[21].status+"",I,L,N,H,te,oe,q,K,W,X,ne=(((de=e[21].meta)==null?void 0:de.errorMessage)||((be=e[21].meta)==null?void 0:be.errorData))&&Iu();H=new _i({props:{date:e[21].created}});function fe(){return e[16](e[21])}function Me(...Z){return e[17](e[21],...Z)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),o=R(l),a=T(),u=_("td"),f=_("span"),d=R(c),g=T(),ne&&ne.c(),v=T(),b=_("td"),y=_("span"),M=R(C),$=T(),D=_("td"),O=_("span"),I=R(E),L=T(),N=_("td"),B(H.$$.fragment),te=T(),oe=_("td"),oe.innerHTML='<i class="ri-arrow-right-line"></i>',q=T(),h(s,"class",r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",p=e[21].url),h(u,"class","col-type-text col-field-url"),h(y,"class","txt txt-ellipsis"),h(y,"title",S=e[21].referer),le(y,"txt-hint",!e[21].referer),h(b,"class","col-type-text col-field-referer"),h(O,"class","label"),le(O,"label-danger",e[21].status>=400),h(D,"class","col-type-number col-field-status"),h(N,"class","col-type-date col-field-created"),h(oe,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Z,we){w(Z,t,we),m(t,i),m(i,s),m(s,o),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),ne&&ne.m(u,null),m(t,v),m(t,b),m(b,y),m(y,M),m(t,$),m(t,D),m(D,O),m(O,I),m(t,L),m(t,N),V(H,N,null),m(t,te),m(t,oe),m(t,q),K=!0,W||(X=[Q(t,"click",fe),Q(t,"keydown",Me)],W=!0)},p(Z,we){var G,ve,Ne;e=Z,(!K||we&8)&&l!==(l=((G=e[21].method)==null?void 0:G.toUpperCase())+"")&&ge(o,l),(!K||we&8&&r!==(r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&h(s,"class",r),(!K||we&8)&&c!==(c=e[21].url+"")&&ge(d,c),(!K||we&8&&p!==(p=e[21].url))&&h(f,"title",p),((ve=e[21].meta)==null?void 0:ve.errorMessage)||((Ne=e[21].meta)==null?void 0:Ne.errorData)?ne||(ne=Iu(),ne.c(),ne.m(u,null)):ne&&(ne.d(1),ne=null),(!K||we&8)&&C!==(C=(e[21].referer||"N/A")+"")&&ge(M,C),(!K||we&8&&S!==(S=e[21].referer))&&h(y,"title",S),we&8&&le(y,"txt-hint",!e[21].referer),(!K||we&8)&&E!==(E=e[21].status+"")&&ge(I,E),we&8&&le(O,"label-danger",e[21].status>=400);const ee={};we&8&&(ee.date=e[21].created),H.$set(ee)},i(Z){K||(A(H.$$.fragment,Z),K=!0)},o(Z){P(H.$$.fragment,Z),K=!1},d(Z){Z&&k(t),ne&&ne.d(),z(H),W=!1,xe(X)}}}function Nu(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),o=R(n[4]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a&8&&i!==(i=r[3].length+"")&&ge(s,i),a&16&&ge(o,r[4])},d(r){r&&k(e)}}}function Ru(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=R("Load more ("),o=R(l),r=R(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),le(t,"btn-loading",n[6]),le(t,"btn-disabled",n[6]),h(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=Q(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&ge(o,l),c&64&&le(t,"btn-loading",f[6]),c&64&&le(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function c1(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M,S,$,D,O=[],E=new Map,I,L,N,H;function te(G){n[11](G)}let oe={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[s1]},$$scope:{ctx:n}};n[1]!==void 0&&(oe.sort=n[1]),l=new en({props:oe}),me.push(()=>Le(l,"sort",te));function q(G){n[12](G)}let K={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[l1]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),a=new en({props:K}),me.push(()=>Le(a,"sort",q));function W(G){n[13](G)}let X={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[o1]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),c=new en({props:X}),me.push(()=>Le(c,"sort",W));function ne(G){n[14](G)}let fe={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[r1]},$$scope:{ctx:n}};n[1]!==void 0&&(fe.sort=n[1]),g=new en({props:fe}),me.push(()=>Le(g,"sort",ne));function Me(G){n[15](G)}let re={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[a1]},$$scope:{ctx:n}};n[1]!==void 0&&(re.sort=n[1]),y=new en({props:re}),me.push(()=>Le(y,"sort",Me));let de=n[3];const be=G=>G[21].id;for(let G=0;G<de.length;G+=1){let ve=Au(n,de,G),Ne=be(ve);E.set(Ne,O[G]=Fu(Ne,ve))}let Z=null;de.length
Line truncated
|
||||
* Chart.js v3.8.2
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/const Ym=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Km(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,Ym.call(window,()=>{s=!1,n.apply(e,l)}))}}function p1(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const m1=n=>n==="start"?"left":n==="end"?"right":"center",Hu=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function fi(){}const g1=function(){let n=0;return function(){return n++}}();function Tt(n){return n===null||typeof n>"u"}function Rt(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 ft(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Ut=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function Pn(n,e){return Ut(n)?n:e}function gt(n,e){return typeof n>"u"?e:n}const _1=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,Zm=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Vt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function Mt(n,e,t,i){let s,l,o;if(Rt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(ft(n))for(o=Object.keys(n),l=o.length,s=0;s<l;s++)e.call(t,n[o[s]],o[s])}function _o(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function bo(n){if(Rt(n))return n.map(bo);if(ft(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=bo(n[t[s]]);return e}return n}function Gm(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function b1(n,e,t,i){if(!Gm(n))return;const s=e[n],l=t[n];ft(s)&&ft(l)?ll(s,l,i):e[n]=bo(l)}function ll(n,e,t){const i=Rt(e)?e:[e],s=i.length;if(!ft(n))return n;t=t||{};const l=t.merger||b1;for(let o=0;o<s;++o){if(e=i[o],!ft(e))continue;const r=Object.keys(e);for(let a=0,u=r.length;a<u;++a)l(r[a],n,e,t)}return n}function Js(n,e){return ll(n,e,{merger:v1})}function v1(n,e,t){if(!Gm(n))return;const i=e[n],s=t[n];ft(i)&&ft(s)?Js(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=bo(s))}const y1="",k1=".";function ju(n,e){const t=n.indexOf(k1,e);return t===-1?n.length:t}function Ai(n,e){if(e===y1)return n;let t=0,i=ju(e,t);for(;n&&i>t;)n=n[e.slice(t,i)],t=i+1,i=ju(e,t);return n}function _a(n){return n.charAt(0).toUpperCase()+n.slice(1)}const qn=n=>typeof n<"u",Pi=n=>typeof n=="function",qu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function w1(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Bt=Math.PI,Et=2*Bt,S1=Et+Bt,vo=Number.POSITIVE_INFINITY,$1=Bt/180,zt=Bt/2,Ls=Bt/4,Vu=Bt*2/3,Fn=Math.log10,ni=Math.sign;function zu(n){const e=Math.round(n);n=Xs(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Fn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function C1(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function ol(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Xs(n,e,t){return Math.abs(n-e)<t}function M1(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function Jm(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Kn(n){return n*(Bt/180)}function ba(n){return n*(180/Bt)}function Bu(n){if(!Ut(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function Xm(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Bt&&(l+=Et),{angle:l,distance:s}}function jr(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function T1(n,e){return(n-e+S1)%Et-Bt}function kn(n){return(n%Et+Et)%Et}function rl(n,e,t,i){const s=kn(n),l=kn(e),o=kn(t),r=kn(l-s),a=kn(o-s),u=kn(s-l),f=kn(s-o);return s===l||s===o||i&&l===o||r>a&&u<f}function ln(n,e,t){return Math.max(e,Math.min(t,n))}function D1(n){return ln(n,-32768,32767)}function al(n,e,t,i=1e-6){return n>=Math.min(e,t)-i&&n<=Math.max(e,t)+i}const Hl=n=>n===0||n===1,Uu=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*Et/t)),Wu=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*Et/t)+1,Qs={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*zt)+1,easeOutSine:n=>Math.sin(n*zt),easeInOutSine:n=>-.5*(Math.cos(Bt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(Line truncated
|
||||
* @kurkle/color v0.2.1
|
||||
* https://github.com/kurkle/color#readme
|
||||
* (c) 2022 Jukka Kurkela
|
||||
* Released under the MIT License
|
||||
*/function vl(n){return n+.5|0}const Ti=(n,e,t)=>Math.max(Math.min(n,t),e);function Bs(n){return Ti(vl(n*2.55),0,255)}function Ei(n){return Ti(vl(n*255),0,255)}function hi(n){return Ti(vl(n/2.55)/100,0,1)}function Yu(n){return Ti(vl(n*100),0,100)}const An={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},qr=[..."0123456789ABCDEF"],O1=n=>qr[n&15],E1=n=>qr[(n&240)>>4]+qr[n&15],jl=n=>(n&240)>>4===(n&15),A1=n=>jl(n.r)&&jl(n.g)&&jl(n.b)&&jl(n.a);function P1(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&An[n[1]]*17,g:255&An[n[2]]*17,b:255&An[n[3]]*17,a:e===5?An[n[4]]*17:255}:(e===7||e===9)&&(t={r:An[n[1]]<<4|An[n[2]],g:An[n[3]]<<4|An[n[4]],b:An[n[5]]<<4|An[n[6]],a:e===9?An[n[7]]<<4|An[n[8]]:255})),t}const L1=(n,e)=>n<255?e(n):"";function I1(n){var e=A1(n)?O1:E1;return n?"#"+e(n.r)+e(n.g)+e(n.b)+L1(n.a,e):void 0}const F1=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Qm(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 N1(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 R1(n,e,t){const i=Qm(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 H1(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function va(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),o=Math.min(t,i,s),r=(l+o)/2;let a,u,f;return l!==o&&(f=l-o,u=r>.5?f/(2-l-o):f/(l+o),a=H1(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function ya(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ei)}function ka(n,e,t){return ya(Qm,n,e,t)}function j1(n,e,t){return ya(R1,n,e,t)}function q1(n,e,t){return ya(N1,n,e,t)}function xm(n){return(n%360+360)%360}function V1(n){const e=F1.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Bs(+e[5]):Ei(+e[5]));const s=xm(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=j1(s,l,o):e[1]==="hsv"?i=q1(s,l,o):i=ka(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function z1(n,e){var t=va(n);t[0]=xm(t[0]+e),t=ka(t),n.r=t[0],n.g=t[1],n.b=t[2]}function B1(n){if(!n)return;const e=va(n),t=e[0],i=Yu(e[1]),s=Yu(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${hi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Ku={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"},Zu={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 U1(){const n={},e=Object.keys(Zu),t=Object.keys(Ku);let i,s,l,o,r;for(i=0;i<e.length;i++){for(o=r=e[i],s=0;s<t.length;s++)l=t[s]Line truncated
|
||||
* Chart.js v3.8.2
|
||||
* https://www.chartjs.org
|
||||
* (c) 2022 Chart.js Contributors
|
||||
* Released under the MIT License
|
||||
*/class Gv{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ym.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 ci=new Gv;const af="transparent",Jv={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Ju(n||af),s=i.valid&&Ju(e||af);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class Xv{constructor(e,t,i,s){const l=t[i];s=zl([e.to,s,l,e.from]);const o=zl([e.from,l,s]);this._active=!0,this._fn=e.fn||Jv[e.type||typeof o],this._easing=Qs[e.easing]||Qs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=zl([e.to,t,s,e.from]),this._from=zl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?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;s<i.length;s++)i[s][t]()}}const Qv=["x","y","borderWidth","radius","tension"],xv=["color","borderColor","backgroundColor"];_t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const ey=Object.keys(_t.animation);_t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});_t.set("animations",{colors:{type:"color",properties:xv},numbers:{type:"number",properties:Qv}});_t.describe("animations",{_fallback:"animation"});_t.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 gg{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!ft(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!ft(s))return;const l={};for(const o of ey)l[o]=s[o];(Rt(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=ny(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&ty(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new Xv(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return ci.add(this._chart,i),!0}}function ty(n,e){const t=[]Line truncated
|
||||
`)>-1?n.split(`
|
||||
`):n}function bw(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 jf(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=Sn(e.bodyFont),u=Sn(e.titleFont),f=Sn(e.footerFont),c=l.length,d=s.length,p=i.length,g=Vn(e.padding);let v=g.height,b=0,y=i.reduce((S,$)=>S+$.before.length+$.lines.length+$.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(v+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const S=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;v+=p*S+(y-p)*a.lineHeight+(y-1)*e.bodySpacing}d&&(v+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let C=0;const M=function(S){b=Math.max(b,t.measureText(S).width+C)};return t.save(),t.font=u.string,Mt(n.title,M),t.font=a.string,Mt(n.beforeBody.concat(n.afterBody),M),C=e.displayColors?o+2+e.boxPadding:0,Mt(i,S=>{Mt(S.before,M),Mt(S.lines,M),Mt(S.after,M)}),C=0,t.font=f.string,Mt(n.footer,M),t.restore(),b+=g.width,{width:b,height:v}}function vw(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function yw(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 kw(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"),yw(u,n,e,t)&&(u="center"),u}function qf(n,e,t){const i=t.yAlign||e.yAlign||vw(n,t);return{xAlign:t.xAlign||e.xAlign||kw(n,e,t,i),yAlign:i}}function ww(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Sw(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Vf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:p}=hs(o);let g=ww(e,r);const v=Sw(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,p)+s),{x:ln(g,0,i.width-e.width),y:ln(v,0,i.height-e.height)}}function Gl(n,e,t){const i=Vn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function zf(n){return xn([],di(n))}function $w(n,e,t){return Ii(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Bf(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class Gr extends vi{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 gg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=$w(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=xn(r,di(s)),r=xn(r,di(l)),r=xn(r,di(o)),r}getBeforeBody(e,t){return zf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return Mt(e,l=>{const o={before:[],lines:[],after:[]},r=Bf(i,l);xn(o.before,di(r.beforeLabel.call(this,l))),xn(o.lines,r.label.call(this,l)),xn(o.after,di(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return zf(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=xn(r,di(s)),r=xn(r,di(l)),r=xn(r,di(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;a<u;++a)r.push(bw(this.chart,t[a]));return e.filter&&(r=r.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),Mt(r,f=>{const c=Bf(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;l
Line truncated
|
||||
* chartjs-adapter-luxon v1.1.0
|
||||
* https://www.chartjs.org
|
||||
* (c) 2021 chartjs-adapter-luxon Contributors
|
||||
* Released under the MIT license
|
||||
*/const Ww={datetime:Ge.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ge.TIME_WITH_SECONDS,minute:Ge.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};yg._date.override({_id:"luxon",_create:function(n){return Ge.fromMillis(n,this.options)},formats:function(){return Ww},parse:function(n,e){const t=this.options;if(n===null||typeof n>"u")return null;const i=typeof n;return i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Ge.fromFormat(n,e,t):n=Ge.fromISO(n,t):n instanceof Date?n=Ge.fromJSDate(n,t):i==="object"&&!(n instanceof Ge)&&(n=Ge.fromObject(n)),n.isValid?n.valueOf():null},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e,this.options):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 Xf(n){let e,t,i;return{c(){e=_("div"),h(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(Dt(()=>{t||(t=ot(e,jn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){t||(t=ot(e,jn,{duration:150},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function Yw(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=R(n[1]),t=T(),s=R(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&ge(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&ge(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function Kw(n){let e;return{c(){e=R("Loading...")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function Zw(n){let e,t,i,s,l,o,r=n[2]&&Xf();function a(c,d){return c[2]?Kw:Yw}let u=a(n),f=u(n);return{c(){e=_("div"),r&&r.c(),t=T(),i=_("canvas"),s=T(),l=_("div"),f.c(),h(i,"class","chart-canvas svelte-vh4sl8"),Ya(i,"height","250px"),Ya(i,"width","100%"),h(e,"class","chart-wrapper svelte-vh4sl8"),le(e,"loading",n[2]),h(l,"class","txt-hint m-t-xs txt-right")},m(c,d){w(c,e,d),r&&r.m(e,null),m(e,t),m(e,i),n[8](i),w(c,s,d),w(c,l,d),f.m(l,null),o=!0},p(c,[d]){c[2]?r?d&4&&A(r,1):(r=Xf(),r.c(),A(r,1),r.m(e,t)):r&&(De(),P(r,1,1,()=>{r=null}),Oe()),d&4&&le(e,"loading",c[2]),u===(u=a(c))&&f?f.p(c,d):(f.d(1),f=u(c),f&&(f.c(),f.m(l,null)))},i(c){o||(A(r),o=!0)},o(c){P(r),o=!1},d(c){c&&k(e),r&&r.d(),n[8](null),c&&k(s),c&&k(l),f.d()}}}function Gw(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),ke.Logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(p=>{c();for(let g of p)r.push({x:Y.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(p=>{p!=null&&p.isAbort||(c(),console.warn(p),ke.errorResponseHandler(p,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Bn(()=>(To.register(Fi,Bo,wl,Ha,$l,_w,Cw),t(6,o=new To(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:p=>p.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:p=>p.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(p){me[p?"unshift":"push"](()=>{l=p,t(0,l)})}return n.$$set=p=>{"filter"in p&&t(3,i=p.filter),"presets"in p&&t(4,s=p.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class Jw extends Ae{constructor(e){super(),Ee(this,e,Gw,Zw,Te,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Vg={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
||||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||||
*
|
||||
* @license MIT <https://opensource.org/licenses/MIT>
|
||||
* @author Lea Verou <https://lea.verou.me>
|
||||
* @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 C(M){return M instanceof a?new a(M.type,C(M.content),M.alias):Array.isArray(M)?M.map(C):M.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++l}),C.__id},clone:function C(M,S){S=S||{};var $,D;switch(r.util.type(M)){case"Object":if(D=r.util.objId(M),S[D])return S[D];$={},S[D]=$;for(var O in M)M.hasOwnProperty(O)&&($[O]=C(M[O],S));return $;case"Array":return D=r.util.objId(M),S[D]?S[D]:($=[],S[D]=$,M.forEach(function(E,I){$[I]=C(E,S)}),$);default:return M}},getLanguage:function(C){for(;C;){var M=s.exec(C.className);if(M)return M[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,M){C.className=C.className.replace(RegExp(s,"gi"),""),C.classList.add("language-"+M)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch($){var C=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec($.stack)||[])[1];if(C){var M=document.getElementsByTagName("script");for(var S in M)if(M[S].src==C)return M[S]}return null}},isActive:function(C,M,S){for(var $="no-"+M;C;){var D=C.classList;if(D.contains(M))return!0;if(D.contains($))return!1;C=C.parentElement}return!!S}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(C,M){var S=r.util.clone(r.languages[C]);for(var $ in M)S[$]=M[$];return S},insertBefore:function(C,M,S,$){$=$||r.languages;var D=$[C],O={};for(var E in D)if(D.hasOwnProperty(E)){if(E==M)for(var I in S)S.hasOwnProperty(I)&&(O[I]=S[I]);S.hasOwnProperty(E)||(O[E]=D[E])}var L=$[C];return $[C]=O,r.languages.DFS(r.languages,function(N,H){H===L&&N!=C&&(this[N]=O)}),O},DFS:function C(M,S,$,D){D=D||{};var O=r.util.objId;for(var E in M)if(M.hasOwnProperty(E)){S.call(M,E,M[E],$||E);var I=M[E],L=r.util.type(I);L==="Object"&&!D[O(I)]?(D[O(I)]=!0,C(I,S,null,D)):L==="Array"&&!D[O(I)]&&(D[O(I)]=!0,C(I,S,E,D))}}},plugins:{},highlightAll:function(C,M){r.highlightAllUnder(document,C,M)},highlightAllUnder:function(C,M,S){var $={callback:S,container:C,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",$),$.elements=Array.prototype.slice.apply($.container.querySelectorAll($.selector)),r.hooks.run("before-all-elements-highlight",$);for(var D=0,O;O=$.elements[D++];)r.highlightElement(O,M===!0,$.callback)},highlightElement:function(C,M,S){var $=r.util.getLanguage(C),D=r.languages[$];r.util.setLanguage(C,$);var O=C.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,$);var E=C.textContent,I={element:C,language:$,grammar:D,code:E};function L(H){I.highlightedCode=H,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),S&&S.call(I.element)}if(r.hooks.run("before-sanity-check",I),O=I.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),S&&S.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){L(r.util.encode(I.code));return}if(M&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(H){L(H.data)},N.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else L(r.highlight(I.code,I.grammar,I.language))},highlight:function(C,M,S){var $={code:C,grammar:M,language:S};if(r.hooks.run("before-tokenize",$),!$.grammar)throw new Error('The language "'+$.language+'" has no grammar.');return $.tokens=r.tokenize($.code,$.grammar),r.hooks.run("after-tokenize",$),a.stringify(r.util.encode($.tokens),$.language)},tokenize:function(C,M){var S=M.rest;if(S){for(var $ in S)M[$]=S[$];delete M.rest}var D=new c;return d(D,D.head,C),f(C,D,M,D.head,0),g(D)},hooks:{all:{},add:function(C,M){var S=r.hooks.all;S[C]=S[C]||[],S[C].push(M)},run:function(C,M){var S=r.hooks.all[C];if(!(!S||!S.length))for(var $=0,D;D=S[$++];)D(M)}},Token:a};i.Prism=r;function a(C,M,S,$){this.type=C,this.content=M,this.alias=S,this.length=($||"").length|0}a.stringify=function C(M,S){if(typeof M=="string")return M;if(Array.isArray(M)){var $="";return M.forEach(function(L){$+=C(L,S)}),$}var D={type:M.type,content:C(M.content,S),tag:"span",classes:["token",M.type],attributes:{},language:S},O=M.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(D.classes,O):D.classes.push(O)),r.hooks.run("wrap",D);var E="";for(var I in D.attributes)E+=" "+I+'="'+(D.attributes[I]||"").replace(/"/g,""")+'"';return"<"+D.tag+' class="'+D.classes.join(" ")+'"'+E+">"+D.content+"</"+D.tag+">"};function u(C,M,S,$){C.lastIndex=M;var D=C.exec(S);if(D&&$&&D[1]){var O=D[1].length;D.index+=O,D[0]=D[0].slice(O)}return D}funLine truncated
|
||||
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(I+1))}y.textContent=D,t.highlightElement(y)},function(D){b.setAttribute(r,f),y.textContent=D})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),C=0,M;M=y[C++];)t.highlightElement(M)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Vg);const js=Vg.exports;var Xw={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(l,o){for(var r in o)o.hasOwnProperty(r)&&(l[r]=o[r]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(o,r){return r.toUpperCase()})}function s(l){for(var o=0,r=0;r<l.length;++r)l.charCodeAt(r)==" ".charCodeAt(0)&&(o+=3);return l.length+o}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,o){o=e(this.defaults,o);for(var r in o){var a=i(r);r!=="normalize"&&a!=="setDefaults"&&o[r]&&this[a]&&(l=this[a].call(this,l,o[r]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,o){return o=o|0||4,l.replace(/\t/g,new Array(++o).join(" "))},spacesToTabs:function(l,o){return o=o|0||4,l.replace(RegExp(" {"+o+"}","g")," ")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var o=l.match(/^[^\S\n\r]*(?=\S)/gm);return!o||!o[0].length||(o.sort(function(r,a){return r.length-a.length}),!o[0].length)?l:l.replace(RegExp("^"+o[0],"gm"),"")},indent:function(l,o){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++o).join(" ")+"$&")},breakLines:function(l,o){o=o===!0?80:o|0||80;for(var r=l.split(`
|
||||
`),a=0;a<r.length;++a)if(!(s(r[a])<=o)){for(var u=r[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>o&&(u[c]=`
|
||||
`+u[c],f=d)}r[a]=u.join("")}return r.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(l){var o=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=o.normalize(l.code,l.settings);return}var r=l.element.parentNode;if(!(!l.code||!r||r.nodeName.toLowerCase()!=="pre")){for(var a=r.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var p=a[d];p==l.element?c=!0:p.nodeName==="#text"&&(c?f+=p.nodeValue:u+=p.nodeValue,r.removeChild(p),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=o.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=o.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(Xw);(function(n){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};n.languages.dart=n.languages.extend("clike",{"class-name":[i,{pattern:RegExp(t+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:i.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\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 Qw(n){let e,t;return{c(){e=_("div"),t=_("code"),h(t,"class","svelte-tv7jme"),h(e,"class","code-wrapper prism-light svelte-tv7jme")},m(i,s){w(i,e,s),m(e,t),t.innerHTML=n[0]},p(i,[s]){s&1&&(t.innerHTML=i[0])},i:ae,o:ae,d(i){i&&k(e)}}}function xw(n,e,t){let{content:i=""}=e,{language:s="javascript"}=e,l="";function o(r){return r=typeof r=="string"?r:"",r=js.plugins.NormalizeWhitespace.normalize(r,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),js.highlight(r,js.languages[s]||js.languages.javascript,s)}return n.$$set=r=>{"content"in r&&t(1,i=r.content),"language"in r&&t(2,s=r.language)},n.$$.update=()=>{n.$$.dirty&2&&typeof js<"u"&&i&&t(0,l=o(i))},[l,i,s]}class gn extends Ae{constructor(e){super(),Ee(this,e,xw,Qw,Te,{content:1,language:2})}}const e2=n=>({}),xf=n=>({}),t2=n=>({}),ec=n=>({});function tc(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M=n[4]&&!n[2]&&nc(n);const S=n[18].header,$=$n(S,n,n[17],ec);let D=n[4]&&n[2]&&ic(n);const O=n[18].default,E=$n(O,n,n[17],null),I=n[18].footer,L=$n(I,n,n[17],xf);return{c(){e=_("div"),t=_("div"),s=T(),l=_("div"),o=_("div"),M&&M.c(),r=T(),$&&$.c(),a=T(),D&&D.c(),u=T(),f=_("div"),E&&E.c(),c=T(),d=_("div"),L&&L.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(d,"class","overlay-panel-section panel-footer"),h(l,"class",p="overlay-panel "+n[1]+" "+n[8]),le(l,"popup",n[2]),h(e,"class","overlay-panel-container"),le(e,"padded",n[2]),le(e,"active",n[0])},m(N,H){w(N,e,H),m(e,t),m(e,s),m(e,l),m(l,o),M&&M.m(o,null),m(o,r),$&&$.m(o,null),m(o,a),D&&D.m(o,null),m(l,u),m(l,f),E&&E.m(f,null),n[20](f),m(l,c),m(l,d),L&&L.m(d,null),b=!0,y||(C=[Q(t,"click",Wt(n[19])),Q(f,"scroll",n[21])],y=!0)},p(N,H){n=N,n[4]&&!n[2]?M?M.p(n,H):(M=nc(n),M.c(),M.m(o,r)):M&&(M.d(1),M=null),$&&$.p&&(!b||H&131072)&&Mn($,S,n,n[17],b?Cn(S,n[17],H,t2):Tn(n[17]),ec),n[4]&&n[2]?D?D.p(n,H):(D=ic(n),D.c(),D.m(o,null)):D&&(D.d(1),D=null),E&&E.p&&(!b||H&131072)&&Mn(E,O,n,n[17],b?Cn(O,n[17],H,null):Tn(n[17]),null),L&&L.p&&(!b||H&131072)&&Mn(L,I,n,n[17],b?Cn(I,n[17],H,e2):Tn(n[17]),xf),(!b||H&258&&p!==(p="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",p),H&262&&le(l,"popup",n[2]),H&4&&le(e,"padded",n[2]),H&1&&le(e,"active",n[0])},i(N){b||(Dt(()=>{i||(i=ot(t,go,{duration:fs,opacity:0},!0)),i.run(1)}),A($,N),A(E,N),A(L,N),Dt(()=>{v&&v.end(1),g=Ap(l,Hn,n[2]?{duration:fs,y:-10}:{duration:fs,x:50}),g.start()}),b=!0)},o(N){i||(i=ot(t,go,{dur
Line truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]))&&h(e,"for",l);const C={};y&16&&(C.id=b[4]),y&1&&(C.disabled=!Y.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,C.value=b[0].exceptDomains,Fe(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,p()}}}function rS(n){let e,t,i,s,l,o,r,a,u,f,c,d,p;function g(b){n[3](b)}let v={id:n[4]+".options.onlyDomains",disabled:!Y.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new ss({props:v}),me.push(()=>Le(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[4]+".options.onlyDomains"),h(f,"class","help-block")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(p=Ze(St.call(null,s,{text:`List of domains that are ONLY allowed.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]+".options.onlyDomains"))&&h(e,"for",l);const C={};y&16&&(C.id=b[4]+".options.onlyDomains"),y&1&&(C.disabled=!Y.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,C.value=b[0].onlyDomains,Fe(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,p()}}}function aS(n){let e,t,i,s,l,o,r;return i=new Pe({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[oS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[rS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(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&&k(e),z(i),z(o)}}}function uS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class Wg extends Ae{constructor(e){super(),Ee(this,e,uS,aS,Te,{key:1,options:0})}}function fS(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new Wg({props:r}),me.push(()=>Le(e,"key",l)),me.push(()=>Le(e,"options",o)),{c(){B(e.$$.fragment)},m(a,u){V(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],Fe(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],Fe(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){z(e,a)}}}function cS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class dS extends Ae{constructor(e){super(),Ee(this,e,cS,fS,Te,{key:0,options:1})}}var _r=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ps={_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:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},cl={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 togg
Line truncated
|
||||
<span class='flatpickr-weekday'>
|
||||
`+j.join("</span><span class='flatpickr-weekday'>")+`
|
||||
</span>
|
||||
`}}function fe(){t.calendarContainer.classList.add("hasWeeks");var F=yt("div","flatpickr-weekwrapper");F.appendChild(yt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var j=yt("div","flatpickr-weeks");return F.appendChild(j),{weekWrapper:F,weekNumbers:j}}function Me(F,j){j===void 0&&(j=!0);var x=j?F:F-t.currentMonth;x<0&&t._hidePrevMonthArrow===!0||x>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=x,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ye("onYearChange"),te()),H(),Ye("onMonthChange"),Ct())}function re(F,j){if(F===void 0&&(F=!0),j===void 0&&(j=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,j===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var x=kr(t.config),U=x.hours,ue=x.minutes,$e=x.seconds;p(U,ue,$e)}t.redraw(),F&&Ye("onChange")}function de(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ye("onClose")}function be(){t.config!==void 0&&Ye("onDestroy");for(var F=t._handlers.length;F--;)t._handlers[F].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 j=t.calendarContainer.parentNode;if(j.lastChild&&j.removeChild(j.lastChild),j.parentNode){for(;j.firstChild;)j.parentNode.insertBefore(j.firstChild,j);j.parentNode.removeChild(j)}}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(x){try{delete t[x]}catch{}})}function Z(F){return t.calendarContainer.contains(F)}function we(F){if(t.isOpen&&!t.config.inline){var j=vn(F),x=Z(j),U=j===t.input||j===t.altInput||t.element.contains(j)||F.path&&F.path.indexOf&&(~F.path.indexOf(t.input)||~F.path.indexOf(t.altInput)),ue=!U&&!x&&!Z(F.relatedTarget),$e=!t.config.ignoredFocusElements.some(function(Ke){return Ke.contains(j)});ue&&$e&&(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 ee(F){if(!(!F||t.config.minDate&&F<t.config.minDate.getFullYear()||t.config.maxDate&&F>t.config.maxDate.getFullYear())){var j=F,x=t.currentYear!==j;t.currentYear=j||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)),x&&(t.redraw(),Ye("onYearChange"),te())}}function G(F,j){var x;j===void 0&&(j=!0);var U=t.parseDate(F,void 0,j);if(t.config.minDate&&U&&yn(U,t.config.minDate,j!==void 0?j:!t.minDateHasTime)<0||t.config.maxDate&&U&&yn(U,t.config.maxDate,j!==void 0?j:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(U===void 0)return!1;for(var ue=!!t.config.enable,$e=(x=t.config.enable)!==null&&x!==void 0?x:t.config.disable,Ke=0,je=void 0;Ke<$e.length;Ke++){if(je=$e[Ke],typeof je=="function"&&je(U))return ue;if(je instanceof Date&&U!==void 0&&je.getTime()===U.getTime())return ue;if(typeof je=="string"){var ce=t.parseDate(je,void 0,!0);return ce&&ce.getTime()===U.getTime()?ue:!ue}else if(typeof je=="object"&&U!==void 0&&je.from&&je.to&&U.getTime()>=je.from.getTime()&&U.getTime()<=je.to.getTime())return ue}return!ue}function ve(F){return t.daysContainer!==void 0?F.className.indexOf("hidden")===-1&&F.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(F):!1}function Ne(F){var j=F.target===t._input,x=t._input.value.trimEnd()!==Lt();j&&x&&!(F.relatedTarget&&Z(F.relatedTarget))&&t.setDate(t._input.value,!0,F.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ve(F){var j=vn(F),x=t.config.wr
Line truncated
|
||||
`),d=_("span"),p=_("span"),p.textContent="Choose presets",g=T(),B(v.$$.fragment),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[10]),h(p,"class","txt link-primary"),h(d,"class","inline-flex"),h(f,"class","help-block")},m($,D){w($,e,D),m(e,t),m(e,i),m(e,s),w($,o,D),V(r,$,D),w($,u,D),w($,f,D),m(f,c),m(f,d),m(d,p),m(d,g),V(v,d,null),b=!0,y||(C=Ze(St.call(null,s,{text:`Allow files ONLY with the listed mime types.
|
||||
Leave empty for no restriction.`,position:"top"})),y=!0)},p($,D){(!b||D&1024&&l!==(l=$[10]))&&h(e,"for",l);const O={};D&1024&&(O.id=$[10]),!a&&D&1&&(a=!0,O.value=$[0].mimeTypes,Fe(()=>a=!1)),r.$set(O);const E={};D&2049&&(E.$$scope={dirty:D,ctx:$}),v.$set(E)},i($){b||(A(r.$$.fragment,$),A(v.$$.fragment,$),b=!0)},o($){P(r.$$.fragment,$),P(v.$$.fragment,$),b=!1},d($){$&&k(e),$&&k(o),z(r,$),$&&k(u),$&&k(f),z(v),y=!1,C()}}}function jS(n){let e,t,i,s,l,o,r,a,u,f,c,d,p;function g(b){n[9](b)}let v={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(v.value=n[0].thumbs),r=new ss({props:v}),me.push(()=>Le(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[10]),h(f,"class","help-block")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(p=Ze(St.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(b,y){(!c||y&1024&&l!==(l=b[10]))&&h(e,"for",l);const C={};y&1024&&(C.id=b[10]),!a&&y&1&&(a=!0,C.value=b[0].thumbs,Fe(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,p()}}}function qS(n){let e,t,i,s,l,o,r,a,u,f,c,d,p;return i=new Pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[FS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[NS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),u=new Pe({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[HS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),d=new Pe({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[jS,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(a,"class","col-sm-12"),h(c,"class","col-sm-12"),h(e,"class","grid")},m(g,v){w(g,e,v),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),m(e,r),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),p=!0},p(g,[v]){const b={};v&2&&(b.name="schema."+g[1]+".options.maxSize"),v&3073&&(b.$$scope={dirty:v,ctx:g}),i.$set(b);const y={};v&2&&(y.name="schema."+g[1]+".options.maxSelect"),v&3073&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const C={};v&2&&(C.name="schema."+g[1]+".options.mimeTypes"),v&3073&&(C.$$scope={dirty:v,ctx:g}),u.$set(C);const M={};v&2&&(M.name="schema."+g[1]+".options.thumbs"),v&3073&&(M.$$scope={dirty:v,ctx:g}),d.$set(M)},i(g){p||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),p=!0)},o(g){P(i.$$.fragment,g),P(o.$$.fragment,g),P(u.$$.fragment,g),P(d.$$.fragment,g),p=!1},d(g){g&&k(e),z(i),z(o),z(u),z(d)}}}function VS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=At(this.value),t(0,s)}function o(){s.maxSelect=At(this.value),t(0,s)}function r(p){n.$$.not_equal(s.mimeTypes,p)&&(s.mimeTypes=p,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(p){n.$$.not_equal(s.thumbs,p)&&(s.thumbs=p,t(0,s))}return n.$$set=p=>{"key"in p&&t(1,i=p.key),"options"in p&&t(0,s=p.options)},n.$$.update=()=>{n.$$.dirty&1&&Y.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class zS extends Ae{constructor(e){super(),Ee(this,e,VS,qS,Te,{key:1,options:0})}}function BS(n){let e,t,i,s,l,o,r;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new is({props:u}),me.push(()=>Le(l,"keyOfSelected",a)),{c(){e=_("label"),t=R("Collection"),s=T(),B(l.$$.fragment),h(e,"for",i=n[9])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&512&&i!==(i=f[9]))&&h(e,"for",i);const d={};c&8&&(d.searchable=f[3].length>5),c&4&&(d.selectPlaceholder=f[2]?"Loading...":"Select collection"),c&8&&(d.items=f[3]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,Fe(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=
Line truncated
|
||||
form-field
|
||||
required
|
||||
`+(n[5]?"":"invalid")+`
|
||||
`+(n[0].id&&n[0].system?"disabled":"")+`
|
||||
`,name:"schema."+n[1]+".name",$$slots:{default:[t$,({uniqueId:H})=>({38:H}),({uniqueId:H})=>[0,H?128:0]]},$$scope:{ctx:n}}});const O=[d$,c$,f$,u$,a$,r$,o$,l$,s$,i$,n$],E=[];function I(H,te){return H[0].type==="text"?0:H[0].type==="number"?1:H[0].type==="bool"?2:H[0].type==="email"?3:H[0].type==="url"?4:H[0].type==="date"?5:H[0].type==="select"?6:H[0].type==="json"?7:H[0].type==="file"?8:H[0].type==="relation"?9:H[0].type==="user"?10:-1}~(f=I(n))&&(c=E[f]=O[f](n)),g=new Pe({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[h$,({uniqueId:H})=>({38:H}),({uniqueId:H})=>[0,H?128:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Lc(n),N=!n[0].toDelete&&Ic(n);return{c(){e=_("form"),t=_("div"),i=_("div"),B(s.$$.fragment),l=T(),o=_("div"),B(r.$$.fragment),a=T(),u=_("div"),c&&c.c(),d=T(),p=_("div"),B(g.$$.fragment),v=T(),b=_("div"),L&&L.c(),y=T(),N&&N.c(),C=T(),M=_("input"),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(u,"class","col-sm-12 hidden-empty"),h(p,"class","col-sm-4 flex"),h(b,"class","col-sm-4 flex"),h(t,"class","grid"),h(M,"type","submit"),h(M,"class","hidden"),h(M,"tabindex","-1"),h(e,"class","field-form")},m(H,te){w(H,e,te),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,o),V(r,o,null),m(t,a),m(t,u),~f&&E[f].m(u,null),m(t,d),m(t,p),V(g,p,null),m(t,v),m(t,b),L&&L.m(b,null),m(t,y),N&&N.m(t,null),m(e,C),m(e,M),S=!0,$||(D=Q(e,"submit",Wt(n[31])),$=!0)},p(H,te){const oe={};te[0]&1&&(oe.class="form-field required "+(H[0].id?"disabled":"")),te[0]&2&&(oe.name="schema."+H[1]+".type"),te[0]&1|te[1]&384&&(oe.$$scope={dirty:te,ctx:H}),s.$set(oe);const q={};te[0]&33&&(q.class=`
|
||||
form-field
|
||||
required
|
||||
`+(H[5]?"":"invalid")+`
|
||||
`+(H[0].id&&H[0].system?"disabled":"")+`
|
||||
`),te[0]&2&&(q.name="schema."+H[1]+".name"),te[0]&33|te[1]&384&&(q.$$scope={dirty:te,ctx:H}),r.$set(q);let K=f;f=I(H),f===K?~f&&E[f].p(H,te):(c&&(De(),P(E[K],1,1,()=>{E[K]=null}),Oe()),~f?(c=E[f],c?c.p(H,te):(c=E[f]=O[f](H),c.c()),A(c,1),c.m(u,null)):c=null);const W={};te[0]&1|te[1]&384&&(W.$$scope={dirty:te,ctx:H}),g.$set(W),H[0].type!=="file"?L?(L.p(H,te),te[0]&1&&A(L,1)):(L=Lc(H),L.c(),A(L,1),L.m(b,null)):L&&(De(),P(L,1,1,()=>{L=null}),Oe()),H[0].toDelete?N&&(De(),P(N,1,1,()=>{N=null}),Oe()):N?(N.p(H,te),te[0]&1&&A(N,1)):(N=Ic(H),N.c(),A(N,1),N.m(t,null))},i(H){S||(A(s.$$.fragment,H),A(r.$$.fragment,H),A(c),A(g.$$.fragment,H),A(L),A(N),S=!0)},o(H){P(s.$$.fragment,H),P(r.$$.fragment,H),P(c),P(g.$$.fragment,H),P(L),P(N),S=!1},d(H){H&&k(e),z(s),z(r),~f&&E[f].d(),z(g),L&&L.d(),N&&N.d(),$=!1,D()}}}function Nc(n){let e,t,i,s,l=n[0].system&&Rc(),o=!n[0].id&&Hc(n),r=n[0].required&&jc(),a=n[0].unique&&qc();return{c(){e=_("div"),l&&l.c(),t=T(),o&&o.c(),i=T(),r&&r.c(),s=T(),a&&a.c(),h(e,"class","inline-flex")},m(u,f){w(u,e,f),l&&l.m(e,null),m(e,t),o&&o.m(e,null),m(e,i),r&&r.m(e,null),m(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Rc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=Hc(u),o.c(),o.m(e,i)),u[0].required?r||(r=jc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=qc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Rc(n){let e;return{c(){e=_("span"),e.textContent="System",h(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Hc(n){let e;return{c(){e=_("span"),e.textContent="New",h(e,"class","label"),le(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&257&&le(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&k(e)}}}function jc(n){let e;return{c(){e=_("span"),e.textContent="Required",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function qc(n){let e;return{c(){e=_("span"),e.textContent="Unique",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Vc(n){let e,t,i,s,l;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ze(St.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Dt(()=>{t||(t=ot(e,jn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ot(e,jn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function zc(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=Q(e,"click",Gn(n[15])),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function _$(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,p,g,v,b,y=!n[0].toDelete&&Nc(n),C=n[7]&&!n[0].system&&Vc(),M=n[0].toDelete&&zc(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=T(),o=_("strong"),a=R(r),f=T(),y&&y.c(),c=T(),d=_("div"),p=T(),C&&C.c(),g=T(),M&&M.c(),v=lt(),h(i,"class",s=Wa(Y.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),h(t,"class","icon field-type"),h(o,"class","title field-name svelte-1tpxlm5"),h(o,"title",u=n[0].name),le(o,"txt-strikethrough",n[0].toDelete),h(e,"class","inline-flex"),h(d,"class","flex-fill")},m(S,$){w(S,e,$),m(e,t),m(t,i),m(e,l),m(e,o),m(o,a),w(S,f,$),y&&y.m(S,$),w(S,c,$),w(S,d,$),w(S,p,$),C&&C.m(S,$),w(S,g,$),M&&M.m(S,$),w(S,v,$),b=!0},p(S,$){(!b||$[0]&1&&s!==(s=Wa(Y.getFieldTypeIcon(S[0].type))+" svelte-1tpxlm5"))&&h(i,"class",s),(!b||$[0]&1)&&r!==(r=(S[0].name||"-")+"")&&ge(a,r),(!b||$[0]&1&&u!==(u=S[0].name))&&h(o,"title",u),$[0]&1&&le(o,"txt-strikethrough",S[0].toDelete),S[0].toDelete?y&&(y.d(1),y=null):y?y.p(S,$):(y=Nc(S),y.c(),y.m(c.parentNode,c)),S[7]&&!S[0].system?C?$[0]&129&&A(C,1):(C=Vc(),C.c(),A(C,1),C.m(g.parentNode,g)):C&&(De(),P(C,1,1,()=>{C=null}),Oe()),S[0].toDelete?M?M.p(S,$):(M=zc(S),M.c(),M.m(v.parentNode,v)):M&&(M.d(1),M=null)},i(S){b||(A(C),b=!0)},o(S){P(C),b=!1},d(S){S&&k(e),S&&k(f),y&&y.d(S),S&&k(c),S&&k(d),S&&k(p),C&&C.d(S),S&&k(g),M&&M.d(S),S&&k(v)}}}function b$(n){let e,t,i={single:!0,interactive:n[8],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[_$],default:[g$]},$$scope:{ctx:n}};return e=new qa({props:i}),n[32](e),e.$on("expand",n[33]),e.$on("collapse",n[34]),e.$on("toggle",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&256&&(o.interactive=s[8]),l[0]&5&&(o.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&483|l[1]&256&&(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[32](null),z(e,s)}}}function v$(n,e,t){let i,s,l,o,r;It(n,ts,Z=>t(14,r=Z));const a=rn();let{key:u="0"}=e,{field:f=new bn}=e,{disabled:c=!1}=e,{excludeNames:d=[]}=e,p,g=f.type;function v(){p==null||p.expand()}function b(){p==null||p.collapse()}function y(){f.id?t(0,f.toDelete=!0,f):(b(),a("remove"))}function C(Z){if(Z=(""+Z).toLowerCase(),!Z)return!1;for(co
Line truncated
|
||||
<code>@request.query.*</code>
|
||||
<code>@request.data.*</code>
|
||||
<code>@request.user.*</code>`,M=T(),S=_("hr"),$=T(),D=_("p"),D.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",O=T(),E=_("div"),E.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",I=T(),L=_("hr"),N=T(),H=_("p"),H.innerHTML=`Example rule:
|
||||
<br/>
|
||||
<code>@request.user.id!="" && created>"2022-01-01 00:00:00"</code>`,h(s,"class","m-b-0"),h(o,"class","inline-flex flex-gap-5"),h(g,"class","m-t-10 m-b-5"),h(b,"class","m-b-0"),h(C,"class","inline-flex flex-gap-5"),h(S,"class","m-t-10 m-b-5"),h(D,"class","m-b-0"),h(E,"class","inline-flex flex-gap-5"),h(L,"class","m-t-10 m-b-5"),h(i,"class","content"),h(t,"class","alert alert-warning m-0")},m(W,X){w(W,e,X),m(e,t),m(t,i),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(o,d);for(let ne=0;ne<K.length;ne+=1)K[ne].m(o,null);m(i,p),m(i,g),m(i,v),m(i,b),m(i,y),m(i,C),m(i,M),m(i,S),m(i,$),m(i,D),m(i,O),m(i,E),m(i,I),m(i,L),m(i,N),m(i,H),oe=!0},p(W,X){if(X&1){q=W[0].schema;let ne;for(ne=0;ne<q.length;ne+=1){const fe=Yc(W,q,ne);K[ne]?K[ne].p(fe,X):(K[ne]=Zc(fe),K[ne].c(),K[ne].m(o,null))}for(;ne<K.length;ne+=1)K[ne].d(1);K.length=q.length}},i(W){oe||(W&&Dt(()=>{te||(te=ot(e,xt,{duration:150},!0)),te.run(1)}),oe=!0)},o(W){W&&(te||(te=ot(e,xt,{duration:150},!1)),te.run(0)),oe=!1},d(W){W&&k(e),Rn(K,W),W&&te&&te.end()}}}function $$(n){let e,t=n[19].name+"",i;return{c(){e=_("code"),i=R(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&ge(i,t)},d(s){s&&k(e)}}}function C$(n){let e,t=n[19].name+"",i,s;return{c(){e=_("code"),i=R(t),s=R(".*")},m(l,o){w(l,e,o),m(e,i),m(e,s)},p(l,o){o&1&&t!==(t=l[19].name+"")&&ge(i,t)},d(l){l&&k(e)}}}function Zc(n){let e;function t(l,o){return l[19].type==="relation"||l[19].type==="user"?C$:$$}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function M$(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const o=r=>r[14];for(let r=0;r<l.length;r+=1){let a=Wc(n,l,r),u=o(a);t.set(u,e[r]=Gc(u,a))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();i=lt()},m(r,a){for(let u=0;u<e.length;u+=1)e[u].m(r,a);w(r,i,a),s=!0},p(r,a){a&262235&&(l=Object.entries(r[6]),De(),e=kt(e,a,o,1,r,l,t,i.parentNode,Gt,Gc,i,Wc),Oe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(r){for(let a=0;a<e.length;a+=1)P(e[a]);s=!1},d(r){for(let a=0;a<e.length;a+=1)e[a].d(r);r&&k(i)}}}function T$(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',h(e,"class","txt-center")},m(t,i){w(t,e,i)},p:ae,i:ae,o:ae,d(t){t&&k(e)}}}function D$(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',h(e,"type","button"),h(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ze(St.call(null,e,"Lock and set to Admins only")),Q(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,xe(i)}}}function O$(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',h(e,"type","button"),h(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ze(St.call(null,e,"Unlock and set custom rule")),Q(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,xe(i)}}}function E$(n){let e;return{c(){e=R("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function A$(n){let e;return{c(){e=R("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function P$(n){let e,t=n[15]+"",i,s,l=Mi(n[0][n[14]])?"Admins only":"Custom rule",o,r,a,u,f=n[14],c,d,p,g,v,b,y;function C(){return n[10](n[14])}const M=()=>n[11](u,f),S=()=>n[11](null,f);function $(N){n[12](N,n[14])}var D=n[4];function O(N){let H={baseCollection:N[0],disabled:Mi(N[0][N[14]])};return N[0][N[14]]!==void 0&&(H.value=N[0][N[14]]),{props:H}}D&&(u=new D(O(n)),M(),me.push(()=>Le(u,"value",$)));function E(N,H){return H&1&&(g=null),g==null&&(g=!!Mi(N[0][N[14]])),g?A$:E$}let I=E(n,-1),L=I(n);return{c(){e=_("label"),i=R(t),s=R(" - "),o=R(l),a=T(),u&&B(u.$$.fragment),d=T(),p=_("div"),L.c(),h(e,"for",r=n[18]),h(p,"class","help-block")},m(N,H){w(N,e,H),m(e,i),m(e,s),m(e,o),w(N,a,H),u&&V(u,N,H),w(N,d,H),w(N,p,H),L.m(p,null),v=!0,b||(y=Q(e,"click",C),b=!0)},p(N,H){n=N,(!v||H&1)&&l!==(l=Mi(n[0][n[14]])?"Admins only":"Custom rule")&&ge(o,l),(!v||H&262144&&r!==(r=n[18]))&&h(e,"for",r),f!==n[14]&&(S(),f=n[14],M());const te={};if(H&1&&(te.baseCollection=n[0]),H&1&&(te.disabled=Mi(n[0][n[14]])),!c&&H&65&&(c=!0,te.value=n[0][n[14]],Fe(()=>c=!1)),D!==(D=n[4])){if(u){De();const oe=u;P(oe.$$.fragment,1,0,()=>{z(oe,1)}),Oe()}D?(u=new D(O(n)),M(),me.push(()=>Le(u,"value",$)),B(u.$$.fragment),A(u.$$.fragment,1),V(u,d.parentNode,d)):u=null}else D&&u.$set(te);I!==(I=E(n,H))&&(L.d(1),L=I(n),L&&(L.c(),L.m(p,null)))},i(N){v||(u&&A(u.$$.fragment,N),v=!0)},o(N){u&&P(u.$$.fragment,N),v=!1},d(N){N&&k(e),N&&k(a),S(),u&&z(u,N),N&&k(d),N&&k(p),L.d(),b=!1,y()}}}function Gc(n,e){let t,i,s,l,o,r,a,u;function f(p,g){return g&1&&(l=null),l==null&&(l=!!Mi(p[0][p[14]])),l?O$:D$}let c=f(e,-1),d=c(e);return r=new Pe({props:{class:"form-field rule-field m-0 "+(Mi(e[0][e[14]])?"disabled":Line truncated
|
||||
<a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
|
||||
</a>.`,s=T(),l=_("span"),r=R(o),a=T(),b&&b.c(),u=T(),c.c(),d=lt(),h(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),h(t,"class","flex"),h(e,"class","block m-b-base")},m(S,$){w(S,e,$),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),b&&b.m(e,null),w(S,u,$),C[f].m(S,$),w(S,d,$),p=!0,g||(v=Q(l,"click",n[7]),g=!0)},p(S,[$]){(!p||$&4)&&o!==(o=S[2]?"Hide available fields":"Show available fields")&&ge(r,o),S[2]?b?(b.p(S,$),$&4&&A(b,1)):(b=Kc(S),b.c(),A(b,1),b.m(e,null)):b&&(De(),P(b,1,1,()=>{b=null}),Oe());let D=f;f=M(S),f===D?C[f].p(S,$):(De(),P(C[D],1,1,()=>{C[D]=null}),Oe(),c=C[f],c?c.p(S,$):(c=C[f]=y[f](S),c.c()),A(c,1),c.m(d.parentNode,d))},i(S){p||(A(b),A(c),p=!0)},o(S){P(b),P(c),p=!1},d(S){S&&k(e),b&&b.d(),S&&k(u),C[f].d(S),S&&k(d),g=!1,v()}}}function Mi(n){return n===null}function I$(n,e,t){let{collection:i=new On}=e,s={},l=!1,o={},r,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,r=(await Yi(()=>import("./FilterAutocompleteInput.e329ae0a.js"),[])).default)}catch(y){console.warn(y),t(4,r=null)}t(5,a=!1)}Bn(()=>{f()});const c=()=>t(2,l=!l),d=async y=>{var C;t(0,i[y]=s[y]||"",i),await oi(),(C=o[y])==null||C.focus()},p=y=>{t(1,s[y]=i[y],s),t(0,i[y]=null,i)},g=y=>{var C;return(C=o[y])==null?void 0:C.focus()};function v(y,C){me[y?"unshift":"push"](()=>{o[C]=y,t(3,o)})}function b(y,C){n.$$.not_equal(i[C],y)&&(i[C]=y,t(0,i))}return n.$$set=y=>{"collection"in y&&t(0,i=y.collection)},[i,s,l,o,r,a,u,c,d,p,g,v,b]}class F$ extends Ae{constructor(e){super(),Ee(this,e,I$,L$,Te,{collection:0})}}function Jc(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xc(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qc(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xc(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=R(`Renamed collection
|
||||
`),s=_("strong"),o=R(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=R(c),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")},m(p,g){w(p,e,g),m(e,t),m(t,i),m(t,s),m(s,o),m(t,r),m(t,a),m(t,u),m(t,f),m(f,d)},p(p,g){g&2&&l!==(l=p[1].originalName+"")&&ge(o,l),g&2&&c!==(c=p[1].name+"")&&ge(d,c)},d(p){p&&k(e)}}}function ed(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=R(`Renamed field
|
||||
`),s=_("strong"),o=R(l),r=T(),a=_("i"),u=T(),f=_("strong"),d=R(c),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")},m(p,g){w(p,e,g),m(e,t),m(t,i),m(t,s),m(s,o),m(t,r),m(t,a),m(t,u),m(t,f),m(f,d)},p(p,g){g&16&&l!==(l=p[14].originalName+"")&&ge(o,l),g&16&&c!==(c=p[14].name+"")&&ge(d,c)},d(p){p&&k(e)}}}function td(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=_("li"),t=R("Removed field "),i=_("span"),l=R(s),o=T(),h(i,"class","txt-bold"),h(e,"class","txt-danger")},m(r,a){w(r,e,a),m(e,t),m(e,i),m(i,l),m(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ge(l,s)},d(r){r&&k(e)}}}function N$(n){let e,t,i,s,l,o,r,a,u,f,c,d,p=n[3].length&&Qc(),g=n[5]&&xc(n),v=n[4],b=[];for(let M=0;M<v.length;M+=1)b[M]=ed(Xc(n,v,M));let y=n[3],C=[];for(let M=0;M<y.length;M+=1)C[M]=td(Jc(n,y,M));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=T(),s=_("div"),l=_("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to
|
||||
update it manually!`,o=T(),p&&p.c(),r=T(),a=_("h6"),a.textContent="Changes:",u=T(),f=_("ul"),g&&g.c(),c=T();for(let M=0;M<b.length;M+=1)b[M].c();d=T();for(let M=0;M<C.length;M+=1)C[M].c();h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning"),h(f,"class","changes-list svelte-1ghly2p")},m(M,S){w(M,e,S),m(e,t),m(e,i),m(e,s),m(s,l),m(s,o),p&&p.m(s,null),w(M,r,S),w(M,a,S),w(M,u,S),w(M,f,S),g&&g.m(f,null),m(f,c);for(let $=0;$<b.length;$+=1)b[$].m(f,null);m(f,d);for(let $=0;$<C.length;$+=1)C[$].m(f,null)},p(M,S){if(M[3].length?p||(p=Qc(),p.c(),p.m(s,null)):p&&(p.d(1),p=null),M[5]?g?g.p(M,S):(g=xc(M),g.c(),g.m(f,c)):g&&(g.d(1),g=null),S&16){v=M[4];let $;for($=0;$<v.length;$+=1){const D=Xc(M,v,$);b[$]?b[$].p(D,S):(b[$]=ed(D),b[$].c(),b[$].m(f,d))}for(;$<b.length;$+=1)b[$].d(1);b.length=v.length}if(S&8){y=M[3];let $;for($=0;$<y.length;$+=1){const D=Jc(M,y,$);C[$]?C[$].p(D,S):(C[$]=td(D),C[$].c(),C[$].m(f,null))}for(;$<C.length;$+=1)C[$].d(1);C.length=y.length}},d(M){M&&k(e),p&&p.d(),M&&k(r),M&&k(a),M&&k(u),M&&k(f),g&&g.d(),Rn(b,M),Rn(C,M)}}}function R$(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function H$(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=T(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-secondary"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[Q(e,"click",n[8]),Q(i,"click",n[9])],s=!0)},p:ae,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,xe(l)}}}function j$(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[H$],header:[R$],default:[N$]},$$scope:{ctx:n}};return e=new yi({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(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),z(e,s)}}}function q$(n,e,t){let i,s,l;const o=rn();let r,a;async function u(y){t(1,a=y),await oi(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),p=()=>c();function g(y){me[y?"unshift":"push"](()=>{r=y,t(2,r)})}function v(y){ut.call(this,n,y)}function b(y){ut.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,p,g,v,b]}class V$ extends Ae{constructor(e){super(),Ee(this,e,q$,j$,Te,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function nd(n){let e,t,i,s;function l(r){n[26](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new F$({props:o}),me.push(()=>Le(t,"collection",l)),{c(){e=_("div"),B(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],Fe(()=>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&&k(e),z(t)}}}function z$(n){let e,t,i,s,l,o;function r(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new S$({props:a}),me.push(()=>Le(i,"collection",r));let u=n[9]===dl&&nd(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),l=T(),u&&u.c(),h(t,"class","tab-item"),le(t,"active",n[9]===Qi),h(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),V(i,t,null),m(e,l),u&&u.m(e,null),o=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],Fe(()=>s=!1)),i.$set(d),c[0]&512&&le(t,"active",f[9]===Qi),f[9]===dl?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=nd(f),u.c(),A(u,1),u.m(e,null)):u&&(De(),P(u,1,1,()=>{u=null}),Oe())},i(f){o||(A(i.$$.fragment,f),A(u),o=!0)},o(f){P(i.$$.fragment,f),P(u),o=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function id(n){let e,t,i,s,l,o,r;return o=new Ni({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[B$]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=T(),i=_("button"),s=_("i"),l=T(),B(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),m(i,s),m(i,l),V(o,i,null),r=!0},p(a,u){const f={};u[1]&256&&(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&&k(e),a&&k(t),a&&k(i),z(o)}}}function B$(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[20]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function sd(n){let e;return{c(){e=_("div"),e.textContent="System collection",h(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function U$(n){let e,t,i,s,l,o,r,a,u,f,c,d,p=n[2].system&&sd();return{c(){e=_("label"),t=R("Name"),s=T(),l=_("input"),u=T(),p&&p.c(),f=lt(),h(e,"for",i=n[38]),h(l,"type","text"),h(l,"id",o=n[38]),l.required=!0,l.disabled=n[11],h(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,h(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,v){w(g,e,v),m(e,t),w(g,s,v),w(g,l,v),w(g,u,v),p&&p.m(g,v),w(g,f,v),n[2].isNew&&l.focus(),c||(d=Q(l,"input",n[21]),c=!0)},p(g,v){v[1]&128&&i!==(i=g[38])&&h(e,"for",i),v[1]&128&&o!==(o=g[38])&&h(l,"id",o),v[0]&2048&&(l.disabled=g[11]),v[0]&4&&r!==(r=g[2].isNew)&&(l.autofocus=r),v[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?p||(p=sd(),p.c(),p.m(f.parentNode,f)):p&&(p.d(1),p=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),p&&p.d(g),g&&k(f),c=!1,d()}}}function ld(n){let e,t,i,s,l,o;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Ze(t=St.call(null,e,n[12])),l=!0)},p(r,a){t&&zn(t.update)&&a[0]&4096&&t.update.call(null,r[12])},i(r){s||(r&&Dt(()=>{i||(i=ot(e,jn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=ot(e,jn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function od(n){let e,t,i,s,l;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ze(St.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Dt(()=>{t||(t=ot(e,jn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=ot(e,jn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function W$(n){var N,H,te,oe,q,K;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,p,g,v=!Y.isEmpty((N=n[4])==null?void 0:N.schema),b,y,C,M,S=!Y.isEmpty((H=n[4])==null?void 0:H.listRule)||!Y.isEmpty((te=n[4])==null?void 0:te.viewRule)||!Y.isEmpty((oe=n[4])==null?void 0:oe.createRule)||!Y.isEmpty((q=n[4])==null?void 0:q.updateRule)||!Y.isEmpty((K=n[4])==null?void 0:K.deleteRule),$,D,O,E=!n[2].isNew&&!n[2].system&&id(n);r=new Pe({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[U$,({uniqueId:W})=>({38:W}),({uniqueId:W})=>[0,W?128:0]]},$$scope:{ctx:n}}});let I=v&&ld(n),L=S&&od();return{c(){e=_("h4"),i=R(t),s=T(),E&&E.c(),l=T(),o=_("form"),B(r.$$.fragment),a=T(),u=_("input"),f=T(),c=_("div"),d=_("button"),p=_("span"),p.textContent="Fields",g=T(),I&&I.c(),b=T(),y=_("button"),C=_("span"),C.textContent="API Rules",M=T(),L&&L.c(),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(p,"class","txt"),h(d,"type","button"),h(d,"class","tab-item"),le(d,"active",n[9]===Qi),h(C,"class","txt"),h(y,"type","button"),h(y,"class","tab-item"),le(y,"active",n[9]===dl),h(c,"class","tabs-header stretched")},m(W,X){w(W,e,X),m(e,i),w(W,s,X),E&&E.m(W,X),w(W,l,X),w(W,o,X),V(r,o,null),m(o,a),m(o,u),w(W,f,X),w(W,c,X),m(c,d),m(d,p),m(d,g),I&&I.m(d,null),m(c,b),m(c,y),m(y,C),m(y,M),L&&L.m(y,null),$=!0,D||(O=[Q(o,"submit",Wt(n[22])),Q(d,"click",n[23]),Q(y,"click",n[24])],D=!0)},p(W,X){var fe,Me,re,de,be,Z;(!$||X[0]&4)&&t!==(t=W[2].isNew?"New collection":"Edit collection")&&ge(i,t),!W[2].isNew&&!W[2].system?E?(E.p(W,X),X[0]&4&&A(E,1)):(E=id(W),E.c(),A(E,1),E.m(l.parentNode,l)):E&&(De(),P(E,1,1,()=>{E=null}),Oe());const ne={};X[0]&2048&&(ne.class="form-field required m-b-0 "+(W[11]?"disabled":"")),X[0]&2052|X[1]&384&&(ne.$$scope={dirty:X,ctx:W}),r.$set(ne),X[0]&16&&(v=!Y.isEmpty((fe=W[4])==null?void 0:fe.schema)),v?I?(I.p(W,X),X[0]&16&&A(I,1)):(I=ld(W),I.c(),A(I,1),I.m(d,null)):I&&(De(),P(I,1,1,()=>{I=null}),Oe()),X[0]&512&&le(d,"active",W[9]===Qi),X[0]&16&&(S=!Y.isEmpty((Me=W[4])==null?void 0:Me.listRule)||!Y.isEmpty((re=W[4])==null?void 0:re.viewRule)||!Y.isEmpty((de=W[4])==null?void 0:de.createRule)||!Y.isEmpty((be=W[4])==null?void 0:be.updateRule)||!Y.isEmpty((Z=W[4])==null?void 0:Z.deleteRule)),S?L?X[0]&16&&A(L,1):(L=od(),L.c(),A(L,1),L.m(y,null)):L&&(De(),P(L,1,1,()=>{L=null}),Oe()),X[0]&512&&le(y,"active",W[9]===dl)},i(W){$||(A(E),A(r.$$.fragment,W),A(I),A(L),$=!0)},o(W){P(E),P(r.$$.fragment,W),P(I),P(L),$=!1},d(W){W&&k(e),W&&k(s),E&&E.d(W),W&&k(l),W&&k(o),z(r),W&&k(f),W&&k(c),I&&I.d(),L&&L.d(),D=!1,xe(O)}}}function Y$(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=R(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-secondary"),e.disabled=n[7],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],le(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,r),u||(f=[Q(e,"click",n[18]),Q(s,"clickLine truncated
|
||||
<span class="txt">New collection</span>`,y=T(),B(C.$$.fragment),h(l,"type","button"),h(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),le(l,"hidden",!n[4]),h(s,"class","form-field-addon"),h(r,"type","text"),h(r,"placeholder","Search collections..."),h(i,"class","form-field search"),le(i,"active",n[4]),h(t,"class","sidebar-header"),h(u,"class","m-t-5 m-b-xs"),h(c,"class","sidebar-content"),h(b,"type","button"),h(b,"class","btn btn-block btn-outline"),h(v,"class","sidebar-footer"),h(e,"class","page-sidebar collection-sidebar")},m(L,N){w(L,e,N),m(e,t),m(t,i),m(i,s),m(s,l),m(i,o),m(i,r),Se(r,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let H=0;H<d.length;H+=1)d[H].m(c,null);E&&E.m(c,null),m(e,g),m(e,v),m(v,b),w(L,y,N),V(C,L,N),M=!0,S||($=[Q(l,"click",n[8]),Q(r,"input",n[9]),Q(b,"click",n[11])],S=!0)},p(L,[N]){N&16&&le(l,"hidden",!L[4]),N&1&&r.value!==L[0]&&Se(r,L[0]),N&16&&le(i,"active",L[4]),N&106&&(D=L[3],d=kt(d,N,O,1,L,D,p,c,Jn,fd,null,rd),!D.length&&E?E.p(L,N):D.length?E&&(E.d(1),E=null):(E=ad(L),E.c(),E.m(c,null)));const H={};C.$set(H)},i(L){M||(A(C.$$.fragment,L),M=!0)},o(L){P(C.$$.fragment,L),M=!1},d(L){L&&k(e);for(let N=0;N<d.length;N+=1)d[N].d();E&&E.d(),L&&k(y),n[12](null),z(C,L),S=!1,xe($)}}}function Q$(n,e,t){let i,s,l,o,r;It(n,ii,b=>t(5,o=b)),It(n,ys,b=>t(7,r=b));let a,u="";function f(b){_n(ii,o=b,o)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const p=b=>f(b),g=()=>a==null?void 0:a.show();function v(b){me[b?"unshift":"push"](()=>{a=b,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=r.filter(b=>b.name!="profiles"&&(b.id==u||b.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,o,f,r,c,d,p,g,v]}class x$ extends Ae{constructor(e){super(),Ee(this,e,Q$,X$,Te,{})}}function eC(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X,ne,fe,Me,re,de,be,Z,we,ee,G,ve,Ne,Ve,pe,J,se,ye,We;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
|
||||
<code><span class="txt-success">OPERAND</span>
|
||||
<span class="txt-danger">OPERATOR</span>
|
||||
<span class="txt-success">OPERAND</span></code>, where:`,t=T(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
|
||||
quoted), number, null, true, false`,l=T(),o=_("li"),r=_("code"),r.textContent="OPERATOR",a=R(` - is one of:
|
||||
`),u=_("br"),f=T(),c=_("ul"),d=_("li"),p=_("code"),p.textContent="=",g=T(),v=_("span"),v.textContent="Equal",b=T(),y=_("li"),C=_("code"),C.textContent="!=",M=T(),S=_("span"),S.textContent="NOT equal",$=T(),D=_("li"),O=_("code"),O.textContent=">",E=T(),I=_("span"),I.textContent="Greater than",L=T(),N=_("li"),H=_("code"),H.textContent=">=",te=T(),oe=_("span"),oe.textContent="Greater than or equal",q=T(),K=_("li"),W=_("code"),W.textContent="<",X=T(),ne=_("span"),ne.textContent="Less than or equal",fe=T(),Me=_("li"),re=_("code"),re.textContent="<=",de=T(),be=_("span"),be.textContent="Less than or equal",Z=T(),we=_("li"),ee=_("code"),ee.textContent="~",G=T(),ve=_("span"),ve.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
|
||||
match)`,Ne=T(),Ve=_("li"),pe=_("code"),pe.textContent="!~",J=T(),se=_("span"),se.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
|
||||
wildcard match)`,ye=T(),We=_("p"),We.innerHTML=`To group and combine several expressions you could use brackets
|
||||
<code>(...)</code>, <code>&&</code> (AND) and <code>||</code> (OR) tokens.`,h(r,"class","txt-danger"),h(p,"class","filter-op svelte-1w7s5nw"),h(v,"class","txt-hint"),h(C,"class","filter-op svelte-1w7s5nw"),h(S,"class","txt-hint"),h(O,"class","filter-op svelte-1w7s5nw"),h(I,"class","txt-hint"),h(H,"class","filter-op svelte-1w7s5nw"),h(oe,"class","txt-hint"),h(W,"class","filter-op svelte-1w7s5nw"),h(ne,"class","txt-hint"),h(re,"class","filter-op svelte-1w7s5nw"),h(be,"class","txt-hint"),h(ee,"class","filter-op svelte-1w7s5nw"),h(ve,"class","txt-hint"),h(pe,"class","filter-op svelte-1w7s5nw"),h(se,"class","txt-hint")},m(et,Je){w(et,e,Je),w(et,t,Je),w(et,i,Je),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(c,d),m(d,p),m(d,g),m(d,v),m(c,b),m(c,y),m(y,C),m(y,M),m(y,S),m(c,$),m(c,D),m(D,O),m(D,E),m(D,I),m(c,L),m(c,N),m(N,H),m(N,te),m(N,oe),m(c,q),m(c,K),m(K,W),m(K,X),m(K,ne),m(c,fe),m(c,Me),m(Me,re),m(Me,de),m(Me,be),m(c,Z),m(c,we),m(we,ee),m(we,G),m(we,ve),m(c,Ne),m(c,Ve),m(Ve,pe),m(Ve,J),m(Ve,se),w(et,ye,Je),w(et,We,Je)},p:ae,i:ae,o:ae,d(et){et&&k(e),et&&k(t),et&&k(i),et&&k(ye),et&&k(We)}}}class tC extends Ae{constructor(e){super(),Ee(this,e,null,eC,Te,{})}}function cd(n,e,t){const i=n.slice();return i[5]=e[t],i}function dd(n,e,t){const i=n.slice();return i[5]=e[t],i}function hd(n,e){let t,i,s=e[5].title+"",l,o,r,a;function u(){return e[4](e[5])}return{key:n,first:null,c(){t=_("button"),i=_("div"),l=R(s),o=T(),h(i,"class","txt"),h(t,"class","tab-item svelte-1maocj6"),le(t,"active",e[0]===e[5].language),this.first=t},m(f,c){w(f,t,c),m(t,i),m(i,l),m(t,o),r||(a=Q(t,"click",u),r=!0)},p(f,c){e=f,c&2&&s!==(s=e[5].title+"")&&ge(l,s),c&3&&le(t,"active",e[0]===e[5].language)},d(f){f&&k(t),r=!1,a()}}}function pd(n,e){let t,i,s,l;return i=new gn({props:{language:e[5].language,content:e[5].content}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item svelte-1maocj6"),le(t,"active",e[0]===e[5].language),this.first=t},m(o,r){w(o,t,r),V(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&2&&(a.language=e[5].language),r&2&&(a.content=e[5].content),i.$set(a),r&3&&le(t,"active",e[0]===e[5].language)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function nC(n){let e,t,i=[],s=new Map,l,o,r=[],a=new Map,u,f=n[1];const c=g=>g[5].language;for(let g=0;g<f.length;g+=1){let v=dd(n,f,g),b=c(v);s.set(b,i[g]=hd(b,v))}let d=n[1];const p=g=>g[5].language;for(let g=0;g<d.length;g+=1){let v=cd(n,d,g),b=p(v);a.set(b,r[g]=pd(b,v))}return{c(){e=_("div"),t=_("div");for(let g=0;g<i.length;g+=1)i[g].c();l=T(),o=_("div");for(let g=0;g<r.length;g+=1)r[g].c();h(t,"class","tabs-header compact left"),h(o,"class","tabs-content"),h(e,"class","tabs sdk-tabs m-b-lg svelte-1maocj6")},m(g,v){w(g,e,v),m(e,t);for(let b=0;b<i.length;b+=1)i[b].m(t,null);m(e,l),m(e,o);for(let b=0;b<r.length;b+=1)r[b].m(o,null);u=!0},p(g,[v]){v&3&&(f=g[1],i=kt(i,v,c,1,g,f,s,t,Jn,hd,null,dd)),v&3&&(d=g[1],De(),r=kt(r,v,p,1,g,d,a,o,Gt,pd,null,cd),Oe())},i(g){if(!u){for(let v=0;v<d.length;v+=1)A(r[v]);u=!0}},o(g){for(let v=0;v<r.length;v+=1)P(r[v]);u=!1},d(g){g&&k(e);for(let v=0;v<i.length;v+=1)i[v].d();for(let v=0;v<r.length;v+=1)r[v].d()}}}const md="pb_sdk_preference";function iC(n,e,t){let i,{js:s=""}=e,{dart:l=""}=e,o=localStorage.getItem(md)||"javascript";const r=a=>t(0,o=a.language);return n.$$set=a=>{"js"in a&&t(2,s=a.js),"dart"in a&&t(3,l=a.dart)},n.$$.update=()=>{n.$$.dirty&1&&o&&localStorage.setItem(md,o),n.$$.dirty&12&&t(1,i=[{title:"JavaScript",language:"javascript",content:s},{title:"Dart",language:"dart",content:l}])},[o,i,s,l,r]}class Ms extends Ae{constructor(e){super(),Ee(this,e,iC,nC,Te,{js:2,dart:3})}}function gd(n,e,t){const i=n.slice();return i[6]=e[t],i}function _d(n,e,t){const i=n.slice();return i[6]=e[t],i}function bd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function vd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("div"),s=R(i),l=T(),h(t,"class","tab-item"),le(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=Q(t,"click",a),o=!0)},p(u,f){e=u,f&20&&le(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function yd(n,e){let t,i,s,l;return i=new gn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),le(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&le(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function sC(n){var ui,Cl,ls,Ml;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,p,g,v,b,y=n[0].name+"",C,M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X,ne,fe,Me,re,de,be,Z,we,ee,G,ve,Ne,Ve,pe,J,se,ye,We,et,Je,at,tt,wt,ze,Be,dt,ie,_e,Ue,it,rt,Xe,$t,Pt,Ft,pt,Ye,Ce,He,nt,Ct,Lt,Nt,Ot,st,F,j,x,U=[],ue=new Map,$e,Ke,je=[],ce=newLine truncated
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.Records.getList('${(ui=n[0])==null?void 0:ui.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.Records.getFullList('${(Cl=n[0])==null?void 0:Cl.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${(ls=n[0])==null?void 0:ls.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${(Ml=n[0])==null?void 0:Ml.name}', batch: 200, sort: '-created');
|
||||
`}}),pe=new gn({props:{content:`
|
||||
// DESC by created and ASC by id
|
||||
?sort=-created,id
|
||||
`}}),wt=new gn({props:{content:`
|
||||
?filter=(id='abc' && created>'2022-01-01')
|
||||
`}}),Be=new tC({}),Pt=new gn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let ht=n[4];const tn=Re=>Re[6].code;for(let Re=0;Re<ht.length;Re+=1){let Qe=_d(n,ht,Re),Xt=tn(Qe);ue.set(Xt,U[Re]=vd(Xt,Qe))}let jt=n[4];const ki=Re=>Re[6].code;for(let Re=0;Re<jt.length;Re+=1){let Qe=gd(n,jt,Re),Xt=ki(Qe);ce.set(Xt,je[Re]=yd(Xt,Qe))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records"),c=T(),Ie&&Ie.c(),d=T(),p=_("div"),g=_("p"),v=R("Fetch a paginated "),b=_("strong"),C=R(y),M=R(" records list."),S=T(),$=_("div"),$.textContent="Client SDKs example",D=T(),B(O.$$.fragment),E=T(),I=_("div"),I.textContent="Query parameters",L=T(),N=_("table"),H=_("thead"),H.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,te=T(),oe=_("tbody"),q=_("tr"),q.innerHTML=`<td>page</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,K=T(),W=_("tr"),W.innerHTML=`<td>perPage</td>
|
||||
<td><span class="label">Number</span></td>
|
||||
<td>Specify the max returned records per page (default to 30).</td>`,X=T(),ne=_("tr"),fe=_("td"),fe.textContent="sort",Me=T(),re=_("td"),re.innerHTML='<span class="label">String</span>',de=T(),be=_("td"),Z=R("Specify the records order attribute(s). "),we=_("br"),ee=R(`
|
||||
Add `),G=_("code"),G.textContent="-",ve=R(" / "),Ne=_("code"),Ne.textContent="+",Ve=R(` (default) in front of the attribute for DESC / ASC order.
|
||||
Ex.:
|
||||
`),B(pe.$$.fragment),J=T(),se=_("tr"),ye=_("td"),ye.textContent="filter",We=T(),et=_("td"),et.innerHTML='<span class="label">String</span>',Je=T(),at=_("td"),tt=R(`Filter the returned records. Ex.:
|
||||
`),B(wt.$$.fragment),ze=T(),B(Be.$$.fragment),dt=T(),ie=_("tr"),_e=_("td"),_e.textContent="expand",Ue=T(),it=_("td"),it.innerHTML='<span class="label">String</span>',rt=T(),Xe=_("td"),$t=R(`Auto expand record relations. Ex.:
|
||||
`),B(Pt.$$.fragment),Ft=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),pt=_("br"),Ye=R(`
|
||||
The expanded relations will be appended to each individual record under the
|
||||
`),Ce=_("code"),Ce.textContent="@expand",He=R(" property (eg. "),nt=_("code"),nt.textContent='"@expand": {"rel1": {...}, ...}',Ct=R(`). Only the
|
||||
relations that the user has permissions to `),Lt=_("strong"),Lt.textContent="view",Nt=R(" will be expanded."),Ot=T(),st=_("div"),st.textContent="Responses",F=T(),j=_("div"),x=_("div");for(let Re=0;Re<U.length;Re+=1)U[Re].c();$e=T(),Ke=_("div");for(let Re=0;Re<je.length;Re+=1)je[Re].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-info"),h(p,"class","content m-b-base"),h($,"class","section-title"),h(I,"class","section-title"),h(N,"class","table-compact table-border m-b-lg"),h(st,"class","section-title"),h(x,"class","tabs-header compact left"),h(Ke,"class","tabs-content"),h(j,"class","tabs")},m(Re,Qe){w(Re,e,Qe),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),Ie&&Ie.m(e,null),w(Re,d,Qe),w(Re,p,Qe),m(p,g),m(g,v),m(g,b),m(b,C),m(g,M),w(Re,S,Qe),w(Re,$,Qe),w(Re,D,Qe),V(O,Re,Qe),w(Re,E,Qe),w(Re,I,Qe),w(Re,L,Qe),w(Re,N,Qe),m(N,H),m(N,te),m(N,oe),m(oe,q),m(oe,K),m(oe,W),m(oe,X),m(oe,ne),m(ne,fe),m(ne,Me),m(ne,re),m(ne,de),m(ne,be),m(be,Z),m(be,we),m(be,ee),m(be,G),m(be,ve),m(be,Ne),m(be,Ve),V(pe,be,null),m(oe,J),m(oe,se),m(se,ye),m(se,We),m(se,et),m(se,Je),m(se,at),m(at,tt),V(wt,at,null),m(at,ze),V(Be,at,null),m(oe,dt),m(oe,ie),m(ie,_e),m(ie,Ue),m(ie,it),m(ie,rt),m(ie,Xe),m(Xe,$t),V(Pt,Xe,null),m(Xe,Ft),m(Xe,pt),m(Xe,Ye),m(Xe,Ce),m(Xe,He),m(Xe,nt),m(Xe,Ct),m(Xe,Lt),m(Xe,Nt),w(Re,Ot,Qe),w(Re,st,Qe),w(Re,F,Qe),w(Re,j,Qe),m(j,x);for(let Xt=0;Xt<U.length;Xt+=1)U[Xt].m(x,null);m(j,$e),m(j,Ke);for(let Xt=0;Xt<je.length;Xt+=1)je[Xt].m(Ke,null);he=!0},p(Re,[Qe]){var Tl,Dl,Ol,El;(!he||Qe&1)&&a!==(a=Re[0].name+"")&&ge(u,a),Re[1]?Ie||(Ie=bd(),Ie.c(),Ie.m(e,null)):Ie&&(Ie.d(1),Ie=null),(!he||Qe&1)&&y!==(y=Re[0].name+"")&&ge(C,y);const Xt={};Qe&9&&(Xt.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${Re[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.Records.getList('${(Tl=Re[0])==null?void 0:Tl.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.Records.getFullList('${(Dl=Re[0])==null?void 0:Dl.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`),Qe&9&&(Xt.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${Re[3]}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${(Ol=Re[0])==null?void 0:Ol.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${(El=Re[0])==null?void 0:El.name}', batch: 200, sort: '-created');
|
||||
`),O.$set(Xt),Qe&20&&(ht=Re[4],U=kt(U,Qe,tn,1,Re,ht,ue,x,Jn,vd,null,_d)),Qe&20&&(jt=Re[4],De(),je=kt(je,Qe,ki,1,Re,jt,ce,Ke,Gt,yd,null,gd),Oe())},i(Re){if(!he){A(O.$$.fragment,Re),A(pe.$$.fragment,Re),A(wt.$$.fragment,Re),A(Be.$$.fragment,Re),A(Pt.$$.fragment,Re);for(let Qe=0;Qe<jt.length;Qe+=1)A(je[Qe]);he=!0}},o(Re){P(O.$$.fragment,Re),P(pe.$$.fragment,Re),P(wt.$$.fragment,Re),P(Be.$$.fragment,Re),P(Pt.$$.fragment,Re);for(let Qe=0;Qe<je.length;Qe+=1)P(je[Qe]);he=!1},d(Re){Re&&k(e),Ie&&Ie.d(),Re&&k(d),Re&&k(p),Re&&k(S),Re&&k($),Re&&k(D),z(O,Re),Re&&k(E),Re&&k(I),Re&&k(L),Re&&k(N),z(pe),z(wt),z(Be),z(Pt),Re&&k(Ot),Re&&k(st),Re&&k(F),Re&&k(j);for(let Qe=0;Qe<U.length;Qe+=1)U[Qe].d();for(let Qe=0;Qe<je.length;Qe+=1)je[Qe].d()}}}function lC(n,e,t){let i,s,{collection:l=new On}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.listRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[Y.dummyCollectionRecord(l),Y.dummyCollectionRecord(l)]},null,2)}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Something went wrong while processing your request. Invalid filter.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||ke.baseUrl),[l,i,o,s,r,a]}class oC extends Ae{constructor(e){super(),Ee(this,e,lC,sC,Te,{collection:0})}}function kd(n,e,t){const i=n.slice();return i[6]=e[t],i}function wd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Sd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $d(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),le(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=Q(t,"click",a),o=!0)},p(u,f){e=u,f&20&&le(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Cd(n,e){let t,i,s,l;return i=new gn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),le(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&le(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function rC(n){var pt,Ye;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,p,g,v,b,y,C=n[0].name+"",M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X,ne,fe,Me,re,de,be,Z,we,ee,G,ve,Ne,Ve,pe,J,se,ye,We,et,Je,at,tt,wt,ze=[],Be=new Map,dt,ie,_e=[],Ue=new Map,it,rt=n[1]&&Sd();E=new Ms({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.Records.getOne('${(pt=n[0])==null?void 0:pt.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${(Ye=n[0])==null?void 0:Ye.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`}}),ee=new gn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let Xe=n[4];const $t=Ce=>Ce[6].code;for(let Ce=0;Ce<Xe.length;Ce+=1){let He=wd(n,Xe,Ce),nt=$t(He);Be.set(nt,ze[Ce]=$d(nt,He))}let Pt=n[4];const Ft=Ce=>Ce[6].code;for(let Ce=0;Ce<Pt.length;Ce+=1){let He=kd(n,Pt,Ce),nt=Ft(He);Ue.set(nt,_e[Ce]=Cd(nt,He))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records/"),c=_("strong"),c.textContent=":id",d=T(),rt&&rt.c(),p=T(),g=_("div"),v=_("p"),b=R("Fetch a single "),y=_("strong"),M=R(C),S=R(" record."),$=T(),D=_("div"),D.textContent="Client SDKs example",O=T(),B(E.$$.fragment),I=T(),L=_("div"),L.textContent="Path Parameters",N=T(),H=_("table"),H.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to view.</td></tr></tbody>`,te=T(),oe=_("div"),oe.textContent="Query parameters",q=T(),K=_("table"),W=_("thead"),W.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,X=T(),ne=_("tbody"),fe=_("tr"),Me=_("td"),Me.textContent="expand",re=T(),de=_("td"),de.innerHTML='<span class="label">String</span>',be=T(),Z=_("td"),we=R(`Auto expand record relations. Ex.:
|
||||
`),B(ee.$$.fragment),G=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),ve=_("br"),Ne=R(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),Ve=_("code"),Ve.textContent="@expand",pe=R(" property (eg. "),J=_("code"),J.textContent='"@expand": {"rel1": {...}, ...}',se=R(`). Only the
|
||||
relations that the user has permissions to `),ye=_("strong"),ye.textContent="view",We=R(" will be expanded."),et=T(),Je=_("div"),Je.textContent="Responses",at=T(),tt=_("div"),wt=_("div");for(let Ce=0;Ce<ze.length;Ce+=1)ze[Ce].c();dt=T(),ie=_("div");for(let Ce=0;Ce<_e.length;Ce+=1)_e[Ce].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-info"),h(g,"class","content m-b-base"),h(D,"class","section-title"),h(L,"class","section-title"),h(H,"class","table-compact table-border m-b-lg"),h(oe,"class","section-title"),h(K,"class","table-compact table-border m-b-lg"),h(Je,"class","section-title"),h(wt,"class","tabs-header compact left"),h(ie,"class","tabs-content"),h(tt,"class","tabs")},m(Ce,He){w(Ce,e,He),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),rt&&rt.m(e,null),w(Ce,p,He),w(Ce,g,He),m(g,v),m(v,b),m(v,y),m(y,M),m(v,S),w(Ce,$,He),w(Ce,D,He),w(Ce,O,He),V(E,Ce,He),w(Ce,I,He),w(Ce,L,He),w(Ce,N,He),w(Ce,H,He),w(Ce,te,He),w(Ce,oe,He),w(Ce,q,He),w(Ce,K,He),m(K,W),m(K,X),m(K,ne),m(ne,fe),m(fe,Me),m(fe,re),m(fe,de),m(fe,be),m(fe,Z),m(Z,we),V(ee,Z,null),m(Z,G),m(Z,ve),m(Z,Ne),m(Z,Ve),m(Z,pe),m(Z,J),m(Z,se),m(Z,ye),m(Z,We),w(Ce,et,He),w(Ce,Je,He),w(Ce,at,He),w(Ce,tt,He),m(tt,wt);for(let nt=0;nt<ze.length;nt+=1)ze[nt].m(wt,null);m(tt,dt),m(tt,ie);for(let nt=0;nt<_e.length;nt+=1)_e[nt].m(ie,null);it=!0},p(Ce,[He]){var Ct,Lt;(!it||He&1)&&a!==(a=Ce[0].name+"")&&ge(u,a),Ce[1]?rt||(rt=Sd(),rt.c(),rt.m(e,null)):rt&&(rt.d(1),rt=null),(!it||He&1)&&C!==(C=Ce[0].name+"")&&ge(M,C);const nt={};He&9&&(nt.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${Ce[3]}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.Records.getOne('${(Ct=Ce[0])==null?void 0:Ct.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`),He&9&&(nt.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${Ce[3]}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${(Lt=Ce[0])==null?void 0:Lt.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`),E.$set(nt),He&20&&(Xe=Ce[4],ze=kt(ze,He,$t,1,Ce,Xe,Be,wt,Jn,$d,null,wd)),He&20&&(Pt=Ce[4],De(),_e=kt(_e,He,Ft,1,Ce,Pt,Ue,ie,Gt,Cd,null,kd),Oe())},i(Ce){if(!it){A(E.$$.fragment,Ce),A(ee.$$.fragment,Ce);for(let He=0;He<Pt.length;He+=1)A(_e[He]);it=!0}},o(Ce){P(E.$$.fragment,Ce),P(ee.$$.fragment,Ce);for(let He=0;He<_e.length;He+=1)P(_e[He]);it=!1},d(Ce){Ce&&k(e),rt&&rt.d(),Ce&&k(p),Ce&&k(g),Ce&&k($),Ce&&k(D),Ce&&k(O),z(E,Ce),Ce&&k(I),Ce&&k(L),Ce&&k(N),Ce&&k(H),Ce&&k(te),Ce&&k(oe),Ce&&k(q),Ce&&k(K),z(ee),Ce&&k(et),Ce&&k(Je),Ce&&k(at),Ce&&k(tt);for(let He=0;He<ze.length;He+=1)ze[He].d();for(let He=0;He<_e.length;He+=1)_e[He].d()}}}function aC(n,e,t){let i,s,{collection:l=new On}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.viewRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify(Y.dummyCollectionRecord(l),null,2)}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||ke.baseUrl),[l,i,o,s,r,a]}class uC extends Ae{constructor(e){super(),Ee(this,e,aC,rC,Te,{collection:0})}}function Md(n,e,t){const i=n.slice();return i[6]=e[t],i}function Td(n,e,t){const i=n.slice();return i[6]=e[t],i}function Dd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Od(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function fC(n){let e;return{c(){e=_("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function cC(n){let e;return{c(){e=_("span"),e.textContent="Required",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("User "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function hC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("Relation record "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function pC(n){let e,t,i,s,l;return{c(){e=R("FormData object."),t=_("br"),i=R(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=R(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:ae,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function mC(n){let e;return{c(){e=R("URL address.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function gC(n){let e;return{c(){e=R("Email address.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function _C(n){let e;return{c(){e=R("JSON array or object.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function bC(n){let e;return{c(){e=R("Number value.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function vC(n){let e;return{c(){e=R("Plain text value.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function Ed(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=Y.getFieldValueType(e[11])+"",p,g,v,b;function y(O,E){return O[11].required?cC:fC}let C=y(e),M=C(e);function S(O,E){if(O[11].type==="text")return vC;if(O[11].type==="number")return bC;if(O[11].type==="json")return _C;if(O[11].type==="email")return gC;if(O[11].type==="url")return mC;if(O[11].type==="file")return pC;if(O[11].type==="relation")return hC;if(O[11].type==="user")return dC}let $=S(e),D=$&&$(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),M.c(),l=T(),o=_("span"),a=R(r),u=T(),f=_("td"),c=_("span"),p=R(d),g=T(),v=_("td"),D&&D.c(),b=T(),h(s,"class","inline-flex"),h(c,"class","label"),this.first=t},m(O,E){w(O,t,E),m(t,i),m(i,s),M.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,p),m(t,g),m(t,v),D&&D.m(v,null),m(t,b)},p(O,E){e=O,C!==(C=y(e))&&(M.d(1),M=C(e),M&&(M.c(),M.m(s,l))),E&1&&r!==(r=e[11].name+"")&&ge(a,r),E&1&&d!==(d=Y.getFieldValueType(e[11])+"")&&ge(p,d),$===($=S(e))&&D?D.p(e,E):(D&&D.d(1),D=$&&$(e),D&&(D.c(),D.m(v,null)))},d(O){O&&k(t),M.d(),D&&D.d()}}}function Ad(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),le(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=Q(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&ge(s,i),f&6&&le(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Pd(n,e){let t,i,s,l;return i=new gn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),le(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&le(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function yC(n){var F,j,x;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,p,g,v,b,y=n[0].name+"",C,M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X,ne=[],fe=new Map,Me,re,de,be,Z,we,ee,G,ve,Ne,Ve,pe,J,se,ye,We,et,Je,at,tt,wt,ze,Be,dt,ie,_e,Ue,it,rt,Xe=[],$t=new Map,Pt,Ft,pt=[],Ye=new Map,Ce,He=n[4]&&Od();N=new Ms({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.create('${(F=n[0])==null?void 0:F.name}', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${(j=n[0])==null?void 0:j.name}', body: body);
|
||||
`}});let nt=(x=n[0])==null?void 0:x.schema;const Ct=U=>U[11].name;for(let U=0;U<nt.length;U+=1){let ue=Dd(n,nt,U),$e=Ct(ue);fe.set($e,ne[U]=Ed($e,ue))}ye=new gn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let Lt=n[2];const Nt=U=>U[6].code;for(let U=0;U<Lt.length;U+=1){let ue=Td(n,Lt,U),$e=Nt(ue);$t.set($e,Xe[U]=Ad($e,ue))}let Ot=n[2];const st=U=>U[6].code;for(let U=0;U<Ot.length;U+=1){let ue=Md(n,Ot,U),$e=st(ue);Ye.set($e,pt[U]=Pd($e,ue))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records"),c=T(),He&&He.c(),d=T(),p=_("div"),g=_("p"),v=R("Create a new "),b=_("strong"),C=R(y),M=R(" record."),S=T(),$=_("p"),$.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,D=T(),O=_("p"),O.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",E=T(),I=_("div"),I.textContent="Client SDKs example",L=T(),B(N.$$.fragment),H=T(),te=_("div"),te.textContent="Body Parameters",oe=T(),q=_("table"),K=_("thead"),K.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,W=T(),X=_("tbody");for(let U=0;U<ne.length;U+=1)ne[U].c();Me=T(),re=_("div"),re.textContent="Query parameters",de=T(),be=_("table"),Z=_("thead"),Z.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,we=T(),ee=_("tbody"),G=_("tr"),ve=_("td"),ve.textContent="expand",Ne=T(),Ve=_("td"),Ve.innerHTML='<span class="label">String</span>',pe=T(),J=_("td"),se=R(`Auto expand relations when returning the created record. Ex.:
|
||||
`),B(ye.$$.fragment),We=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),et=_("br"),Je=R(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),at=_("code"),at.textContent="@expand",tt=R(" property (eg. "),wt=_("code"),wt.textContent='"@expand": {"rel1": {...}, ...}',ze=R(`). Only the
|
||||
relations that the user has permissions to `),Be=_("strong"),Be.textContent="view",dt=R(" will be expanded."),ie=T(),_e=_("div"),_e.textContent="Responses",Ue=T(),it=_("div"),rt=_("div");for(let U=0;U<Xe.length;U+=1)Xe[U].c();Pt=T(),Ft=_("div");for(let U=0;U<pt.length;U+=1)pt[U].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-success"),h(p,"class","content m-b-base"),h(I,"class","section-title"),h(te,"class","section-title"),h(q,"class","table-compact table-border m-b-lg"),h(re,"class","section-title"),h(be,"class","table-compact table-border m-b-lg"),h(_e,"class","section-title"),h(rt,"class","tabs-header compact left"),h(Ft,"class","tabs-content"),h(it,"class","tabs")},m(U,ue){w(U,e,ue),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),He&&He.m(e,null),w(U,d,ue),w(U,p,ue),m(p,g),m(g,v),m(g,b),m(b,C),m(g,M),m(p,S),m(p,$),m(p,D),m(p,O),w(U,E,ue),w(U,I,ue),w(U,L,ue),V(N,U,ue),w(U,H,ue),w(U,te,ue),w(U,oe,ue),w(U,q,ue),m(q,K),m(q,W),m(q,X);for(let $e=0;$e<ne.length;$e+=1)ne[$e].m(X,null);w(U,Me,ue),w(U,re,ue),w(U,de,ue),w(U,be,ue),m(be,Z),m(be,we),m(be,ee),m(ee,G),m(G,ve),m(G,Ne),m(G,Ve),m(G,pe),m(G,J),m(J,se),V(ye,J,null),m(J,We),m(J,et),m(J,Je),m(J,at),m(J,tt),m(J,wt),m(J,ze),m(J,Be),m(J,dt),w(U,ie,ue),w(U,_e,ue),w(U,Ue,ue),w(U,it,ue),m(it,rt);for(let $e=0;$e<Xe.length;$e+=1)Xe[$e].m(rt,null);m(it,Pt),m(it,Ft);for(let $e=0;$e<pt.length;$e+=1)pt[$e].m(Ft,null);Ce=!0},p(U,[ue]){var Ke,je,ce;(!Ce||ue&1)&&a!==(a=U[0].name+"")&&ge(u,a),U[4]?He||(He=Od(),He.c(),He.m(e,null)):He&&(He.d(1),He=null),(!Ce||ue&1)&&y!==(y=U[0].name+"")&&ge(C,y);const $e={};ue&9&&($e.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${U[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.create('${(Ke=U[0])==null?void 0:Ke.name}', data);
|
||||
`),ue&9&&($e.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${U[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${(je=U[0])==null?void 0:je.name}', body: body);
|
||||
`),N.$set($e),ue&1&&(nt=(ce=U[0])==null?void 0:ce.schema,ne=kt(ne,ue,Ct,1,U,nt,fe,X,Jn,Ed,null,Dd)),ue&6&&(Lt=U[2],Xe=kt(Xe,ue,Nt,1,U,Lt,$t,rt,Jn,Ad,null,Td)),ue&6&&(Ot=U[2],De(),pt=kt(pt,ue,st,1,U,Ot,Ye,Ft,Gt,Pd,null,Md),Oe())},i(U){if(!Ce){A(N.$$.fragment,U),A(ye.$$.fragment,U);for(let ue=0;ue<Ot.length;ue+=1)A(pt[ue]);Ce=!0}},o(U){P(N.$$.fragment,U),P(ye.$$.fragment,U);for(let ue=0;ue<pt.length;ue+=1)P(pt[ue]);Ce=!1},d(U){U&&k(e),He&&He.d(),U&&k(d),U&&k(p),U&&k(E),U&&k(I),U&&k(L),z(N,U),U&&k(H),U&&k(te),U&&k(oe),U&&k(q);for(let ue=0;ue<ne.length;ue+=1)ne[ue].d();U&&k(Me),U&&k(re),U&&k(de),U&&k(be),z(ye),U&&k(ie),U&&k(_e),U&&k(Ue),U&&k(it);for(let ue=0;ue<Xe.length;ue+=1)Xe[ue].d();for(let ue=0;ue<pt.length;ue+=1)pt[ue].d()}}}function kC(n,e,t){let i,s,{collection:l=new On}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.createRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(Y.dummyCollectionRecord(l),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to create record.",
|
||||
"data": {
|
||||
"${(f=(u=l==null?void 0:l.schema)==null?void 0:u[0])==null?void 0:f.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||ke.baseUrl),[l,o,r,s,i,a]}class wC extends Ae{constructor(e){super(),Ee(this,e,kC,yC,Te,{collection:0})}}function Ld(n,e,t){const i=n.slice();return i[6]=e[t],i}function Id(n,e,t){const i=n.slice();return i[6]=e[t],i}function Fd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Nd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function SC(n){let e;return{c(){e=_("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $C(n){let e;return{c(){e=_("span"),e.textContent="Required",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function CC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("User "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function MC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=R("Relation record "),i=R(t),s=R(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ge(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function TC(n){let e,t,i,s,l;return{c(){e=R("FormData object."),t=_("br"),i=R(`
|
||||
Set to `),s=_("code"),s.textContent="null",l=R(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:ae,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function DC(n){let e;return{c(){e=R("URL address.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function OC(n){let e;return{c(){e=R("Email address.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function EC(n){let e;return{c(){e=R("JSON array or object.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function AC(n){let e;return{c(){e=R("Number value.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function PC(n){let e;return{c(){e=R("Plain text value.")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function Rd(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=Y.getFieldValueType(e[11])+"",p,g,v,b;function y(O,E){return O[11].required?$C:SC}let C=y(e),M=C(e);function S(O,E){if(O[11].type==="text")return PC;if(O[11].type==="number")return AC;if(O[11].type==="json")return EC;if(O[11].type==="email")return OC;if(O[11].type==="url")return DC;if(O[11].type==="file")return TC;if(O[11].type==="relation")return MC;if(O[11].type==="user")return CC}let $=S(e),D=$&&$(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),M.c(),l=T(),o=_("span"),a=R(r),u=T(),f=_("td"),c=_("span"),p=R(d),g=T(),v=_("td"),D&&D.c(),b=T(),h(s,"class","inline-flex"),h(c,"class","label"),this.first=t},m(O,E){w(O,t,E),m(t,i),m(i,s),M.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,p),m(t,g),m(t,v),D&&D.m(v,null),m(t,b)},p(O,E){e=O,C!==(C=y(e))&&(M.d(1),M=C(e),M&&(M.c(),M.m(s,l))),E&1&&r!==(r=e[11].name+"")&&ge(a,r),E&1&&d!==(d=Y.getFieldValueType(e[11])+"")&&ge(p,d),$===($=S(e))&&D?D.p(e,E):(D&&D.d(1),D=$&&$(e),D&&(D.c(),D.m(v,null)))},d(O){O&&k(t),M.d(),D&&D.d()}}}function Hd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),le(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=Q(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&ge(s,i),f&6&&le(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function jd(n,e){let t,i,s,l;return i=new gn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),le(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&le(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function LC(n){var $e,Ke,je;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,p,g,v,b,y,C=n[0].name+"",M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X,ne,fe,Me,re,de,be=[],Z=new Map,we,ee,G,ve,Ne,Ve,pe,J,se,ye,We,et,Je,at,tt,wt,ze,Be,dt,ie,_e,Ue,it,rt,Xe,$t,Pt,Ft,pt,Ye=[],Ce=new Map,He,nt,Ct=[],Lt=new Map,Nt,Ot=n[4]&&Nd();H=new Ms({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.update('${($e=n[0])==null?void 0:$e.name}', 'RECORD_ID', data);
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${(Ke=n[0])==null?void 0:Ke.name}', 'RECORD_ID', body: body);
|
||||
`}});let st=(je=n[0])==null?void 0:je.schema;const F=ce=>ce[11].name;for(let ce=0;ce<st.length;ce+=1){let he=Fd(n,st,ce),Ie=F(he);Z.set(Ie,be[ce]=Rd(Ie,he))}tt=new gn({props:{content:`
|
||||
?expand=rel1,rel2.subrel21.subrel22
|
||||
`}});let j=n[2];const x=ce=>ce[6].code;for(let ce=0;ce<j.length;ce+=1){let he=Id(n,j,ce),Ie=x(he);Ce.set(Ie,Ye[ce]=Hd(Ie,he))}let U=n[2];const ue=ce=>ce[6].code;for(let ce=0;ce<U.length;ce+=1){let he=Ld(n,U,ce),Ie=ue(he);Lt.set(Ie,Ct[ce]=jd(Ie,he))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records/"),c=_("strong"),c.textContent=":id",d=T(),Ot&&Ot.c(),p=T(),g=_("div"),v=_("p"),b=R("Update a single "),y=_("strong"),M=R(C),S=R(" record."),$=T(),D=_("p"),D.innerHTML=`Body parameters could be sent as <code>application/json</code> or
|
||||
<code>multipart/form-data</code>.`,O=T(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",I=T(),L=_("div"),L.textContent="Client SDKs example",N=T(),B(H.$$.fragment),te=T(),oe=_("div"),oe.textContent="Path parameters",q=T(),K=_("table"),K.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to update.</td></tr></tbody>`,W=T(),X=_("div"),X.textContent="Body Parameters",ne=T(),fe=_("table"),Me=_("thead"),Me.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="50%">Description</th></tr>`,re=T(),de=_("tbody");for(let ce=0;ce<be.length;ce+=1)be[ce].c();we=T(),ee=_("div"),ee.textContent="Query parameters",G=T(),ve=_("table"),Ne=_("thead"),Ne.innerHTML=`<tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr>`,Ve=T(),pe=_("tbody"),J=_("tr"),se=_("td"),se.textContent="expand",ye=T(),We=_("td"),We.innerHTML='<span class="label">String</span>',et=T(),Je=_("td"),at=R(`Auto expand relations when returning the updated record. Ex.:
|
||||
`),B(tt.$$.fragment),wt=R(`
|
||||
Supports up to 6-levels depth nested relations expansion. `),ze=_("br"),Be=R(`
|
||||
The expanded relations will be appended to the record under the
|
||||
`),dt=_("code"),dt.textContent="@expand",ie=R(" property (eg. "),_e=_("code"),_e.textContent='"@expand": {"rel1": {...}, ...}',Ue=R(`). Only the
|
||||
relations that the user has permissions to `),it=_("strong"),it.textContent="view",rt=R(" will be expanded."),Xe=T(),$t=_("div"),$t.textContent="Responses",Pt=T(),Ft=_("div"),pt=_("div");for(let ce=0;ce<Ye.length;ce+=1)Ye[ce].c();He=T(),nt=_("div");for(let ce=0;ce<Ct.length;ce+=1)Ct[ce].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-warning"),h(g,"class","content m-b-base"),h(L,"class","section-title"),h(oe,"class","section-title"),h(K,"class","table-compact table-border m-b-lg"),h(X,"class","section-title"),h(fe,"class","table-compact table-border m-b-lg"),h(ee,"class","section-title"),h(ve,"class","table-compact table-border m-b-lg"),h($t,"class","section-title"),h(pt,"class","tabs-header compact left"),h(nt,"class","tabs-content"),h(Ft,"class","tabs")},m(ce,he){w(ce,e,he),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),Ot&&Ot.m(e,null),w(ce,p,he),w(ce,g,he),m(g,v),m(v,b),m(v,y),m(y,M),m(v,S),m(g,$),m(g,D),m(g,O),m(g,E),w(ce,I,he),w(ce,L,he),w(ce,N,he),V(H,ce,he),w(ce,te,he),w(ce,oe,he),w(ce,q,he),w(ce,K,he),w(ce,W,he),w(ce,X,he),w(ce,ne,he),w(ce,fe,he),m(fe,Me),m(fe,re),m(fe,de);for(let Ie=0;Ie<be.length;Ie+=1)be[Ie].m(de,null);w(ce,we,he),w(ce,ee,he),w(ce,G,he),w(ce,ve,he),m(ve,Ne),m(ve,Ve),m(ve,pe),m(pe,J),m(J,se),m(J,ye),m(J,We),m(J,et),m(J,Je),m(Je,at),V(tt,Je,null),m(Je,wt),m(Je,ze),m(Je,Be),m(Je,dt),m(Je,ie),m(Je,_e),m(Je,Ue),m(Je,it),m(Je,rt),w(ce,Xe,he),w(ce,$t,he),w(ce,Pt,he),w(ce,Ft,he),m(Ft,pt);for(let Ie=0;Ie<Ye.length;Ie+=1)Ye[Ie].m(pt,null);m(Ft,He),m(Ft,nt);for(let Ie=0;Ie<Ct.length;Ie+=1)Ct[Ie].m(nt,null);Nt=!0},p(ce,[he]){var ht,tn,jt;(!Nt||he&1)&&a!==(a=ce[0].name+"")&&ge(u,a),ce[4]?Ot||(Ot=Nd(),Ot.c(),Ot.m(e,null)):Ot&&(Ot.d(1),Ot=null),(!Nt||he&1)&&C!==(C=ce[0].name+"")&&ge(M,C);const Ie={};he&9&&(Ie.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${ce[3]}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.update('${(ht=ce[0])==null?void 0:ht.name}', 'RECORD_ID', data);
|
||||
`),he&9&&(Ie.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${ce[3]}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${(tn=ce[0])==null?void 0:tn.name}', 'RECORD_ID', body: body);
|
||||
`),H.$set(Ie),he&1&&(st=(jt=ce[0])==null?void 0:jt.schema,be=kt(be,he,F,1,ce,st,Z,de,Jn,Rd,null,Fd)),he&6&&(j=ce[2],Ye=kt(Ye,he,x,1,ce,j,Ce,pt,Jn,Hd,null,Id)),he&6&&(U=ce[2],De(),Ct=kt(Ct,he,ue,1,ce,U,Lt,nt,Gt,jd,null,Ld),Oe())},i(ce){if(!Nt){A(H.$$.fragment,ce),A(tt.$$.fragment,ce);for(let he=0;he<U.length;he+=1)A(Ct[he]);Nt=!0}},o(ce){P(H.$$.fragment,ce),P(tt.$$.fragment,ce);for(let he=0;he<Ct.length;he+=1)P(Ct[he]);Nt=!1},d(ce){ce&&k(e),Ot&&Ot.d(),ce&&k(p),ce&&k(g),ce&&k(I),ce&&k(L),ce&&k(N),z(H,ce),ce&&k(te),ce&&k(oe),ce&&k(q),ce&&k(K),ce&&k(W),ce&&k(X),ce&&k(ne),ce&&k(fe);for(let he=0;he<be.length;he+=1)be[he].d();ce&&k(we),ce&&k(ee),ce&&k(G),ce&&k(ve),z(tt),ce&&k(Xe),ce&&k($t),ce&&k(Pt),ce&&k(Ft);for(let he=0;he<Ye.length;he+=1)Ye[he].d();for(let he=0;he<Ct.length;he+=1)Ct[he].d()}}}function IC(n,e,t){let i,s,{collection:l=new On}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.updateRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(Y.dummyCollectionRecord(l),null,2)},{code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to update record.",
|
||||
"data": {
|
||||
"${(f=(u=l==null?void 0:l.schema)==null?void 0:u[0])==null?void 0:f.name}": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`},{code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "You are not allowed to perform this request.",
|
||||
"data": {}
|
||||
}
|
||||
`},{code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}])},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||ke.baseUrl),[l,o,r,s,i,a]}class FC extends Ae{constructor(e){super(),Ee(this,e,IC,LC,Te,{collection:0})}}function qd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Vd(n,e,t){const i=n.slice();return i[6]=e[t],i}function zd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",h(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Bd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=R(i),l=T(),h(t,"class","tab-item"),le(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=Q(t,"click",a),o=!0)},p(u,f){e=u,f&20&&le(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Ud(n,e){let t,i,s,l;return i=new gn({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),B(i.$$.fragment),s=T(),h(t,"class","tab-item"),le(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),V(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&le(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){P(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function NC(n){var Ne,Ve;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,p,g,v,b,y,C=n[0].name+"",M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X=[],ne=new Map,fe,Me,re=[],de=new Map,be,Z=n[1]&&zd();E=new Ms({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.Records.delete('${(Ne=n[0])==null?void 0:Ne.name}', 'RECORD_ID');
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(Ve=n[0])==null?void 0:Ve.name}', 'RECORD_ID');
|
||||
`}});let we=n[4];const ee=pe=>pe[6].code;for(let pe=0;pe<we.length;pe+=1){let J=Vd(n,we,pe),se=ee(J);ne.set(se,X[pe]=Bd(se,J))}let G=n[4];const ve=pe=>pe[6].code;for(let pe=0;pe<G.length;pe+=1){let J=qd(n,G,pe),se=ve(J);de.set(se,re[pe]=Ud(se,J))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=T(),s=_("div"),l=_("p"),o=R("/api/collections/"),r=_("strong"),u=R(a),f=R("/records/"),c=_("strong"),c.textContent=":id",d=T(),Z&&Z.c(),p=T(),g=_("div"),v=_("p"),b=R("Delete a single "),y=_("strong"),M=R(C),S=R(" record."),$=T(),D=_("div"),D.textContent="Client SDKs example",O=T(),B(E.$$.fragment),I=T(),L=_("div"),L.textContent="Path parameters",N=T(),H=_("table"),H.innerHTML=`<thead><tr><th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th></tr></thead>
|
||||
<tbody><tr><td>id</td>
|
||||
<td><span class="label">String</span></td>
|
||||
<td>ID of the record to delete.</td></tr></tbody>`,te=T(),oe=_("div"),oe.textContent="Responses",q=T(),K=_("div"),W=_("div");for(let pe=0;pe<X.length;pe+=1)X[pe].c();fe=T(),Me=_("div");for(let pe=0;pe<re.length;pe+=1)re[pe].c();h(t,"class","label label-primary"),h(s,"class","content"),h(e,"class","alert alert-danger"),h(g,"class","content m-b-base"),h(D,"class","section-title"),h(L,"class","section-title"),h(H,"class","table-compact table-border m-b-lg"),h(oe,"class","section-title"),h(W,"class","tabs-header compact left"),h(Me,"class","tabs-content"),h(K,"class","tabs")},m(pe,J){w(pe,e,J),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),Z&&Z.m(e,null),w(pe,p,J),w(pe,g,J),m(g,v),m(v,b),m(v,y),m(y,M),m(v,S),w(pe,$,J),w(pe,D,J),w(pe,O,J),V(E,pe,J),w(pe,I,J),w(pe,L,J),w(pe,N,J),w(pe,H,J),w(pe,te,J),w(pe,oe,J),w(pe,q,J),w(pe,K,J),m(K,W);for(let se=0;se<X.length;se+=1)X[se].m(W,null);m(K,fe),m(K,Me);for(let se=0;se<re.length;se+=1)re[se].m(Me,null);be=!0},p(pe,[J]){var ye,We;(!be||J&1)&&a!==(a=pe[0].name+"")&&ge(u,a),pe[1]?Z||(Z=zd(),Z.c(),Z.m(e,null)):Z&&(Z.d(1),Z=null),(!be||J&1)&&C!==(C=pe[0].name+"")&&ge(M,C);const se={};J&9&&(se.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${pe[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.Records.delete('${(ye=pe[0])==null?void 0:ye.name}', 'RECORD_ID');
|
||||
`),J&9&&(se.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${pe[3]}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${(We=pe[0])==null?void 0:We.name}', 'RECORD_ID');
|
||||
`),E.$set(se),J&20&&(we=pe[4],X=kt(X,J,ee,1,pe,we,ne,W,Jn,Bd,null,Vd)),J&20&&(G=pe[4],De(),re=kt(re,J,ve,1,pe,G,de,Me,Gt,Ud,null,qd),Oe())},i(pe){if(!be){A(E.$$.fragment,pe);for(let J=0;J<G.length;J+=1)A(re[J]);be=!0}},o(pe){P(E.$$.fragment,pe);for(let J=0;J<re.length;J+=1)P(re[J]);be=!1},d(pe){pe&&k(e),Z&&Z.d(),pe&&k(p),pe&&k(g),pe&&k($),pe&&k(D),pe&&k(O),z(E,pe),pe&&k(I),pe&&k(L),pe&&k(N),pe&&k(H),pe&&k(te),pe&&k(oe),pe&&k(q),pe&&k(K);for(let J=0;J<X.length;J+=1)X[J].d();for(let J=0;J<re.length;J+=1)re[J].d()}}}function RC(n,e,t){let i,s,{collection:l=new On}=e,o=204,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.deleteRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:204,body:`
|
||||
null
|
||||
`}),r.push({code:400,body:`
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
|
||||
"data": {}
|
||||
}
|
||||
`}),i&&r.push({code:403,body:`
|
||||
{
|
||||
"code": 403,
|
||||
"message": "Only admins can access this action.",
|
||||
"data": {}
|
||||
}
|
||||
`}),r.push({code:404,body:`
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`}))},t(3,s=window.location.href.substring(0,window.location.href.indexOf("/_"))||ke.baseUrl),[l,i,o,s,r,a]}class HC extends Ae{constructor(e){super(),Ee(this,e,RC,NC,Te,{collection:0})}}function jC(n){var p,g,v,b,y,C,M,S;let e,t,i,s,l,o,r,a,u,f,c,d;return r=new Ms({props:{js:`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${n[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.Users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.Realtime.subscribe('${(p=n[0])==null?void 0:p.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.Realtime.subscribe('${(g=n[0])==null?void 0:g.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.Realtime.unsubscribe() // remove all subscriptions
|
||||
client.Realtime.unsubscribe('${(v=n[0])==null?void 0:v.name}') // remove only the collection subscription
|
||||
client.Realtime.unsubscribe('${(b=n[0])==null?void 0:b.name}/RECORD_ID') // remove only the record subscription
|
||||
`,dart:`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${n[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(y=n[0])==null?void 0:y.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(C=n[0])==null?void 0:C.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(M=n[0])==null?void 0:M.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(S=n[0])==null?void 0:S.name}/RECORD_ID') // remove only the record subscription
|
||||
`}}),c=new gn({props:{content:JSON.stringify({action:"create",record:Y.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong>
|
||||
<div class="content"><p>/api/realtime</p></div>`,t=T(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
|
||||
<p>Events are send for <strong>create</strong>, <strong>update</strong>
|
||||
and <strong>delete</strong> record operations (see "Event data format" section below).</p>
|
||||
<div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div>
|
||||
<div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p>
|
||||
<p>When you subscribe to a <strong>single record</strong>, the collection's
|
||||
<strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p>
|
||||
<p>When you subscribe to an <strong>entire collection</strong>, the collection's
|
||||
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
|
||||
the event message.</p></div></div>`,s=T(),l=_("div"),l.textContent="Client SDKs example",o=T(),B(r.$$.fragment),a=T(),u=_("div"),u.textContent="Event data format",f=T(),B(c.$$.fragment),h(e,"class","alert"),h(i,"class","content m-b-base"),h(l,"class","section-title"),h(u,"class","section-title")},m($,D){w($,e,D),w($,t,D),w($,i,D),w($,s,D),w($,l,D),w($,o,D),V(r,$,D),w($,a,D),w($,u,D),w($,f,D),V(c,$,D),d=!0},p($,[D]){var I,L,N,H,te,oe,q,K;const O={};D&3&&(O.js=`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${$[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.Users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.Realtime.subscribe('${(I=$[0])==null?void 0:I.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.Realtime.subscribe('${(L=$[0])==null?void 0:L.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.Realtime.unsubscribe() // remove all subscriptions
|
||||
client.Realtime.unsubscribe('${(N=$[0])==null?void 0:N.name}') // remove only the collection subscription
|
||||
client.Realtime.unsubscribe('${(H=$[0])==null?void 0:H.name}/RECORD_ID') // remove only the record subscription
|
||||
`),D&3&&(O.dart=`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${$[1]}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${(te=$[0])==null?void 0:te.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${(oe=$[0])==null?void 0:oe.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${(q=$[0])==null?void 0:q.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${(K=$[0])==null?void 0:K.name}/RECORD_ID') // remove only the record subscription
|
||||
`),r.$set(O);const E={};D&1&&(E.content=JSON.stringify({action:"create",record:Y.dummyCollectionRecord($[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),c.$set(E)},i($){d||(A(r.$$.fragment,$),A(c.$$.fragment,$),d=!0)},o($){P(r.$$.fragment,$),P(c.$$.fragment,$),d=!1},d($){$&&k(e),$&&k(t),$&&k(i),$&&k(s),$&&k(l),$&&k(o),z(r,$),$&&k(a),$&&k(u),$&&k(f),z(c,$)}}}function qC(n,e,t){let i,{collection:s=new On}=e;return n.$$set=l=>{"collection"in l&&t(0,s=l.collection)},t(1,i=window.location.href.substring(0,window.location.href.indexOf("/_"))||ke.baseUrl),[s,i]}class VC extends Ae{constructor(e){super(),Ee(this,e,qC,jC,Te,{collection:0})}}function Wd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Yd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Kd(n){let e,t,i,s;var l=n[14].component;function o(r){return{props:{collection:r[3]}}}return l&&(t=new l(o(n))),{c(){e=_("div"),t&&B(t.$$.fragment),i=T(),h(e,"class","tab-item active")},m(r,a){w(r,e,a),t&&V(t,e,null),m(e,i),s=!0},p(r,a){const u={};if(a&8&&(u.collection=r[3]),l!==(l=r[14].component)){if(t){De();const f=t;P(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(t=new l(o(r)),B(t.$$.fragment),A(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(r){s||(t&&A(t.$$.fragment,r),s=!0)},o(r){t&&P(t.$$.fragment,r),s=!1},d(r){r&&k(e),t&&z(t)}}}function Zd(n,e){let t,i,s,l=e[4]===e[14].id&&Kd(e);return{key:n,first:null,c(){t=lt(),l&&l.c(),i=lt(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[4]===e[14].id?l?(l.p(e,r),r&16&&A(l,1)):(l=Kd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(De(),P(l,1,1,()=>{l=null}),Oe())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function zC(n){let e,t=[],i=new Map,s,l=n[5];const o=r=>r[14].id;for(let r=0;r<l.length;r+=1){let a=Wd(n,l,r),u=o(a);i.set(u,t[r]=Zd(u,a))}return{c(){e=_("div");for(let r=0;r<t.length;r+=1)t[r].c();h(e,"class","tabs-content")},m(r,a){w(r,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(r,a){a&56&&(l=r[5],De(),t=kt(t,a,o,1,r,l,i,e,Gt,Zd,null,Wd),Oe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(r){for(let a=0;a<t.length;a+=1)P(t[a]);s=!1},d(r){r&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function Gd(n,e){let t,i,s=e[14].label+"",l,o,r,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=R(s),o=T(),h(i,"class","txt"),h(t,"tabindex","0"),h(t,"class","tab-item"),le(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),m(t,i),m(i,l),m(t,o),r||(a=[Q(t,"click",u),Q(t,"keydown",Cp(f))],r=!0)},p(c,d){e=c,d&48&&le(t,"active",e[4]===e[14].id)},d(c){c&&k(t),r=!1,xe(a)}}}function BC(n){let e,t,i=n[3].name+"",s,l,o,r,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let p=Yd(n,f,d),g=c(p);u.set(g,a[d]=Gd(g,p))}return{c(){e=_("h4"),t=_("strong"),s=R(i),l=R(" records API"),o=T(),r=_("div");for(let d=0;d<a.length;d+=1)a[d].c();h(r,"class","tabs-header stretched")},m(d,p){w(d,e,p),m(e,t),m(t,s),m(e,l),w(d,o,p),w(d,r,p);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(d,p){p&8&&i!==(i=d[3].name+"")&&ge(s,i),p&114&&(f=d[5],a=kt(a,p,c,1,d,f,u,r,Jn,Gd,null,Yd))},d(d){d&&k(e),d&&k(o),d&&k(r);for(let p=0;p<a.length;p+=1)a[p].d()}}}function UC(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',h(e,"type","button"),h(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[8]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function WC(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[UC],header:[BC],default:[zC]},$$scope:{ctx:n}};return e=new yi({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&524312&&(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[11](null),z(e,s)}}}function YC(n,e,t){const i=[{id:"list",label:"List",component:oC},{id:"view",label:"View",component:uC},{id:"create",label:"Create",component:wC},{id:"update",label:"Update",component:FC},{id:"delete",label:"Delete",component:HC},{id:"realtime",label:"Realtime",component:VC}];let s,l=new On,o=i[0].id;function r(y){return t(3,l=y),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(y){t(4,o=y)}function f(y,C){(y.code==="Enter"||y.code==="Space")&&(y.preventDefault(),u(C))}const c=()=>a(),d=y=>u(y.id),p=(y,C)=>f(C,y.id);function g(y){me[y?"unshift":"push"](()=>{s=y,t(2,s)})}function v(y){ut.call(this,n,y)}function b(y){ut.call(this,n,y)}return[a,u,s,l,o,i,f,r,c,d,p,g,v,b]}class KC extends Ae{constructor(e){super(),Ee(this,e,YC,WC,Te,{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 ZC(n){let e,t,i,s=[n[3]],l={};for(let o=0;o<s.length;o+=1)l=ct(l,s[o]);return{c(){e=_("textarea"),si(e,l),le(e,"svelte-1x1pbts",!0)},m(o,r){w(o,e,r)
Line truncated
|
||||
<span class="txt">Upload new file</span>`,h(t,"type","file"),h(t,"class","hidden"),t.multiple=n[5],h(s,"type","button"),h(s,"class","btn btn-secondary btn-sm btn-block"),h(e,"class","list-item btn-list-item")},m(r,a){w(r,e,a),m(e,t),n[16](t),m(e,i),m(e,s),l||(o=[Q(t,"change",n[17]),Q(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&k(e),n[16](null),l=!1,xe(o)}}}function Y3(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,p,g,v,b=n[4];const y=D=>D[25];for(let D=0;D<b.length;D+=1){let O=Qd(n,b,D),E=y(O);d.set(E,c[D]=xd(E,O))}let C=n[0],M=[];for(let D=0;D<C.length;D+=1)M[D]=eh(Xd(n,C,D));const S=D=>P(M[D],1,1,()=>{M[D]=null});let $=!n[8]&&th(n);return{c(){e=_("label"),t=_("i"),s=T(),l=_("span"),r=R(o),u=T(),f=_("div");for(let D=0;D<c.length;D+=1)c[D].c();p=T();for(let D=0;D<M.length;D+=1)M[D].c();g=T(),$&&$.c(),h(t,"class",i=Y.getFieldTypeIcon(n[3].type)),h(l,"class","txt"),h(e,"for",a=n[21]),h(f,"class","files-list")},m(D,O){w(D,e,O),m(e,t),m(e,s),m(e,l),m(l,r),w(D,u,O),w(D,f,O);for(let E=0;E<c.length;E+=1)c[E].m(f,null);m(f,p);for(let E=0;E<M.length;E+=1)M[E].m(f,null);m(f,g),$&&$.m(f,null),n[19](f),v=!0},p(D,O){if((!v||O&8&&i!==(i=Y.getFieldTypeIcon(D[3].type)))&&h(t,"class",i),(!v||O&8)&&o!==(o=D[3].name+"")&&ge(r,o),(!v||O&2097152&&a!==(a=D[21]))&&h(e,"for",a),O&1558&&(b=D[4],De(),c=kt(c,O,y,1,D,b,d,f,Gt,xd,p,Qd),Oe()),O&2049){C=D[0];let E;for(E=0;E<C.length;E+=1){const I=Xd(D,C,E);M[E]?(M[E].p(I,O),A(M[E],1)):(M[E]=eh(I),M[E].c(),A(M[E],1),M[E].m(f,g))}for(De(),E=C.length;E<M.length;E+=1)S(E);Oe()}D[8]?$&&($.d(1),$=null):$?$.p(D,O):($=th(D),$.c(),$.m(f,null))},i(D){if(!v){for(let O=0;O<b.length;O+=1)A(c[O]);for(let O=0;O<C.length;O+=1)A(M[O]);v=!0}},o(D){for(let O=0;O<c.length;O+=1)P(c[O]);M=M.filter(Boolean);for(let O=0;O<M.length;O+=1)P(M[O]);v=!1},d(D){D&&k(e),D&&k(u),D&&k(f);for(let O=0;O<c.length;O+=1)c[O].d();Rn(M,D),$&&$.d(),n[19](null)}}}function K3(n){let e,t;return e=new Pe({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[Y3,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function Z3(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new bn}=e,c,d;function p(E){Y.removeByValue(u,E),t(1,u)}function g(E){Y.pushUnique(u,E),t(1,u)}function v(E){Y.isEmpty(a[E])||a.splice(E,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=E=>p(E),C=E=>g(E),M=E=>v(E);function S(E){me[E?"unshift":"push"](()=>{c=E,t(6,c)})}const $=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function O(E){me[E?"unshift":"push"](()=>{d=E,t(7,d)})}return n.$$set=E=>{"record"in E&&t(2,o=E.record),"value"in E&&t(12,r=E.value),"uploadedFiles"in E&&t(0,a=E.uploadedFiles),"deletedFileIndexes"in E&&t(1,u=E.deletedFileIndexes),"field"in E&&t(3,f=E.field)},n.$$.update=()=>{var E,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=Y.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=Y.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&Y.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=Y.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,p,g,v,r,y,C,M,S,$,D,O]}class G3 extends Ae{constructor(e){super(),Ee(this,e,Z3,K3,Te,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function nh(n){let e,t;return{c(){e=_("small"),t=R(n[1]),h(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&ge(t,i[1])},d(i){i&&k(e)}}}function J3(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&nh(n);return{c(){e=_("i"),i=T(),s=_("div"),l=_("div"),r=R(o),a=T(),c&&c.c(),h(e,"class","ri-information-line link-hint"),h(l,"class","block txt-ellipsis"),h(s,"class","content svelte-1gjwqyd")},m(d,p){w(d,e,p),w(d,i,p),w(d,s,p),m(s,l),m(l,r),m(s,a),c&&c.m(s,null),u||(f=Ze(t=St.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[p]){t&&zn(t.update)&&p&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),p&1&&o!==(o=d[0].id+"")&&ge(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,p):(c=nh(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:ae,o:ae,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function X3(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["name","title","label","key","email","heading","content",...ObjectLine truncated
|
||||
`,h(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function b4(n){let e,t,i;function s(o){n[31](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new g4({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function v4(n){let e,t,i;function s(o){n[30](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new o4({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function y4(n){let e,t,i,s,l;function o(f){n[27](f,n[40])}function r(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new G3({props:u}),me.push(()=>Le(e,"value",o)),me.push(()=>Le(e,"uploadedFiles",r)),me.push(()=>Le(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],Fe(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],Fe(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],Fe(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function k4(n){let e,t,i;function s(o){n[26](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new D3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function w4(n){let e,t,i;function s(o){n[25](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new $3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function S4(n){let e,t,i;function s(o){n[24](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new y3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function $4(n){let e,t,i;function s(o){n[23](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new g3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function C4(n){let e,t,i;function s(o){n[22](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new d3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function M4(n){let e,t,i;function s(o){n[21](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new a3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function T4(n){let e,t,i;function s(o){n[20](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new s3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],Fe(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function D4(n){let e,t,i;function s(o){n[19](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new e3({props:l}),me.push(()=>Le(e,"value",s)),{c(){B(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;
Line truncated
|
||||
<span class="txt">Delete</span>`,h(e,"tabindex","0"),h(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[18]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function A4(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",o,r,a,u,f,c=!n[2].isNew&&n[10]&&ch(n);return{c(){e=_("h4"),i=R(t),s=T(),o=R(l),r=R(" record"),a=T(),c&&c.c(),u=lt()},m(d,p){w(d,e,p),m(e,i),m(e,s),m(e,o),m(e,r),w(d,a,p),c&&c.m(d,p),w(d,u,p),f=!0},p(d,p){(!f||p[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&ge(i,t),(!f||p[0]&1)&&l!==(l=d[0].name+"")&&ge(o,l),!d[2].isNew&&d[10]?c?(c.p(d,p),p[0]&1028&&A(c,1)):(c=ch(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(De(),P(c,1,1,()=>{c=null}),Oe())},i(d){f||(A(c),f=!0)},o(d){P(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function P4(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=T(),s=_("button"),l=_("span"),r=R(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-secondary"),e.disabled=n[7],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[11]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[9]||n[7],le(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,r),u||(f=Q(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ge(r,o),d[0]&640&&a!==(a=!c[9]||c[7])&&(s.disabled=a),d[0]&128&&le(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function L4(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[P4],header:[A4],default:[O4]},$$scope:{ctx:n}};return e=new yi({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&288&&(o.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(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[33](null),z(e,s)}}}function dh(n){return JSON.stringify(n)}function I4(n,e,t){let i,s,l,o;const r=rn(),a="record_"+Y.randomString(5);let{collection:u}=e,f,c=null,d=new ao,p=!1,g=!1,v={},b={},y="";function C(ee){return S(ee),t(8,g=!0),f==null?void 0:f.show()}function M(){return f==null?void 0:f.hide()}async function S(ee){Li({}),c=ee||{},t(2,d=ee!=null&&ee.clone?ee.clone():new ao),t(3,v={}),t(4,b={}),await oi(),t(15,y=dh(d))}function $(){if(p||!l)return;t(7,p=!0);const ee=O();let G;d.isNew?G=ke.Records.create(u==null?void 0:u.id,ee):G=ke.Records.update(u==null?void 0:u.id,d.id,ee),G.then(async ve=>{cn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),M(),r("save",ve)}).catch(ve=>{ke.errorResponseHandler(ve)}).finally(()=>{t(7,p=!1)})}function D(){!(c!=null&&c.id)||bi("Do you really want to delete the selected record?",()=>ke.Records.delete(c["@collectionId"],c.id).then(()=>{M(),cn("Successfully deleted record."),r("delete",c)}).catch(ee=>{ke.errorResponseHandler(ee)}))}function O(){const ee=(d==null?void 0:d.export())||{},G=new FormData,ve={};for(const Ne of(u==null?void 0:u.schema)||[])ve[Ne.name]=Ne;for(const Ne in ee)!ve[Ne]||(typeof ee[Ne]>"u"&&(ee[Ne]=null),Y.addValueToFormData(G,Ne,ee[Ne]));for(const Ne in v){const Ve=Y.toArray(v[Ne]);for(const pe of Ve)G.append(Ne,pe)}for(const Ne in b){const Ve=Y.toArray(b[Ne]);for(const pe of Ve)G.append(Ne+"."+pe,"")}return G}const E=()=>M(),I=()=>D();function L(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function N(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function H(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function te(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function oe(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function q(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function K(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function W(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function X(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function ne(ee,G){n.$$.not_equal(v[G.name],ee)&&(v[G.name]=ee,t(3,v))}function fe(ee,G){n.$$.not_equal(b[G.name],ee)&&(b[G.name]=ee,t(4,b))}function Me(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}function re(ee,G){n.$$.not_equal(d[G.name],ee)&&(d[G.name]=ee,t(2,d))}const de=()=>s&&g?(bi("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),M()}),!1):!0;function be(ee){me[ee?"unshift":"push"](()=>{f=ee,t(6,f)})}function Z(ee){ut.call(this,n,ee)}function we(ee){ut.call(this,n,ee)}return n.$$set=ee=>{"collection"in ee&&t(0,u=ee.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=Y.hasNonEmptyProps(v)||Y.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||y!=dh(d)),n.$$.dirty[0]&36&&t(9,l=d.isNew||s),n.$$.dirty[0]&1&&t(10,o=(u==null?void 0:u.name)!=="profiles")},[u,M,d,v,b,s,f,p,g,l,o,a,$,D,C,y,i,E,I,L,N,H,te,oe,q,K,W,X,ne,fe,Me,re,de,be,Z,we]}class Gg extends Ae{constructor(e){super(),Ee(this,e,I4,L4,Te,{collection:0,show:14,hide:1},null,[-1,-1Line truncated
|
||||
`},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function $h(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[28]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function Ch(n,e){let t,i,s;return i=new Jg({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8&&(r.record=e[35]),o[0]&2048&&(r.field=e[38]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Mh(n,e){let t,i,s,l,o,r,a,u,f,c,d,p,g,v=[],b=new Map,y,C,M,S,$,D,O,E,I,L,N,H;function te(){return e[25](e[35])}p=new Yo({props:{id:e[35].id}});let oe=e[11];const q=X=>X[38].name;for(let X=0;X<oe.length;X+=1){let ne=yh(e,oe,X),fe=q(ne);b.set(fe,v[X]=Ch(fe,ne))}M=new _i({props:{date:e[35].created}}),D=new _i({props:{date:e[35].updated}});function K(){return e[26](e[35])}function W(...X){return e[27](e[35],...X)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=T(),u=_("label"),c=T(),d=_("td"),B(p.$$.fragment),g=T();for(let X=0;X<v.length;X+=1)v[X].c();y=T(),C=_("td"),B(M.$$.fragment),S=T(),$=_("td"),B(D.$$.fragment),O=T(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',I=T(),h(l,"type","checkbox"),h(l,"id",o="checkbox_"+e[35].id),l.checked=r=e[5][e[35].id],h(u,"for",f="checkbox_"+e[35].id),h(s,"class","form-field"),h(i,"class","bulk-select-col min-width"),h(d,"class","col-type-text col-field-id"),h(C,"class","col-type-date col-field-created"),h($,"class","col-type-date col-field-updated"),h(E,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(X,ne){w(X,t,ne),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),V(p,d,null),m(t,g);for(let fe=0;fe<v.length;fe+=1)v[fe].m(t,null);m(t,y),m(t,C),V(M,C,null),m(t,S),m(t,$),V(D,$,null),m(t,O),m(t,E),m(t,I),L=!0,N||(H=[Q(l,"change",te),Q(s,"click",Gn(e[19])),Q(t,"click",K),Q(t,"keydown",W)],N=!0)},p(X,ne){e=X,(!L||ne[0]&8&&o!==(o="checkbox_"+e[35].id))&&h(l,"id",o),(!L||ne[0]&40&&r!==(r=e[5][e[35].id]))&&(l.checked=r),(!L||ne[0]&8&&f!==(f="checkbox_"+e[35].id))&&h(u,"for",f);const fe={};ne[0]&8&&(fe.id=e[35].id),p.$set(fe),ne[0]&2056&&(oe=e[11],De(),v=kt(v,ne,q,1,e,oe,b,t,Gt,Ch,y,yh),Oe());const Me={};ne[0]&8&&(Me.date=e[35].created),M.$set(Me);const re={};ne[0]&8&&(re.date=e[35].updated),D.$set(re)},i(X){if(!L){A(p.$$.fragment,X);for(let ne=0;ne<oe.length;ne+=1)A(v[ne]);A(M.$$.fragment,X),A(D.$$.fragment,X),L=!0}},o(X){P(p.$$.fragment,X);for(let ne=0;ne<v.length;ne+=1)P(v[ne]);P(M.$$.fragment,X),P(D.$$.fragment,X),L=!1},d(X){X&&k(t),z(p);for(let ne=0;ne<v.length;ne+=1)v[ne].d();z(M),z(D),N=!1,xe(H)}}}function Th(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),o=R(n[4]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&ge(s,i),a[0]&16&&ge(o,r[4])},d(r){r&&k(e)}}}function Dh(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=R("Load more ("),o=R(l),r=R(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),le(t,"btn-loading",n[8]),le(t,"btn-disabled",n[8]),h(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=Q(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&ge(o,l),c[0]&256&&le(t,"btn-loading",f[8]),c[0]&256&&le(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Oh(n){let e,t,i,s,l,o,r=n[6]===1?"record":"records",a,u,f,c,d,p,g,v,b,y,C;return{c(){e=_("div"),t=_("div"),i=R("Selected "),s=_("strong"),l=R(n[6]),o=T(),a=R(r),u=T(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=T(),d=_("div"),p=T(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',h(t,"class","txt"),h(f,"type","button"),h(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),le(f,"btn-disabled",n[9]),h(d,"class","flex-fill"),h(g,"type","button"),h(g,"class","btn btn-sm btn-secondary btn-danger"),le(g,"btn-loading",n[9]),le(g,"btn-disabled",n[9]),h(e,"class","bulkbar")},m(M,S){w(M,e,S),m(e,t),m(t,i),m(t,s),m(s,l),m(t,o),m(t,a),m(e,u),m(e,f),m(e,c),m(e,d),m(e,p),m(e,g),b=!0,y||(C=[Q(f,"click",n[30]),Q(g,"click",n[31])],y=!0)},p(M,S){(!b||S[0]&64)&&ge(l,M[6]),(!b||S[0]&64)&&r!==(r=M[6]===1?"record":"records")&&ge(a,r),S[0]&512&&le(f,"btn-disabled",M[9]),S[0]&512&&le(g,"btn-loading",M[9]),S[0]&512&&le(g,"btn-disabled",M[9])},i(M){b||(M&&Dt(()=>{v||(v=ot(e,Hn,{duration:150,y:5},!0)),v.run(1)}),b=!0)},o(M){M&&(v||(v=ot(e,Hn,{duration:150,y:5},!1)),v.run(0)),b=!1},d(M){M&&k(e),M&&v&&v.end(),y=!1,xe(C)}}}function nM(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v=[],b=new Map,y,C,M,S,$,D,O,E,I,L,N=[],H=new Map,te,oe,q,K,W,X,ne;function fe(se){n[21](se)}let Me={class:"col-type-text
Line truncated
|
||||
<span class="txt">API Preview</span>`,C=T(),M=_("button"),M.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New record</span>`,S=T(),B($.$$.fragment),D=T(),B(O.$$.fragment),h(o,"class","breadcrumb-item"),h(a,"class","breadcrumb-item"),h(l,"class","breadcrumbs"),h(d,"type","button"),h(d,"class","btn btn-secondary btn-circle"),h(y,"type","button"),h(y,"class","btn btn-outline"),h(M,"type","button"),h(M,"class","btn btn-expanded"),h(b,"class","btns-group"),h(s,"class","page-header"),h(i,"class","page-wrapper")},m(K,W){V(e,K,W),w(K,t,W),w(K,i,W),m(i,s),m(s,l),m(l,o),m(l,r),m(l,a),m(a,f),m(s,c),m(s,d),m(s,p),V(g,s,null),m(s,v),m(s,b),m(b,y),m(b,C),m(b,M),m(i,S),V($,i,null),m(i,D),V(O,i,null),L=!0,N||(H=[Ze(St.call(null,d,{text:"Edit collection",position:"right"})),Q(d,"click",n[12]),Q(y,"click",n[14]),Q(M,"click",n[15])],N=!0)},p(K,W){(!L||W&4)&&u!==(u=K[2].name+"")&&ge(f,u);const X={};W&1&&(X.value=K[0]),W&4&&(X.autocompleteCollection=K[2]),$.$set(X);const ne={};W&4&&(ne.collection=K[2]),!E&&W&1&&(E=!0,ne.filter=K[0],Fe(()=>E=!1)),!I&&W&2&&(I=!0,ne.sort=K[1],Fe(()=>I=!1)),O.$set(ne)},i(K){L||(A(e.$$.fragment,K),A(g.$$.fragment,K),A($.$$.fragment,K),A(O.$$.fragment,K),L=!0)},o(K){P(e.$$.fragment,K),P(g.$$.fragment,K),P($.$$.fragment,K),P(O.$$.fragment,K),L=!1},d(K){z(e,K),K&&k(t),K&&k(i),z(g),z($),n[17](null),z(O),N=!1,xe(H)}}}function oM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=T(),s=_("h1"),s.textContent="Create your first collection to add records!",l=T(),o=_("button"),o.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">Create new collection</span>`,h(t,"class","icon"),h(s,"class","m-b-10"),h(o,"type","button"),h(o,"class","btn btn-expanded-lg btn-lg"),h(e,"class","placeholder-section m-b-base")},m(u,f){w(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,o),r||(a=Q(o,"click",n[11]),r=!0)},p:ae,i:ae,o:ae,d(u){u&&k(e),r=!1,a()}}}function rM(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading collections...</h1>`,h(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:ae,i:ae,o:ae,d(t){t&&k(e)}}}function aM(n){let e,t,i,s,l,o,r,a,u;const f=[rM,oM,lM],c=[];function d(b,y){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let p={};s=new za({props:p}),n[21](s);let g={};o=new KC({props:g}),n[22](o);let v={collection:n[2]};return a=new Gg({props:v}),n[23](a),a.$on("save",n[24]),a.$on("delete",n[25]),{c(){t.c(),i=T(),B(s.$$.fragment),l=T(),B(o.$$.fragment),r=T(),B(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),V(s,b,y),w(b,l,y),V(o,b,y),w(b,r,y),V(a,b,y),u=!0},p(b,[y]){let C=e;e=d(b),e===C?c[e].p(b,y):(De(),P(c[C],1,1,()=>{c[C]=null}),Oe(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const S={};o.$set(S);const $={};y&4&&($.collection=b[2]),a.$set($)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[21](null),z(s,b),b&&k(l),n[22](null),z(o,b),b&&k(r),n[23](null),z(a,b)}}}function uM(n,e,t){var K;let i,s,l,o,r;It(n,ii,W=>t(2,s=W)),It(n,ys,W=>t(10,l=W)),It(n,Jt,W=>t(26,o=W)),It(n,Qr,W=>t(8,r=W));const a=Y.getQueryParams((K=window.location)==null?void 0:K.href);_n(Jt,o="Collections",o);let u,f,c,d,p=a.filter||"",g=a.sort||"-created",v=a.collectionId;function b(){t(9,v=s.id),t(1,g="-created"),t(0,p="")}y2(v);const y=()=>u==null?void 0:u.show(),C=()=>u==null?void 0:u.show(s),M=()=>d==null?void 0:d.load(),S=()=>f==null?void 0:f.show(s),$=()=>c==null?void 0:c.show(),D=W=>t(0,p=W.detail);function O(W){me[W?"unshift":"push"](()=>{d=W,t(6,d)})}function E(W){p=W,t(0,p)}function I(W){g=W,t(1,g)}const L=W=>c==null?void 0:c.show(W==null?void 0:W.detail);function N(W){me[W?"unshift":"push"](()=>{u=W,t(3,u)})}function H(W){me[W?"unshift":"push"](()=>{f=W,t(4,f)})}function te(W){me[W?"unshift":"push"](()=>{c=W,t(5,c)})}const oe=()=>d==null?void 0:d.load(),q=()=>d==null?void 0:d.load();return n.$$.update=()=>{n.$$.dirty&1024&&t(7,i=l.filter(W=>W.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&v!=s.id&&b(),n.$$.dirty&7&&(g||p||(s==null?void 0:s.id))&&Y.replaceClientQueryParams({collectionId:s==null?void 0:s.id,filter:p,sort:g})},[p,g,s,u,f,c,d,i,r,v,l,y,C,M,S,$,D,O,E,I,L,N,H,te,oe,q]}class fM extends Ae{constructor(e){super(),Ee(this,e,uM,aM,Te,{})}}function Eh(n){let e,t;return e=new Pe({props:{class:"form-field disabled",name:"id",$$slots:{default:[cM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(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){z(e,i)}}}function cM(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[31]),h(r,"type","text"),h(r,"id",a=n[31]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&h(e,"for",l),c[1]&1&&a!==(a=f[31])&&h(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function Ah(n){let e,t,i;return{c(){e=_("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',h(e,"class","form-field-addon txt-success")},m(s,l){w(s,e,l),t||(i=Ze(St.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function dM(n){let e,t,i,s,l,o,r,a,u,f,c,d=n[1].verified&&Ah();return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),d&&d.c(),r=T(),a=_("input"),h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[31]),h(a,"type","email"),h(a,"autocomplete","off"),h(a,"id",u=n[31]),a.required=!0},m(p,g){w(p,e,g),m(e,t),m(e,i),m(e,s),w(p,o,g),d&&d.m(p,g),w(p,r,g),w(p,a,g),Se(a,n[2]),f||(c=Q(a,"input",n[19]),f=!0)},p(p,g){g[1]&1&&l!==(l=p[31])&&h(e,"for",l),p[1].verified?d||(d=Ah(),d.c(),d.m(r.parentNode,r)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=p[31])&&h(a,"id",u),g[0]&4&&a.value!==p[2]&&Se(a,p[2])},d(p){p&&k(e),p&&k(o),d&&d.d(p),p&&k(r),p&&k(a),f=!1,c()}}}function Ph(n){let e,t;return e=new Pe({props:{class:"form-field form-field-toggle",$$slots:{default:[hM,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&8|s[1]&3&&(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){z(e,i)}}}function hM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[31]),h(s,"for",o=n[31])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),m(s,l),r||(a=Q(e,"change",n[20]),r=!0)},p(u,f){f[1]&1&&t!==(t=u[31])&&h(e,"id",t),f[0]&8&&(e.checked=u[3]),f[1]&1&&o!==(o=u[31])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Lh(n){let e,t,i,s,l,o,r,a,u;return s=new Pe({props:{claLine truncated
|
||||
<span class="txt">Send verification email</span>`,h(e,"type","button"),h(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[16]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function vM(n){let e,t,i,s,l=!n[1].verified&&Nh(n);return{c(){l&&l.c(),e=T(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i>
|
||||
<span class="txt">Delete</span>`,h(t,"type","button"),h(t,"class","dropdown-item")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),i||(s=Q(t,"click",n[17]),i=!0)},p(o,r){o[1].verified?l&&(l.d(1),l=null):l?l.p(o,r):(l=Nh(o),l.c(),l.m(e.parentNode,e))},d(o){l&&l.d(o),o&&k(e),o&&k(t),i=!1,s()}}}function yM(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,p=!n[1].isNew&&Fh(n);return{c(){p&&p.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=R(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-secondary"),t.disabled=n[5],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[5],le(l,"btn-loading",n[5])},m(g,v){p&&p.m(g,v),w(g,e,v),w(g,t,v),m(t,i),w(g,s,v),w(g,l,v),m(l,o),m(o,a),f=!0,c||(d=Q(t,"click",n[18]),c=!0)},p(g,v){g[1].isNew?p&&(De(),P(p,1,1,()=>{p=null}),Oe()):p?(p.p(g,v),v[0]&2&&A(p,1)):(p=Fh(g),p.c(),A(p,1),p.m(e.parentNode,e)),(!f||v[0]&32)&&(t.disabled=g[5]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&ge(a,r),(!f||v[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),v[0]&32&&le(l,"btn-loading",g[5])},i(g){f||(A(p),f=!0)},o(g){P(p),f=!1},d(g){p&&p.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function kM(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[yM],header:[bM],default:[_M]},$$scope:{ctx:n}};return e=new yi({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1088&&(o.beforeHide=s[24]),l[0]&1966|l[1]&2&&(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[25](null),z(e,s)}}}function wM(n,e,t){let i;const s=rn(),l="user_"+Y.randomString(5);let o,r=new uo,a=!1,u=!1,f="",c="",d="",p=!1,g=!0;function v(X){return y(X),t(6,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(X){Li({}),t(1,r=X!=null&&X.clone?X.clone():new uo),C()}function C(){t(3,p=!1),t(9,g=!0),t(2,f=(r==null?void 0:r.email)||""),t(7,c=""),t(8,d="")}function M(){if(a||!i)return;t(5,a=!0);const X={email:f};(r.isNew||p)&&(X.password=c,X.passwordConfirm=d);let ne;r.isNew?ne=ke.Users.create(X):ne=ke.Users.update(r.id,X),ne.then(async fe=>{g&&$(!1),t(6,u=!1),b(),cn(r.isNew?"Successfully created user.":"Successfully updated user."),s("save",fe)}).catch(fe=>{ke.errorResponseHandler(fe)}).finally(()=>{t(5,a=!1)})}function S(){!(r!=null&&r.id)||bi("Do you really want to delete the selected user?",()=>ke.Users.delete(r.id).then(()=>{t(6,u=!1),b(),cn("Successfully deleted user."),s("delete",r)}).catch(X=>{ke.errorResponseHandler(X)}))}function $(X=!0){return ke.Users.requestVerification(r.isNew?f:r.email).then(()=>{t(6,u=!1),b(),X&&cn(`Successfully sent verification email to ${r.email}.`)}).catch(ne=>{ke.errorResponseHandler(ne)})}const D=()=>$(),O=()=>S(),E=()=>b();function I(){f=this.value,t(2,f)}function L(){p=this.checked,t(3,p)}function N(){c=this.value,t(7,c)}function H(){d=this.value,t(8,d)}function te(){g=this.checked,t(9,g)}const oe=()=>i&&u?(bi("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),b()}),!1):!0;function q(X){me[X?"unshift":"push"](()=>{o=X,t(4,o)})}function K(X){ut.call(this,n,X)}function W(X){ut.call(this,n,X)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=r.isNew&&f!=""||p||f!==r.email)},[b,r,f,p,o,a,u,c,d,g,i,l,M,S,$,v,D,O,E,I,L,N,H,te,oe,q,K,W]}class SM extends Ae{constructor(e){super(),Ee(this,e,wM,kM,Te,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function Rh(n,e,t){const i=n.slice();return i[39]=e[t],i}function Hh(n,e,t){const i=n.slice();return i[42]=e[t],i}function jh(n,e,t){const i=n.slice();return i[42]=e[t],i}function $M(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M,S,$,D,O,E,I,L,N=[],H=new Map,te,oe,q,K,W,X,ne,fe,Me,re,de=[],be=new Map,Z,we,ee,G,ve;u=new qo({}),u.$on("refresh",n[17]),v=new jo({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),v.$on("submit",n[19]);function Ne(ie){n[20](ie)}let Ve={class:"col-type-text col-field-id",name:"id",$$slots:{default:[MM]},$$scope:{ctx:n}};n[4]!==void 0&&(Ve.sort=n[4]),$=new en({props:Ve}),me.push(()=>Le($,"sort",Ne));function pe(ie){n[21](ie)}let J={class:"col-type-email col-field-email",name:"email",$$slots:{default:[TM]},$$scope:{ctx:n}};n[4]!==void 0&&(J.sort=n[4]),E=new en({props:J}),me.push(()=>Le(E,"sort",pe));let se=n[12];const ye=ie=>ie[42].name;for(let ie=0;ie<se.length;ie+=1){let _e=jh(n,se,ie),Ue=ye(_e);H.set(Ue,N[ie]=qh(Ue,_e))}function We(ie){n[22](ie)}let et={class:"col-type-date col-field-created",name:"created",$$slots:{default:[DM]},$$scope:{ctx:n}};n[4]!==void 0&&(et.sort=n[4]),oe=new en({props:et}),me.push(()=>Le(oe,"sort",We));function Je(ie){n[23](ie)}let at={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[OM]},$$scope:{ctx:n}};n[4]!==voLine truncated
|
||||
<span class="txt">New user</span>`,g=T(),B(v.$$.fragment),b=T(),y=_("div"),C=_("table"),M=_("thead"),S=_("tr"),B($.$$.fragment),O=T(),B(E.$$.fragment),L=T();for(let ie=0;ie<N.length;ie+=1)N[ie].c();te=T(),B(oe.$$.fragment),K=T(),B(W.$$.fragment),ne=T(),fe=_("th"),Me=T(),re=_("tbody");for(let ie=0;ie<de.length;ie+=1)de[ie].c();ze&&ze.c(),Z=T(),Be&&Be.c(),we=T(),dt&&dt.c(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(r,"type","button"),h(r,"class","btn btn-secondary btn-circle"),h(c,"class","flex-fill"),h(p,"type","button"),h(p,"class","btn btn-expanded"),h(t,"class","page-header"),h(fe,"class","col-type-action min-width"),h(C,"class","table"),le(C,"table-loading",n[10]),h(y,"class","table-wrapper"),h(e,"class","page-wrapper")},m(ie,_e){w(ie,e,_e),m(e,t),m(t,i),m(i,s),m(s,l),m(t,o),m(t,r),m(t,a),V(u,t,null),m(t,f),m(t,c),m(t,d),m(t,p),m(e,g),V(v,e,null),m(e,b),m(e,y),m(y,C),m(C,M),m(M,S),V($,S,null),m(S,O),V(E,S,null),m(S,L);for(let Ue=0;Ue<N.length;Ue+=1)N[Ue].m(S,null);m(S,te),V(oe,S,null),m(S,K),V(W,S,null),m(S,ne),m(S,fe),m(C,Me),m(C,re);for(let Ue=0;Ue<de.length;Ue+=1)de[Ue].m(re,null);ze&&ze.m(re,null),m(e,Z),Be&&Be.m(e,null),m(e,we),dt&&dt.m(e,null),ee=!0,G||(ve=[Ze(St.call(null,r,{text:"Edit profile collection",position:"right"})),Q(r,"click",n[16]),Q(p,"click",n[18])],G=!0)},p(ie,_e){(!ee||_e[0]&16384)&&ge(l,ie[14]);const Ue={};_e[0]&8&&(Ue.value=ie[3]),v.$set(Ue);const it={};_e[1]&65536&&(it.$$scope={dirty:_e,ctx:ie}),!D&&_e[0]&16&&(D=!0,it.sort=ie[4],Fe(()=>D=!1)),$.$set(it);const rt={};_e[1]&65536&&(rt.$$scope={dirty:_e,ctx:ie}),!I&&_e[0]&16&&(I=!0,rt.sort=ie[4],Fe(()=>I=!1)),E.$set(rt),_e[0]&4096&&(se=ie[12],N=kt(N,_e,ye,1,ie,se,H,S,Jn,qh,te,jh));const Xe={};_e[1]&65536&&(Xe.$$scope={dirty:_e,ctx:ie}),!q&&_e[0]&16&&(q=!0,Xe.sort=ie[4],Fe(()=>q=!1)),oe.$set(Xe);const $t={};_e[1]&65536&&($t.$$scope={dirty:_e,ctx:ie}),!X&&_e[0]&16&&(X=!0,$t.sort=ie[4],Fe(()=>X=!1)),W.$set($t),_e[0]&5450&&(tt=ie[1],De(),de=kt(de,_e,wt,1,ie,tt,be,re,Gt,Uh,null,Rh),Oe(),!tt.length&&ze?ze.p(ie,_e):tt.length?ze&&(ze.d(1),ze=null):(ze=Vh(ie),ze.c(),ze.m(re,null))),_e[0]&1024&&le(C,"table-loading",ie[10]),ie[1].length?Be?Be.p(ie,_e):(Be=Wh(ie),Be.c(),Be.m(e,we)):Be&&(Be.d(1),Be=null),ie[1].length&&ie[13]?dt?dt.p(ie,_e):(dt=Yh(ie),dt.c(),dt.m(e,null)):dt&&(dt.d(1),dt=null)},i(ie){if(!ee){A(u.$$.fragment,ie),A(v.$$.fragment,ie),A($.$$.fragment,ie),A(E.$$.fragment,ie),A(oe.$$.fragment,ie),A(W.$$.fragment,ie);for(let _e=0;_e<tt.length;_e+=1)A(de[_e]);ee=!0}},o(ie){P(u.$$.fragment,ie),P(v.$$.fragment,ie),P($.$$.fragment,ie),P(E.$$.fragment,ie),P(oe.$$.fragment,ie),P(W.$$.fragment,ie);for(let _e=0;_e<de.length;_e+=1)P(de[_e]);ee=!1},d(ie){ie&&k(e),z(u),z(v),z($),z(E);for(let _e=0;_e<N.length;_e+=1)N[_e].d();z(oe),z(W);for(let _e=0;_e<de.length;_e+=1)de[_e].d();ze&&ze.d(),Be&&Be.d(),dt&&dt.d(),G=!1,xe(ve)}}}function CM(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
|
||||
<h1>Loading users...</h1>`,h(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:ae,i:ae,o:ae,d(t){t&&k(e)}}}function MM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function TM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function qh(n,e){let t,i,s,l,o,r,a,u=e[42].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),o=T(),r=_("span"),a=R("profile."),f=R(u),h(s,"class",l=Y.getFieldTypeIcon(e[42].type)),h(r,"class","txt"),h(i,"class","col-header-content"),h(t,"class",c="col-type-"+e[42].type+" col-field-"+e[42].name),h(t,"name",d=e[42].name),this.first=t},m(p,g){w(p,t,g),m(t,i),m(i,s),m(i,o),m(i,r),m(r,a),m(r,f)},p(p,g){e=p,g[0]&4096&&l!==(l=Y.getFieldTypeIcon(e[42].type))&&h(s,"class",l),g[0]&4096&&u!==(u=e[42].name+"")&&ge(f,u),g[0]&4096&&c!==(c="col-type-"+e[42].type+" col-field-"+e[42].name)&&h(t,"class",c),g[0]&4096&&d!==(d=e[42].name)&&h(t,"name",d)},d(p){p&&k(t)}}}function DM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function OM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function Vh(n){let e;function t(l,o){return l[10]?AM:EM}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function EM(n){var r;let e,t,i,s,l,o=((r=n[3])==null?void 0:r.length)&&zh(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=T(),o&&o.c(),l=T(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),o&&o.m(t,null),m(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?o?o.p(a,u):(o=zh(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function AM(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
|
||||
`},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function zh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[26]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function Bh(n,e){let t,i,s;return i=new Jg({props:{field:e[42],record:e[39].profile||{}}}),{key:n,first:null,c(){t=lt(),B(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&4096&&(r.field=e[42]),o[0]&2&&(r.record=e[39].profile||{}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Uh(n,e){let t,i,s,l,o,r,a,u=e[39].email+"",f,c,d,p,g=e[39].verified?"Verified":"Unverified",v,b,y=[],C=new Map,M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W;s=new Yo({props:{id:e[39].id}});let X=e[12];const ne=re=>re[42].name;for(let re=0;re<X.length;re+=1){let de=Hh(e,X,re),be=ne(de);C.set(be,y[re]=Bh(be,de))}$=new _i({props:{date:e[39].created}}),E=new _i({props:{date:e[39].updated}});function fe(){return e[24](e[39])}function Me(){return e[25](e[39])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),B(s.$$.fragment),l=T(),o=_("td"),r=_("div"),a=_("span"),f=R(u),d=T(),p=_("span"),v=R(g),b=T();for(let re=0;re<y.length;re+=1)y[re].c();M=T(),S=_("td"),B($.$$.fragment),D=T(),O=_("td"),B(E.$$.fragment),I=T(),L=_("td"),N=_("button"),N.innerHTML=`<i class="ri-user-settings-line"></i>
|
||||
<span class="txt">Edit user</span>`,H=T(),te=_("button"),te.innerHTML=`<i class="ri-profile-line"></i>
|
||||
<span class="txt">Edit profile</span>`,oe=T(),h(i,"class","col-type-text col-field-id"),h(a,"class","txt"),h(a,"title",c=e[39].email),h(p,"class","label"),le(p,"label-success",e[39].verified),le(p,"label-warning",!e[39].verified),h(r,"class","inline-flex"),h(o,"class","col-type-email col-field-email"),h(S,"class","col-type-date col-field-created"),h(O,"class","col-type-date col-field-updated"),h(N,"type","button"),h(N,"class","btn btn-sm btn-outline"),h(te,"type","button"),h(te,"class","btn btn-sm m-l-10"),h(L,"class","col-type-action min-width"),this.first=t},m(re,de){w(re,t,de),m(t,i),V(s,i,null),m(t,l),m(t,o),m(o,r),m(r,a),m(a,f),m(r,d),m(r,p),m(p,v),m(t,b);for(let be=0;be<y.length;be+=1)y[be].m(t,null);m(t,M),m(t,S),V($,S,null),m(t,D),m(t,O),V(E,O,null),m(t,I),m(t,L),m(L,N),m(L,H),m(L,te),m(t,oe),q=!0,K||(W=[Q(N,"click",Gn(fe)),Q(te,"click",Gn(Me))],K=!0)},p(re,de){e=re;const be={};de[0]&2&&(be.id=e[39].id),s.$set(be),(!q||de[0]&2)&&u!==(u=e[39].email+"")&&ge(f,u),(!q||de[0]&2&&c!==(c=e[39].email))&&h(a,"title",c),(!q||de[0]&2)&&g!==(g=e[39].verified?"Verified":"Unverified")&&ge(v,g),de[0]&2&&le(p,"label-success",e[39].verified),de[0]&2&&le(p,"label-warning",!e[39].verified),de[0]&4098&&(X=e[12],De(),y=kt(y,de,ne,1,e,X,C,t,Gt,Bh,M,Hh),Oe());const Z={};de[0]&2&&(Z.date=e[39].created),$.$set(Z);const we={};de[0]&2&&(we.date=e[39].updated),E.$set(we)},i(re){if(!q){A(s.$$.fragment,re);for(let de=0;de<X.length;de+=1)A(y[de]);A($.$$.fragment,re),A(E.$$.fragment,re),q=!0}},o(re){P(s.$$.fragment,re);for(let de=0;de<y.length;de+=1)P(y[de]);P($.$$.fragment,re),P(E.$$.fragment,re),q=!1},d(re){re&&k(t),z(s);for(let de=0;de<y.length;de+=1)y[de].d();z($),z(E),K=!1,xe(W)}}}function Wh(n){let e,t,i=n[1].length+"",s,l,o;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),o=R(n[2]),h(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&2&&i!==(i=r[1].length+"")&&ge(s,i),a[0]&4&&ge(o,r[2])},d(r){r&&k(e)}}}function Yh(n){let e,t,i,s,l=n[2]-n[1].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=R("Load more ("),o=R(l),r=R(")"),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-lg btn-secondary btn-expanded"),le(t,"btn-loading",n[10]),le(t,"btn-disabled",n[10]),h(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=Q(t,"click",n[27]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&ge(o,l),c[0]&1024&&le(t,"btn-loading",f[10]),c[0]&1024&&le(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function PM(n){let e,t,i,s,l,o,r,a,u;const f=[CM,$M],c=[];function d(b,y){return b[11]?0:1}e=d(n),t=c[e]=f[e](n);let p={};s=new SM({props:p}),n[28](s),s.$on("save",n[29]),s.$on("delete",n[30]);let g={};o=new za({props:g}),n[31](o),o.$on("save",n[32]);let v={collection:n[5]};return a=new Gg({props:v}),n[33](a),a.$on("save",n[34]),{c(){t.c(),i=T(),B(s.$$.fragment),l=T(),B(o.$$.fragment),r=T(),B(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),V(s,b,y),w(b,l,y),V(o,b,y),w(b,r,y),V(a,b,y),u=!0},p(b,y){let C=e;e=d(b),e===C?c[e].p(b,y):(De(),P(c[C],1,1,()=>{c[C]=null}),Oe(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const S={};o.$set(S);const $={};y[0]&32&&($.collection=b[5]),a.$set($)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[28](null),z(s,b),b&&k(l),n[31](null),z(o,b),b&&k(r),n[33](null),z(a,b)}}}function LM(n,e,t){var we;let i,s,l;It(n,Jt,ee=>t(14,l=ee));const o=Y.getQueryParams((we=window.location)==null?void 0:we.href),r=["id","userId","created","updated"];_n(Jt,l="Users",l);let a,u,f,c=[],d=1,p=0,g=!1,v=o.filter||"",b=o.sort||"-created",y=new On,C=!1;D();async function M(ee=1){return t(10,g=!0),ee<=1&&S(),ke.Users.getList(ee,50,{sort:b||"-created",filter:v}).then(G=>{t(10,g=!1),t(1,c=c.concat(G.items)),t(9,d=G.page),t(2,p=G.totalItems)}).catch(G=>{G!=null&&G.isAbort||(t(10,g=!1),console.warn(G),S(),ke.errorResponseHandler(G,!1))})}function S(){t(1,c=[]),t(9,d=1),t(2,p=0)}function $(ee){const G=c.find(ve=>ve.id===(ee==null?void 0:ee.userId));G&&(G.profile=ee),t(1,c)}async function D(){t(11,C=!0);try{t(5,y=await ke.Collections.getOne("profiles"))}catch(ee){ke.errorResponseHandler(ee)}t(11,C=!1)}const O=()=>u==null?void 0:u.show(y),E=()=>M(),I=()=>a==null?void 0:a.show(),L=ee=>t(3,v=ee.detail);function N(ee){b=ee,t(4,b)}function H(ee){b=ee,t(4,b)}function te(ee){b=ee,t(4,b)}function oe(ee){b=ee,t(4,b)}const q=ee=>a==null?void 0:a.show(ee),K=ee=>f==null?void 0:f.show(ee.profile),W=()=>t(3,v=""),X=()=>M(d+1);function ne(ee){me[ee?"unshift":"push"](()=>{a=ee,t(6,a)})}const fe=()=>M(),Me=()=>M();function re(ee){me[ee?"unshift":"push"](()=>{u=ee,t(7,u)})}const de=ee=>t(5,y=ee.detail);function be(ee){me[ee?"unshift":"push"](()=>{f=ee,t(8,f)})}const Z=ee=>$(ee.detail);return n.$$.update=()=>{var ee;n.$$.dirty[0]&24Line truncated
|
||||
<span class="txt">Application</span>`,o=T(),r=_("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
|
||||
<span class="txt">Mail settings</span>`,a=T(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
|
||||
<span class="txt">Files storage</span>`,f=T(),c=_("div"),c.textContent="Authentication",d=T(),p=_("a"),p.innerHTML=`<i class="ri-lock-password-line"></i>
|
||||
<span class="txt">Auth providers</span>`,g=T(),v=_("a"),v.innerHTML=`<i class="ri-key-line"></i>
|
||||
<span class="txt">Token options</span>`,b=T(),y=_("a"),y.innerHTML=`<i class="ri-shield-user-line"></i>
|
||||
<span class="txt">Admins</span>`,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(c,"class","sidebar-title"),h(p,"href","/settings/auth-providers"),h(p,"class","sidebar-list-item"),h(v,"href","/settings/tokens"),h(v,"class","sidebar-list-item"),h(y,"href","/settings/admins"),h(y,"class","sidebar-list-item"),h(t,"class","sidebar-content"),h(e,"class","page-sidebar settings-sidebar")},m(S,$){w(S,e,$),m(e,t),m(t,i),m(t,s),m(t,l),m(t,o),m(t,r),m(t,a),m(t,u),m(t,f),m(t,c),m(t,d),m(t,p),m(t,g),m(t,v),m(t,b),m(t,y),C||(M=[Ze(ei.call(null,l,{path:"/settings"})),Ze(wn.call(null,l)),Ze(ei.call(null,r,{path:"/settings/mail/?.*"})),Ze(wn.call(null,r)),Ze(ei.call(null,u,{path:"/settings/storage/?.*"})),Ze(wn.call(null,u)),Ze(ei.call(null,p,{path:"/settings/auth-providers/?.*"})),Ze(wn.call(null,p)),Ze(ei.call(null,v,{path:"/settings/tokens/?.*"})),Ze(wn.call(null,v)),Ze(ei.call(null,y,{path:"/settings/admins/?.*"})),Ze(wn.call(null,y))],C=!0)},p:ae,i:ae,o:ae,d(S){S&&k(e),C=!1,xe(M)}}}class Ts extends Ae{constructor(e){super(),Ee(this,e,null,FM,Te,{})}}function Kh(n,e,t){const i=n.slice();return i[31]=e[t],i}function Zh(n){let e,t;return e=new Pe({props:{class:"form-field disabled",name:"id",$$slots:{default:[NM,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|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){z(e,i)}}}function NM(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="ID",o=T(),r=_("input"),h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"for",l=n[30]),h(r,"type","text"),h(r,"id",a=n[30]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&h(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&h(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function Gh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[31])}function u(...f){return n[18](n[31],...f)}return{c(){e=_("figure"),t=_("img"),s=T(),Zn(t.src,i="/_/images/avatars/avatar"+n[31]+".svg")||h(t,"src",i),h(t,"alt","Avatar "+n[31]),h(e,"tabindex","0"),h(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,c){w(f,e,c),m(e,t),m(e,s),o||(r=[Q(e,"click",a),Q(e,"keydown",u)],o=!0)},p(f,c){n=f,c[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&h(e,"class",l)},d(f){f&&k(e),o=!1,xe(r)}}}function RM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=_("i"),i=T(),s=_("span"),s.textContent="Email",o=T(),r=_("input"),h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[30]),h(r,"type","email"),h(r,"autocomplete","off"),h(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,o,d),w(c,r,d),Se(r,n[3]),u||(f=Q(r,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&h(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&h(r,"id",a),d[0]&8&&r.value!==c[3]&&Se(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function Jh(n){let e,t;return e=new Pe({props:{class:"form-field form-field-toggle",$$slots:{default:[HM,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|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){z(e,i)}}}function HM(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[30]),h(s,"for",o=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),m(s,l),r||(a=Q(e,"change",n[20]),r=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&h(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&o!==(o=u[30])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Xh(n){let e,t,i,s,l,o,r,a,u;return s=new Pe({props:{class:"form-field required",name:"password",$$slots:{default:[jM,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),r=new Pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[qM,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),B(s.$$.fragment),l=T(),o=_("div"),B(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,c){w(f,e,c),m(e,t),m(t,i),V(s,i,null),m(t,l),m(t,o),V(r,o,null),u=!0},p(f,c){const d={};c[0]&1073742080|c[1]&8&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const p={};c[0]&1073742336|c[1]&8&&(p.$$scope={dirty:c,ctx:f}),r.$set(p)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),Dt(()=>{a||(a=ot(t,xt,{duration:150},!0)),a.run(Line truncated
|
||||
<span class="txt">Delete</span>`,h(e,"type","button"),h(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[15]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function UM(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,p=!n[1].isNew&&Qh(n);return{c(){p&&p.c(),e=T(),t=_("button"),i=_("span"),i.textContent="Cancel",s=T(),l=_("button"),o=_("span"),a=R(r),h(i,"class","txt"),h(t,"type","button"),h(t,"class","btn btn-secondary"),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],le(l,"btn-loading",n[6])},m(g,v){p&&p.m(g,v),w(g,e,v),w(g,t,v),m(t,i),w(g,s,v),w(g,l,v),m(l,o),m(o,a),f=!0,c||(d=Q(t,"click",n[16]),c=!0)},p(g,v){g[1].isNew?p&&(De(),P(p,1,1,()=>{p=null}),Oe()):p?(p.p(g,v),v[0]&2&&A(p,1)):(p=Qh(g),p.c(),A(p,1),p.m(e.parentNode,e)),(!f||v[0]&64)&&(t.disabled=g[6]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&ge(a,r),(!f||v[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),v[0]&64&&le(l,"btn-loading",g[6])},i(g){f||(A(p),f=!0)},o(g){P(p),f=!1},d(g){p&&p.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function WM(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[UM],header:[zM],default:[VM]},$$scope:{ctx:n}};return e=new yi({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[23]),l[0]&1886|l[1]&8&&(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[24](null),z(e,s)}}}function YM(n,e,t){let i;const s=rn(),l="admin_"+Y.randomString(5);let o,r=new gs,a=!1,u=!1,f=0,c="",d="",p="",g=!1;function v(W){return y(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(W){Li({}),t(1,r=W!=null&&W.clone?W.clone():new gs),C()}function C(){t(4,g=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,p="")}function M(){if(a||!i)return;t(6,a=!0);const W={email:c,avatar:f};(r.isNew||g)&&(W.password=d,W.passwordConfirm=p);let X;r.isNew?X=ke.Admins.create(W):X=ke.Admins.update(r.id,W),X.then(async ne=>{var fe;t(7,u=!1),b(),cn(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ne),((fe=ke.AuthStore.model)==null?void 0:fe.id)===ne.id&&ke.AuthStore.save(ke.AuthStore.token,ne)}).catch(ne=>{ke.errorResponseHandler(ne)}).finally(()=>{t(6,a=!1)})}function S(){!(r!=null&&r.id)||bi("Do you really want to delete the selected admin?",()=>ke.Admins.delete(r.id).then(()=>{t(7,u=!1),b(),cn("Successfully deleted admin."),s("delete",r)}).catch(W=>{ke.errorResponseHandler(W)}))}const $=()=>S(),D=()=>b(),O=W=>t(2,f=W),E=(W,X)=>{(X.code==="Enter"||X.code==="Space")&&(X.preventDefault(),t(2,f=W))};function I(){c=this.value,t(3,c)}function L(){g=this.checked,t(4,g)}function N(){d=this.value,t(8,d)}function H(){p=this.value,t(9,p)}const te=()=>i&&u?(bi("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function oe(W){me[W?"unshift":"push"](()=>{o=W,t(5,o)})}function q(W){ut.call(this,n,W)}function K(W){ut.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||g||c!==r.email||f!==r.avatar)},[b,r,f,c,g,o,a,u,d,p,i,l,M,S,v,$,D,O,E,I,L,N,H,te,oe,q,K]}class KM extends Ae{constructor(e){super(),Ee(this,e,YM,WM,Te,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function xh(n,e,t){const i=n.slice();return i[23]=e[t],i}function ZM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="id",h(t,"class",Y.getFieldTypeIcon("primary")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function GM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="email",h(t,"class",Y.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function JM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="created",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function XM(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=T(),s=_("span"),s.textContent="updated",h(t,"class",Y.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:ae,d(l){l&&k(e)}}}function ep(n){let e;function t(l,o){return l[5]?xM:QM}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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&&k(e)}}}function QM(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&tp(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=T(),o&&o.c(),l=T(),h(t,"colspan","99"),h(t,"class","txtLine truncated
|
||||
`},m(t,i){w(t,e,i)},p:ae,d(t){t&&k(e)}}}function tp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Q(e,"click",n[17]),t=!0)},p:ae,d(s){s&&k(e),t=!1,i()}}}function np(n){let e;return{c(){e=_("span"),e.textContent="You",h(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ip(n,e){let t,i,s,l,o,r,a,u,f,c,d,p,g=e[23].email+"",v,b,y,C,M,S,$,D,O,E,I,L,N,H;u=new Yo({props:{id:e[23].id}});let te=e[23].id===e[7].id&&np();M=new _i({props:{date:e[23].created}}),D=new _i({props:{date:e[23].updated}});function oe(){return e[15](e[23])}function q(...K){return e[16](e[23],...K)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),r=T(),a=_("td"),B(u.$$.fragment),f=T(),te&&te.c(),c=T(),d=_("td"),p=_("span"),v=R(g),y=T(),C=_("td"),B(M.$$.fragment),S=T(),$=_("td"),B(D.$$.fragment),O=T(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',I=T(),Zn(l.src,o="/_/images/avatars/avatar"+(e[23].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(a,"class","col-type-text col-field-id"),h(p,"class","txt txt-ellipsis"),h(p,"title",b=e[23].email),h(d,"class","col-type-email col-field-email"),h(C,"class","col-type-date col-field-created"),h($,"class","col-type-date col-field-updated"),h(E,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(K,W){w(K,t,W),m(t,i),m(i,s),m(s,l),m(t,r),m(t,a),V(u,a,null),m(a,f),te&&te.m(a,null),m(t,c),m(t,d),m(d,p),m(p,v),m(t,y),m(t,C),V(M,C,null),m(t,S),m(t,$),V(D,$,null),m(t,O),m(t,E),m(t,I),L=!0,N||(H=[Q(t,"click",oe),Q(t,"keydown",q)],N=!0)},p(K,W){e=K,(!L||W&16&&!Zn(l.src,o="/_/images/avatars/avatar"+(e[23].avatar||0)+".svg"))&&h(l,"src",o);const X={};W&16&&(X.id=e[23].id),u.$set(X),e[23].id===e[7].id?te||(te=np(),te.c(),te.m(a,null)):te&&(te.d(1),te=null),(!L||W&16)&&g!==(g=e[23].email+"")&&ge(v,g),(!L||W&16&&b!==(b=e[23].email))&&h(p,"title",b);const ne={};W&16&&(ne.date=e[23].created),M.$set(ne);const fe={};W&16&&(fe.date=e[23].updated),D.$set(fe)},i(K){L||(A(u.$$.fragment,K),A(M.$$.fragment,K),A(D.$$.fragment,K),L=!0)},o(K){P(u.$$.fragment,K),P(M.$$.fragment,K),P(D.$$.fragment,K),L=!1},d(K){K&&k(t),z(u),te&&te.d(),z(M),z(D),N=!1,xe(H)}}}function sp(n){let e,t,i=n[4].length+"",s,l,o=n[4].length+"",r;return{c(){e=_("small"),t=R("Showing "),s=R(i),l=R(" of "),r=R(o),h(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(e,r)},p(a,u){u&16&&i!==(i=a[4].length+"")&&ge(s,i),u&16&&o!==(o=a[4].length+"")&&ge(r,o)},d(a){a&&k(e)}}}function eT(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M,S,$,D,O,E,I,L,N,H,te,oe,q,K,W,X,ne,fe,Me,re,de,be=[],Z=new Map,we,ee,G,ve,Ne,Ve;e=new Ts({}),c=new qo({}),c.$on("refresh",n[8]),y=new jo({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),y.$on("submit",n[10]);function pe(ie){n[11](ie)}let J={class:"col-type-text",name:"id",$$slots:{default:[ZM]},$$scope:{ctx:n}};n[2]!==void 0&&(J.sort=n[2]),I=new en({props:J}),me.push(()=>Le(I,"sort",pe));function se(ie){n[12](ie)}let ye={class:"col-type-email col-field-email",name:"email",$$slots:{default:[GM]},$$scope:{ctx:n}};n[2]!==void 0&&(ye.sort=n[2]),H=new en({props:ye}),me.push(()=>Le(H,"sort",se));function We(ie){n[13](ie)}let et={class:"col-type-date col-field-created",name:"created",$$slots:{default:[JM]},$$scope:{ctx:n}};n[2]!==void 0&&(et.sort=n[2]),q=new en({props:et}),me.push(()=>Le(q,"sort",We));function Je(ie){n[14](ie)}let at={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[XM]},$$scope:{ctx:n}};n[2]!==void 0&&(at.sort=n[2]),X=new en({props:at}),me.push(()=>Le(X,"sort",Je));let tt=n[4];const wt=ie=>ie[23].id;for(let ie=0;ie<tt.length;ie+=1){let _e=xh(n,tt,ie),Ue=wt(_e);Z.set(Ue,be[ie]=ip(Ue,_e))}let ze=null;tt.length||(ze=ep(n));let Be=n[4].length&&sp(n),dt={};return G=new KM({props:dt}),n[18](G),G.$on("save",n[19]),G.$on("delete",n[20]),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),l=_("nav"),o=_("div"),o.textContent="Settings",r=T(),a=_("div"),u=R(n[6]),f=T(),B(c.$$.fragment),d=T(),p=_("div"),g=T(),v=_("button"),v.innerHTML=`<i class="ri-add-line"></i>
|
||||
<span class="txt">New admin</span>`,b=T(),B(y.$$.fragment),C=T(),M=_("div"),S=_("table"),$=_("thead"),D=_("tr"),O=_("th"),E=T(),B(I.$$.fragment),N=T(),B(H.$$.fragment),oe=T(),B(q.$$.fragment),W=T(),B(X.$$.fragment),fe=T(),Me=_("th"),re=T(),de=_("tbody");for(let ie=0;ie<be.length;ie+=1)be[ie].c();ze&&ze.c(),we=T(),Be&&Be.c(),ee=T(),B(G.$$.fragment),h(o,"class","breadcrumb-item"),h(a,"class","breadcrumb-item"),h(l,"class","breadcrumbs"),h(p,"class","flex-fill"),h(v,"type","button"),h(v,"class","btn btn-expanded"),h(s,"class","page-header"),h(O,"class","min-width"),h(Me,"class","col-type-action min-width"),h(S,"class","table"),le(S,"table-loading",n[5]),h(M,"class","table-wrapper"),h(i,"class","page-wrapper")},m(ie,_e){V(e,ie,_e),w(ie,t,_e),w(ie,i,_e),m(i,s),m(s,l),m(l,o),m(l,r),m(l,a),m(a,u),m(s,f),V(c,s,null),m(s,d),m(s,p),m(s,g),m(s,v),m(i,b),V(y,i,null),m(i,C),m(i,M),m(M,S),m(S,$),m($,D),m(D,O),m(D,E),V(I,D,null),m(D,N),V(H,D,null),m(D,oe),V(q,D,null),m(D,W),V(X,D,null),m(D,fe),m(D,Me),m(S,re),m(S,de);for(let Ue=0;Ue<be.length;Ue+=1)be[Ue].m(de,null);ze&&ze.m(de,null),m(i,we),Be&&Be.m(i,null),w(ie,ee,_e),V(G,ie,_e),ve=!0,Ne||(Ve=Q(v,"click",n[9]),Ne=!0)},p(ie,[_e]){(!ve||_e&64)&&ge(u,ie[6]);const Ue={};_e&2&&(Ue.value=ie[1]),y.$set(Ue);const it={};_e&67108864&&(it.$$scope={dirty:_e,ctx:ie}),!L&&_e&4&&(L=!0,it.sort=ie[2],Fe(()=>L=!1)),I.$set(it);const rt={};_e&67108864&&(rt.$$scope={dirty:_e,ctx:ie}),!te&&_e&4&&(te=!0,rt.sort=ie[2],Fe(()=>te=!1)),H.$set(rt);const Xe={};_e&67108864&&(Xe.$$scope={dirty:_e,ctx:ie}),!K&&_e&4&&(K=!0,Xe.sort=ie[2],Fe(()=>K=!1)),q.$set(Xe);const $t={};_e&67108864&&($t.$$scope={dirty:_e,ctx:ie}),!ne&&_e&4&&(ne=!0,$t.sort=ie[2],Fe(()=>ne=!1)),X.$set($t),_e&186&&(tt=ie[4],De(),be=kt(be,_e,wt,1,ie,tt,Z,de,Gt,ip,null,xh),Oe(),!tt.length&&ze?ze.p(ie,_e):tt.length?ze&&(ze.d(1),ze=null):(ze=ep(ie),ze.c(),ze.m(de,null))),_e&32&&le(S,"table-loading",ie[5]),ie[4].length?Be?Be.p(ie,_e):(Be=sp(ie),Be.c(),Be.m(i,null)):Be&&(Be.d(1),Be=null);const Pt={};G.$set(Pt)},i(ie){if(!ve){A(e.$$.fragment,ie),A(c.$$.fragment,ie),A(y.$$.fragment,ie),A(I.$$.fragment,ie),A(H.$$.fragment,ie),A(q.$$.fragment,ie),A(X.$$.fragment,ie);for(let _e=0;_e<tt.length;_e+=1)A(be[_e]);A(G.$$.fragment,ie),ve=!0}},o(ie){P(e.$$.fragment,ie),P(c.$$.fragment,ie),P(y.$$.fragment,ie),P(I.$$.fragment,ie),P(H.$$.fragment,ie),P(q.$$.fragment,ie),P(X.$$.fragment,ie);for(let _e=0;_e<be.length;_e+=1)P(be[_e]);P(G.$$.fragment,ie),ve=!1},d(ie){z(e,ie),ie&&k(t),ie&&k(i),z(c),z(y),z(I),z(H),z(q),z(X);for(let _e=0;_e<be.length;_e+=1)be[_e].d();ze&&ze.d(),Be&&Be.d(),ie&&k(ee),n[18](null),z(G,ie),Ne=!1,Ve()}}}function tT(n,e,t){var L;let i,s;It(n,Jt,N=>t(6,i=N)),It(n,ga,N=>t(7,s=N));const l=Y.getQueryParams((L=window.location)==null?void 0:L.href);_n(Jt,i="Admins",i);let o,r=[],a=!1,u=l.filter||"",f=l.sort||"-created";function c(){return t(5,a=!0),t(4,r=[]),ke.Admins.getFullList(100,{sort:f||"-created",filter:u}).then(N=>{t(4,r=N),t(5,a=!1)}).catch(N=>{N!=null&&N.isAbort||(t(5,a=!1),console.warn(N),d(),ke.errorResponseHandler(N,!1))})}function d(){t(4,r=[])}const p=()=>c(),g=()=>o==null?void 0:o.show(),v=N=>t(1,u=N.detail);function b(N){f=N,t(2,f)}function y(N){f=N,t(2,f)}function C(N){f=N,t(2,f)}function M(N){f=N,t(2,f)}const S=N=>o==null?void 0:o.show(N),$=(N,H)=>{(H.code==="Enter"||H.code==="Space")&&(H.preventDefault(),o==null||o.show(N))},D=()=>t(1,u="");function O(N){me[N?"unshift":"push"](()=>{o=N,t(3,o)})}const E=()=>c(),I=()=>c();return n.$$.update=()=>{n.$$.dirty&6&&f!==-1&&u!==-1&&(Y.replaceClientQueryParams({filter:u,sort:f}),c())},[c,u,f,o,r,a,i,s,p,g,v,b,y,C,M,S,$,D,O,E,I]}class nT extends Ae{constructor(e){super(),Ee(this,e,tT,eT,Te,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function iT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Email"),s=T(),l=_("input"),h(e,"for",i=n[7]),h(l,"type","email"),h(l,"id",o=n[7]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0]),l.focus(),r||(a=Q(l,"input",n[4]),r=!0)},p(u,f){f&128&&i!==(i=u[7])&&h(e,"for",i),f&128&&o!==(o=u[7])&&h(l,"id",o),f&1&&l.value!==u[0]&&Se(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function sT(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=_("label"),t=R("Password"),s=T(),l=_("input"),r=T(),a=_("div"),u=_("a"),u.textContent="Forgotten password?",h(e,"for",i=n[7]),h(l,"type","password"),h(l,"id",o=n[7]),l.required=!0,h(u,"href","/request-password-reset"),h(u,"class","link-hint"),h(a,"class","help-block")},m(d,p){w(d,e,p),m(e,t),w(d,s,p),w(d,l,p),Se(l,n[1]),w(d,r,p),w(d,a,p),m(a,u),f||(c=[Q(l,"input",n[5]),Ze(wn.call(null,u))],f=!0)},p(d,p){p&128&&i!==(i=d[7])&&h(e,"for",i),p&128&&o!==(o=d[7])&&h(l,"id",o),p&2&&l.value!==d[1]&&Se(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),f=!1,xe(c)}}}function lT(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new Pe({props:{class:"form-field required",name:"email",$$slots:{default:[iT,({uniqueId:d})=>({7:d}),({uniqueId:d})=>d?128:0]},$$scope:{ctx:n}}}),o=new Pe({props:{claLine truncated
|
||||
<i class="ri-arrow-right-line"></i>`,h(t,"class","content txt-center m-b-base"),h(a,"type","submit"),h(a,"class","btn btn-lg btn-block btn-next"),le(a,"btn-disabled",n[2]),le(a,"btn-loading",n[2]),h(e,"class","block")},m(d,p){w(d,e,p),m(e,t),m(e,i),V(s,e,null),m(e,l),V(o,e,null),m(e,r),m(e,a),u=!0,f||(c=Q(e,"submit",Wt(n[3])),f=!0)},p(d,p){const g={};p&385&&(g.$$scope={dirty:p,ctx:d}),s.$set(g);const v={};p&386&&(v.$$scope={dirty:p,ctx:d}),o.$set(v),p&4&&le(a,"btn-disabled",d[2]),p&4&&le(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(o),f=!1,c()}}}function oT(n){let e,t;return e=new Um({props:{$$slots:{default:[lT]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&263&&(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){z(e,i)}}}function rT(n,e,t){var f;const i=Y.getQueryParams((f=window.location)==null?void 0:f.href);let s=i.demoEmail||"",l=i.demoPassword||"",o=!1;function r(){if(!o)return t(2,o=!0),ke.Admins.authViaEmail(s,l).then(()=>{ks("/")}).catch(()=>{jm("Invalid login credentials.")}).finally(()=>{t(2,o=!1)})}function a(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}return[s,l,o,r,a,u]}class aT extends Ae{constructor(e){super(),Ee(this,e,rT,oT,Te,{})}}function uT(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C;return i=new Pe({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[cT,({uniqueId:M})=>({14:M}),({uniqueId:M})=>M?16384:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[dT,({uniqueId:M})=>({14:M}),({uniqueId:M})=>M?16384:0]},$$scope:{ctx:n}}}),a=new Pe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[hT,({uniqueId:M})=>({14:M}),({uniqueId:M})=>M?16384:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),f=_("div"),c=_("div"),d=T(),p=_("button"),g=_("span"),g.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(c,"class","flex-fill"),h(g,"class","txt"),h(p,"type","submit"),h(p,"class","btn btn-expanded"),p.disabled=v=!n[3]||n[2],le(p,"btn-loading",n[2]),h(f,"class","col-lg-12 flex"),h(e,"class","grid")},m(M,S){w(M,e,S),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),m(e,r),V(a,e,null),m(e,u),m(e,f),m(f,c),m(f,d),m(f,p),m(p,g),b=!0,y||(C=Q(p,"click",n[9]),y=!0)},p(M,S){const $={};S&49153&&($.$$scope={dirty:S,ctx:M}),i.$set($);const D={};S&49153&&(D.$$scope={dirty:S,ctx:M}),o.$set(D);const O={};S&49153&&(O.$$scope={dirty:S,ctx:M}),a.$set(O),(!b||S&12&&v!==(v=!M[3]||M[2]))&&(p.disabled=v),S&4&&le(p,"btn-loading",M[2])},i(M){b||(A(i.$$.fragment,M),A(o.$$.fragment,M),A(a.$$.fragment,M),b=!0)},o(M){P(i.$$.fragment,M),P(o.$$.fragment,M),P(a.$$.fragment,M),b=!1},d(M){M&&k(e),z(i),z(o),z(a),y=!1,C()}}}function fT(n){let e;return{c(){e=_("div"),h(e,"class","loader")},m(t,i){w(t,e,i)},p:ae,i:ae,o:ae,d(t){t&&k(e)}}}function cT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Application name"),s=T(),l=_("input"),h(e,"for",i=n[14]),h(l,"type","text"),h(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.appName),r||(a=Q(l,"input",n[6]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&h(e,"for",i),f&16384&&o!==(o=u[14])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appName&&Se(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function dT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Application url"),s=T(),l=_("input"),h(e,"for",i=n[14]),h(l,"type","text"),h(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.appUrl),r||(a=Q(l,"input",n[7]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&h(e,"for",i),f&16384&&o!==(o=u[14])&&h(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&Se(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function hT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Logs max days retention"),s=T(),l=_("input"),h(e,"for",i=n[14]),h(l,"type","number"),h(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].logs.maxDays),r||(a=Q(l,"input",n[8]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&h(e,"for",i),f&16384&&o!==(o=u[14])&&h(l,"id",o),f&1&&At(l.value)!==u[0].logs.maxDays&&Se(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function pT(n){let e,t,i,s,l,o,r,a,u,f,c,d;e=new Ts({});const p=[fT,uT],g=[];function v(b,y){return b[1]?0:1}return a=v(n),u=g[a]=p[a](n),{c(){B(e.$$.fragment),t=T(),i=_("main"),s=_("header"),s.innerHTML=`<nav class="breadcrumbs"><div class="breadcrumb-item">Settings</div>
|
||||
<div class="breadcrumb-item">Application</div></nav>`,l=T(),o=_("div"),r=_("form"),u.c(),h(s,"class","page-header"),h(r,"class","panel"),h(r,"autocomplete","off"),h(o,"class","wrapper"),h(i,"class","page-wrapper")},m(b,y){V(e,b,y),w(b,t,y),w(b,i,y),m(i,s),m(i,l),m(i,o),m(o,r),g[a].m(r,null),f=!0,c||(d=Q(r,"submit",Wt(n[4])),c=!0)},p(b,[y]){let C=a;a=v(b),a===C?g[a].p(b,y):(De(),P(g[C],1,1,()=>{g[C]=null}),Oe(),u=g[a],u?u.p(b,y):(u=g[a]=p[a](b),u.c()),A(u,1),u.m(r,null))},i(b){f||(A(e.$$.fragment,b),A(u),f=!0)},o(b){P(e.$$.fragment,b),P(u),f=!1},d(b){z(e,b),b&&k(t),b&&k(i),g[a].d(),c=!1,d()}}}function mT(n,e,t){let i,s,l;It(n,mo,y=>t(10,s=y)),It(n,Jt,y=>t(11,l=y)),_n(Jt,l="Application settings",l);let o={},r=!1,a=!1,u="";f();async function f(){t(1,r=!0);try{const y=await ke.Settings.getAll()||{};d(y)}catch(y){ke.errorResponseHandler(y)}t(1,r=!1)}async function c(){if(!(a||!i)){t(2,a=!0);try{const y=await ke.Settings.update(Y.filterRedactedProps(o));d(y),cn("Successfully saved application settings.")}catch(y){ke.errorResponseHandler(y)}t(2,a=!1)}}function d(y={}){var C;_n(mo,s=(C=y==null?void 0:y.meta)==null?void 0:C.appName,s),t(0,o={meta:(y==null?void 0:y.meta)||{},logs:(y==null?void 0:y.logs)||{}}),t(5,u=JSON.stringify(o))}function p(){o.meta.appName=this.value,t(0,o)}function g(){o.meta.appUrl=this.value,t(0,o)}function v(){o.logs.maxDays=At(this.value),t(0,o)}const b=()=>c();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=u!=JSON.stringify(o))},[o,r,a,i,c,u,p,g,v,b]}class gT extends Ae{constructor(e){super(),Ee(this,e,mT,pT,Te,{})}}function _T(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=ct(l,s[o]);return{c(){e=_("input"),si(e,l)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[7](e),Se(e,n[0]),t||(i=Q(e,"input",n[8]),t=!0)},p(o,r){si(e,l=dn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&Se(e,o[0])},d(o){o&&k(e),n[7](null),t=!1,i()}}}function bT(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<r.length;u+=1)a=ct(a,r[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=T(),s=_("input"),h(t,"type","button"),h(t,"class","btn btn-secondary btn-circle"),h(e,"class","form-field-addon"),si(s,a)},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[Ze(St.call(null,t,{position:"left",text:"Set new value"})),Q(t,"click",n[6])],l=!0)},p(u,f){si(s,a=dn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,xe(o)}}}function vT(n){let e;function t(l,o){return l[3]?bT:_T}let i=t(n),s=i(n);return{c(){s.c(),e=lt()},m(l,o){s.m(l,o),w(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:ae,o:ae,d(l){s.d(l),l&&k(e)}}}function yT(n,e,t){const i=["value","mask"];let s=Zt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await oi(),r==null||r.focus()}const f=()=>u();function c(p){me[p?"unshift":"push"](()=>{r=p,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=p=>{e=ct(ct({},e),li(p)),t(5,s=Zt(e,i)),"value"in p&&t(0,l=p.value),"mask"in p&&t(1,o=p.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Ba extends Ae{constructor(e){super(),Ee(this,e,yT,vT,Te,{value:0,mask:1})}}function kT(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M,S,$,D,O,E,I,L,N,H,te;i=new Pe({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[ST,({uniqueId:q})=>({23:q}),({uniqueId:q})=>q?8388608:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[$T,({uniqueId:q})=>({23:q}),({uniqueId:q})=>q?8388608:0]},$$scope:{ctx:n}}}),a=new Pe({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[CT,({uniqueId:q})=>({23:q}),({uniqueId:q})=>q?8388608:0]},$$scope:{ctx:n}}}),f=new Pe({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[MT,({uniqueId:q})=>({23:q}),({uniqueId:q})=>q?8388608:0]},$$scope:{ctx:n}}}),d=new Pe({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:{default:[TT,({uniqueId:q})=>({23:q}),({uniqueId:q})=>q?8388608:0]},$$scope:{ctx:n}}}),C=new Pe({props:{class:"form-field form-field-toggle",$$slots:{default:[DT,({uniqueId:q})=>({23:q}),({uniqueId:q})=>q?8388608:0]},$$scope:{ctx:n}}});let oe=n[0].smtp.enabled&&lp(n);return{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),B(f.$$.fragment),c=T(),B(d.$$.fragment),p=T(),g=_("hr"),v=T(),b=_("div"),b.innerHTML=`<p>By default PocketBase uses the OS <code>sendmail</code> command for sending emails.
|
||||
<br/>
|
||||
<strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
|
||||
below.</strong></p>`,y=T(),B(C.$$.fragment),M=T(),oe&&oe.c(),S=T(),$=_("div"),D=_("div"),O=T(),E=_("button"),I=_("span"),I.textContent="Save changes",h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid"),h(b,"class","content m-b-sm"),h(D,"class","flex-fill"),h(I,"class","txt"),h(E,"type","submit"),h(E,"class","btn btn-expanded"),E.disabled=L=!n[3]||n[2],le(E,"btn-loading",n[2]),h($,"class","flex")},m(q,K){w(q,e,K),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),m(e,r),V(a,e,null),m(e,u),V(f,e,null),m(e,c),V(d,e,null),w(q,p,K),w(q,g,K),w(q,v,K),w(q,b,K),w(q,y,K),V(C,q,K),w(q,M,K),oe&&oe.m(q,K),w(q,S,K),w(q,$,K),m($,D),m($,O),m($,E),m(E,I),N=!0,H||(te=Q(E,"click",n[19]),H=!0)},p(q,K){const W={};K&25165825&&(W.$$scope={dirty:K,ctx:q}),i.$set(W);const X={};K&25165825&&(X.$$scope={dirty:K,ctx:q}),o.$set(X);const ne={};K&25165825&&(ne.$$scope={dirty:K,ctx:q}),a.$set(ne);const fe={};K&25165825&&(fe.$$scope={dirty:K,ctx:q}),f.$set(fe);const Me={};K&25165825&&(Me.$$scope={dirty:K,ctx:q}),d.$set(Me);const re={};K&25165825&&(re.$$scope={dirty:K,ctx:q}),C.$set(re),q[0].smtp.enabled?oe?(oe.p(q,K),K&1&&A(oe,1)):(oe=lp(q),oe.c(),A(oe,1),oe.m(S.parentNode,S)):oe&&(De(),P(oe,1,1,()=>{oe=null}),Oe()),(!N||K&12&&L!==(L=!q[3]||q[2]))&&(E.disabled=L),K&4&&le(E,"btn-loading",q[2])},i(q){N||(A(i.$$.fragment,q),A(o.$$.fragment,q),A(a.$$.fragment,q),A(f.$$.fragment,q),A(d.$$.fragment,q),A(C.$$.fragment,q),A(oe),N=!0)},o(q){P(i.$$.fragment,q),P(o.$$.fragment,q),P(a.$$.fragment,q),P(f.$$.fragment,q),P(d.$$.fragment,q),P(C.$$.fragment,q),P(oe),N=!1},d(q){q&&k(e),z(i),z(o),z(a),z(f),z(d),q&&k(p),q&&k(g),q&&k(v),q&&k(b),q&&k(y),z(C,q),q&&k(M),oe&&oe.d(q),q&&k(S),q&&k($),H=!1,te()}}}function wT(n){let e;return{c(){e=_("div"),h(e,"class","loader")},m(t,i){w(t,e,i)},p:ae,i:ae,o:ae,d(t){t&&k(e)}}}function ST(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Sender name"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.senderName),r||(a=Q(l,"input",n[8]),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&1&&l.value!==u[0].meta.senderName&&Se(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function $T(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Sender address"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","email"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.senderAddress),r||(a=Q(l,"input",n[9]),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&1&&l.value!==u[0].meta.senderAddress&&Se(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function CT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("User verification page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0,h(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Se(l,n[0].meta.userVerificationUrl),w(c,r,d),w(c,a,d),u||(f=Q(l,"input",n[10]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&h(e,"for",i),d&8388608&&o!==(o=c[23])&&h(l,"id",o),d&1&&l.value!==c[0].meta.userVerificationUrl&&Se(l,c[0].meta.userVerificationUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function MT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("User reset password page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0,h(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Se(l,n[0].meta.userResetPasswordUrl),w(c,r,d),w(c,a,d),u||(f=Q(l,"input",n[11]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&h(e,"for",i),d&8388608&&o!==(o=c[23])&&h(l,"id",o),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&Se(l,c[0].meta.userResetPasswordUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function TT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=R("User confirm email change page url"),s=T(),l=_("input"),r=T(),a=_("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
|
||||
parameters:
|
||||
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0,h(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Se(l,n[0].meta.userConfirmEmailChangeUrl),w(c,r,d),w(c,a,d),u||(f=Q(l,"input",n[12]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&h(e,"for",i),d&8388608&&o!==(o=c[23])&&h(l,"id",o),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&Se(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function DT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Use SMTP mail server"),h(e,"type","checkbox"),h(e,"id",t=n[23]),e.required=!0,h(s,"for",o=n[23])},m(u,f){w(u,e,f),e.checked=n[0].smtp.enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=Q(e,"change",n[13]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&h(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&8388608&&o!==(o=u[23])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function lp(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M;return i=new Pe({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[OT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[ET,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),u=new Pe({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[AT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),d=new Pe({props:{class:"form-field",name:"smtp.username",$$slots:{default:[PT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),v=new Pe({props:{class:"form-field",name:"smtp.password",$$slots:{default:[LT,({uniqueId:S})=>({23:S}),({uniqueId:S})=>S?8388608:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),p=T(),g=_("div"),B(v.$$.fragment),b=T(),y=_("div"),h(t,"class","col-lg-6"),h(l,"class","col-lg-3"),h(a,"class","col-lg-3"),h(c,"class","col-lg-6"),h(g,"class","col-lg-6"),h(y,"class","col-lg-12"),h(e,"class","grid")},m(S,$){w(S,e,$),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),m(e,r),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,p),m(e,g),V(v,g,null),m(e,b),m(e,y),M=!0},p(S,$){const D={};$&25165825&&(D.$$scope={dirty:$,ctx:S}),i.$set(D);const O={};$&25165825&&(O.$$scope={dirty:$,ctx:S}),o.$set(O);const E={};$&25165825&&(E.$$scope={dirty:$,ctx:S}),u.$set(E);const I={};$&25165825&&(I.$$scope={dirty:$,ctx:S}),d.$set(I);const L={};$&25165825&&(L.$$scope={dirty:$,ctx:S}),v.$set(L)},i(S){M||(A(i.$$.fragment,S),A(o.$$.fragment,S),A(u.$$.fragment,S),A(d.$$.fragment,S),A(v.$$.fragment,S),S&&Dt(()=>{C||(C=ot(e,xt,{duration:150},!0)),C.run(1)}),M=!0)},o(S){P(i.$$.fragment,S),P(o.$$.fragment,S),P(u.$$.fragment,S),P(d.$$.fragment,S),P(v.$$.fragment,S),S&&(C||(C=ot(e,xt,{duration:150},!1)),C.run(0)),M=!1},d(S){S&&k(e),z(i),z(o),z(u),z(d),z(v),S&&C&&C.end()}}}function OT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("SMTP server host"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].smtp.host),r||(a=Q(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&1&&l.value!==u[0].smtp.host&&Se(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function ET(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Port"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","number"),h(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].smtp.port),r||(a=Q(l,"input",n[15]),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&1&&At(l.value)!==u[0].smtp.port&&Se(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function AT(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[23],items:n[5]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new is({props:u}),me.push(()=>Le(l,"keyOfSelected",a)),{c(){e=_("label"),t=R("TLS Encryption"),s=T(),B(l.$$.fragment),h(e,"for",i=n[23])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&8388608&&i!==(i=f[23]))&&h(e,"for",i);const d={};c&8388608&&(d.id=f[23]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,Fe(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function PT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Username"),s=T(),l=_("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23])},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].smtp.username),r||(a=Q(l,"input",n[17]),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&1&&l.value!==u[0].smtp.username&&Se(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function LT(n){let e,t,i,s,l,o,r;function a(f){n[18](f)}let u={id:Line truncated
|
||||
the
|
||||
`),r=_("strong"),u=R(a),f=R(`
|
||||
to the
|
||||
`),c=_("strong"),p=R(d),g=R(`.
|
||||
`),v=_("br"),b=R(`
|
||||
There are numerous command line tools that can help you, such as:
|
||||
`),y=_("a"),y.textContent=`rclone
|
||||
`,C=R(`,
|
||||
`),M=_("a"),M.textContent=`s5cmd
|
||||
`,S=R(", etc."),$=T(),D=_("div"),h(i,"class","icon"),h(y,"href","https://github.com/rclone/rclone"),h(y,"target","_blank"),h(y,"rel","noopener"),h(y,"class","txt-bold"),h(M,"href","https://github.com/peak/s5cmd"),h(M,"target","_blank"),h(M,"rel","noopener"),h(M,"class","txt-bold"),h(l,"class","content"),h(t,"class","alert alert-warning m-0"),h(D,"class","clearfix m-t-base")},m(I,L){w(I,e,L),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(c,p),m(l,g),m(l,v),m(l,b),m(l,y),m(l,C),m(l,M),m(l,S),m(e,$),m(e,D),E=!0},p(I,L){(!E||L&8)&&a!==(a=I[3]?"S3 storage":"local file system")&&ge(u,a),(!E||L&1)&&d!==(d=I[0].enabled?"S3 storage":"local file system")&&ge(p,d)},i(I){E||(I&&Dt(()=>{O||(O=ot(e,xt,{duration:150},!0)),O.run(1)}),E=!0)},o(I){I&&(O||(O=ot(e,xt,{duration:150},!1)),O.run(0)),E=!1},d(I){I&&k(e),I&&O&&O.end()}}}function rp(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g,v,b,y,C,M,S,$,D;return i=new Pe({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[qT,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[VT,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),u=new Pe({props:{class:"form-field required",name:"s3.region",$$slots:{default:[zT,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),d=new Pe({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[BT,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),v=new Pe({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[UT,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),C=new Pe({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[WT,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),f=T(),c=_("div"),B(d.$$.fragment),p=T(),g=_("div"),B(v.$$.fragment),b=T(),y=_("div"),B(C.$$.fragment),M=T(),S=_("div"),h(t,"class","col-lg-12"),h(l,"class","col-lg-6"),h(a,"class","col-lg-6"),h(c,"class","col-lg-6"),h(g,"class","col-lg-6"),h(y,"class","col-lg-12"),h(S,"class","col-lg-12"),h(e,"class","grid")},m(O,E){w(O,e,E),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),m(e,r),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,p),m(e,g),V(v,g,null),m(e,b),m(e,y),V(C,y,null),m(e,M),m(e,S),D=!0},p(O,E){const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),i.$set(I);const L={};E&1572865&&(L.$$scope={dirty:E,ctx:O}),o.$set(L);const N={};E&1572865&&(N.$$scope={dirty:E,ctx:O}),u.$set(N);const H={};E&1572865&&(H.$$scope={dirty:E,ctx:O}),d.$set(H);const te={};E&1572865&&(te.$$scope={dirty:E,ctx:O}),v.$set(te);const oe={};E&1572865&&(oe.$$scope={dirty:E,ctx:O}),C.$set(oe)},i(O){D||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(v.$$.fragment,O),A(C.$$.fragment,O),O&&Dt(()=>{$||($=ot(e,xt,{duration:150},!0)),$.run(1)}),D=!0)},o(O){P(i.$$.fragment,O),P(o.$$.fragment,O),P(u.$$.fragment,O),P(d.$$.fragment,O),P(v.$$.fragment,O),P(C.$$.fragment,O),O&&($||($=ot(e,xt,{duration:150},!1)),$.run(0)),D=!1},d(O){O&&k(e),z(i),z(o),z(u),z(d),z(v),z(C),O&&$&&$.end()}}}function qT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Endpoint"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].endpoint),r||(a=Q(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].endpoint&&Se(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function VT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Bucket"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].bucket),r||(a=Q(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].bucket&&Se(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function zT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Region"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].region),r||(a=Q(l,"input",n[11]),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].region&&Se(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function BT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Access key"),s=T(),l=_("input"),h(e,"for",i=n[19]),h(l,"type","text"),h(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].accessKey),r||(a=Q(l,"input",n[12]),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].accessKey&&Se(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}func
Line truncated
|
||||
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,g=T(),b.c(),h(o,"class","breadcrumb-item"),h(a,"class","breadcrumb-item"),h(l,"class","breadcrumbs"),h(s,"class","page-header"),h(p,"class","content txt-xl m-b-base"),h(d,"class","panel"),h(d,"autocomplete","off"),h(c,"class","wrapper"),h(i,"class","page-wrapper")},m(O,E){V(e,O,E),w(O,t,E),w(O,i,E),m(i,s),m(s,l),m(l,o),m(l,r),m(l,a),m(a,u),m(i,f),m(i,c),m(c,d),m(d,p),m(d,g),$[v].m(d,null),y=!0,C||(M=Q(d,"submit",Wt(n[16])),C=!0)},p(O,[E]){(!y||E&32)&&ge(u,O[5]);let I=v;v=D(O),v===I?$[v].p(O,E):(De(),P($[I],1,1,()=>{$[I]=null}),Oe(),b=$[v],b?b.p(O,E):(b=$[v]=S[v](O),b.c()),A(b,1),b.m(d,null))},i(O){y||(A(e.$$.fragment,O),A(b),y=!0)},o(O){P(e.$$.fragment,O),P(b),y=!1},d(O){z(e,O),O&&k(t),O&&k(i),$[v].d(),C=!1,M()}}}function KT(n,e,t){let i,s;It(n,Jt,D=>t(5,s=D)),_n(Jt,s="Files storage",s);let l={},o=!1,r=!1,a="",u=!1;f();async function f(){t(1,o=!0);try{const D=await ke.Settings.getAll()||{};d(D)}catch(D){ke.errorResponseHandler(D)}t(1,o=!1)}async function c(){if(!(r||!i)){t(2,r=!0);try{const D=await ke.Settings.update(Y.filterRedactedProps({s3:l}));d(D),Li({}),cn("Successfully saved Files storage settings.")}catch(D){ke.errorResponseHandler(D)}t(2,r=!1)}}function d(D={}){t(0,l=(D==null?void 0:D.s3)||{}),t(3,u=l.enabled),t(7,a=JSON.stringify(l))}function p(){l.enabled=this.checked,t(0,l)}function g(){l.endpoint=this.value,t(0,l)}function v(){l.bucket=this.value,t(0,l)}function b(){l.region=this.value,t(0,l)}function y(){l.accessKey=this.value,t(0,l)}function C(D){n.$$.not_equal(l.secret,D)&&(l.secret=D,t(0,l))}function M(){l.forcePathStyle=this.checked,t(0,l)}const S=()=>c(),$=()=>c();return n.$$.update=()=>{n.$$.dirty&129&&t(4,i=a!=JSON.stringify(l))},[l,o,r,u,i,s,c,a,p,g,v,b,y,C,M,S,$]}class ZT extends Ae{constructor(e){super(),Ee(this,e,KT,YT,Te,{})}}function GT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[16]),h(s,"for",o=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=Q(e,"change",n[8]),r=!0)},p(u,f){f&65536&&t!==(t=u[16])&&h(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&o!==(o=u[16])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function ap(n){let e,t,i,s,l,o,r,a,u,f,c;return i=new Pe({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[JT,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),o=new Pe({props:{class:"form-field "+(Y.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[XT,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Pe({props:{class:"form-field "+(Y.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[QT,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),B(i.$$.fragment),s=T(),l=_("div"),B(o.$$.fragment),r=T(),a=_("div"),B(u.$$.fragment),h(t,"class","col-sm-12 m-t-sm"),h(l,"class","col-lg-6"),h(a,"class","col-lg-6"),h(e,"class","grid")},m(d,p){w(d,e,p),m(e,t),V(i,t,null),m(e,s),m(e,l),V(o,l,null),m(e,r),m(e,a),V(u,a,null),c=!0},p(d,p){const g={};p&196609&&(g.$$scope={dirty:p,ctx:d}),i.$set(g);const v={};p&1&&(v.class="form-field "+(Y.isEmpty(d[0].onlyDomains)?"":"disabled")),p&196609&&(v.$$scope={dirty:p,ctx:d}),o.$set(v);const b={};p&1&&(b.class="form-field "+(Y.isEmpty(d[0].exceptDomains)?"":"disabled")),p&196609&&(b.$$scope={dirty:p,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),d&&Dt(()=>{f||(f=ot(e,xt,{duration:150},!0)),f.run(1)}),c=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),d&&(f||(f=ot(e,xt,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),z(i),z(o),z(u),d&&f&&f.end()}}}function JT(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Minimum password length"),s=T(),l=_("input"),h(e,"for",i=n[16]),h(l,"type","number"),h(l,"id",o=n[16]),l.required=!0,h(l,"min","5"),h(l,"max","200")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].minPasswordLength),r||(a=Q(l,"input",n[9]),r=!0)},p(u,f){f&65536&&i!==(i=u[16])&&h(e,"for",i),f&65536&&o!==(o=u[16])&&h(l,"id",o),f&1&&At(l.value)!==u[0].minPasswordLength&&Se(l,u[0].minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function XT(n){let e,t,i,s,l,o,r,a,u,f,c,d,p;function g(b){n[10](b)}let v={id:n[16],disabled:!Y.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(v.value=n[0].exceptDomains),r=new ss({props:v}),me.push(()=>Le(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Except domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[16]),h(f,"class","help-block")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(p=Ze(St.call(null,s,{text:`Email domainsLine truncated
|
||||
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]))&&h(e,"for",l);const C={};y&65536&&(C.id=b[16]),y&1&&(C.disabled=!Y.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,C.value=b[0].exceptDomains,Fe(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,p()}}}function QT(n){let e,t,i,s,l,o,r,a,u,f,c,d,p;function g(b){n[11](b)}let v={id:n[16]+".config.onlyDomains",disabled:!Y.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new ss({props:v}),me.push(()=>Le(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=T(),s=_("i"),o=T(),B(r.$$.fragment),u=T(),f=_("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[16]+".config.onlyDomains"),h(f,"class","help-block")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(p=Ze(St.call(null,s,{text:`Email domains that are ONLY allowed to sign up.
|
||||
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]+".config.onlyDomains"))&&h(e,"for",l);const C={};y&65536&&(C.id=b[16]+".config.onlyDomains"),y&1&&(C.disabled=!Y.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,C.value=b[0].onlyDomains,Fe(()=>a=!1)),r.$set(C)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,p()}}}function xT(n){let e,t,i,s;e=new Pe({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[GT,({uniqueId:o})=>({16:o}),({uniqueId:o})=>o?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&ap(n);return{c(){B(e.$$.fragment),t=T(),l&&l.c(),i=lt()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&196609&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&A(l,1)):(l=ap(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(De(),P(l,1,1,()=>{l=null}),Oe())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){z(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function eD(n){let e;return{c(){e=_("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function tD(n){let e;return{c(){e=_("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function up(n){let e,t,i,s,l;return{c(){e=_("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ze(St.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Dt(()=>{t||(t=ot(e,jn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=ot(e,jn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function nD(n){let e,t,i,s,l,o,r;function a(d,p){return d[0].enabled?tD:eD}let u=a(n),f=u(n),c=n[2]&&up();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
|
||||
<span class="txt">Email/Password</span>`,t=T(),f.c(),i=T(),s=_("div"),l=T(),c&&c.c(),o=lt(),h(e,"class","inline-flex"),h(s,"class","flex-fill")},m(d,p){w(d,e,p),w(d,t,p),f.m(d,p),w(d,i,p),w(d,s,p),w(d,l,p),c&&c.m(d,p),w(d,o,p),r=!0},p(d,p){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?p&4&&A(c,1):(c=up(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(De(),P(c,1,1,()=>{c=null}),Oe())},i(d){r||(A(c),r=!0)},o(d){P(c),r=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(o)}}}function iD(n){let e,t;const i=[n[3]];let s={$$slots:{header:[nD],default:[xT]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new qa({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){B(e.$$.fragment)},m(l,o){V(e,l,o),t=!0},p(l,[o]){const r=o&8?dn(i,[ri(l[3])]):{};o&131077&&(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[12](null),z(e,l)}}}function sD(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Zt(e,s),o;It(n,ts,S=>t(7,o=S));let{config:r={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){r.enabled=this.checked,t(0,r)}function p(){r.minPasswordLength=At(this.value),t(0,r)}function g(S){n.$$.not_equal(r.exceptDomains,S)&&(r.exceptDomains=S,t(0,r))}function v(S){n.$$.not_equal(r.onlyDomains,S)&&(r.onlyDomains=S,t(0,r))}function b(S){me[S?"unshift":"push"](()=>{a=S,t(1,a)})}function y(S){ut.call(this,n,S)}function C(S){ut.call(this,n,S)}function M(S){ut.call(this,n,S)}return n.$$set=S=>{e=ct(ct({},e),li(S)),t(3,l=Zt(e,s)),"config"in S&&t(0,r=S.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!Y.isEmpty(o==null?void 0:o.emailPassword))},[r,a,i,l,u,f,c,o,d,p,g,v,b,y,C,M]}class lD extends Ae{constructor(e){super(),Ee(this,e,sD,iD,Te,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function oD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=T(),s=_("label"),l=R("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[22]),h(s,"for",o=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=Q(e,"change",n[11]),r=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&h(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&o!==(o=u[22])&&h(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function fp(n){let e,t,i,s,l,o,r,a,u,f,c,d,p,g;l=new Pe({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[rD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),a=new Pe({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[aD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}}),c=new Pe({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[uD,({uniqueId:b})=>({22:b}),({uniqueId:b})=>b?4194304:0]},$$scope:{ctx:n}}});let v=n[4]&&cp(n);return{c(){e=_("div"),t=_("div"),i=T(),s=_("div"),B(l.$$.fragment),o=T(),r=_("div"),B(a.$$.fragment),u=T(),f=_("div"),B(c.$$.fragment),d=T(),v&&v.c(),h(t,"class","col-12 spacing"),h(s,"class","col-lg-6"),h(r,"class","col-lg-6"),h(f,"class","col-lg-12"),h(e,"class","grid")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),V(l,s,null),m(e,o),m(e,r),V(a,r,null),m(e,u),m(e,f),V(c,f,null),m(e,d),v&&v.m(e,null),g=!0},p(b,y){const C={};y&2&&(C.name=b[1]+".clientId"),y&12582913&&(C.$$scope={dirty:y,ctx:b}),l.$set(C);const M={};y&2&&(M.name=b[1]+".clientSecret"),y&12582913&&(M.$$scope={dirty:y,ctx:b}),a.$set(M);const S={};y&2&&(S.name=b[1]+".allowRegistrations"),y&12582913&&(S.$$scope={dirty:y,ctx:b}),c.$set(S),b[4]?v?(v.p(b,y),y&16&&A(v,1)):(v=cp(b),v.c(),A(v,1),v.m(e,null)):v&&(De(),P(v,1,1,()=>{v=null}),Oe())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(v),b&&Dt(()=>{p||(p=ot(e,xt,{duration:200},!0)),p.run(1)}),g=!0)},o(b){P(l.$$.fragment,b),P(a.$$.fragment,b),P(c.$$.fragment,b),P(v),b&&(p||(p=ot(e,xt,{duration:200},!1)),p.run(0)),g=!1},d(b){b&&k(e),z(l),z(a),z(c),v&&v.d(),b&&p&&p.end()}}}function rD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=R("Client ID"),s=T(),l=_("input"),h(e,"for",i=n[22]),h(l,"type","text"),h(l,"id",o=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].clientId),r||(a=Q(l,"input",n[12]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&h(e,"for",i),f&4194304&&o!==(o=u[22])&&h(l,"id",o),f&1&&l.value!==u[0].clientId&&Se(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function aD(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[22],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new Ba({props:u}),me.push(()=>Le(l,"value",a)),{c(){e=_("label"),t=R("Client Secret"),s=T(),B(l.$$.fragment),h(e,"for",i=n[22])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&4194304&&i!==(i=f[22]))&&h(e,"for",i);const d={};c&4194304&&(d.id=f[22]),!o&&c&Line truncated
|
||||
<span class="txt">Manage admins</span>`,t=T(),i=_("hr"),s=T(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i>
|
||||
<span class="txt">Logout</span>`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"tabindex","0"),h(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Ze(wn.call(null,e)),Q(l,"click",n[6])],o=!0)},p:ae,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,xe(r)}}}function UD(n){var p;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=Y.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((p=n[0])==null?void 0:p.id)&&n[1]&&bp(n);return o=new __({props:{routes:ED}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new RD({}),f=new zD({}),{c(){t=T(),i=_("div"),d&&d.c(),s=T(),l=_("div"),B(o.$$.fragment),r=T(),B(a.$$.fragment),u=T(),B(f.$$.fragment),h(l,"class","app-body"),h(i,"class","app-layout")},m(g,v){w(g,t,v),w(g,i,v),d&&d.m(i,null),m(i,s),m(i,l),V(o,l,null),w(g,r,v),V(a,g,v),w(g,u,v),V(f,g,v),c=!0},p(g,[v]){var b;(!c||v&12)&&e!==(e=Y.joinNonEmpty([g[3],g[2],"PocketBase"]," - "))&&(document.title=e),((b=g[0])==null?void 0:b.id)&&g[1]?d?(d.p(g,v),v&3&&A(d,1)):(d=bp(g),d.c(),A(d,1),d.m(i,s)):d&&(De(),P(d,1,1,()=>{d=null}),Oe())},i(g){c||(A(d),A(o.$$.fragment,g),A(a.$$.fragment,g),A(f.$$.fragment,g),c=!0)},o(g){P(d),P(o.$$.fragment,g),P(a.$$.fragment,g),P(f.$$.fragment,g),c=!1},d(g){g&&k(t),g&&k(i),d&&d.d(),z(o),g&&k(r),z(a,g),g&&k(u),z(f,g)}}}function WD(n,e,t){let i,s,l;It(n,mo,d=>t(2,i=d)),It(n,ga,d=>t(0,s=d)),It(n,Jt,d=>t(3,l=d));let o,r=!1;function a(d){var p,g,v,b;((p=d==null?void 0:d.detail)==null?void 0:p.location)!==o&&(t(1,r=!!((v=(g=d==null?void 0:d.detail)==null?void 0:g.userData)!=null&&v.showAppSidebar)),o=(b=d==null?void 0:d.detail)==null?void 0:b.location,_n(Jt,l="",l),Li({}),Bg())}function u(){ks("/")}async function f(){var d;if(!!(s!=null&&s.id))try{const p=await ke.Settings.getAll({$cancelKey:"loadAppName"});_n(mo,i=((d=p==null?void 0:p.meta)==null?void 0:d.appName)||"",i)}catch(p){console.warn("Failed to load app name.",p)}}function c(){ke.logout()}return n.$$.update=()=>{n.$$.dirty&1&&s!=null&&s.id&&f()},[s,r,i,l,a,u,c]}class YD extends Ae{constructor(e){super(),Ee(this,e,WD,UD,Te,{})}}new YD({target:document.getElementById("app")});export{xe as A,cn as B,Y as C,ks as D,lt as E,Um as F,It as G,ys as H,rn as I,On as J,Bn as K,me as L,Ae as S,P as a,T as b,B as c,z as d,_ as e,h as f,w as g,m as h,Ee as i,Ze as j,De as k,wn as l,V as m,Oe as n,k as o,ke as p,Pe as q,le as r,Te as s,A as t,Q as u,Wt as v,R as w,ge as x,ae as y,Se as z};
|
||||
@@ -1 +1 @@
|
||||
@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #edf0f3;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(88, 95, 101, .3);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .05);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:befoLine truncated
|
||||
@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #edf0f3;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(88, 95, 101, .3);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .05);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:befoLine truncated
|
||||
Vendored
+2
-2
@@ -20,8 +20,8 @@
|
||||
window.Prism = window.Prism || {};
|
||||
window.Prism.manual = true;
|
||||
</script>
|
||||
<script type="module" crossorigin src="/_/assets/index.38300823.js"></script>
|
||||
<link rel="stylesheet" href="/_/assets/index.615ff839.css">
|
||||
<script type="module" crossorigin src="/_/assets/index.7985c732.js"></script>
|
||||
<link rel="stylesheet" href="/_/assets/index.bfd115c1.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Generated
+228
-228
@@ -17,7 +17,7 @@
|
||||
"chart.js": "^3.7.1",
|
||||
"chartjs-adapter-luxon": "^1.1.0",
|
||||
"luxon": "^2.3.2",
|
||||
"pocketbase": "^0.2.1",
|
||||
"pocketbase": "^0.2.2",
|
||||
"prismjs": "^1.28.0",
|
||||
"sass": "^1.45.0",
|
||||
"svelte": "^3.44.0",
|
||||
@@ -27,9 +27,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/autocomplete": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.0.4.tgz",
|
||||
"integrity": "sha512-uP7UodCRykPNwSAN+wYa/AS9gJI/V47echCAXUYgCgBXy3l19nwO7W/d29COtG/dfAsjBOhMDeh3Ms8Y5VZbrA==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.1.0.tgz",
|
||||
"integrity": "sha512-wtO4O5WDyXhhCd4q4utDIDZxnQfmJ++3dGBCG9LMtI79+92OcA1DVk/n7BEupKmjIr8AzvptDz7YQ9ud6OkU+A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
@@ -57,9 +57,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/language": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.0.tgz",
|
||||
"integrity": "sha512-tabB0Ef/BflwoEmTB4a//WZ9P90UQyne9qWB9YFsmeS4bnEqSys7UpGk/da1URMXhyfuzWCwp+AQNMhvu8SfnA==",
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.1.tgz",
|
||||
"integrity": "sha512-MC3svxuvIj0MRpFlGHxLS6vPyIdbTr2KKPEW46kCoCXw2ktb4NTkpkPBI/lSP/FoNXLCBJ0mrnUi1OoZxtpW1Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@@ -80,9 +80,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/search": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.0.0.tgz",
|
||||
"integrity": "sha512-rL0rd3AhI0TAsaJPUaEwC63KHLO7KL0Z/dYozXj6E7L3wNHRyx7RfE0/j5HsIf912EE5n2PCb4Vg0rGYmDv4UQ==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.0.1.tgz",
|
||||
"integrity": "sha512-uOinkOrM+daMduCgMPomDfKLr7drGHB4jHl3Vq6xY2WRlL7MkNsBE0b+XHYa/Mee2npsJOgwvkW4n1lMFeBW2Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@@ -97,9 +97,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@codemirror/view": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.0.3.tgz",
|
||||
"integrity": "sha512-1gDBymhbx2DZzwnR/rNUu1LiQqjxBJtFiB+4uLR6tHQ6vKhTIwUsP5uZUQ7SM7JxVx3UihMynnTqjcsC+mczZg==",
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.1.2.tgz",
|
||||
"integrity": "sha512-puUydfKwfmOo+ixtuB+uN/ZpcteEYSnpjHmMaow1sOQhNICsKtGBup3i9ybVqyzDagARRYzSHTWjbdeHqmn31w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@@ -206,9 +206,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/chart.js": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.0.tgz",
|
||||
"integrity": "sha512-cr8xhrXjLIXVLOBZPkBZVF6NDeiVIrPLHcMhnON7UufudL+CNeRrD+wpYanswlm8NpudMdrt3CHoLMQMxJhHRg==",
|
||||
"version": "3.8.2",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz",
|
||||
"integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/chartjs-adapter-luxon": {
|
||||
@@ -281,9 +281,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz",
|
||||
"integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.51.tgz",
|
||||
"integrity": "sha512-+CvnDitD7Q5sT7F+FM65sWkF8wJRf+j9fPcprxYV4j+ohmzVj2W7caUqH2s5kCaCJAfcAICjSlKhDCcvDpU7nw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
@@ -293,32 +293,32 @@
|
||||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"esbuild-android-64": "0.14.49",
|
||||
"esbuild-android-arm64": "0.14.49",
|
||||
"esbuild-darwin-64": "0.14.49",
|
||||
"esbuild-darwin-arm64": "0.14.49",
|
||||
"esbuild-freebsd-64": "0.14.49",
|
||||
"esbuild-freebsd-arm64": "0.14.49",
|
||||
"esbuild-linux-32": "0.14.49",
|
||||
"esbuild-linux-64": "0.14.49",
|
||||
"esbuild-linux-arm": "0.14.49",
|
||||
"esbuild-linux-arm64": "0.14.49",
|
||||
"esbuild-linux-mips64le": "0.14.49",
|
||||
"esbuild-linux-ppc64le": "0.14.49",
|
||||
"esbuild-linux-riscv64": "0.14.49",
|
||||
"esbuild-linux-s390x": "0.14.49",
|
||||
"esbuild-netbsd-64": "0.14.49",
|
||||
"esbuild-openbsd-64": "0.14.49",
|
||||
"esbuild-sunos-64": "0.14.49",
|
||||
"esbuild-windows-32": "0.14.49",
|
||||
"esbuild-windows-64": "0.14.49",
|
||||
"esbuild-windows-arm64": "0.14.49"
|
||||
"esbuild-android-64": "0.14.51",
|
||||
"esbuild-android-arm64": "0.14.51",
|
||||
"esbuild-darwin-64": "0.14.51",
|
||||
"esbuild-darwin-arm64": "0.14.51",
|
||||
"esbuild-freebsd-64": "0.14.51",
|
||||
"esbuild-freebsd-arm64": "0.14.51",
|
||||
"esbuild-linux-32": "0.14.51",
|
||||
"esbuild-linux-64": "0.14.51",
|
||||
"esbuild-linux-arm": "0.14.51",
|
||||
"esbuild-linux-arm64": "0.14.51",
|
||||
"esbuild-linux-mips64le": "0.14.51",
|
||||
"esbuild-linux-ppc64le": "0.14.51",
|
||||
"esbuild-linux-riscv64": "0.14.51",
|
||||
"esbuild-linux-s390x": "0.14.51",
|
||||
"esbuild-netbsd-64": "0.14.51",
|
||||
"esbuild-openbsd-64": "0.14.51",
|
||||
"esbuild-sunos-64": "0.14.51",
|
||||
"esbuild-windows-32": "0.14.51",
|
||||
"esbuild-windows-64": "0.14.51",
|
||||
"esbuild-windows-arm64": "0.14.51"
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-android-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz",
|
||||
"integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.51.tgz",
|
||||
"integrity": "sha512-6FOuKTHnC86dtrKDmdSj2CkcKF8PnqkaIXqvgydqfJmqBazCPdw+relrMlhGjkvVdiiGV70rpdnyFmA65ekBCQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -332,9 +332,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-android-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-vBtp//5VVkZWmYYvHsqBRCMMi1MzKuMIn5XDScmnykMTu9+TD9v0NMEDqQxvtFToeYmojdo5UCV2vzMQWJcJ4A==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -348,9 +348,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-darwin-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz",
|
||||
"integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.51.tgz",
|
||||
"integrity": "sha512-YFmXPIOvuagDcwCejMRtCDjgPfnDu+bNeh5FU2Ryi68ADDVlWEpbtpAbrtf/lvFTWPexbgyKgzppNgsmLPr8PA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -364,9 +364,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-darwin-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-juYD0QnSKwAMfzwKdIF6YbueXzS6N7y4GXPDeDkApz/1RzlT42mvX9jgNmyOlWKN7YzQAYbcUEJmZJYQGdf2ow==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -380,9 +380,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-freebsd-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz",
|
||||
"integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.51.tgz",
|
||||
"integrity": "sha512-cLEI/aXjb6vo5O2Y8rvVSQ7smgLldwYY5xMxqh/dQGfWO+R1NJOFsiax3IS4Ng300SVp7Gz3czxT6d6qf2cw0g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -396,9 +396,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-freebsd-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-TcWVw/rCL2F+jUgRkgLa3qltd5gzKjIMGhkVybkjk6PJadYInPtgtUBp1/hG+mxyigaT7ib+od1Xb84b+L+1Mg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -412,9 +412,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-32": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz",
|
||||
"integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.51.tgz",
|
||||
"integrity": "sha512-RFqpyC5ChyWrjx8Xj2K0EC1aN0A37H6OJfmUXIASEqJoHcntuV3j2Efr9RNmUhMfNE6yEj2VpYuDteZLGDMr0w==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -428,9 +428,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz",
|
||||
"integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.51.tgz",
|
||||
"integrity": "sha512-dxjhrqo5i7Rq6DXwz5v+MEHVs9VNFItJmHBe1CxROWNf4miOGoQhqSG8StStbDkQ1Mtobg6ng+4fwByOhoQoeA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -444,9 +444,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-arm": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz",
|
||||
"integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.51.tgz",
|
||||
"integrity": "sha512-LsJynDxYF6Neg7ZC7748yweCDD+N8ByCv22/7IAZglIEniEkqdF4HCaa49JNDLw1UQGlYuhOB8ZT/MmcSWzcWg==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -460,9 +460,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-D9rFxGutoqQX3xJPxqd6o+kvYKeIbM0ifW2y0bgKk5HPgQQOo2k9/2Vpto3ybGYaFPCE5qTGtqQta9PoP6ZEzw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -476,9 +476,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-mips64le": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz",
|
||||
"integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.51.tgz",
|
||||
"integrity": "sha512-vS54wQjy4IinLSlb5EIlLoln8buh1yDgliP4CuEHumrPk4PvvP4kTRIG4SzMXm6t19N0rIfT4bNdAxzJLg2k6A==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
@@ -492,9 +492,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-ppc64le": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz",
|
||||
"integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.51.tgz",
|
||||
"integrity": "sha512-xcdd62Y3VfGoyphNP/aIV9LP+RzFw5M5Z7ja+zdpQHHvokJM7d0rlDRMN+iSSwvUymQkqZO+G/xjb4/75du8BQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -508,9 +508,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-riscv64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz",
|
||||
"integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.51.tgz",
|
||||
"integrity": "sha512-syXHGak9wkAnFz0gMmRBoy44JV0rp4kVCEA36P5MCeZcxFq8+fllBC2t6sKI23w3qd8Vwo9pTADCgjTSf3L3rA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -524,9 +524,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-linux-s390x": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz",
|
||||
"integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.51.tgz",
|
||||
"integrity": "sha512-kFAJY3dv+Wq8o28K/C7xkZk/X34rgTwhknSsElIqoEo8armCOjMJ6NsMxm48KaWY2h2RUYGtQmr+RGuUPKBhyw==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -540,9 +540,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-netbsd-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz",
|
||||
"integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.51.tgz",
|
||||
"integrity": "sha512-ZZBI7qrR1FevdPBVHz/1GSk1x5GDL/iy42Zy8+neEm/HA7ma+hH/bwPEjeHXKWUDvM36CZpSL/fn1/y9/Hb+1A==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -556,9 +556,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-openbsd-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz",
|
||||
"integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.51.tgz",
|
||||
"integrity": "sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -572,9 +572,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-sunos-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz",
|
||||
"integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.51.tgz",
|
||||
"integrity": "sha512-HoHaCswHxLEYN8eBTtyO0bFEWvA3Kdb++hSQ/lLG7TyKF69TeSG0RNoBRAs45x/oCeWaTDntEZlYwAfQlhEtJA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -588,9 +588,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-windows-32": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz",
|
||||
"integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.51.tgz",
|
||||
"integrity": "sha512-4rtwSAM35A07CBt1/X8RWieDj3ZUHQqUOaEo5ZBs69rt5WAFjP4aqCIobdqOy4FdhYw1yF8Z0xFBTyc9lgPtEg==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -604,9 +604,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-windows-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz",
|
||||
"integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.51.tgz",
|
||||
"integrity": "sha512-HoN/5HGRXJpWODprGCgKbdMvrC3A2gqvzewu2eECRw2sYxOUoh2TV1tS+G7bHNapPGI79woQJGV6pFH7GH7qnA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -620,9 +620,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild-windows-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-JQDqPjuOH7o+BsKMSddMfmVJXrnYZxXDHsoLHc0xgmAZkOOCflRmC43q31pk79F9xuyWY45jDBPolb5ZgGOf9g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -845,9 +845,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/pocketbase": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.2.1.tgz",
|
||||
"integrity": "sha512-RPyfMw8MJISyP8PNHDllKC09jnUzZX7Cb1Q0vh9mOytEn5EqFhNLan8e5D1E6h1ebIFS3nT+DzZtP2wYpPygag==",
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.2.2.tgz",
|
||||
"integrity": "sha512-87UBwZD5HCvBu4PSzRZSxrHVAeFOBwJnMUuvqQjZijdhwNLeR7cVLF34mHpWSeIM4jbwe+RSwDNFP0jOzkwGBQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
@@ -922,9 +922,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "2.77.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.0.tgz",
|
||||
"integrity": "sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==",
|
||||
"version": "2.77.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz",
|
||||
"integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
@@ -937,9 +937,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.53.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.53.0.tgz",
|
||||
"integrity": "sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==",
|
||||
"version": "1.54.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz",
|
||||
"integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
@@ -1044,9 +1044,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.0.tgz",
|
||||
"integrity": "sha512-M7phQhY3+fRZa0H+1WzI6N+/onruwPTBTMvaj7TzgZ0v2TE+N2sdLKxJOfOv9CckDWt5C4HmyQP81xB4dwRKzA==",
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.4.tgz",
|
||||
"integrity": "sha512-NU304nqnBeOx2MkQnskBQxVsa0pRAH5FphokTGmyy8M3oxbvw7qAXts2GORxs+h/2vKsD+osMhZ7An6yK6F1dA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.14.47",
|
||||
@@ -1058,7 +1058,7 @@
|
||||
"vite": "bin/vite.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.18.0"
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
@@ -1085,17 +1085,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/w3c-keyname": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz",
|
||||
"integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==",
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.5.tgz",
|
||||
"integrity": "sha512-WJrK7i6w+ULuZsGscCezbCH4Aev5U3xY87vnSimzzEgPQhb0Sa0a1rE3c2jtEwrFtSfi61Jefw3jI5/DD/3jbQ==",
|
||||
"dev": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": {
|
||||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.0.4.tgz",
|
||||
"integrity": "sha512-uP7UodCRykPNwSAN+wYa/AS9gJI/V47echCAXUYgCgBXy3l19nwO7W/d29COtG/dfAsjBOhMDeh3Ms8Y5VZbrA==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.1.0.tgz",
|
||||
"integrity": "sha512-wtO4O5WDyXhhCd4q4utDIDZxnQfmJ++3dGBCG9LMtI79+92OcA1DVk/n7BEupKmjIr8AzvptDz7YQ9ud6OkU+A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
@@ -1117,9 +1117,9 @@
|
||||
}
|
||||
},
|
||||
"@codemirror/language": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.0.tgz",
|
||||
"integrity": "sha512-tabB0Ef/BflwoEmTB4a//WZ9P90UQyne9qWB9YFsmeS4bnEqSys7UpGk/da1URMXhyfuzWCwp+AQNMhvu8SfnA==",
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.1.tgz",
|
||||
"integrity": "sha512-MC3svxuvIj0MRpFlGHxLS6vPyIdbTr2KKPEW46kCoCXw2ktb4NTkpkPBI/lSP/FoNXLCBJ0mrnUi1OoZxtpW1Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@@ -1140,9 +1140,9 @@
|
||||
}
|
||||
},
|
||||
"@codemirror/search": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.0.0.tgz",
|
||||
"integrity": "sha512-rL0rd3AhI0TAsaJPUaEwC63KHLO7KL0Z/dYozXj6E7L3wNHRyx7RfE0/j5HsIf912EE5n2PCb4Vg0rGYmDv4UQ==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.0.1.tgz",
|
||||
"integrity": "sha512-uOinkOrM+daMduCgMPomDfKLr7drGHB4jHl3Vq6xY2WRlL7MkNsBE0b+XHYa/Mee2npsJOgwvkW4n1lMFeBW2Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@@ -1157,9 +1157,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@codemirror/view": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.0.3.tgz",
|
||||
"integrity": "sha512-1gDBymhbx2DZzwnR/rNUu1LiQqjxBJtFiB+4uLR6tHQ6vKhTIwUsP5uZUQ7SM7JxVx3UihMynnTqjcsC+mczZg==",
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.1.2.tgz",
|
||||
"integrity": "sha512-puUydfKwfmOo+ixtuB+uN/ZpcteEYSnpjHmMaow1sOQhNICsKtGBup3i9ybVqyzDagARRYzSHTWjbdeHqmn31w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@@ -1241,9 +1241,9 @@
|
||||
}
|
||||
},
|
||||
"chart.js": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.0.tgz",
|
||||
"integrity": "sha512-cr8xhrXjLIXVLOBZPkBZVF6NDeiVIrPLHcMhnON7UufudL+CNeRrD+wpYanswlm8NpudMdrt3CHoLMQMxJhHRg==",
|
||||
"version": "3.8.2",
|
||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.8.2.tgz",
|
||||
"integrity": "sha512-7rqSlHWMUKFyBDOJvmFGW2lxULtcwaPLegDjX/Nu5j6QybY+GCiQkEY+6cqHw62S5tcwXMD8Y+H5OBGoR7d+ZQ==",
|
||||
"dev": true
|
||||
},
|
||||
"chartjs-adapter-luxon": {
|
||||
@@ -1291,170 +1291,170 @@
|
||||
"dev": true
|
||||
},
|
||||
"esbuild": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz",
|
||||
"integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.51.tgz",
|
||||
"integrity": "sha512-+CvnDitD7Q5sT7F+FM65sWkF8wJRf+j9fPcprxYV4j+ohmzVj2W7caUqH2s5kCaCJAfcAICjSlKhDCcvDpU7nw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esbuild-android-64": "0.14.49",
|
||||
"esbuild-android-arm64": "0.14.49",
|
||||
"esbuild-darwin-64": "0.14.49",
|
||||
"esbuild-darwin-arm64": "0.14.49",
|
||||
"esbuild-freebsd-64": "0.14.49",
|
||||
"esbuild-freebsd-arm64": "0.14.49",
|
||||
"esbuild-linux-32": "0.14.49",
|
||||
"esbuild-linux-64": "0.14.49",
|
||||
"esbuild-linux-arm": "0.14.49",
|
||||
"esbuild-linux-arm64": "0.14.49",
|
||||
"esbuild-linux-mips64le": "0.14.49",
|
||||
"esbuild-linux-ppc64le": "0.14.49",
|
||||
"esbuild-linux-riscv64": "0.14.49",
|
||||
"esbuild-linux-s390x": "0.14.49",
|
||||
"esbuild-netbsd-64": "0.14.49",
|
||||
"esbuild-openbsd-64": "0.14.49",
|
||||
"esbuild-sunos-64": "0.14.49",
|
||||
"esbuild-windows-32": "0.14.49",
|
||||
"esbuild-windows-64": "0.14.49",
|
||||
"esbuild-windows-arm64": "0.14.49"
|
||||
"esbuild-android-64": "0.14.51",
|
||||
"esbuild-android-arm64": "0.14.51",
|
||||
"esbuild-darwin-64": "0.14.51",
|
||||
"esbuild-darwin-arm64": "0.14.51",
|
||||
"esbuild-freebsd-64": "0.14.51",
|
||||
"esbuild-freebsd-arm64": "0.14.51",
|
||||
"esbuild-linux-32": "0.14.51",
|
||||
"esbuild-linux-64": "0.14.51",
|
||||
"esbuild-linux-arm": "0.14.51",
|
||||
"esbuild-linux-arm64": "0.14.51",
|
||||
"esbuild-linux-mips64le": "0.14.51",
|
||||
"esbuild-linux-ppc64le": "0.14.51",
|
||||
"esbuild-linux-riscv64": "0.14.51",
|
||||
"esbuild-linux-s390x": "0.14.51",
|
||||
"esbuild-netbsd-64": "0.14.51",
|
||||
"esbuild-openbsd-64": "0.14.51",
|
||||
"esbuild-sunos-64": "0.14.51",
|
||||
"esbuild-windows-32": "0.14.51",
|
||||
"esbuild-windows-64": "0.14.51",
|
||||
"esbuild-windows-arm64": "0.14.51"
|
||||
}
|
||||
},
|
||||
"esbuild-android-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz",
|
||||
"integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.51.tgz",
|
||||
"integrity": "sha512-6FOuKTHnC86dtrKDmdSj2CkcKF8PnqkaIXqvgydqfJmqBazCPdw+relrMlhGjkvVdiiGV70rpdnyFmA65ekBCQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-android-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-vBtp//5VVkZWmYYvHsqBRCMMi1MzKuMIn5XDScmnykMTu9+TD9v0NMEDqQxvtFToeYmojdo5UCV2vzMQWJcJ4A==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-darwin-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz",
|
||||
"integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.51.tgz",
|
||||
"integrity": "sha512-YFmXPIOvuagDcwCejMRtCDjgPfnDu+bNeh5FU2Ryi68ADDVlWEpbtpAbrtf/lvFTWPexbgyKgzppNgsmLPr8PA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-darwin-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-juYD0QnSKwAMfzwKdIF6YbueXzS6N7y4GXPDeDkApz/1RzlT42mvX9jgNmyOlWKN7YzQAYbcUEJmZJYQGdf2ow==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-freebsd-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz",
|
||||
"integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.51.tgz",
|
||||
"integrity": "sha512-cLEI/aXjb6vo5O2Y8rvVSQ7smgLldwYY5xMxqh/dQGfWO+R1NJOFsiax3IS4Ng300SVp7Gz3czxT6d6qf2cw0g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-freebsd-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-TcWVw/rCL2F+jUgRkgLa3qltd5gzKjIMGhkVybkjk6PJadYInPtgtUBp1/hG+mxyigaT7ib+od1Xb84b+L+1Mg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-32": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz",
|
||||
"integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.51.tgz",
|
||||
"integrity": "sha512-RFqpyC5ChyWrjx8Xj2K0EC1aN0A37H6OJfmUXIASEqJoHcntuV3j2Efr9RNmUhMfNE6yEj2VpYuDteZLGDMr0w==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz",
|
||||
"integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.51.tgz",
|
||||
"integrity": "sha512-dxjhrqo5i7Rq6DXwz5v+MEHVs9VNFItJmHBe1CxROWNf4miOGoQhqSG8StStbDkQ1Mtobg6ng+4fwByOhoQoeA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-arm": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz",
|
||||
"integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.51.tgz",
|
||||
"integrity": "sha512-LsJynDxYF6Neg7ZC7748yweCDD+N8ByCv22/7IAZglIEniEkqdF4HCaa49JNDLw1UQGlYuhOB8ZT/MmcSWzcWg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-D9rFxGutoqQX3xJPxqd6o+kvYKeIbM0ifW2y0bgKk5HPgQQOo2k9/2Vpto3ybGYaFPCE5qTGtqQta9PoP6ZEzw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-mips64le": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz",
|
||||
"integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.51.tgz",
|
||||
"integrity": "sha512-vS54wQjy4IinLSlb5EIlLoln8buh1yDgliP4CuEHumrPk4PvvP4kTRIG4SzMXm6t19N0rIfT4bNdAxzJLg2k6A==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-ppc64le": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz",
|
||||
"integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.51.tgz",
|
||||
"integrity": "sha512-xcdd62Y3VfGoyphNP/aIV9LP+RzFw5M5Z7ja+zdpQHHvokJM7d0rlDRMN+iSSwvUymQkqZO+G/xjb4/75du8BQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-riscv64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz",
|
||||
"integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.51.tgz",
|
||||
"integrity": "sha512-syXHGak9wkAnFz0gMmRBoy44JV0rp4kVCEA36P5MCeZcxFq8+fllBC2t6sKI23w3qd8Vwo9pTADCgjTSf3L3rA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-linux-s390x": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz",
|
||||
"integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.51.tgz",
|
||||
"integrity": "sha512-kFAJY3dv+Wq8o28K/C7xkZk/X34rgTwhknSsElIqoEo8armCOjMJ6NsMxm48KaWY2h2RUYGtQmr+RGuUPKBhyw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-netbsd-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz",
|
||||
"integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.51.tgz",
|
||||
"integrity": "sha512-ZZBI7qrR1FevdPBVHz/1GSk1x5GDL/iy42Zy8+neEm/HA7ma+hH/bwPEjeHXKWUDvM36CZpSL/fn1/y9/Hb+1A==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-openbsd-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz",
|
||||
"integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.51.tgz",
|
||||
"integrity": "sha512-7R1/p39M+LSVQVgDVlcY1KKm6kFKjERSX1lipMG51NPcspJD1tmiZSmmBXoY5jhHIu6JL1QkFDTx94gMYK6vfA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-sunos-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz",
|
||||
"integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.51.tgz",
|
||||
"integrity": "sha512-HoHaCswHxLEYN8eBTtyO0bFEWvA3Kdb++hSQ/lLG7TyKF69TeSG0RNoBRAs45x/oCeWaTDntEZlYwAfQlhEtJA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-windows-32": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz",
|
||||
"integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.51.tgz",
|
||||
"integrity": "sha512-4rtwSAM35A07CBt1/X8RWieDj3ZUHQqUOaEo5ZBs69rt5WAFjP4aqCIobdqOy4FdhYw1yF8Z0xFBTyc9lgPtEg==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-windows-64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz",
|
||||
"integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.51.tgz",
|
||||
"integrity": "sha512-HoN/5HGRXJpWODprGCgKbdMvrC3A2gqvzewu2eECRw2sYxOUoh2TV1tS+G7bHNapPGI79woQJGV6pFH7GH7qnA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"esbuild-windows-arm64": {
|
||||
"version": "0.14.49",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz",
|
||||
"integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==",
|
||||
"version": "0.14.51",
|
||||
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.51.tgz",
|
||||
"integrity": "sha512-JQDqPjuOH7o+BsKMSddMfmVJXrnYZxXDHsoLHc0xgmAZkOOCflRmC43q31pk79F9xuyWY45jDBPolb5ZgGOf9g==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
@@ -1613,9 +1613,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"pocketbase": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.2.1.tgz",
|
||||
"integrity": "sha512-RPyfMw8MJISyP8PNHDllKC09jnUzZX7Cb1Q0vh9mOytEn5EqFhNLan8e5D1E6h1ebIFS3nT+DzZtP2wYpPygag==",
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.2.2.tgz",
|
||||
"integrity": "sha512-87UBwZD5HCvBu4PSzRZSxrHVAeFOBwJnMUuvqQjZijdhwNLeR7cVLF34mHpWSeIM4jbwe+RSwDNFP0jOzkwGBQ==",
|
||||
"dev": true
|
||||
},
|
||||
"postcss": {
|
||||
@@ -1662,18 +1662,18 @@
|
||||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "2.77.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.0.tgz",
|
||||
"integrity": "sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==",
|
||||
"version": "2.77.2",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz",
|
||||
"integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fsevents": "~2.3.2"
|
||||
}
|
||||
},
|
||||
"sass": {
|
||||
"version": "1.53.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.53.0.tgz",
|
||||
"integrity": "sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ==",
|
||||
"version": "1.54.0",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.0.tgz",
|
||||
"integrity": "sha512-C4zp79GCXZfK0yoHZg+GxF818/aclhp9F48XBu/+bm9vXEVAYov9iU3FBVRMq3Hx3OA4jfKL+p2K9180mEh0xQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
@@ -1746,9 +1746,9 @@
|
||||
}
|
||||
},
|
||||
"vite": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.0.tgz",
|
||||
"integrity": "sha512-M7phQhY3+fRZa0H+1WzI6N+/onruwPTBTMvaj7TzgZ0v2TE+N2sdLKxJOfOv9CckDWt5C4HmyQP81xB4dwRKzA==",
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.4.tgz",
|
||||
"integrity": "sha512-NU304nqnBeOx2MkQnskBQxVsa0pRAH5FphokTGmyy8M3oxbvw7qAXts2GORxs+h/2vKsD+osMhZ7An6yK6F1dA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esbuild": "^0.14.47",
|
||||
@@ -1759,9 +1759,9 @@
|
||||
}
|
||||
},
|
||||
"w3c-keyname": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.4.tgz",
|
||||
"integrity": "sha512-tOhfEwEzFLJzf6d1ZPkYfGj+FWhIpBux9ppoP3rlclw3Z0BZv3N7b7030Z1kYth+6rDuAsXUFr+d0VE6Ed1ikw==",
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.5.tgz",
|
||||
"integrity": "sha512-WJrK7i6w+ULuZsGscCezbCH4Aev5U3xY87vnSimzzEgPQhb0Sa0a1rE3c2jtEwrFtSfi61Jefw3jI5/DD/3jbQ==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
"chart.js": "^3.7.1",
|
||||
"chartjs-adapter-luxon": "^1.1.0",
|
||||
"luxon": "^2.3.2",
|
||||
"pocketbase": "^0.2.1",
|
||||
"pocketbase": "^0.2.2",
|
||||
"prismjs": "^1.28.0",
|
||||
"sass": "^1.45.0",
|
||||
"svelte": "^3.44.0",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script>
|
||||
import Prism from "prismjs";
|
||||
import "prismjs/plugins/normalize-whitespace/prism-normalize-whitespace.js";
|
||||
import "prismjs/components/prism-dart.js";
|
||||
import "@/scss/prism_light.scss";
|
||||
|
||||
export let content = "";
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
import ApiClient from "@/utils/ApiClient";
|
||||
import CommonHelper from "@/utils/CommonHelper";
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
|
||||
export let collection = new Collection();
|
||||
|
||||
let responseTab = 200;
|
||||
let sdkTab = "JavaScript";
|
||||
let responses = [];
|
||||
let sdkExamples = [];
|
||||
|
||||
$: adminsOnly = collection?.createRule === null;
|
||||
|
||||
$: backendAbsUrl =
|
||||
window.location.href.substring(0, window.location.href.indexOf("/_")) || ApiClient.baseUrl;
|
||||
|
||||
$: responses = [
|
||||
{
|
||||
code: 200,
|
||||
@@ -44,23 +46,6 @@
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
lang: "JavaScript",
|
||||
code: `
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${ApiClient.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.create("${collection?.name}", data);
|
||||
`,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="alert alert-success">
|
||||
@@ -87,26 +72,30 @@
|
||||
</div>
|
||||
|
||||
<div class="section-title">Client SDKs example</div>
|
||||
<div class="tabs m-b-lg">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={sdkTab === example.lang}
|
||||
on:click={() => (sdkTab = example.lang)}
|
||||
>
|
||||
{example.lang}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<div class="tab-item" class:active={sdkTab === example.lang}>
|
||||
<CodeBlock content={example.code} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<SdkTabs
|
||||
js={`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.create('${collection?.name}', data);
|
||||
`}
|
||||
dart={`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.create('${collection?.name}', body: body);
|
||||
`}
|
||||
/>
|
||||
|
||||
<div class="section-title">Body Parameters</div>
|
||||
<table class="table-compact table-border m-b-lg">
|
||||
|
||||
@@ -2,16 +2,18 @@
|
||||
import { Collection } from "pocketbase";
|
||||
import ApiClient from "@/utils/ApiClient";
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
|
||||
export let collection = new Collection();
|
||||
|
||||
let responseTab = 204;
|
||||
let sdkTab = "JavaScript";
|
||||
let responses = [];
|
||||
let sdkExamples = [];
|
||||
|
||||
$: adminsOnly = collection?.deleteRule === null;
|
||||
|
||||
$: backendAbsUrl =
|
||||
window.location.href.substring(0, window.location.href.indexOf("/_")) || ApiClient.baseUrl;
|
||||
|
||||
$: if (collection?.id) {
|
||||
responses.push({
|
||||
code: 204,
|
||||
@@ -55,21 +57,6 @@
|
||||
`,
|
||||
});
|
||||
}
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
lang: "JavaScript",
|
||||
code: `
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${ApiClient.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
await client.Records.delete("${collection?.name}", "RECORD_ID");
|
||||
`,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
@@ -89,26 +76,26 @@
|
||||
</div>
|
||||
|
||||
<div class="section-title">Client SDKs example</div>
|
||||
<div class="tabs m-b-lg">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={sdkTab === example.lang}
|
||||
on:click={() => (sdkTab = example.lang)}
|
||||
>
|
||||
{example.lang}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<div class="tab-item" class:active={sdkTab === example.lang}>
|
||||
<CodeBlock content={example.code} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<SdkTabs
|
||||
js={`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
await client.Records.delete('${collection?.name}', 'RECORD_ID');
|
||||
`}
|
||||
dart={`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
await client.records.delete('${collection?.name}', 'RECORD_ID');
|
||||
`}
|
||||
/>
|
||||
|
||||
<div class="section-title">Path parameters</div>
|
||||
<table class="table-compact table-border m-b-lg">
|
||||
|
||||
@@ -4,16 +4,18 @@
|
||||
import CommonHelper from "@/utils/CommonHelper";
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import FilterSyntax from "@/components/collections/docs/FilterSyntax.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
|
||||
export let collection = new Collection();
|
||||
|
||||
let responseTab = 200;
|
||||
let sdkTab = "JavaScript";
|
||||
let responses = [];
|
||||
let sdkExamples = [];
|
||||
|
||||
$: adminsOnly = collection?.listRule === null;
|
||||
|
||||
$: backendAbsUrl =
|
||||
window.location.href.substring(0, window.location.href.indexOf("/_")) || ApiClient.baseUrl;
|
||||
|
||||
$: if (collection?.id) {
|
||||
responses.push({
|
||||
code: 200,
|
||||
@@ -67,29 +69,6 @@
|
||||
`,
|
||||
});
|
||||
}
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
lang: "JavaScript",
|
||||
code: `
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${ApiClient.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.Records.getList("${collection?.name}", 1, 50, {
|
||||
filter: "created >= '2022-01-01 00:00:00'",
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.Records.getFullList("${collection?.name}", 200 /* batch size */, {
|
||||
sort: "-created",
|
||||
});
|
||||
`,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="alert alert-info">
|
||||
@@ -109,26 +88,43 @@
|
||||
</div>
|
||||
|
||||
<div class="section-title">Client SDKs example</div>
|
||||
<div class="tabs m-b-lg">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={sdkTab === example.lang}
|
||||
on:click={() => (sdkTab = example.lang)}
|
||||
>
|
||||
{example.lang}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<div class="tab-item" class:active={sdkTab === example.lang}>
|
||||
<CodeBlock content={example.code} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<SdkTabs
|
||||
js={`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
const resultList = await client.Records.getList('${collection?.name}', 1, 50, {
|
||||
filter: 'created >= '2022-01-01 00:00:00'',
|
||||
});
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
const records = await client.Records.getFullList('${collection?.name}', 200 /* batch size */, {
|
||||
sort: '-created',
|
||||
});
|
||||
`}
|
||||
dart={`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await client.records.getList(
|
||||
'${collection?.name}',
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00"',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
final records = await client.records.getFullList('${collection?.name}', batch: 200, sort: '-created');
|
||||
`}
|
||||
/>
|
||||
|
||||
<div class="section-title">Query parameters</div>
|
||||
<table class="table-compact table-border m-b-lg">
|
||||
|
||||
@@ -3,40 +3,12 @@
|
||||
import ApiClient from "@/utils/ApiClient";
|
||||
import CommonHelper from "@/utils/CommonHelper";
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
|
||||
export let collection = new Collection();
|
||||
|
||||
let sdkTab = "JavaScript";
|
||||
let sdkExamples = [];
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
lang: "JavaScript",
|
||||
code: `
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${ApiClient.baseUrl}");
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.Users.authViaEmail("test@example.com", "123456");
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.Realtime.subscribe("${collection?.name}", function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.Realtime.subscribe("${collection?.name}/RECORD_ID", function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.Realtime.unsubscribe() // remove all subscriptions
|
||||
client.Realtime.unsubscribe("${collection?.name}") // remove the collection subscription
|
||||
client.Realtime.unsubscribe("${collection?.name}/RECORD_ID") // remove the record subscription
|
||||
`,
|
||||
},
|
||||
];
|
||||
$: backendAbsUrl =
|
||||
window.location.href.substring(0, window.location.href.indexOf("/_")) || ApiClient.baseUrl;
|
||||
</script>
|
||||
|
||||
<div class="alert">
|
||||
@@ -75,26 +47,58 @@
|
||||
</div>
|
||||
|
||||
<div class="section-title">Client SDKs example</div>
|
||||
<div class="tabs m-b-base">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={sdkTab === example.lang}
|
||||
on:click={() => (sdkTab = example.lang)}
|
||||
>
|
||||
{example.lang}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<div class="tab-item" class:active={sdkTab === example.lang}>
|
||||
<CodeBlock content={example.code} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<SdkTabs
|
||||
js={`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.Users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.Realtime.subscribe('${collection?.name}', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.Realtime.subscribe('${collection?.name}/RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.Realtime.unsubscribe() // remove all subscriptions
|
||||
client.Realtime.unsubscribe('${collection?.name}') // remove only the collection subscription
|
||||
client.Realtime.unsubscribe('${collection?.name}/RECORD_ID') // remove only the record subscription
|
||||
`}
|
||||
dart={`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
// (Optionally) authenticate
|
||||
client.users.authViaEmail('test@example.com', '123456');
|
||||
|
||||
// Subscribe to changes in any record from the collection
|
||||
client.realtime.subscribe('${collection?.name}', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Subscribe to changes in a single record
|
||||
client.realtime.subscribe('${collection?.name}/RECORD_ID', (e) {
|
||||
print(e.record);
|
||||
});
|
||||
|
||||
// Unsubscribe
|
||||
client.realtime.unsubscribe() // remove all subscriptions
|
||||
client.realtime.unsubscribe('${collection?.name}') // remove only the collection subscription
|
||||
client.realtime.unsubscribe('${collection?.name}/RECORD_ID') // remove only the record subscription
|
||||
`}
|
||||
/>
|
||||
|
||||
<div class="section-title">Event data format</div>
|
||||
<CodeBlock
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<script>
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
|
||||
const SDK_PREFERENCE_KEY = "pb_sdk_preference";
|
||||
|
||||
export let js = "";
|
||||
export let dart = "";
|
||||
|
||||
let activeTab = localStorage.getItem(SDK_PREFERENCE_KEY) || "javascript";
|
||||
|
||||
$: if (activeTab) {
|
||||
// store user preference
|
||||
localStorage.setItem(SDK_PREFERENCE_KEY, activeTab);
|
||||
}
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
title: "JavaScript",
|
||||
language: "javascript",
|
||||
content: js,
|
||||
},
|
||||
{
|
||||
title: "Dart",
|
||||
language: "dart",
|
||||
content: dart,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="tabs sdk-tabs m-b-lg">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.language)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={activeTab === example.language}
|
||||
on:click={() => (activeTab = example.language)}
|
||||
>
|
||||
<div class="txt">{example.title}</div>
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.language)}
|
||||
<div class="tab-item" class:active={activeTab === example.language}>
|
||||
<CodeBlock language={example.language} content={example.content} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.sdk-tabs .tabs-header .tab-item {
|
||||
min-width: 100px;
|
||||
}
|
||||
</style>
|
||||
@@ -3,16 +3,18 @@
|
||||
import ApiClient from "@/utils/ApiClient";
|
||||
import CommonHelper from "@/utils/CommonHelper";
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
|
||||
export let collection = new Collection();
|
||||
|
||||
let responseTab = 200;
|
||||
let sdkTab = "JavaScript";
|
||||
let responses = [];
|
||||
let sdkExamples = [];
|
||||
|
||||
$: adminsOnly = collection?.updateRule === null;
|
||||
|
||||
$: backendAbsUrl =
|
||||
window.location.href.substring(0, window.location.href.indexOf("/_")) || ApiClient.baseUrl;
|
||||
|
||||
$: responses = [
|
||||
{
|
||||
code: 200,
|
||||
@@ -54,23 +56,6 @@
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
lang: "JavaScript",
|
||||
code: `
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${ApiClient.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.update("${collection?.name}", "RECORD_ID", data);
|
||||
`,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
@@ -97,26 +82,30 @@
|
||||
</div>
|
||||
|
||||
<div class="section-title">Client SDKs example</div>
|
||||
<div class="tabs m-b-lg">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={sdkTab === example.lang}
|
||||
on:click={() => (sdkTab = example.lang)}
|
||||
>
|
||||
{example.lang}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<div class="tab-item" class:active={sdkTab === example.lang}>
|
||||
<CodeBlock content={example.code} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<SdkTabs
|
||||
js={`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
const data = { ... };
|
||||
|
||||
const record = await client.Records.update('${collection?.name}', 'RECORD_ID', data);
|
||||
`}
|
||||
dart={`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
final body = <String, dynamic>{ ... };
|
||||
|
||||
final record = await client.records.update('${collection?.name}', 'RECORD_ID', body: body);
|
||||
`}
|
||||
/>
|
||||
|
||||
<div class="section-title">Path parameters</div>
|
||||
<table class="table-compact table-border m-b-lg">
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
import ApiClient from "@/utils/ApiClient";
|
||||
import CommonHelper from "@/utils/CommonHelper";
|
||||
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
||||
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
|
||||
|
||||
export let collection = new Collection();
|
||||
|
||||
let responseTab = 200;
|
||||
let sdkTab = "JavaScript";
|
||||
let responses = [];
|
||||
let sdkExamples = [];
|
||||
|
||||
$: adminsOnly = collection?.viewRule === null;
|
||||
|
||||
$: backendAbsUrl =
|
||||
window.location.href.substring(0, window.location.href.indexOf("/_")) || ApiClient.baseUrl;
|
||||
|
||||
$: if (collection?.id) {
|
||||
responses.push({
|
||||
code: 200,
|
||||
@@ -43,23 +45,6 @@
|
||||
`,
|
||||
});
|
||||
}
|
||||
|
||||
$: sdkExamples = [
|
||||
{
|
||||
lang: "JavaScript",
|
||||
code: `
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase("${ApiClient.baseUrl}");
|
||||
|
||||
...
|
||||
|
||||
const record = await client.Records.getOne("${collection?.name}", "RECORD_ID", {
|
||||
expand: "some_relation"
|
||||
});
|
||||
`,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="alert alert-info">
|
||||
@@ -79,26 +64,30 @@
|
||||
</div>
|
||||
|
||||
<div class="section-title">Client SDKs example</div>
|
||||
<div class="tabs m-b-lg">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<button
|
||||
class="tab-item"
|
||||
class:active={sdkTab === example.lang}
|
||||
on:click={() => (sdkTab = example.lang)}
|
||||
>
|
||||
{example.lang}
|
||||
</button>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="tabs-content">
|
||||
{#each sdkExamples as example (example.lang)}
|
||||
<div class="tab-item" class:active={sdkTab === example.lang}>
|
||||
<CodeBlock content={example.code} />
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
<SdkTabs
|
||||
js={`
|
||||
import PocketBase from 'pocketbase';
|
||||
|
||||
const client = new PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
const record = await client.Records.getOne('${collection?.name}', 'RECORD_ID', {
|
||||
expand: 'some_relation'
|
||||
});
|
||||
`}
|
||||
dart={`
|
||||
import 'package:pocketbase/pocketbase.dart';
|
||||
|
||||
final client = PocketBase('${backendAbsUrl}');
|
||||
|
||||
...
|
||||
|
||||
final record = await client.records.getOne('${collection?.name}', 'RECORD_ID', query: {
|
||||
'expand': 'some_relation',
|
||||
});
|
||||
`}
|
||||
/>
|
||||
|
||||
<div class="section-title">Path Parameters</div>
|
||||
<table class="table-compact table-border m-b-lg">
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
pointBackgroundColor: "#ef4565",
|
||||
backgroundColor: "rgb(239,69,101,0.05)",
|
||||
borderWidth: 2,
|
||||
pointRadius: 1,
|
||||
pointBorderWidth: 0,
|
||||
fill: true,
|
||||
},
|
||||
|
||||
@@ -456,6 +456,7 @@ a,
|
||||
border-radius: var(--baseRadius);
|
||||
color: var(--txtPrimaryColor);
|
||||
font-size: 1.2rem;
|
||||
overflow: hidden;
|
||||
@include shadowize();
|
||||
i {
|
||||
font-size: inherit;
|
||||
|
||||
@@ -143,6 +143,7 @@ table {
|
||||
}
|
||||
.col-type-email {
|
||||
min-width: 120px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.col-type-file {
|
||||
min-width: 100px;
|
||||
|
||||
@@ -28,7 +28,7 @@ $tabContentAnimationSpeed: 0.3s;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 50px;
|
||||
min-width: 70px;
|
||||
gap: 5px;
|
||||
padding: 10px 10px;
|
||||
margin: 0;
|
||||
|
||||
Reference in new issue
Block a user