diff --git a/ui/dist/assets/AuthMethodsDocs-99d1684a.js b/ui/dist/assets/AuthMethodsDocs-5804e5c2.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs-99d1684a.js rename to ui/dist/assets/AuthMethodsDocs-5804e5c2.js index 979f07ed..1e12c5b3 100644 --- a/ui/dist/assets/AuthMethodsDocs-99d1684a.js +++ b/ui/dist/assets/AuthMethodsDocs-5804e5c2.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as me,f as k,g as h,h as n,m as _e,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-a4705b02.js";import{S as Be}from"./SdkTabs-98b01dec.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=g(s),f=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&H(_,s),C&6&&Q(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&Q(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as g,b as w,c as me,f as k,g as h,h as n,m as _e,x as H,N as re,O as we,k as ve,P as Ce,n as Pe,t as L,a as Y,o as m,d as pe,R as Me,C as Se,p as $e,r as Q,u as je,M as Ae}from"./index-55a566ae.js";import{S as Be}from"./SdkTabs-2b871527.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",_,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),_=g(s),f=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,_),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&H(_,s),C&6&&Q(o,"active",l[1]===l[5].code)},d(v){v&&m(o),i=!1,u()}}}function he(a,l){let o,s,_,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),me(s.$$.fragment),_=w(),k(o,"class","tab-item"),Q(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),_e(s,o,null),n(o,_),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&Q(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&m(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",_,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,y,A,Z,V,z=a[0].name+"",E,x,I,B,J,S,O,b=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs-6e6bdd49.js b/ui/dist/assets/AuthRefreshDocs-643f84c5.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs-6e6bdd49.js rename to ui/dist/assets/AuthRefreshDocs-643f84c5.js index 2807eb79..6f2e3480 100644 --- a/ui/dist/assets/AuthRefreshDocs-6e6bdd49.js +++ b/ui/dist/assets/AuthRefreshDocs-643f84c5.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,R as Qe,C as He,p as We,r as x,u as Ge}from"./index-a4705b02.js";import{S as Xe}from"./SdkTabs-98b01dec.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){d(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&u(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){d(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,S=[],Te=new Map,Ce,H,y=[],Re=new Map,M;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,M as Ve,e as a,w as k,b as p,c as ae,f as b,g as d,h as o,m as ne,x as re,N as qe,O as xe,k as Je,P as Ke,n as Ie,t as U,a as j,o as u,d as ie,R as Qe,C as He,p as We,r as x,u as Ge}from"./index-55a566ae.js";import{S as Xe}from"./SdkTabs-2b871527.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){d(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&u(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){d(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&u(s),ie(n)}}}function Ye(r){var Ae,Be;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,A,J,$,F,ce,L,B,de,K,N=r[0].name+"",I,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,S=[],Te=new Map,Ce,H,y=[],Re=new Map,M;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-937df869.js b/ui/dist/assets/AuthWithOAuth2Docs-b6d55bee.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-937df869.js rename to ui/dist/assets/AuthWithOAuth2Docs-b6d55bee.js index 5da9161d..06680b12 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-937df869.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-b6d55bee.js @@ -1,4 +1,4 @@ -import{S as je,i as ze,s as Fe,M as We,e as s,w,b as h,c as re,f as p,g as i,h as a,m as ce,x as de,N as De,O as Ve,k as Le,P as Ee,n as Je,t as L,a as E,o as r,d as ue,R as Ne,C as Ue,p as Ie,r as J,u as Ke}from"./index-a4705b02.js";import{S as Qe}from"./SdkTabs-98b01dec.js";function Be(c,l,o){const n=c.slice();return n[5]=l[o],n}function Me(c,l,o){const n=c.slice();return n[5]=l[o],n}function Re(c,l){let o,n=l[5].code+"",m,v,d,b;function k(){return l[4](l[5])}return{key:c,first:null,c(){o=s("button"),m=w(n),v=h(),p(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(g,O){i(g,o,O),a(o,m),a(o,v),d||(b=Ke(o,"click",k),d=!0)},p(g,O){l=g,O&4&&n!==(n=l[5].code+"")&&de(m,n),O&6&&J(o,"active",l[1]===l[5].code)},d(g){g&&r(o),d=!1,b()}}}function He(c,l){let o,n,m,v;return n=new We({props:{content:l[5].body}}),{key:c,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){i(d,o,b),ce(n,o,null),a(o,m),v=!0},p(d,b){l=d;const k={};b&4&&(k.content=l[5].body),n.$set(k),(!v||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){v||(L(n.$$.fragment,d),v=!0)},o(d){E(n.$$.fragment,d),v=!1},d(d){d&&r(o),ue(n)}}}function Ge(c){let l,o,n=c[0].name+"",m,v,d,b,k,g,O,x,N,A,j,he,z,P,pe,I,F=c[0].name+"",K,be,Q,D,G,U,X,B,Y,S,Z,fe,ee,T,te,me,ae,ve,f,we,C,ke,ge,_e,le,ye,oe,Oe,Ae,Se,se,Te,ne,M,ie,$,R,y=[],$e=new Map,Ce,H,_=[],qe=new Map,q;g=new Qe({props:{js:` +import{S as je,i as ze,s as Fe,M as We,e as s,w,b as h,c as re,f as p,g as i,h as a,m as ce,x as de,N as De,O as Ve,k as Le,P as Ee,n as Je,t as L,a as E,o as r,d as ue,R as Ne,C as Ue,p as Ie,r as J,u as Ke}from"./index-55a566ae.js";import{S as Qe}from"./SdkTabs-2b871527.js";function Be(c,l,o){const n=c.slice();return n[5]=l[o],n}function Me(c,l,o){const n=c.slice();return n[5]=l[o],n}function Re(c,l){let o,n=l[5].code+"",m,v,d,b;function k(){return l[4](l[5])}return{key:c,first:null,c(){o=s("button"),m=w(n),v=h(),p(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(g,O){i(g,o,O),a(o,m),a(o,v),d||(b=Ke(o,"click",k),d=!0)},p(g,O){l=g,O&4&&n!==(n=l[5].code+"")&&de(m,n),O&6&&J(o,"active",l[1]===l[5].code)},d(g){g&&r(o),d=!1,b()}}}function He(c,l){let o,n,m,v;return n=new We({props:{content:l[5].body}}),{key:c,first:null,c(){o=s("div"),re(n.$$.fragment),m=h(),p(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){i(d,o,b),ce(n,o,null),a(o,m),v=!0},p(d,b){l=d;const k={};b&4&&(k.content=l[5].body),n.$set(k),(!v||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){v||(L(n.$$.fragment,d),v=!0)},o(d){E(n.$$.fragment,d),v=!1},d(d){d&&r(o),ue(n)}}}function Ge(c){let l,o,n=c[0].name+"",m,v,d,b,k,g,O,x,N,A,j,he,z,P,pe,I,F=c[0].name+"",K,be,Q,D,G,U,X,B,Y,S,Z,fe,ee,T,te,me,ae,ve,f,we,C,ke,ge,_e,le,ye,oe,Oe,Ae,Se,se,Te,ne,M,ie,$,R,y=[],$e=new Map,Ce,H,_=[],qe=new Map,q;g=new Qe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${c[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-fa38cbdf.js b/ui/dist/assets/AuthWithPasswordDocs-2ad19a54.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-fa38cbdf.js rename to ui/dist/assets/AuthWithPasswordDocs-2ad19a54.js index 4554da7e..dcaa61e4 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-fa38cbdf.js +++ b/ui/dist/assets/AuthWithPasswordDocs-2ad19a54.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,N as ce,O as ye,k as ge,P as Pe,n as Re,t as tt,a as et,o as c,d as Mt,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-a4705b02.js";import{S as Ae}from"./SdkTabs-98b01dec.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Ut,ot,T,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,K,A=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` +import{S as Se,i as ve,s as we,M as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,N as ce,O as ye,k as ge,P as Pe,n as Re,t as tt,a as et,o as c,d as Mt,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index-55a566ae.js";import{S as Ae}from"./SdkTabs-2b871527.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Mt(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Ut,ot,T,at,F,st,M,G,Dt,X,N,Et,nt,Z=n[0].name+"",it,Wt,rt,I,ct,U,dt,Lt,V,D,ut,Bt,ft,Ht,P,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,Nt,yt,It,k,Vt,H,jt,Jt,Kt,gt,Qt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,K,A=[],xt=new Map,te,Q,v=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Ue;if(t[1])return Me;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor-462b7ad0.js b/ui/dist/assets/CodeEditor-becbd613.js similarity index 99% rename from ui/dist/assets/CodeEditor-462b7ad0.js rename to ui/dist/assets/CodeEditor-becbd613.js index 8b0de68c..c037e552 100644 --- a/ui/dist/assets/CodeEditor-462b7ad0.js +++ b/ui/dist/assets/CodeEditor-becbd613.js @@ -1,4 +1,4 @@ -import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,T as N,g as bt,y as RO,o as kt,I as xt,J as yt,K as wt,H as Yt,C as vt,L as Tt}from"./index-a4705b02.js";import{P as Ut,N as Wt,u as _t,D as Ct,v as wO,T as D,I as YO,w as rO,x as l,y as Vt,L as sO,z as nO,A as j,B as lO,F as ye,G as oO,H as C,J as we,K as Ye,M as ve,E as v,O as G,Q as qt,R as Rt,U as Te,V as X,W as zt,X as jt,a as V,h as Gt,b as At,c as It,d as Nt,e as Et,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ht,k as Ft,j as Kt,l as Oa,m as ea,n as ta,o as aa,p as ia,q as zO,C as E}from"./index-6f704b4c.js";class H{constructor(O,a,t,i,r,s,n,o,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let i=O.parser.context;return new H(O,[],a,t,t,0,[],0,i?new jO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,i=O&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(O,a,t,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(O,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(O,a,t){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),i=O.bufferBase+a;for(;O&&i==O.bufferBase;)O=O.parent;return new H(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-t*3;if(r<0||a.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var GO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"})(GO||(GO={}));class ra{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class F{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new F(O,a,a-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new F(this.stack,this.pos,this.index)}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new O(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new J;class sa{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,i=this.rangeIndex,r=this.pos+O;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,a)))}return t}}class W{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ue(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class XO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?z(O):O}token(O,a){let t=O.pos,i;for(;i=O.pos,Ue(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i-t))}}XO.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class b{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ue(e,O,a,t,i,r){let s=0,n=1<0){let p=e[h];if(o.allows(p)&&(O.token.value==-1||O.token.value==p||na(p,O.token.value,i,r))){O.acceptToken(p);break}}let u=O.next,c=0,f=e[s+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535&&e[Q+f*3-3]==65535){s=e[Q+f*3-1];continue O}for(;c>1,p=Q+h+(h<<1),$=e[p],g=e[p+1]||65536;if(u<$)f=h;else if(u>=g)c=h+1;else{s=e[p+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,i;(i=e[t])!=65535;t++)if(i==a)return t-O;return-1}function na(e,O,a,t){let i=IO(a,t,O);return i<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class la{constructor(O,a){this.fragments=O,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?EO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?EO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof D){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[a]++,this.nextStart=s+r.length}}}class oa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new J)}getActions(O){let a=0,t=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new J,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=O;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(O,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,O),t),O.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,a,t,i){for(let r=0;rO.bufferLength*4?new la(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ha(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?r.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(wO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(c.type.id)})`),!0;if(!(c instanceof D)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof D&&c.positions[0]==0)c=h;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),Z&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!i||i.scoree;class We{constructor(O){this.start=O.start,this.shift=O.shift||uO,this.reduce=O.reduce||uO,this.reuse=O.reuse||uO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ut{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,o,n[Q++]);else{let c=n[Q+-u];for(let f=-u;f>0;f--)r(n[Q++],o,c);Q++}}}this.nodeSet=new Wt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ct;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new W(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,a,t){let i=new Qa(this,O,a,t);for(let r of this.wrappers)i=r(i,O,a,t);return i}getGoto(O,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let Q=r+(s>>1);r0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else return!1;if(a==k(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(r=>r.from==t);return i?i.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=O.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=JO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let r of O.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const ua=54,fa=1,da=55,pa=2,Sa=56,$a=3,LO=4,ga=5,K=6,_e=7,Ce=8,Ve=9,qe=10,Pa=11,ma=12,Xa=13,fO=57,Za=14,MO=58,Re=20,ba=22,ze=23,ka=24,ZO=26,je=27,xa=28,ya=31,wa=34,Ya=36,va=37,Ta=0,Ua=1,Wa={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ca(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function bO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let i="";for(;Ca(t);)i+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=i?i.toLowerCase():t==Va||t==qa?void 0:null}const Ae=60,OO=62,vO=47,Va=63,qa=33,Ra=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(bO(t,1)||"",e):e},reduce(e,O){return O==Re&&e?e.parent:e},reuse(e,O,a,t){let i=O.type.id;return i==K||i==Ya?new ee(bO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ga=new b((e,O)=>{if(e.next!=Ae){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==vO;a&&e.advance();let t=bO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Za:K);let i=O.context?O.context.name:null;if(a){if(t==i)return e.acceptToken(Pa);if(i&&_a[i])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ta))return e.acceptToken(ma);for(let r=O.context;r;r=r.parent)if(r.name==t)return;e.acceptToken(Xa)}else{if(t=="script")return e.acceptToken(_e);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ve);if(Wa.hasOwnProperty(t))return e.acceptToken(qe);i&&HO[i]&&HO[i][t]?e.acceptToken(fO,-1):e.acceptToken(K)}},{contextual:!0}),Aa=new b(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ra)O++;else if(e.next==OO&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ia(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Na=new b((e,O)=>{if(e.next==vO&&e.peek(1)==OO){let a=O.dialectEnabled(Ua)||Ia(O.context);e.acceptToken(a?ga:LO,2)}else e.next==OO&&e.acceptToken(LO,1)});function TO(e,O,a){let t=2+e.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==Ae||r==1&&i.next==vO||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Ea=TO("script",ua,fa),Ba=TO("style",da,pa),Da=TO("textarea",Sa,$a),Ja=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ea,Ba,Da,Na,Ga,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Ie(e,O){let a=Object.create(null);for(let t of e.getChildren(ze)){let i=t.getChild(ka),r=t.getChild(ZO)||t.getChild(je);i&&(a[O.read(i.from,i.to)]=r?r.type.id==ZO?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return a}function te(e,O){let a=e.getChild(ba);return a?O.read(a.from,a.to):" "}function dO(e,O,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=Ie(e.node.parent.firstChild,O))))return{parser:i.parser};return null}function Ne(e=[],O=[]){let a=[],t=[],i=[],r=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let Q=n.type.id;if(Q==xa)return dO(n,o,a);if(Q==ya)return dO(n,o,t);if(Q==wa)return dO(n,o,i);if(Q==Re&&r.length){let u=n.node,c=u.firstChild,f=c&&te(c,o),h;if(f){for(let p of r)if(p.tag==f&&(!p.attrs||p.attrs(h||(h=Ie(u,o))))){let $=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:$.type.id==va?$.from:u.to}]}}}}if(s&&Q==ze){let u=n.node,c;if(c=u.firstChild){let f=s[o.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=te(u.parent,o))continue;let p=u.lastChild;if(p.type.id==ZO){let $=p.from+1,g=p.lastChild,w=p.to-(g&&g.isError?0:1);if(w>$)return{parser:h.parser,overlay:[{from:$,to:w}]}}else if(p.type.id==je)return{parser:h.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ma=94,ae=1,Ha=95,Fa=96,ie=2,Ee=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,Oi=40,Be=95,ei=91,L=45,ti=46,ai=35,ii=37;function eO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ri(e){return e>=48&&e<=57}const si=new b((e,O)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=e;if(eO(r)||r==L||r==Be||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,e.advance();else{a&&e.acceptToken(r==Oi?Ha:t==2&&O.canShift(ie)?ie:Fa);break}}}),ni=new b(e=>{if(Ee.includes(e.peek(-1))){let{next:O}=e;(eO(O)||O==Be||O==ai||O==ti||O==ei||O==Ka||O==L)&&e.acceptToken(Ma)}}),li=new b(e=>{if(!Ee.includes(e.peek(-1))){let{next:O}=e;if(O==ii&&(e.advance(),e.acceptToken(ae)),eO(O)){do e.advance();while(eO(e.next));e.acceptToken(ae)}}}),oi=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hi={__proto__:null,not:128,only:128,from:158,to:160},ui=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>Qi[e]||-1},{term:56,get:e=>ci[e]||-1},{term:96,get:e=>hi[e]||-1}],tokenPrec:1123});let pO=null;function SO(){if(!pO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));pO=O.sort().map(t=>({type:"property",label:t}))}return pO||[]}const re=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),se=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),fi=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,di=/^-(-[\w-]*)?$/;function pi(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const ne=new we,Si=["Declaration"];function $i(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function De(e,O){if(O.to-O.from>4096){let a=ne.get(O);if(a)return a;let t=[],i=new Set,r=O.cursor(YO.IncludeAnonymous);if(r.firstChild())do for(let s of De(e,r.node))i.has(s.label)||(i.add(s.label),t.push(s));while(r.nextSibling());return ne.set(O,t),t}else{let a=[],t=new Set;return O.cursor().iterate(i=>{var r;if(i.name=="VariableName"&&i.matchContext(Si)&&((r=i.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let s=e.sliceString(i.from,i.to);t.has(s)||(t.add(s),a.push({label:s,type:"variable"}))}}),a}}const gi=e=>{let{state:O,pos:a}=e,t=C(O).resolveInner(a,-1),i=t.type.isError&&t.from==t.to-1&&O.doc.sliceString(t.from,t.to)=="-";if(t.name=="PropertyName"||(i||t.name=="TagName")&&/^(Block|Styles)$/.test(t.resolve(t.to).name))return{from:t.from,options:SO(),validFor:y};if(t.name=="ValueName")return{from:t.from,options:se,validFor:y};if(t.name=="PseudoClassName")return{from:t.from,options:re,validFor:y};if(t.name=="VariableName"||(e.explicit||i)&&pi(t,O.doc))return{from:t.name=="VariableName"?t.from:a,options:De(O.doc,$i(t)),validFor:di};if(t.name=="TagName"){for(let{parent:n}=t;n;n=n.parent)if(n.name=="Block")return{from:t.from,options:SO(),validFor:y};return{from:t.from,options:fi,validFor:y}}if(!e.explicit)return null;let r=t.resolve(a),s=r.childBefore(a);return s&&s.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:re,validFor:y}:s&&s.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:y}:r.name=="Block"||r.name=="Styles"?{from:a,options:SO(),validFor:y}:null},tO=sO.define({name:"css",parser:ui.configure({props:[nO.add({Declaration:j()}),lO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pi(){return new oO(tO,tO.data.of({autocomplete:gi}))}const le=302,oe=1,mi=2,Qe=303,Xi=305,Zi=306,bi=3,ki=4,xi=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Je=125,yi=59,ce=47,wi=42,Yi=43,vi=45,Ti=new We({start:!1,shift(e,O){return O==bi||O==ki||O==Xi?e:O==Zi},strict:!1}),Ui=new b((e,O)=>{let{next:a}=e;(a==Je||a==-1||O.context)&&O.canShift(Qe)&&e.acceptToken(Qe)},{contextual:!0,fallback:!0}),Wi=new b((e,O)=>{let{next:a}=e,t;xi.indexOf(a)>-1||a==ce&&((t=e.peek(1))==ce||t==wi)||a!=Je&&a!=yi&&a!=-1&&!O.context&&O.canShift(le)&&e.acceptToken(le)},{contextual:!0}),_i=new b((e,O)=>{let{next:a}=e;if((a==Yi||a==vi)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(oe);e.acceptToken(t?oe:mi)}},{contextual:!0}),Ci=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Vi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},qi={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Ri={__proto__:null,"<":137},zi=T.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#J}'#J}O8yQSO'#IPO9OQ(C[O'#IQOOQQ'#JP'#JPOOQQ'#IU'#IUQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HoO>VQ(C]O'#HuO%QQUO'#HwO>bQ(C]O'#HyO>mQ(C]O'#H{O9OQ(C[O'#H}O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOBUQWO'#E`OOQ(CW'#E_'#E_OB`Q(C`O'#E`OBzQWO'#ESOOQO'#Jj'#JjOC`QWO'#ESOCmQWO'#E`ODTQWO'#EfODWQWO'#E`ODqQWO'#E`OAQQWO'#E`OBzQWO'#E`PEbO?MpO'#C`POOO)CDn)CDnOOOO'#IV'#IVOEmOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOE{O!bO,59RO%QQUO'#D]OOOO'#IY'#IYOFZO07`O,59uOOQ(CY,59u,59uOFiQUO'#IZOF|QSO'#JeOIOQbO'#JeO+sQUO'#JeOIVQSO,59{OImQSO'#EiOIzQSO'#JrOJVQSO'#JqOJVQSO'#JqOJ_QSO,5;VOJdQSO'#JpOOQ(CY,5:W,5:WOJkQUO,5:WOLlQ(CjO,5:bOM]QSO,5:jOMbQSO'#JnON[Q(C[O'#JoO:vQSO'#JnONcQSO'#JnONkQSO,5;UONpQSO'#JnOOQ(CY'#Cf'#CfO%QQUO'#EOO! dQ`O,5:oOOQO'#Jk'#JkOOQO-E<^-E<^O9_QSO,5=VO! zQSO,5=VO!!PQUO,5;SO!$SQ,UO'#EdO!%gQSO,5;SO!'PQ,UO'#DpO!'WQUO'#DuO!'bQWO,5;]O!'jQWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!'xQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!){QSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!*TQ(C[O,5kOOQQ'#JX'#JXOOQQ,5>l,5>lOOQQ-EQQWO,5;yO!>VQSO,5=rO!>[QSO,5=rO!>aQSO,5=rO9OQ(C[O,5=rO!>oQSO'#EkO!?iQWO'#ElOOQ(CW'#Jp'#JpO!?pQ(C[O'#KOO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!?{QWO,5=^O!@TQ,UO,5=_O!@`QSO,5=aO!@eQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!@mQSO'#HPO9dQ,UO'#HSO!@rQSO'#HSOOQQ,5=g,5=gO!@wQSO'#HTO!APQSO'#ClO!AUQSO,58|O!A`QSO,58|O!ChQUO,58|OOQQ,58|,58|O!CuQ(C[O,58|O%QQUO,58|O!DQQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!DbQSO,5=tO`QUO,5=zO`QUO,5=|O!DgQSO,5>OO`QUO,5>QO!DlQSO,5>TO!DqQUO,5>ZOOQQ,5>a,5>aO%QQUO,5>aO9OQ(C[O,5>cOOQQ,5>e,5>eO!HxQSO,5>eOOQQ,5>g,5>gO!HxQSO,5>gOOQQ,5>i,5>iO!H}QWO'#DXO%QQUO'#JgO!IlQWO'#JgO!JZQWO'#DgO!JlQWO'#DgO!L}QUO'#DgO!MUQSO'#JfO!M^QSO,5:QO!McQSO'#EmO!MqQSO'#JsO!MyQSO,5;WO!NOQWO'#DgO!N]QWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!NdQSO,5:kO>QQSO,5;RO!uO+sQUO,5>uOOQO,5>{,5>{O#&oQUO'#IZOOQO-EUQ(CjO1G0xO#AUQ$IUO'#CfO#CSQ$IUO1G1ZO#EQQ$IUO'#JdO!*OQSO1G1aO#EeQ(CjO,5?QOOQ(CW-EQQSO'#HsOOQQ1G3u1G3uO$0}QUO1G3uO9OQ(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9OQ(C[O1G4PO9OQ(C[O1G4RO$5RQSO,5@RO!'xQUO,5;XO:vQSO,5;XO>QQSO,5:RO!'xQUO,5:RO!QQSO1G0mO!uO$:qQSO1G5kO$:yQSO1G5wO$;RQbO1G5xO:vQSO,5>{O$;]QSO1G5tO$;]QSO1G5tO:vQSO1G5tO$;eQ(CjO1G5uO%QQUO1G5uO$;uQ(C[O1G5uO$}O:vQSO,5>}OOQO,5>},5>}O$}OOQO-EQQWO,59pO%QQUO,59pO% mQSO1G2SO!%lQ,UO1G2ZO% rQ(CjO7+'gOOQ(CY7+'g7+'gO!!PQUO7+'gOOQ(CY7+%`7+%`O%!fQ`O'#J|O!NgQSO7+(]O%!pQbO7+(]O$<}QSO7+(]O%!wQ(ChO'#CfO%#[Q(ChO,5<{O%#|QSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!VOOQQ,5>V,5>VO%QQUO'#HlO%)^QSO'#HnOOQQ,5>],5>]O:vQSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%)cQWO1G5mO%)wQ$IUO1G0sO%*RQSO1G0sOOQO1G/m1G/mO%*^Q$IUO1G/mO>QQSO1G/mO!'xQUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!QQSO7+&XO!wOOQO-ExO%QQUO,5>xOOQO-E<[-E<[O%5iQSO1G5oOOQ(CY<}Q$IUO1G0xO%?UQ$IUO1G0xO%AYQ$IUO1G0xO%AaQ$IUO1G0xO%CXQ$IUO1G0xO%ClQ(CjO<WOOQQ,5>Y,5>YO&&aQSO1G3wO:vQSO7+&_O!'xQUO7+&_OOQO7+%X7+%XO&&fQ$IUO1G5xO>QQSO7+%XOOQ(CY<QQSO<[QWO,5=mO&>mQWO,5:zOOQQ<QQSO7+)cO&@ZQSO<zAN>zO%QQUOAN?WO!zO&@pQ(C[OAN?WO!zO&@{Q(C[OAN?WOBzQWOAN>zO&AZQ(C[OAN?WO&AoQ(C`OAN?WO&AyQWOAN>zOBzQWOAN?WOOQO<ROy)uO|)vO(h)xO(i)zO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#*rO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(a(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!1}O!V.bOd([X~P!.aOd.dO~O!V.eO!g(]X~P!4aO!g.hO~O!S.jO~OP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#.nO#g#|O~P#.nOP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#1`Ok$OO~P#1`OP$ZOk$OOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#4QOX$bO!e$QO#l$QO#m$QO#n$aO#o$QO~P#4QOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(a#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(h#fi~P#7RO(h#zO~P#7ROP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO(RVO(h#zO^#fi!V#fi#u#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#9sO(i#{O~P#9sOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO#u$VO(RVO(h#zO(i#{O~O^#fi!V#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#SOy)uO|)vO(h)xO(i)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(a#fi!V#fi!W#fi~P%D`O!f#uOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(a(QX(h(QX(i(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#A]O#y!ni!W!ni~P$$jO!W6|O~O!V'Ya!W'Ya~P#A]O!a#sO(a'fO!V'Za!g'Za~O!V/YO!g(ni~O!V/YO!a#sO!g(ni~Od$uq!V$uq#X$uq#y$uq~P!.aO!S']a!V']a~P#*rO!a7TO~O!V/bO!S(oi~P#*rO!V/bO!S(oi~O!S7XO~O!a#sO#o7^O~Ok7_O!a#sO(a'fO~O!S7aO~Od$wq!V$wq#X$wq#y$wq~P!.aO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!4aO!V4aO!X(pa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!4aOX7fO~O!V0bO!W(vi~O]7lO~O!a6PO~O(U(sO!V'bX!W'bX~O!V4xO!W(sa~O!h%[O'}%PO^(ZX!a(ZX!l(ZX#X(ZX'k(ZX(a(ZX~O't7uO~P._O!xg#>v#>|#?`#?f#?l#?z#@a#Aq#BP#BV#B]#Bc#Bi#Bs#By#CP#CZ#Cm#CsPPPPPPPPPP#CyPPPPPPP#Dm#I^P#J}#KU#K^PPPP$ h$$^$+P$+S$+V$-g$-j$-m$-tPP$-z$.O$.w$/w$/{$0aPP$0e$0k$0oP$0r$0v$0y$1o$2V$2[$2_$2b$2h$2k$2o$2sR!zRmpOXr!X#b%^&e&g&h&j,`,e1j1mU!pQ'R-QQ%dtQ%lwQ%szQ&]!TS&y!c,xQ'X!f^'^!m!r!s!t!u!v!wS*^$z*cQ+W%mQ+e%uQ,P&VQ-O'QQ-Y'YY-b'_'`'a'b'cQ/s*eQ1X,QW2e-d-f-g-hS5R0}5UU6a2h2j2kU8R5Y5Z5]S8x6d6fS9u8S8TQ:c8{Q:z9xRO>R>SQ%vzQ&w!cS&}%x,{Q+]%oS/Q)v/SQ0O*rQ0g+^Q0l+dQ1`,VQ1a,WQ4i0bQ4r0nQ5l1[Q5m1_Q7h4jQ7k4oQ8b5oQ9j7lR:R8_pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR,T&^&z`OPXYrstux!X!^!g!l#Q#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v'T'h'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!d%iw!f!o%k%l%m&x'W'X'Y']'k*]+V+W,u-X-Y-a-c/k0`2T2[2c2g4U6_6c8v8z:a;YQ+P%gQ+p&OQ+s&PQ+}&VQ.Y(fQ1R+zU1V,O,P,QQ2z.ZQ5c1SS5g1W1XS7t4|5QQ8^5hU9s7z8P8QU:x9t9v9wQ;e:yQ;u;f!z=y#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg=zO>R>ST)q$s)rV*o%TPR>O>Q'QkOPWXYZrstu!X!^!l#Q#U#X#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v&z'T'h'x'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>SQ*s%XQ/P)ug3eOQ*V$xS*`$z*cQ*t%YQ/o*a!z=h#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sf=iO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg3eO>R>SQ+q&PQ0v+sQ4v0uR7o4wT*b$z*cS*b$z*cT5T0}5US/m*_4}T4W/u8OQ+R%hQ/n*`Q0]+SQ1T+|Q5e1UQ8[5fQ9n7sQ:O8]Q:t9oQ;P:PQ;c:wQ;s;dQP>Q]=P3d6x9U:i:j;|p){$t(n*u/U/`/w/x3O3w4^6}7`:k=g=s=t!Y=Q(j)Z*P*X._.{/W/e0U0s0u2{2}3x3|4u4w6q6r7U7Y7b7d9`9d;_>P>Q_=R3d6x9U9V:i:j;|pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ&X!SR,[&bpmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR&X!SQ+u&QR0r+nqmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ1O+zS5`1R1SU8U5^5_5cS9z8W8XS:{9y9|Q;g:|R;v;hQ&`!TR,U&[R5l1[S%pz%uR0h+_Q&e!UR,`&fR,f&kT1k,e1mR,j&lQ,i&lR1t,jQ'o!yR-l'oQrOQ#bXT%ar#bQ!|TR'q!|Q#PUR's#PQ)r$sR.|)rQ#SVR'u#SQ#VWU'{#V'|-sQ'|#WR-s'}Q,y&{R2Q,yQ.c(nR3P.cQ.f(pS3S.f3TR3T.gQ-Q'RR2U-Qr_OXr!T!X#b%^&[&^&e&g&h&j,`,e1j1mU!mQ'R-QS#eZ%[Y#o_!m#e-}5OQ-}(_T5O0}5US#]W%wU(S#](T-tQ(T#^R-t(OQ,|'OR2S,|Q(`#hQ-w(XW.R(`-w2l6gQ2l-xR6g2mQ)d$iR.u)dQ$mhR)j$mQ$`cU)Y$`-oP>QQ/c*XU3{/c3}7VQ3}/eR7V3|Q*c$zR/q*cQ*l%OR/z*lQ4b0UR7c4bQ+l%zR0q+lQ4y0xS7q4y9lR9l7rQ+w&RR0{+wQ5U0}R7|5UQ1Z,RS5j1Z8`R8`5lQ0c+ZW4k0c4m7i9hQ4m0fQ7i4lR9h7jQ+`%pR0i+`Q1m,eR5z1mWqOXr#bQ&i!XQ*x%^Q,_&eQ,a&gQ,b&hQ,d&jQ1h,`S1k,e1mR5y1jQ%`oQ&m!]Q&p!_Q&r!`Q&t!aU'g!o5P5QQ+T%jQ+g%vQ+m%{Q,T&`Q,l&oY-]']'i'j'm8QQ-j'eQ/p*bQ0^+US1^,U,XQ1u,kQ1v,nQ1w,oQ2]-[[2_-_-`-c-i-k9wQ4d0_Q4p0lQ4t0sQ5d1TQ5n1`Q5x1iY6X2^2a2d2f2gQ6[2bQ7e4eQ7m4rQ7n4uQ7{5TQ8Z5eQ8a5mY8p6Y6^6`6b6cQ8r6]Q9i7kQ9m7sQ9}8[Q:S8bY:Z8q8u8w8y8zQ:]8tQ:q9jS:s9n9oQ;O:OW;S:[:`:b:dQ;U:_S;a:t:wQ;i;PU;j;T;X;ZQ;l;WS;r;c;dS;w;k;oQ;y;nS;};s;tQOQ>P>RR>Q>SloOXr!X#b%^&e&g&h&j,`,e1j1mQ!dPS#dZ#lQ&o!^U'Z!l4}8OQ't#QQ(w#yQ)h$kS,X&^&aQ,]&bQ,k&nQ,p&vQ-S'TQ.i(uQ.y)iQ0X+OQ0o+jQ1e,[Q2X-UQ2v.XQ3k.tQ4[/}Q5_1QQ5p1bQ5q1cQ5s1dQ5u1fQ5|1oQ6l2yQ6{3hQ8X5bQ8f5tQ8h5vQ8i5wQ9R6pQ9|8YR:U8g#UcOPXZr!X!^!l#b#l#y%^&^&a&b&e&g&h&j&n&v'T(u+O+j,[,`,e-U.X/}1Q1b1c1d1f1j1m1o2y4}5b5t5v5w6p8O8Y8gQ#WWQ#cYQ%bsQ%ctQ%euS'w#U'zQ'}#XQ(i#rQ(p#vQ(x#|Q(y#}Q(z$OQ({$PQ(|$QQ(}$RQ)O$SQ)P$TQ)Q$UQ)R$VQ)S$WQ)U$YQ)X$_Q)]$cW)g$k)i.t3hQ*{%dQ+a%qS,v&z2OQ-k'hS-p'x-rQ-u(QQ-z([Q.a(mQ.g(qQ.k TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:363,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Ci],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(i%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Wi,_i,2,3,4,5,6,7,8,9,10,11,12,13,Ui,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new XO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Vi[e]||-1},{term:328,get:e=>qi[e]||-1},{term:67,get:e=>Ri[e]||-1}],tokenPrec:13551}),ji=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { +import{S as gt,i as Pt,s as mt,e as Xt,f as Zt,T as N,g as bt,y as RO,o as kt,I as xt,J as yt,K as wt,H as Yt,C as vt,L as Tt}from"./index-55a566ae.js";import{P as Ut,N as Wt,u as _t,D as Ct,v as wO,T as D,I as YO,w as rO,x as l,y as Vt,L as sO,z as nO,A as j,B as lO,F as ye,G as oO,H as C,J as we,K as Ye,M as ve,E as v,O as G,Q as qt,R as Rt,U as Te,V as X,W as zt,X as jt,a as V,h as Gt,b as At,c as It,d as Nt,e as Et,s as Bt,t as Dt,f as Jt,g as Lt,r as Mt,i as Ht,k as Ft,j as Kt,l as Oa,m as ea,n as ta,o as aa,p as ia,q as zO,C as E}from"./index-6f704b4c.js";class H{constructor(O,a,t,i,r,s,n,o,Q,u=0,c){this.p=O,this.stack=a,this.state=t,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((O,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,a,t=0){let i=O.parser.context;return new H(O,[],a,t,t,0,[],0,i?new jO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=O}reduce(O){var a;let t=O>>19,i=O&65535,{parser:r}=this.p,s=r.dynamicPrecedence(i);if(s&&(this.score+=s),t==0){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizen;)this.stack.pop();this.reduceContext(i,o)}storeNode(O,a,t,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(a==t)return;if(s.buffer[n-2]>=a){s.buffer[n-2]=t;return}}}if(!r||this.pos==t)this.buffer.push(O,a,t,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>t;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=a,this.buffer[s+2]=t,this.buffer[s+3]=i}}shift(O,a,t){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if(O&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let r=O,{parser:s}=this.p;(t>this.pos||a<=s.maxNode)&&(this.pos=t,s.stateFlag(r,1)||(this.reducePos=t)),this.pushState(r,i),this.shiftContext(a,i),a<=s.maxNode&&this.buffer.push(a,i,t,4)}}apply(O,a,t){O&65536?this.reduce(O):this.shift(O,a,t)}useNode(O,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=O)&&(this.p.reused.push(O),t++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,a=O.buffer.length;for(;a>0&&O.buffer[a-2]>O.reducePos;)a-=4;let t=O.buffer.slice(a),i=O.bufferBase+a;for(;O&&i==O.bufferBase;)O=O.parent;return new H(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,a){let t=O<=this.p.parser.maxNode;t&&this.storeNode(O,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(O){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,O);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(O){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;ro&1&&n==s)||i.push(a[r],s)}a=i}let t=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-t*3;if(r<0||a.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class jO{constructor(O,a){this.tracker=O,this.context=a,this.hash=O.strict?O.hash(a):0}}var GO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"})(GO||(GO={}));class ra{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let a=O&65535,t=O>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class F{constructor(O,a,t){this.stack=O,this.pos=a,this.index=t,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,a=O.bufferBase+O.buffer.length){return new F(O,a,a-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new F(this.stack,this.pos,this.index)}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let a=null;for(let t=0,i=0;t=92&&s--,s>=34&&s--;let o=s-32;if(o>=46&&(o-=46,n=!0),r+=o,n)break;r*=46}a?a[i++]=r:a=new O(r)}return a}class J{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AO=new J;class sa{constructor(O,a){this.input=O,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AO,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(O,a){let t=this.range,i=this.rangeIndex,r=this.pos+O;for(;rt.to:r>=t.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-t.to,t=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,a.from);return this.end}peek(O){let a=this.chunkOff+O,t,i;if(a>=0&&a=this.chunk2Pos&&tn.to&&(this.chunk2=this.chunk2.slice(0,n.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(O,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,a){if(a?(this.token=a,a.start=O,a.lookAhead=O+1,a.value=a.extended=-1):this.token=AO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,a-this.chunkPos);if(O>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,a-this.chunk2Pos);if(O>=this.range.from&&a<=this.range.to)return this.input.read(O,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>O&&(t+=this.input.read(Math.max(i.from,O),Math.min(i.to,a)))}return t}}class W{constructor(O,a){this.data=O,this.id=a}token(O,a){let{parser:t}=a.p;Ue(this.data,O,a,this.id,t.data,t.tokenPrecTable)}}W.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class XO{constructor(O,a,t){this.precTable=a,this.elseToken=t,this.data=typeof O=="string"?z(O):O}token(O,a){let t=O.pos,i;for(;i=O.pos,Ue(this.data,O,a,0,this.data,this.precTable),!(O.token.value>-1);){if(this.elseToken==null)return;if(O.next<0)break;O.advance(),O.reset(i+1,O.token)}i>t&&(O.reset(t,O.token),O.acceptToken(this.elseToken,i-t))}}XO.prototype.contextual=W.prototype.fallback=W.prototype.extend=!1;class b{constructor(O,a={}){this.token=O,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function Ue(e,O,a,t,i,r){let s=0,n=1<0){let p=e[h];if(o.allows(p)&&(O.token.value==-1||O.token.value==p||na(p,O.token.value,i,r))){O.acceptToken(p);break}}let u=O.next,c=0,f=e[s+2];if(O.next<0&&f>c&&e[Q+f*3-3]==65535&&e[Q+f*3-3]==65535){s=e[Q+f*3-1];continue O}for(;c>1,p=Q+h+(h<<1),$=e[p],g=e[p+1]||65536;if(u<$)f=h;else if(u>=g)c=h+1;else{s=e[p+2],O.advance();continue O}}break}}function IO(e,O,a){for(let t=O,i;(i=e[t])!=65535;t++)if(i==a)return t-O;return-1}function na(e,O,a,t){let i=IO(a,t,O);return i<0||IO(a,t,e)O)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,O-25)):Math.min(e.length,Math.max(t.from+1,O+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:e.length}}class la{constructor(O,a){this.fragments=O,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?EO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?EO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof D){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[a]++,this.nextStart=s+r.length}}}class oa{constructor(O,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(t=>new J)}getActions(O){let a=0,t=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let f=a;if(c.extended>-1&&(a=this.addActions(O,c.extended,c.end,a)),a=this.addActions(O,c.value,c.end,a),!u.extend&&(t=c,a>f))break}}for(;this.actions.length>a;)this.actions.pop();return o&&O.setLookAhead(o),!t&&O.pos==this.stream.end&&(t=new J,t.value=O.p.parser.eofTerm,t.start=t.end=O.pos,a=this.addActions(O,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let a=new J,{pos:t,p:i}=O;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(O,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,O),t),O.value>-1){let{parser:r}=t.p;for(let s=0;s=0&&t.p.parser.dialect.allows(n>>1)){n&1?O.extended=n>>1:O.value=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,a,t,i){for(let r=0;rO.bufferLength*4?new la(t,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,a=this.minStackPos,t=this.stacks=[],i,r;if(this.bigReductionCount>300&&O.length==1){let[s]=O;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;sa)t.push(n);else{if(this.advanceStack(n,t,O))continue;{i||(i=[],r=[]),i.push(n);let o=this.tokens.getMainToken(n);r.push(o.value,o.end)}}break}}if(!t.length){let s=i&&ha(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,t);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(t.length>s)for(t.sort((n,o)=>o.score-n.score);t.length>s;)t.pop();t.some(n=>n.reducePos>a)&&this.recovering--}else if(t.length>1){O:for(let s=0;s500&&Q.buffer.length>500)if((n.score-Q.score||n.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(s--,1);continue O}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let Q=O.curContext&&O.curContext.tracker.strict,u=Q?O.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let f=this.parser.nodeSet.types[c.type.id]==c.type?r.getGoto(O.state,c.type.id):-1;if(f>-1&&c.length&&(!Q||(c.prop(wO.contextHash)||0)==u))return O.useNode(c,f),Z&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(c.type.id)})`),!0;if(!(c instanceof D)||c.children.length==0||c.positions[0]>0)break;let h=c.children[0];if(h instanceof D&&c.positions[0]==0)c=h;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),Z&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let o=this.tokens.getActions(O);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(O,a){let t=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>t)return DO(O,a),!0}}runRecovery(O,a,t){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),Z&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,t))))continue;let c=n.split(),f=u;for(let h=0;c.forceReduce()&&h<10&&(Z&&console.log(f+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));h++)Z&&(f=this.stackID(c)+" -> ");for(let h of n.recoverByInsert(o))Z&&console.log(u+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,t);this.stream.end>n.pos?(Q==n.pos&&(Q++,o=0),n.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),DO(n,t)):(!i||i.scoree;class We{constructor(O){this.start=O.start,this.shift=O.shift||uO,this.reduce=O.reduce||uO,this.reuse=O.reuse||uO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class T extends Ut{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (14)`);let a=O.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,o,n[Q++]);else{let c=n[Q+-u];for(let f=-u;f>0;f--)r(n[Q++],o,c);Q++}}}this.nodeSet=new Wt(a.map((n,o)=>_t.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(o)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ct;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new W(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,a,t){let i=new Qa(this,O,a,t);for(let r of this.wrappers)i=r(i,O,a,t);return i}getGoto(O,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let r=i[a+1];;){let s=i[r++],n=s&1,o=i[r++];if(n&&t)return o;for(let Q=r+(s>>1);r0}validAction(O,a){if(a==this.stateSlot(O,4))return!0;for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else return!1;if(a==k(this.data,t+1))return!0}}nextStates(O){let a=[];for(let t=this.stateSlot(O,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((r,s)=>s&1&&r==i)||a.push(this.data[t],i)}}return a}configure(O){let a=Object.assign(Object.create(T.prototype),this);if(O.props&&(a.nodeSet=this.nodeSet.extend(...O.props)),O.top){let t=this.topRules[O.top];if(!t)throw new RangeError(`Invalid top rule name ${O.top}`);a.top=t}return O.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=O.tokenizers.find(r=>r.from==t);return i?i.to:t})),O.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let r=O.specializers.find(n=>n.from==t.external);if(!r)return t;let s=Object.assign(Object.assign({},t),{external:r.to});return a.specializers[i]=JO(s),s})),O.contextTracker&&(a.context=O.contextTracker),O.dialect&&(a.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(a.strict=O.strict),O.wrap&&(a.wrappers=a.wrappers.concat(O.wrap)),O.bufferLength!=null&&(a.bufferLength=O.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let a=this.dynamicPrecedences;return a==null?0:a[O]||0}parseDialect(O){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(O)for(let r of O.split(" ")){let s=a.indexOf(r);s>=0&&(t[s]=!0)}let i=null;for(let r=0;rt)&&a.p.parser.stateFlag(a.state,2)&&(!O||O.scoree.external(a,t)<<1|O}return e.get}const ua=54,fa=1,da=55,pa=2,Sa=56,$a=3,LO=4,ga=5,K=6,_e=7,Ce=8,Ve=9,qe=10,Pa=11,ma=12,Xa=13,fO=57,Za=14,MO=58,Re=20,ba=22,ze=23,ka=24,ZO=26,je=27,xa=28,ya=31,wa=34,Ya=36,va=37,Ta=0,Ua=1,Wa={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},_a={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},HO={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ca(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function Ge(e){return e==9||e==10||e==13||e==32}let FO=null,KO=null,Oe=0;function bO(e,O){let a=e.pos+O;if(Oe==a&&KO==e)return FO;let t=e.peek(O);for(;Ge(t);)t=e.peek(++O);let i="";for(;Ca(t);)i+=String.fromCharCode(t),t=e.peek(++O);return KO=e,Oe=a,FO=i?i.toLowerCase():t==Va||t==qa?void 0:null}const Ae=60,OO=62,vO=47,Va=63,qa=33,Ra=45;function ee(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let a=0;a-1?new ee(bO(t,1)||"",e):e},reduce(e,O){return O==Re&&e?e.parent:e},reuse(e,O,a,t){let i=O.type.id;return i==K||i==Ya?new ee(bO(t,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Ga=new b((e,O)=>{if(e.next!=Ae){e.next<0&&O.context&&e.acceptToken(fO);return}e.advance();let a=e.next==vO;a&&e.advance();let t=bO(e,0);if(t===void 0)return;if(!t)return e.acceptToken(a?Za:K);let i=O.context?O.context.name:null;if(a){if(t==i)return e.acceptToken(Pa);if(i&&_a[i])return e.acceptToken(fO,-2);if(O.dialectEnabled(Ta))return e.acceptToken(ma);for(let r=O.context;r;r=r.parent)if(r.name==t)return;e.acceptToken(Xa)}else{if(t=="script")return e.acceptToken(_e);if(t=="style")return e.acceptToken(Ce);if(t=="textarea")return e.acceptToken(Ve);if(Wa.hasOwnProperty(t))return e.acceptToken(qe);i&&HO[i]&&HO[i][t]?e.acceptToken(fO,-1):e.acceptToken(K)}},{contextual:!0}),Aa=new b(e=>{for(let O=0,a=0;;a++){if(e.next<0){a&&e.acceptToken(MO);break}if(e.next==Ra)O++;else if(e.next==OO&&O>=2){a>3&&e.acceptToken(MO,-2);break}else O=0;e.advance()}});function Ia(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}const Na=new b((e,O)=>{if(e.next==vO&&e.peek(1)==OO){let a=O.dialectEnabled(Ua)||Ia(O.context);e.acceptToken(a?ga:LO,2)}else e.next==OO&&e.acceptToken(LO,1)});function TO(e,O,a){let t=2+e.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==Ae||r==1&&i.next==vO||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(a,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Ea=TO("script",ua,fa),Ba=TO("style",da,pa),Da=TO("textarea",Sa,$a),Ja=rO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),La=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Ja],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Ea,Ba,Da,Na,Ga,Aa,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Ie(e,O){let a=Object.create(null);for(let t of e.getChildren(ze)){let i=t.getChild(ka),r=t.getChild(ZO)||t.getChild(je);i&&(a[O.read(i.from,i.to)]=r?r.type.id==ZO?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return a}function te(e,O){let a=e.getChild(ba);return a?O.read(a.from,a.to):" "}function dO(e,O,a){let t;for(let i of a)if(!i.attrs||i.attrs(t||(t=Ie(e.node.parent.firstChild,O))))return{parser:i.parser};return null}function Ne(e=[],O=[]){let a=[],t=[],i=[],r=[];for(let n of e)(n.tag=="script"?a:n.tag=="style"?t:n.tag=="textarea"?i:r).push(n);let s=O.length?Object.create(null):null;for(let n of O)(s[n.name]||(s[n.name]=[])).push(n);return Vt((n,o)=>{let Q=n.type.id;if(Q==xa)return dO(n,o,a);if(Q==ya)return dO(n,o,t);if(Q==wa)return dO(n,o,i);if(Q==Re&&r.length){let u=n.node,c=u.firstChild,f=c&&te(c,o),h;if(f){for(let p of r)if(p.tag==f&&(!p.attrs||p.attrs(h||(h=Ie(u,o))))){let $=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:$.type.id==va?$.from:u.to}]}}}}if(s&&Q==ze){let u=n.node,c;if(c=u.firstChild){let f=s[o.read(c.from,c.to)];if(f)for(let h of f){if(h.tagName&&h.tagName!=te(u.parent,o))continue;let p=u.lastChild;if(p.type.id==ZO){let $=p.from+1,g=p.lastChild,w=p.to-(g&&g.isError?0:1);if(w>$)return{parser:h.parser,overlay:[{from:$,to:w}]}}else if(p.type.id==je)return{parser:h.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Ma=94,ae=1,Ha=95,Fa=96,ie=2,Ee=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,Oi=40,Be=95,ei=91,L=45,ti=46,ai=35,ii=37;function eO(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ri(e){return e>=48&&e<=57}const si=new b((e,O)=>{for(let a=!1,t=0,i=0;;i++){let{next:r}=e;if(eO(r)||r==L||r==Be||a&&ri(r))!a&&(r!=L||i>0)&&(a=!0),t===i&&r==L&&t++,e.advance();else{a&&e.acceptToken(r==Oi?Ha:t==2&&O.canShift(ie)?ie:Fa);break}}}),ni=new b(e=>{if(Ee.includes(e.peek(-1))){let{next:O}=e;(eO(O)||O==Be||O==ai||O==ti||O==ei||O==Ka||O==L)&&e.acceptToken(Ma)}}),li=new b(e=>{if(!Ee.includes(e.peek(-1))){let{next:O}=e;if(O==ii&&(e.advance(),e.acceptToken(ae)),eO(O)){do e.advance();while(eO(e.next));e.acceptToken(ae)}}}),oi=rO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),Qi={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},hi={__proto__:null,not:128,only:128,from:158,to:160},ui=T.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ni,li,si,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>Qi[e]||-1},{term:56,get:e=>ci[e]||-1},{term:96,get:e=>hi[e]||-1}],tokenPrec:1123});let pO=null;function SO(){if(!pO&&typeof document=="object"&&document.body){let{style:e}=document.body,O=[],a=new Set;for(let t in e)t!="cssText"&&t!="cssFloat"&&typeof e[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(O.push(t),a.add(t)));pO=O.sort().map(t=>({type:"property",label:t}))}return pO||[]}const re=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),se=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),fi=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),y=/^(\w[\w-]*|-\w[\w-]*|)$/,di=/^-(-[\w-]*)?$/;function pi(e,O){var a;if((e.name=="("||e.type.isError)&&(e=e.parent||e),e.name!="ArgList")return!1;let t=(a=e.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:O.sliceString(t.from,t.to)=="var"}const ne=new we,Si=["Declaration"];function $i(e){for(let O=e;;){if(O.type.isTop)return O;if(!(O=O.parent))return e}}function De(e,O){if(O.to-O.from>4096){let a=ne.get(O);if(a)return a;let t=[],i=new Set,r=O.cursor(YO.IncludeAnonymous);if(r.firstChild())do for(let s of De(e,r.node))i.has(s.label)||(i.add(s.label),t.push(s));while(r.nextSibling());return ne.set(O,t),t}else{let a=[],t=new Set;return O.cursor().iterate(i=>{var r;if(i.name=="VariableName"&&i.matchContext(Si)&&((r=i.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let s=e.sliceString(i.from,i.to);t.has(s)||(t.add(s),a.push({label:s,type:"variable"}))}}),a}}const gi=e=>{let{state:O,pos:a}=e,t=C(O).resolveInner(a,-1),i=t.type.isError&&t.from==t.to-1&&O.doc.sliceString(t.from,t.to)=="-";if(t.name=="PropertyName"||(i||t.name=="TagName")&&/^(Block|Styles)$/.test(t.resolve(t.to).name))return{from:t.from,options:SO(),validFor:y};if(t.name=="ValueName")return{from:t.from,options:se,validFor:y};if(t.name=="PseudoClassName")return{from:t.from,options:re,validFor:y};if(t.name=="VariableName"||(e.explicit||i)&&pi(t,O.doc))return{from:t.name=="VariableName"?t.from:a,options:De(O.doc,$i(t)),validFor:di};if(t.name=="TagName"){for(let{parent:n}=t;n;n=n.parent)if(n.name=="Block")return{from:t.from,options:SO(),validFor:y};return{from:t.from,options:fi,validFor:y}}if(!e.explicit)return null;let r=t.resolve(a),s=r.childBefore(a);return s&&s.name==":"&&r.name=="PseudoClassSelector"?{from:a,options:re,validFor:y}:s&&s.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:a,options:se,validFor:y}:r.name=="Block"||r.name=="Styles"?{from:a,options:SO(),validFor:y}:null},tO=sO.define({name:"css",parser:ui.configure({props:[nO.add({Declaration:j()}),lO.add({Block:ye})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Pi(){return new oO(tO,tO.data.of({autocomplete:gi}))}const le=302,oe=1,mi=2,Qe=303,Xi=305,Zi=306,bi=3,ki=4,xi=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Je=125,yi=59,ce=47,wi=42,Yi=43,vi=45,Ti=new We({start:!1,shift(e,O){return O==bi||O==ki||O==Xi?e:O==Zi},strict:!1}),Ui=new b((e,O)=>{let{next:a}=e;(a==Je||a==-1||O.context)&&O.canShift(Qe)&&e.acceptToken(Qe)},{contextual:!0,fallback:!0}),Wi=new b((e,O)=>{let{next:a}=e,t;xi.indexOf(a)>-1||a==ce&&((t=e.peek(1))==ce||t==wi)||a!=Je&&a!=yi&&a!=-1&&!O.context&&O.canShift(le)&&e.acceptToken(le)},{contextual:!0}),_i=new b((e,O)=>{let{next:a}=e;if((a==Yi||a==vi)&&(e.advance(),a==e.next)){e.advance();let t=!O.context&&O.canShift(oe);e.acceptToken(t?oe:mi)}},{contextual:!0}),Ci=rO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,Escape:l.escape,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,"@":l.meta,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Vi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},qi={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Ri={__proto__:null,"<":137},zi=T.deserialize({version:14,states:"$EnO`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#I`'#I`O0}QSO'#GkOOQO'#Ei'#EiO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#J}'#J}O8yQSO'#IPO9OQ(C[O'#IQOOQQ'#JP'#JPOOQQ'#IU'#IUQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HoO>VQ(C]O'#HuO%QQUO'#HwO>bQ(C]O'#HyO>mQ(C]O'#H{O9OQ(C[O'#H}O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOBUQWO'#E`OOQ(CW'#E_'#E_OB`Q(C`O'#E`OBzQWO'#ESOOQO'#Jj'#JjOC`QWO'#ESOCmQWO'#E`ODTQWO'#EfODWQWO'#E`ODqQWO'#E`OAQQWO'#E`OBzQWO'#E`PEbO?MpO'#C`POOO)CDn)CDnOOOO'#IV'#IVOEmOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOE{O!bO,59RO%QQUO'#D]OOOO'#IY'#IYOFZO07`O,59uOOQ(CY,59u,59uOFiQUO'#IZOF|QSO'#JeOIOQbO'#JeO+sQUO'#JeOIVQSO,59{OImQSO'#EiOIzQSO'#JrOJVQSO'#JqOJVQSO'#JqOJ_QSO,5;VOJdQSO'#JpOOQ(CY,5:W,5:WOJkQUO,5:WOLlQ(CjO,5:bOM]QSO,5:jOMbQSO'#JnON[Q(C[O'#JoO:vQSO'#JnONcQSO'#JnONkQSO,5;UONpQSO'#JnOOQ(CY'#Cf'#CfO%QQUO'#EOO! dQ`O,5:oOOQO'#Jk'#JkOOQO-E<^-E<^O9_QSO,5=VO! zQSO,5=VO!!PQUO,5;SO!$SQ,UO'#EdO!%gQSO,5;SO!'PQ,UO'#DpO!'WQUO'#DuO!'bQWO,5;]O!'jQWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!'xQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!){QSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!*TQ(C[O,5kOOQQ'#JX'#JXOOQQ,5>l,5>lOOQQ-EQQWO,5;yO!>VQSO,5=rO!>[QSO,5=rO!>aQSO,5=rO9OQ(C[O,5=rO!>oQSO'#EkO!?iQWO'#ElOOQ(CW'#Jp'#JpO!?pQ(C[O'#KOO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!?{QWO,5=^O!@TQ,UO,5=_O!@`QSO,5=aO!@eQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!@mQSO'#HPO9dQ,UO'#HSO!@rQSO'#HSOOQQ,5=g,5=gO!@wQSO'#HTO!APQSO'#ClO!AUQSO,58|O!A`QSO,58|O!ChQUO,58|OOQQ,58|,58|O!CuQ(C[O,58|O%QQUO,58|O!DQQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!DbQSO,5=tO`QUO,5=zO`QUO,5=|O!DgQSO,5>OO`QUO,5>QO!DlQSO,5>TO!DqQUO,5>ZOOQQ,5>a,5>aO%QQUO,5>aO9OQ(C[O,5>cOOQQ,5>e,5>eO!HxQSO,5>eOOQQ,5>g,5>gO!HxQSO,5>gOOQQ,5>i,5>iO!H}QWO'#DXO%QQUO'#JgO!IlQWO'#JgO!JZQWO'#DgO!JlQWO'#DgO!L}QUO'#DgO!MUQSO'#JfO!M^QSO,5:QO!McQSO'#EmO!MqQSO'#JsO!MyQSO,5;WO!NOQWO'#DgO!N]QWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO!NdQSO,5:kO>QQSO,5;RO!uO+sQUO,5>uOOQO,5>{,5>{O#&oQUO'#IZOOQO-EUQ(CjO1G0xO#AUQ$IUO'#CfO#CSQ$IUO1G1ZO#EQQ$IUO'#JdO!*OQSO1G1aO#EeQ(CjO,5?QOOQ(CW-EQQSO'#HsOOQQ1G3u1G3uO$0}QUO1G3uO9OQ(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9OQ(C[O1G4PO9OQ(C[O1G4RO$5RQSO,5@RO!'xQUO,5;XO:vQSO,5;XO>QQSO,5:RO!'xQUO,5:RO!QQSO1G0mO!uO$:qQSO1G5kO$:yQSO1G5wO$;RQbO1G5xO:vQSO,5>{O$;]QSO1G5tO$;]QSO1G5tO:vQSO1G5tO$;eQ(CjO1G5uO%QQUO1G5uO$;uQ(C[O1G5uO$}O:vQSO,5>}OOQO,5>},5>}O$}OOQO-EQQWO,59pO%QQUO,59pO% mQSO1G2SO!%lQ,UO1G2ZO% rQ(CjO7+'gOOQ(CY7+'g7+'gO!!PQUO7+'gOOQ(CY7+%`7+%`O%!fQ`O'#J|O!NgQSO7+(]O%!pQbO7+(]O$<}QSO7+(]O%!wQ(ChO'#CfO%#[Q(ChO,5<{O%#|QSO,5<{OOQ(CW1G5`1G5`OOQQ7+$^7+$^O!VOOQQ,5>V,5>VO%QQUO'#HlO%)^QSO'#HnOOQQ,5>],5>]O:vQSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%)cQWO1G5mO%)wQ$IUO1G0sO%*RQSO1G0sOOQO1G/m1G/mO%*^Q$IUO1G/mO>QQSO1G/mO!'xQUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!QQSO7+&XO!wOOQO-ExO%QQUO,5>xOOQO-E<[-E<[O%5iQSO1G5oOOQ(CY<}Q$IUO1G0xO%?UQ$IUO1G0xO%AYQ$IUO1G0xO%AaQ$IUO1G0xO%CXQ$IUO1G0xO%ClQ(CjO<WOOQQ,5>Y,5>YO&&aQSO1G3wO:vQSO7+&_O!'xQUO7+&_OOQO7+%X7+%XO&&fQ$IUO1G5xO>QQSO7+%XOOQ(CY<QQSO<[QWO,5=mO&>mQWO,5:zOOQQ<QQSO7+)cO&@ZQSO<zAN>zO%QQUOAN?WO!zO&@pQ(C[OAN?WO!zO&@{Q(C[OAN?WOBzQWOAN>zO&AZQ(C[OAN?WO&AoQ(C`OAN?WO&AyQWOAN>zOBzQWOAN?WOOQO<ROy)uO|)vO(h)xO(i)zO~O#d#Wa^#Wa#X#Wa'k#Wa!V#Wa!g#Wa!X#Wa!S#Wa~P#*rO#d(QXP(QXX(QX^(QXk(QXz(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX'k(QX(R(QX(a(QX!g(QX!S(QX'i(QXo(QX!X(QX%a(QX!a(QX~P!1}O!V.bOd([X~P!.aOd.dO~O!V.eO!g(]X~P!4aO!g.hO~O!S.jO~OP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO(RVOX#fi^#fik#fi!V#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O#g#fi~P#.nO#g#|O~P#.nOP$ZOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O(RVOX#fi^#fi!V#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~Ok#fi~P#1`Ok$OO~P#1`OP$ZOk$OOy#wOz#xO|#yO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO(RVO^#fi!V#fi#q#fi#s#fi#u#fi#v#fi'k#fi(a#fi(h#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P#4QOX$bO!e$QO#l$QO#m$QO#n$aO#o$QO~P#4QOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO(RVO^#fi!V#fi#s#fi#u#fi#v#fi'k#fi(a#fi(i#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(h#fi~P#7RO(h#zO~P#7ROP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO(RVO(h#zO^#fi!V#fi#u#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~O(i#fi~P#9sO(i#{O~P#9sOP$ZOX$bOk$OOy#wOz#xO|#yO!e$QO!f#uO!h#vO!l$ZO#g#|O#h#}O#i#}O#j#}O#k$PO#l$QO#m$QO#n$aO#o$QO#q$RO#s$TO#u$VO(RVO(h#zO(i#{O~O^#fi!V#fi#v#fi'k#fi(a#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#SOy)uO|)vO(h)xO(i)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(R#fi(a#fi!V#fi!W#fi~P%D`O!f#uOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(a(QX(h(QX(i(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#A]O#y!ni!W!ni~P$$jO!W6|O~O!V'Ya!W'Ya~P#A]O!a#sO(a'fO!V'Za!g'Za~O!V/YO!g(ni~O!V/YO!a#sO!g(ni~Od$uq!V$uq#X$uq#y$uq~P!.aO!S']a!V']a~P#*rO!a7TO~O!V/bO!S(oi~P#*rO!V/bO!S(oi~O!S7XO~O!a#sO#o7^O~Ok7_O!a#sO(a'fO~O!S7aO~Od$wq!V$wq#X$wq#y$wq~P!.aO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!4aO!V4aO!X(pa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!4aOX7fO~O!V0bO!W(vi~O]7lO~O!a6PO~O(U(sO!V'bX!W'bX~O!V4xO!W(sa~O!h%[O'}%PO^(ZX!a(ZX!l(ZX#X(ZX'k(ZX(a(ZX~O't7uO~P._O!xg#>v#>|#?`#?f#?l#?z#@a#Aq#BP#BV#B]#Bc#Bi#Bs#By#CP#CZ#Cm#CsPPPPPPPPPP#CyPPPPPPP#Dm#I^P#J}#KU#K^PPPP$ h$$^$+P$+S$+V$-g$-j$-m$-tPP$-z$.O$.w$/w$/{$0aPP$0e$0k$0oP$0r$0v$0y$1o$2V$2[$2_$2b$2h$2k$2o$2sR!zRmpOXr!X#b%^&e&g&h&j,`,e1j1mU!pQ'R-QQ%dtQ%lwQ%szQ&]!TS&y!c,xQ'X!f^'^!m!r!s!t!u!v!wS*^$z*cQ+W%mQ+e%uQ,P&VQ-O'QQ-Y'YY-b'_'`'a'b'cQ/s*eQ1X,QW2e-d-f-g-hS5R0}5UU6a2h2j2kU8R5Y5Z5]S8x6d6fS9u8S8TQ:c8{Q:z9xRO>R>SQ%vzQ&w!cS&}%x,{Q+]%oS/Q)v/SQ0O*rQ0g+^Q0l+dQ1`,VQ1a,WQ4i0bQ4r0nQ5l1[Q5m1_Q7h4jQ7k4oQ8b5oQ9j7lR:R8_pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR,T&^&z`OPXYrstux!X!^!g!l#Q#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v'T'h'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!d%iw!f!o%k%l%m&x'W'X'Y']'k*]+V+W,u-X-Y-a-c/k0`2T2[2c2g4U6_6c8v8z:a;YQ+P%gQ+p&OQ+s&PQ+}&VQ.Y(fQ1R+zU1V,O,P,QQ2z.ZQ5c1SS5g1W1XS7t4|5QQ8^5hU9s7z8P8QU:x9t9v9wQ;e:yQ;u;f!z=y#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg=zO>R>ST)q$s)rV*o%TPR>O>Q'QkOPWXYZrstu!X!^!l#Q#U#X#b#l#r#v#y#|#}$O$P$Q$R$S$T$U$V$W$Y$_$c$k%^%d%q&^&a&b&e&g&h&j&n&v&z'T'h'x'z(Q([(m(q(u)i)t*v+O+j,[,`,e,q,t-U-^-r-{.X.e.l.t/}0S0a1Q1b1c1d1f1j1m1o2O2`2o2y3R3h4z4}5b5t5v5w6Q6Z6p8O8Y8g8s9k:Y:^;V;m;zO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>SQ*s%XQ/P)ug3eOQ*V$xS*`$z*cQ*t%YQ/o*a!z=h#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sf=iO!z(l#s$a$b$v$y)p)|*Z*}+Q+o+r.W/b/d0t0w1P2x3z4S4a4c5a6m7T7^8V9P9{:g:};^R>Sg3eO>R>SQ+q&PQ0v+sQ4v0uR7o4wT*b$z*cS*b$z*cT5T0}5US/m*_4}T4W/u8OQ+R%hQ/n*`Q0]+SQ1T+|Q5e1UQ8[5fQ9n7sQ:O8]Q:t9oQ;P:PQ;c:wQ;s;dQP>Q]=P3d6x9U:i:j;|p){$t(n*u/U/`/w/x3O3w4^6}7`:k=g=s=t!Y=Q(j)Z*P*X._.{/W/e0U0s0u2{2}3x3|4u4w6q6r7U7Y7b7d9`9d;_>P>Q_=R3d6x9U9V:i:j;|pmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ&X!SR,[&bpmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mR&X!SQ+u&QR0r+nqmOXr!T!X#b%^&[&e&g&h&j,`,e1j1mQ1O+zS5`1R1SU8U5^5_5cS9z8W8XS:{9y9|Q;g:|R;v;hQ&`!TR,U&[R5l1[S%pz%uR0h+_Q&e!UR,`&fR,f&kT1k,e1mR,j&lQ,i&lR1t,jQ'o!yR-l'oQrOQ#bXT%ar#bQ!|TR'q!|Q#PUR's#PQ)r$sR.|)rQ#SVR'u#SQ#VWU'{#V'|-sQ'|#WR-s'}Q,y&{R2Q,yQ.c(nR3P.cQ.f(pS3S.f3TR3T.gQ-Q'RR2U-Qr_OXr!T!X#b%^&[&^&e&g&h&j,`,e1j1mU!mQ'R-QS#eZ%[Y#o_!m#e-}5OQ-}(_T5O0}5US#]W%wU(S#](T-tQ(T#^R-t(OQ,|'OR2S,|Q(`#hQ-w(XW.R(`-w2l6gQ2l-xR6g2mQ)d$iR.u)dQ$mhR)j$mQ$`cU)Y$`-oP>QQ/c*XU3{/c3}7VQ3}/eR7V3|Q*c$zR/q*cQ*l%OR/z*lQ4b0UR7c4bQ+l%zR0q+lQ4y0xS7q4y9lR9l7rQ+w&RR0{+wQ5U0}R7|5UQ1Z,RS5j1Z8`R8`5lQ0c+ZW4k0c4m7i9hQ4m0fQ7i4lR9h7jQ+`%pR0i+`Q1m,eR5z1mWqOXr#bQ&i!XQ*x%^Q,_&eQ,a&gQ,b&hQ,d&jQ1h,`S1k,e1mR5y1jQ%`oQ&m!]Q&p!_Q&r!`Q&t!aU'g!o5P5QQ+T%jQ+g%vQ+m%{Q,T&`Q,l&oY-]']'i'j'm8QQ-j'eQ/p*bQ0^+US1^,U,XQ1u,kQ1v,nQ1w,oQ2]-[[2_-_-`-c-i-k9wQ4d0_Q4p0lQ4t0sQ5d1TQ5n1`Q5x1iY6X2^2a2d2f2gQ6[2bQ7e4eQ7m4rQ7n4uQ7{5TQ8Z5eQ8a5mY8p6Y6^6`6b6cQ8r6]Q9i7kQ9m7sQ9}8[Q:S8bY:Z8q8u8w8y8zQ:]8tQ:q9jS:s9n9oQ;O:OW;S:[:`:b:dQ;U:_S;a:t:wQ;i;PU;j;T;X;ZQ;l;WS;r;c;dS;w;k;oQ;y;nS;};s;tQOQ>P>RR>Q>SloOXr!X#b%^&e&g&h&j,`,e1j1mQ!dPS#dZ#lQ&o!^U'Z!l4}8OQ't#QQ(w#yQ)h$kS,X&^&aQ,]&bQ,k&nQ,p&vQ-S'TQ.i(uQ.y)iQ0X+OQ0o+jQ1e,[Q2X-UQ2v.XQ3k.tQ4[/}Q5_1QQ5p1bQ5q1cQ5s1dQ5u1fQ5|1oQ6l2yQ6{3hQ8X5bQ8f5tQ8h5vQ8i5wQ9R6pQ9|8YR:U8g#UcOPXZr!X!^!l#b#l#y%^&^&a&b&e&g&h&j&n&v'T(u+O+j,[,`,e-U.X/}1Q1b1c1d1f1j1m1o2y4}5b5t5v5w6p8O8Y8gQ#WWQ#cYQ%bsQ%ctQ%euS'w#U'zQ'}#XQ(i#rQ(p#vQ(x#|Q(y#}Q(z$OQ({$PQ(|$QQ(}$RQ)O$SQ)P$TQ)Q$UQ)R$VQ)S$WQ)U$YQ)X$_Q)]$cW)g$k)i.t3hQ*{%dQ+a%qS,v&z2OQ-k'hS-p'x-rQ-u(QQ-z([Q.a(mQ.g(qQ.k TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:363,context:Ti,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Ci],skippedNodes:[0,3,4,269],repeatNodeCount:32,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(i%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Wi,_i,2,3,4,5,6,7,8,9,10,11,12,13,Ui,new XO("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new XO("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:13525,ts:13527},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Vi[e]||-1},{term:328,get:e=>qi[e]||-1},{term:67,get:e=>Ri[e]||-1}],tokenPrec:13551}),ji=[X("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),X("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),X("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),X("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),X("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),X(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-c4135ea3.js b/ui/dist/assets/ConfirmEmailChangeDocs-224ee7c9.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-c4135ea3.js rename to ui/dist/assets/ConfirmEmailChangeDocs-224ee7c9.js index 42805beb..bbfe3e79 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-c4135ea3.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-224ee7c9.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Re,t as Z,a as x,o as m,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-a4705b02.js";import{S as Ae}from"./SdkTabs-98b01dec.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,M,te,N,T,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` +import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,O as Pe,k as Se,P as Oe,n as Re,t as Z,a as x,o as m,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-55a566ae.js";import{S as Ae}from"./SdkTabs-2b871527.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,R,L,P,M,te,N,T,le,z,K=o[0].name+"",G,se,J,E,Q,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-1c23cc2f.js b/ui/dist/assets/ConfirmPasswordResetDocs-04a66652.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-1c23cc2f.js rename to ui/dist/assets/ConfirmPasswordResetDocs-04a66652.js index a23c2884..746d32b6 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-1c23cc2f.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-04a66652.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-a4705b02.js";import{S as De}from"./SdkTabs-98b01dec.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,O as Oe,k as Ne,P as Ce,n as We,t as Z,a as x,o as f,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-55a566ae.js";import{S as De}from"./SdkTabs-2b871527.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&f(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,z,O,q,te,B,$,se,G,F=o[0].name+"",J,le,Q,E,V,T,X,g,Y,N,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs-ec8e972e.js b/ui/dist/assets/ConfirmVerificationDocs-ce2e1893.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-ec8e972e.js rename to ui/dist/assets/ConfirmVerificationDocs-ce2e1893.js index d7a9f158..e60a2558 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-ec8e972e.js +++ b/ui/dist/assets/ConfirmVerificationDocs-ce2e1893.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as D,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,M as Me}from"./index-a4705b02.js";import{S as Ne}from"./SdkTabs-98b01dec.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,R,q,le,G,U=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` +import{S as we,i as Ce,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as n,m as he,x as D,N as de,O as Te,k as ge,P as ye,n as Be,t as Z,a as x,o as m,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,M as Me}from"./index-55a566ae.js";import{S as Ne}from"./SdkTabs-2b871527.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=r("button"),_=$(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){f(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&m(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Me({props:{content:l[5].body}}),{key:i,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){f(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&m(s),$e(o)}}}function Ve(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,K=i[0].name+"",F,ee,I,P,L,B,z,T,A,te,R,q,le,G,U=i[0].name+"",J,se,Q,O,W,S,X,E,Y,g,M,h=[],oe=new Map,ie,N,k=[],ne=new Map,y;P=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-d361cb4d.js b/ui/dist/assets/CreateApiDocs-85009ca9.js similarity index 99% rename from ui/dist/assets/CreateApiDocs-d361cb4d.js rename to ui/dist/assets/CreateApiDocs-85009ca9.js index 9a85d8ec..dfb956f3 100644 --- a/ui/dist/assets/CreateApiDocs-d361cb4d.js +++ b/ui/dist/assets/CreateApiDocs-85009ca9.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,N as Le,O as ht,k as Rt,P as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-a4705b02.js";import{S as Nt}from"./SdkTabs-98b01dec.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,v,T,w,M,g,D,E,L,I,j,F,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Ht,i as Lt,s as Pt,C as z,M as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,N as Le,O as ht,k as Rt,P as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index-55a566ae.js";import{S as Nt}from"./SdkTabs-2b871527.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,v,T,w,M,g,D,E,L,I,j,F,S,N,q,C,_;function O(u,$){var ee,Q;return(Q=(ee=u[0])==null?void 0:ee.options)!=null&&Q.requireEmail?Jt:Vt}let K=O(o),P=K(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record. diff --git a/ui/dist/assets/DeleteApiDocs-da6f5a32.js b/ui/dist/assets/DeleteApiDocs-42b997b1.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-da6f5a32.js rename to ui/dist/assets/DeleteApiDocs-42b997b1.js index 11d8612b..6b9b8869 100644 --- a/ui/dist/assets/DeleteApiDocs-da6f5a32.js +++ b/ui/dist/assets/DeleteApiDocs-42b997b1.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Oe,P as Te,n as Be,t as ee,a as te,o as u,d as ge,R as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-a4705b02.js";import{S as He}from"./SdkTabs-98b01dec.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,O,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,T,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,O as Ee,k as Oe,P as Te,n as Be,t as ee,a as te,o as u,d as ge,R as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-55a566ae.js";import{S as He}from"./SdkTabs-2b871527.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,O,G,y,H,se,L,E,oe,J,U=o[0].name+"",Q,ae,V,ne,W,T,X,B,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/FilterAutocompleteInput-d952f6bd.js b/ui/dist/assets/FilterAutocompleteInput-e1414ff6.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-d952f6bd.js rename to ui/dist/assets/FilterAutocompleteInput-e1414ff6.js index 7db20bf8..92f54002 100644 --- a/ui/dist/assets/FilterAutocompleteInput-d952f6bd.js +++ b/ui/dist/assets/FilterAutocompleteInput-e1414ff6.js @@ -1 +1 @@ -import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-a4705b02.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-6f704b4c.js";function Me(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.define(Me({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; +import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-55a566ae.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-6f704b4c.js";function Me(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.define(Me({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-68b40cd3.js b/ui/dist/assets/ListApiDocs-efd300f9.js similarity index 99% rename from ui/dist/assets/ListApiDocs-68b40cd3.js rename to ui/dist/assets/ListApiDocs-efd300f9.js index 563dab03..60b0414a 100644 --- a/ui/dist/assets/ListApiDocs-68b40cd3.js +++ b/ui/dist/assets/ListApiDocs-efd300f9.js @@ -1,4 +1,4 @@ -import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,R as nl,C as ge,p as ol,r as ke}from"./index-a4705b02.js";import{S as il}from"./SdkTabs-98b01dec.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,R,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Rt,oe,mt,ie,H,Ot,at,St,O,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Ke,i as Ve,s as We,e,b as s,E as Ye,f as i,g as u,u as Xe,y as De,o as m,w,h as t,M as $e,c as Zt,m as te,x as Ce,N as He,O as Ze,k as tl,P as el,n as ll,t as Gt,a as Ut,d as ee,Q as sl,R as nl,C as ge,p as ol,r as ke}from"./index-55a566ae.js";import{S as il}from"./SdkTabs-2b871527.js";function al(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function rl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ie(c){let n,o,a,p,b,d,h,C,x,_,f,et,kt,jt,S,Qt,D,ct,R,lt,le,U,j,se,dt,vt,st,yt,ne,ft,pt,nt,E,zt,Ft,T,ot,Lt,Jt,At,Q,it,Tt,Kt,Pt,L,ut,Rt,oe,mt,ie,H,Ot,at,St,O,bt,ae,z,Et,Vt,Nt,re,N,Wt,J,ht,ce,I,de,B,fe,P,qt,K,_t,pe,xt,ue,$,Mt,rt,Dt,me,Ht,Xt,V,wt,be,It,he,Ct,_e,G,W,Yt,q,gt,A,xe,X,Y,y,Bt,Z,v,tt,k;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs-294ce65e.js b/ui/dist/assets/ListExternalAuthsDocs-3234c8ee.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs-294ce65e.js rename to ui/dist/assets/ListExternalAuthsDocs-3234c8ee.js index 69b7c268..f0dab472 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-294ce65e.js +++ b/ui/dist/assets/ListExternalAuthsDocs-3234c8ee.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as Re,n as We,t as te,a as le,o as u,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,M as je}from"./index-a4705b02.js";import{S as Ne}from"./SdkTabs-98b01dec.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,p;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){d(g,o,P),s(o,f),s(o,h),c||(p=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&u(o),c=!1,p()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,R,ae,W,A,ne,Q,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,w=[],de=new Map,ue,M,k=[],pe=new Map,T;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Me,e as i,w as v,b as _,c as Se,f as b,g as d,h as s,m as Ee,x as U,N as Pe,O as Oe,k as Le,P as Re,n as We,t as te,a as le,o as u,d as Ie,R as ze,C as De,p as He,r as j,u as Ue,M as je}from"./index-55a566ae.js";import{S as Ne}from"./SdkTabs-2b871527.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,p;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){d(g,o,P),s(o,f),s(o,h),c||(p=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&u(o),c=!1,p()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Se(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ee(n,o,null),s(o,f),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),n.$set(m),(!h||p&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&u(o),Ie(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,p,m,g,P,L=a[0].name+"",N,oe,se,G,K,y,F,S,J,$,R,ae,W,A,ne,Q,z=a[0].name+"",V,ie,X,ce,re,D,Y,E,Z,I,x,B,ee,C,q,w=[],de=new Map,ue,M,k=[],pe=new Map,T;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-137c6b4a.js b/ui/dist/assets/PageAdminConfirmPasswordReset-e781f1e9.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-137c6b4a.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-e781f1e9.js index ea92730b..88bc3990 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-137c6b4a.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-e781f1e9.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-a4705b02.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-55a566ae.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-5492dbdb.js b/ui/dist/assets/PageAdminRequestPasswordReset-eb8749ca.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-5492dbdb.js rename to ui/dist/assets/PageAdminRequestPasswordReset-eb8749ca.js index 125af446..ba8ef711 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-5492dbdb.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-eb8749ca.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index-a4705b02.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

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

Forgotten admin password

Enter the email associated with your account and we’ll send you a recovery link:

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

Successfully changed the user email address.

You can now sign in with your new email address.

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

Successfully changed the user password.

You can now sign in with your new password.

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

Invalid or expired verification token.

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

Successfully verified email address.

`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const _=H(e==null?void 0:e.token);await d.collection(_.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-1c7e54af.js b/ui/dist/assets/RealtimeApiDocs-c7e23f83.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-1c7e54af.js rename to ui/dist/assets/RealtimeApiDocs-c7e23f83.js index 54df0414..e4b4041b 100644 --- a/ui/dist/assets/RealtimeApiDocs-1c7e54af.js +++ b/ui/dist/assets/RealtimeApiDocs-c7e23f83.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-a4705b02.js";import{S as fe}from"./SdkTabs-98b01dec.js";function $e(o){var B,U,W,A,H,L,M,T,q,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` +import{S as re,i as ae,s as be,M as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index-55a566ae.js";import{S as fe}from"./SdkTabs-2b871527.js";function $e(o){var B,U,W,A,H,L,M,T,q,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs-04c11750.js b/ui/dist/assets/RequestEmailChangeDocs-e827d67e.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-04c11750.js rename to ui/dist/assets/RequestEmailChangeDocs-e827d67e.js index c72bc695..e4320c8d 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-04c11750.js +++ b/ui/dist/assets/RequestEmailChangeDocs-e827d67e.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,R as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-a4705b02.js";import{S as je}from"./SdkTabs-98b01dec.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&d(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as L,N as ve,O as Se,k as Me,P as Re,n as Ae,t as x,a as ee,o as d,d as ye,R as We,C as ze,p as He,r as N,u as Oe,M as Ue}from"./index-55a566ae.js";import{S as je}from"./SdkTabs-2b871527.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&L(_,a),q&6&&N(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),N(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&N(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&d(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,G,g,H,le,O,E,se,J,U=o[0].name+"",Q,ae,oe,j,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new je({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs-dea655c6.js b/ui/dist/assets/RequestPasswordResetDocs-7a66f98e.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-dea655c6.js rename to ui/dist/assets/RequestPasswordResetDocs-7a66f98e.js index 88627762..12260467 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-dea655c6.js +++ b/ui/dist/assets/RequestPasswordResetDocs-7a66f98e.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as me,O as Re,k as ge,P as ye,n as Be,t as Z,a as x,o as f,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-a4705b02.js";import{S as Ue}from"./SdkTabs-98b01dec.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=h(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&f(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,z,q,G,B,J,R,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,g,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as I,N as me,O as Re,k as ge,P as ye,n as Be,t as Z,a as x,o as f,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,M as Ae}from"./index-55a566ae.js";import{S as Ue}from"./SdkTabs-2b871527.js";function ue(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:a,first:null,c(){l=r("button"),_=h(o),u=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(P,l,$),n(l,_),n(l,u),i||(p=Me(l,"click",m),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&I(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&f(l),i=!1,p()}}}function ke(a,s){let l,o,_,u;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(i,l,p),we(o,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),o.$set(m),(!u||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){u||(Z(o.$$.fragment,i),u=!0)},o(i){x(o.$$.fragment,i),u=!1},d(i){i&&f(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,u,i,p,m,P,$,D=a[0].name+"",N,ee,z,q,G,B,J,R,H,te,O,C,se,K,E=a[0].name+"",Q,le,V,S,W,T,X,M,Y,g,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-3b079aad.js b/ui/dist/assets/RequestVerificationDocs-1db2dc91.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-3b079aad.js rename to ui/dist/assets/RequestVerificationDocs-1db2dc91.js index d5bbf9c7..c32957c5 100644 --- a/ui/dist/assets/RequestVerificationDocs-3b079aad.js +++ b/ui/dist/assets/RequestVerificationDocs-1db2dc91.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as de,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as m,d as $e,R as Se,C as Te,p as Me,r as I,u as Re,M as Ve}from"./index-a4705b02.js";import{S as Ae}from"./SdkTabs-98b01dec.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(u=Re(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&m(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&m(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,R,Y,y,V,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as F,N as de,O as ge,k as ye,P as Be,n as Ce,t as Z,a as x,o as m,d as $e,R as Se,C as Te,p as Me,r as I,u as Re,M as Ve}from"./index-55a566ae.js";import{S as Ae}from"./SdkTabs-2b871527.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(u=Re(s,"click",d),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&F(_,o),w&6&&I(s,"active",l[1]===l[5].code)},d(q){q&&m(s),n=!1,u()}}}function ke(a,l){let s,o,_,p;return o=new Ve({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),he(o,s,null),i(s,_),p=!0},p(n,u){l=n;const d={};u&4&&(d.content=l[5].body),o.$set(d),(!p||u&6)&&I(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&m(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,u,d,q,w,j=a[0].name+"",L,ee,N,P,z,C,G,g,D,te,H,S,le,J,O=a[0].name+"",K,se,Q,T,W,M,X,R,Y,y,V,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/SdkTabs-98b01dec.js b/ui/dist/assets/SdkTabs-2b871527.js similarity index 96% rename from ui/dist/assets/SdkTabs-98b01dec.js rename to ui/dist/assets/SdkTabs-2b871527.js index baee5d23..49276ef1 100644 --- a/ui/dist/assets/SdkTabs-98b01dec.js +++ b/ui/dist/assets/SdkTabs-2b871527.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-a4705b02.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,O as J,k as O,P as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as Q}from"./index-55a566ae.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),Q(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-d8bee752.js b/ui/dist/assets/UnlinkExternalAuthDocs-c9dfb1c2.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-d8bee752.js rename to ui/dist/assets/UnlinkExternalAuthDocs-c9dfb1c2.js index ec5b3fc6..c019c8fb 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-d8bee752.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-c9dfb1c2.js @@ -1,4 +1,4 @@ -import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f,g as d,h as s,m as Be,x as j,N as ye,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,M as Ne}from"./index-a4705b02.js";import{S as Ke}from"./SdkTabs-98b01dec.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),a.$set(m),(!b||p&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,m,$,P,D=n[0].name+"",N,se,ae,K,F,A,G,E,J,w,W,ne,z,y,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,g=[],ue=new Map,pe,M,k=[],me=new Map,T;A=new Ke({props:{js:` +import{S as qe,i as Me,s as Oe,e as i,w as v,b as h,c as Se,f,g as d,h as s,m as Be,x as j,N as ye,O as De,k as We,P as ze,n as He,t as le,a as oe,o as u,d as Ue,R as Le,C as Re,p as je,r as I,u as Ie,M as Ne}from"./index-55a566ae.js";import{S as Ke}from"./SdkTabs-2b871527.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&j(_,a),P&6&&I(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),I(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),a.$set(m),(!b||p&6)&&I(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&u(o),Ue(a)}}}function Fe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,m,$,P,D=n[0].name+"",N,se,ae,K,F,A,G,E,J,w,W,ne,z,y,ie,Q,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,C,q,g=[],ue=new Map,pe,M,k=[],me=new Map,T;A=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-a9a0e159.js b/ui/dist/assets/UpdateApiDocs-20297978.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs-a9a0e159.js rename to ui/dist/assets/UpdateApiDocs-20297978.js index ff41cdb1..ad11bb49 100644 --- a/ui/dist/assets/UpdateApiDocs-a9a0e159.js +++ b/ui/dist/assets/UpdateApiDocs-20297978.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,N as Pe,O as ut,k as Mt,P as $t,n as Rt,t as fe,a as pe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-a4705b02.js";import{S as Lt}from"./SdkTabs-98b01dec.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(f){let t,l,s,b,u,d,p,k,C,w,O,H,A,j,M,E,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as U,M as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as I,N as Pe,O as ut,k as Mt,P as $t,n as Rt,t as fe,a as pe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index-55a566ae.js";import{S as Lt}from"./SdkTabs-2b871527.js";function bt(f,t,l){const s=f.slice();return s[7]=t[l],s}function mt(f,t,l){const s=f.slice();return s[7]=t[l],s}function _t(f,t,l){const s=f.slice();return s[12]=t[l],s}function yt(f){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(f){let t,l,s,b,u,d,p,k,C,w,O,H,A,j,M,E,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional diff --git a/ui/dist/assets/ViewApiDocs-299214ca.js b/ui/dist/assets/ViewApiDocs-3ad3880e.js similarity index 98% rename from ui/dist/assets/ViewApiDocs-299214ca.js rename to ui/dist/assets/ViewApiDocs-3ad3880e.js index ad603eca..7cc04a23 100644 --- a/ui/dist/assets/ViewApiDocs-299214ca.js +++ b/ui/dist/assets/ViewApiDocs-3ad3880e.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,R as it,C as Ge,p as at,r as K,u as rt}from"./index-a4705b02.js";import{S as dt}from"./SdkTabs-98b01dec.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",y,c,f,b;function R(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,y),l(n,c),f||(b=rt(n,"click",R),f=!0)},p(h,F){s=h,F&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,R,h,F,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,P,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,T;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,M as Ye,e as o,w as m,b as u,c as _e,f as _,g as r,h as l,m as ke,x as me,N as ze,O as lt,k as st,P as nt,n as ot,t as G,a as J,o as d,d as he,R as it,C as Ge,p as at,r as K,u as rt}from"./index-55a566ae.js";import{S as dt}from"./SdkTabs-2b871527.js";function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function Qe(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",y,c,f,b;function R(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),y=m(a),c=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,y),l(n,c),f||(b=rt(n,"click",R),f=!0)},p(h,F){s=h,F&20&&K(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,b()}}}function Xe(i,s){let n,a,y,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),y=u(),_(n,"class","tab-item"),K(n,"active",s[2]===s[6].code),this.first=n},m(f,b){r(f,n,b),ke(a,n,null),l(n,y),c=!0},p(f,b){s=f,(!c||b&20)&&K(n,"active",s[2]===s[6].code)},i(f){c||(G(a.$$.fragment,f),c=!0)},o(f){J(a.$$.fragment,f),c=!1},d(f){f&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",y,c,f,b,R,h,F,N=i[0].name+"",Q,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,V=i[0].name+"",ee,$e,te,Ce,le,M,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,fe,Se,Be,Me,pe,xe,ue,I,be,P,H,C=[],Ae=new Map,Ie,q,v=[],He=new Map,T;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index-a4705b02.js b/ui/dist/assets/index-55a566ae.js similarity index 97% rename from ui/dist/assets/index-a4705b02.js rename to ui/dist/assets/index-55a566ae.js index 2e32077b..835fbb00 100644 --- a/ui/dist/assets/index-a4705b02.js +++ b/ui/dist/assets/index-55a566ae.js @@ -14,7 +14,7 @@ `}}let Qr,zi;const xr="app-tooltip";function Yu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ci(){return zi=zi||document.querySelector("."+xr),zi||(zi=document.createElement("div"),zi.classList.add(xr),document.body.appendChild(zi)),zi}function t1(n,e){let t=Ci();if(!t.classList.contains("active")||!(e!=null&&e.text)){ea();return}t.textContent=e.text,t.className=xr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function ea(){clearTimeout(Qr),Ci().classList.remove("active"),Ci().activeNode=void 0}function _y(n,e){Ci().activeNode=n,clearTimeout(Qr),Qr=setTimeout(()=>{Ci().classList.add("active"),t1(n,e)},isNaN(e.delay)?0:e.delay)}function Ue(n,e){let t=Yu(e);function i(){_y(n,t)}function s(){ea()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&z.isFocusable(n))&&n.addEventListener("click",s),Ci(),{update(l){var o,r;t=Yu(l),(r=(o=Ci())==null?void 0:o.activeNode)!=null&&r.contains(n)&&t1(n,t)},destroy(){var l,o;(o=(l=Ci())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ea(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Ku(n,e,t){const i=n.slice();return i[12]=e[t],i}const gy=n=>({}),Ju=n=>({uniqueId:n[4]});function by(n){let e,t,i=n[3],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=Ve(t,Ht,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=Ve(t,Ht,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&w(e),a&&s&&s.end(),o=!1,r()}}}function Zu(n){let e,t,i=ko(n[12])+"",s,l,o,r;return{c(){e=y("div"),t=y("pre"),s=U(i),l=E(),h(e,"class","help-block help-block-error")},m(a,u){S(a,e,u),v(e,t),v(t,s),v(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=ko(a[12])+"")&&le(s,i)},i(a){r||(a&&tt(()=>{r&&(o||(o=Ve(e,St,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=Ve(e,St,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&w(e),a&&o&&o.end()}}}function yy(n){let e,t,i,s,l,o,r;const a=n[9].default,u=Ct(a,n,n[8],Ju),f=[vy,by],d=[];function p(m,_){return m[0]&&m[3].length?0:1}return i=p(n),s=d[i]=f[i](n),{c(){e=y("div"),u&&u.c(),t=E(),s.c(),h(e,"class",n[1]),x(e,"error",n[3].length)},m(m,_){S(m,e,_),u&&u.m(e,null),v(e,t),d[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(m,[_]){u&&u.p&&(!l||_&256)&&Ot(u,a,m,m[8],l?Mt(a,m[8],_,gy):Dt(m[8]),Ju);let g=i;i=p(m),i===g?d[i].p(m,_):(re(),P(d[g],1,1,()=>{d[g]=null}),ae(),s=d[i],s?s.p(m,_):(s=d[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&h(e,"class",m[1]),(!l||_&10)&&x(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){P(u,m),P(s),l=!1},d(m){m&&w(e),u&&u.d(m),d[i].d(),n[11](null),o=!1,r()}}}const Gu="Invalid value";function ko(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||Gu:n||Gu}function ky(n,e,t){let i;Ke(n,_i,g=>t(7,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+z.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,d=[];function p(){Di(r)}Xt(()=>(f.addEventListener("input",p),f.addEventListener("change",p),()=>{f.removeEventListener("input",p),f.removeEventListener("change",p)}));function m(g){pe.call(this,n,g)}function _(g){se[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,d=z.toArray(z.getNestedVal(i,r)))},[a,u,f,d,o,r,p,i,l,s,m,_]}class de extends ve{constructor(e){super(),be(this,e,ky,yy,_e,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function wy(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Email"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","email"),h(l,"autocomplete","off"),h(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&1&&l.value!==u[0]&&ue(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Sy(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=U("Password"),s=E(),l=y("input"),r=E(),a=y("div"),a.textContent="Minimum 10 characters.",h(e,"for",i=n[9]),h(l,"type","password"),h(l,"autocomplete","new-password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0,h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),ue(l,n[1]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[6]),u=!0)},p(d,p){p&512&&i!==(i=d[9])&&h(e,"for",i),p&512&&o!==(o=d[9])&&h(l,"id",o),p&2&&l.value!==d[1]&&ue(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function $y(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Password confirm"),s=E(),l=y("input"),h(e,"for",i=n[9]),h(l,"type","password"),h(l,"minlength","10"),h(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&h(e,"for",i),f&512&&o!==(o=u[9])&&h(l,"id",o),f&4&&l.value!==u[2]&&ue(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Ty(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;return s=new de({props:{class:"form-field required",name:"email",$$slots:{default:[wy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"password",$$slots:{default:[Sy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[$y,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),H(s.$$.fragment),l=E(),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),f=y("button"),f.innerHTML=`Create and login - `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(_,g){S(_,e,g),v(e,t),v(e,i),j(s,e,null),v(e,l),j(o,e,null),v(e,r),j(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",ct(n[4])),p=!0)},p(_,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:_}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:_}),o.$set(k);const $={};g&1540&&($.$$scope={dirty:g,ctx:_}),a.$set($),(!d||g&8)&&x(f,"btn-disabled",_[3]),(!d||g&8)&&x(f,"btn-loading",_[3])},i(_){d||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),d=!0)},o(_){P(s.$$.fragment,_),P(o.$$.fragment,_),P(a.$$.fragment,_),d=!1},d(_){_&&w(e),V(s),V(o),V(a),p=!1,m()}}}function Cy(n,e,t){const i=wt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await he.admins.create({email:s,password:l,passwordConfirm:o}),await he.admins.authWithPassword(s,l),i("submit")}catch(p){he.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class My extends ve{constructor(e){super(),be(this,e,Cy,Ty,_e,{})}}function Xu(n){let e,t;return e=new e1({props:{$$slots:{default:[Oy]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(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){V(e,i)}}}function Oy(n){let e,t;return e=new My({}),e.$on("submit",n[1]),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:Q,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Dy(n){let e,t,i=n[0]&&Xu(n);return{c(){i&&i.c(),e=Se()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Xu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),P(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Ey(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){he.logout(!1),t(0,i=!0);return}he.authStore.isValid?Ii("/collections"):he.logout()}return[i,async()=>{t(0,i=!1),await un(),window.location.search=""}]}class Ay extends ve{constructor(e){super(),be(this,e,Ey,Dy,_e,{})}}const Lt=On(""),wo=On(""),Ms=On(!1);function Iy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ue(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&ue(e,l[7])},i:Q,o:Q,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Py(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Pt(o,r(n)),se.push(()=>me(e,"value",l)),e.$on("submit",n[10])),{c(){e&&H(e.$$.fragment),i=Se()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ye(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){re();const d=e;P(d.$$.fragment,1,0,()=>{V(d,1)}),ae()}o?(e=Pt(o,r(a)),se.push(()=>me(e,"value",l)),e.$on("submit",a[10]),H(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&V(e,a)}}}function Qu(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&tt(()=>{i&&(t||(t=Ve(e,ni,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Ve(e,ni,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function xu(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:Q,i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,ni,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,ni,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Ly(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[Py,Iy],m=[];function _(k,$){return k[4]&&!k[5]?0:1}l=_(n),o=m[l]=p[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&Qu(),b=(n[0].length||n[7].length)&&xu(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",Mn(n[11])),J(e,"submit",ct(n[10]))],f=!0)},p(k,[$]){let T=l;l=_(k),l===T?m[l].p(k,$):(re(),P(m[T],1,1,()=>{m[T]=null}),ae(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?g?$&129&&A(g,1):(g=Qu(),g.c(),A(g,1),g.m(e,a)):g&&(re(),P(g,1,1,()=>{g=null}),ae()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=xu(k),b.c(),A(b,1),b.m(e,null)):b&&(re(),P(b,1,1,()=>{b=null}),ae())},i(k){u||(A(o),A(g),A(b),u=!0)},o(k){P(o),P(g),P(b),u=!1},d(k){k&&w(e),m[l].d(),g&&g.d(),b&&b.d(),f=!1,De(d)}}}function Ny(n,e,t){const i=wt(),s="search_"+z.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(O=!0){t(7,p=""),O&&(d==null||d.focus()),i("clear")}function _(){t(0,l=p),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await at(()=>import("./FilterAutocompleteInput-d952f6bd.js"),["./FilterAutocompleteInput-d952f6bd.js","./index-6f704b4c.js"],import.meta.url)).default),t(5,f=!1))}Xt(()=>{g()});function b(O){pe.call(this,n,O)}function k(O){p=O,t(7,p),t(0,l)}function $(O){se[O?"unshift":"push"](()=>{d=O,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),_()};return n.$$set=O=>{"value"in O&&t(0,l=O.value),"placeholder"in O&&t(1,o=O.placeholder),"autocompleteCollection"in O&&t(2,r=O.autocompleteCollection),"extraAutocompleteKeys"in O&&t(3,a=O.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,_,b,k,$,T,C]}class Ko extends ve{constructor(e){super(),be(this,e,Ny,Ly,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Fy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ee(t=Ue.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&zt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:Q,o:Q,d(l){l&&w(e),i=!1,De(s)}}}function Ry(n,e,t){const i=wt();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return Xt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Pa extends ve{constructor(e){super(),be(this,e,Ry,Fy,_e,{tooltip:0})}}function qy(n){let e,t,i,s,l;const o=n[6].default,r=Ct(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Ot(r,o,a,a[5],i?Mt(o,a[5],u,null):Dt(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,De(l)}}}function jy(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class xt extends ve{constructor(e){super(),be(this,e,jy,qy,_e,{class:1,name:2,sort:0,disable:3})}}function Vy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Hy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=U(n[2]),s=E(),l=y("div"),o=U(n[1]),r=U(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&le(i,a[2]),u&2&&le(o,a[1])},d(a){a&&w(e)}}}function zy(n){let e;function t(l,o){return l[0]?Hy:Vy}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function By(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class mi extends ve{constructor(e){super(),be(this,e,By,zy,_e,{date:0})}}const Uy=n=>({}),ef=n=>({}),Wy=n=>({}),tf=n=>({});function Yy(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ct(u,n,n[4],tf),d=n[5].default,p=Ct(d,n,n[4],null),m=n[5].after,_=Ct(m,n,n[4],ef);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),_&&_.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&Ot(f,u,g,g[4],o?Mt(u,g[4],b,Wy):Dt(g[4]),tf),p&&p.p&&(!o||b&16)&&Ot(p,d,g,g[4],o?Mt(d,g[4],b,null):Dt(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&h(i,"class",s),_&&_.p&&(!o||b&16)&&Ot(_,m,g,g[4],o?Mt(m,g[4],b,Uy):Dt(g[4]),ef)},i(g){o||(A(f,g),A(p,g),A(_,g),o=!0)},o(g){P(f,g),P(p,g),P(_,g),o=!1},d(g){g&&w(e),f&&f.d(g),p&&p.d(g),n[6](null),_&&_.d(g),r=!1,De(a)}}}function Ky(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}Xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){se[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class La extends ve{constructor(e){super(),be(this,e,Ky,Yy,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function nf(n,e,t){const i=n.slice();return i[23]=e[t],i}function Jy(n){let e;return{c(){e=y("div"),e.innerHTML=` + `,h(t,"class","content txt-center m-b-base"),h(f,"type","submit"),h(f,"class","btn btn-lg btn-block btn-next"),x(f,"btn-disabled",n[3]),x(f,"btn-loading",n[3]),h(e,"class","block"),h(e,"autocomplete","off")},m(_,g){S(_,e,g),v(e,t),v(e,i),j(s,e,null),v(e,l),j(o,e,null),v(e,r),j(a,e,null),v(e,u),v(e,f),d=!0,p||(m=J(e,"submit",ct(n[4])),p=!0)},p(_,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:_}),s.$set(b);const k={};g&1538&&(k.$$scope={dirty:g,ctx:_}),o.$set(k);const $={};g&1540&&($.$$scope={dirty:g,ctx:_}),a.$set($),(!d||g&8)&&x(f,"btn-disabled",_[3]),(!d||g&8)&&x(f,"btn-loading",_[3])},i(_){d||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),d=!0)},o(_){P(s.$$.fragment,_),P(o.$$.fragment,_),P(a.$$.fragment,_),d=!1},d(_){_&&w(e),V(s),V(o),V(a),p=!1,m()}}}function Cy(n,e,t){const i=wt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await he.admins.create({email:s,password:l,passwordConfirm:o}),await he.admins.authWithPassword(s,l),i("submit")}catch(p){he.errorResponseHandler(p)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function d(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,d]}class My extends ve{constructor(e){super(),be(this,e,Cy,Ty,_e,{})}}function Xu(n){let e,t;return e=new e1({props:{$$slots:{default:[Oy]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(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){V(e,i)}}}function Oy(n){let e,t;return e=new My({}),e.$on("submit",n[1]),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:Q,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Dy(n){let e,t,i=n[0]&&Xu(n);return{c(){i&&i.c(),e=Se()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=Xu(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),P(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Ey(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){he.logout(!1),t(0,i=!0);return}he.authStore.isValid?Ii("/collections"):he.logout()}return[i,async()=>{t(0,i=!1),await un(),window.location.search=""}]}class Ay extends ve{constructor(e){super(),be(this,e,Ey,Dy,_e,{})}}const Lt=On(""),wo=On(""),Ms=On(!1);function Iy(n){let e,t,i,s;return{c(){e=y("input"),h(e,"type","text"),h(e,"id",n[8]),h(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ue(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&h(e,"placeholder",t),o&128&&e.value!==l[7]&&ue(e,l[7])},i:Q,o:Q,d(l){l&&w(e),n[13](null),i=!1,s()}}}function Py(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=Pt(o,r(n)),se.push(()=>me(e,"value",l)),e.$on("submit",n[10])),{c(){e&&H(e.$$.fragment),i=Se()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ye(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){re();const d=e;P(d.$$.fragment,1,0,()=>{V(d,1)}),ae()}o?(e=Pt(o,r(a)),se.push(()=>me(e,"value",l)),e.$on("submit",a[10]),H(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&V(e,a)}}}function Qu(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Search',h(e,"type","submit"),h(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&tt(()=>{i&&(t||(t=Ve(e,ni,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=Ve(e,ni,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function xu(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:Q,i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,ni,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,ni,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Ly(n){let e,t,i,s,l,o,r,a,u,f,d;const p=[Py,Iy],m=[];function _(k,$){return k[4]&&!k[5]?0:1}l=_(n),o=m[l]=p[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&Qu(),b=(n[0].length||n[7].length)&&xu(n);return{c(){e=y("form"),t=y("label"),i=y("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),b&&b.c(),h(i,"class","ri-search-line"),h(t,"for",n[8]),h(t,"class","m-l-10 txt-xl"),h(e,"class","searchbar")},m(k,$){S(k,e,$),v(e,t),v(t,i),v(e,s),m[l].m(e,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0,f||(d=[J(e,"click",Mn(n[11])),J(e,"submit",ct(n[10]))],f=!0)},p(k,[$]){let T=l;l=_(k),l===T?m[l].p(k,$):(re(),P(m[T],1,1,()=>{m[T]=null}),ae(),o=m[l],o?o.p(k,$):(o=m[l]=p[l](k),o.c()),A(o,1),o.m(e,r)),(k[0].length||k[7].length)&&k[7]!=k[0]?g?$&129&&A(g,1):(g=Qu(),g.c(),A(g,1),g.m(e,a)):g&&(re(),P(g,1,1,()=>{g=null}),ae()),k[0].length||k[7].length?b?(b.p(k,$),$&129&&A(b,1)):(b=xu(k),b.c(),A(b,1),b.m(e,null)):b&&(re(),P(b,1,1,()=>{b=null}),ae())},i(k){u||(A(o),A(g),A(b),u=!0)},o(k){P(o),P(g),P(b),u=!1},d(k){k&&w(e),m[l].d(),g&&g.d(),b&&b.d(),f=!1,De(d)}}}function Ny(n,e,t){const i=wt(),s="search_"+z.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new bn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,d,p="";function m(O=!0){t(7,p=""),O&&(d==null||d.focus()),i("clear")}function _(){t(0,l=p),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await at(()=>import("./FilterAutocompleteInput-e1414ff6.js"),["./FilterAutocompleteInput-e1414ff6.js","./index-6f704b4c.js"],import.meta.url)).default),t(5,f=!1))}Xt(()=>{g()});function b(O){pe.call(this,n,O)}function k(O){p=O,t(7,p),t(0,l)}function $(O){se[O?"unshift":"push"](()=>{d=O,t(6,d)})}function T(){p=this.value,t(7,p),t(0,l)}const C=()=>{m(!1),_()};return n.$$set=O=>{"value"in O&&t(0,l=O.value),"placeholder"in O&&t(1,o=O.placeholder),"autocompleteCollection"in O&&t(2,r=O.autocompleteCollection),"extraAutocompleteKeys"in O&&t(3,a=O.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,p=l)},[l,o,r,a,u,f,d,p,s,m,_,b,k,$,T,C]}class Ko extends ve{constructor(e){super(),be(this,e,Ny,Ly,_e,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Fy(n){let e,t,i,s;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"aria-label","Refresh"),h(e,"class","btn btn-transparent btn-circle svelte-1bvelc2"),x(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ee(t=Ue.call(null,e,n[0])),J(e,"click",n[2])],i=!0)},p(l,[o]){t&&zt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&x(e,"refreshing",l[1])},i:Q,o:Q,d(l){l&&w(e),i=!1,De(s)}}}function Ry(n,e,t){const i=wt();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return Xt(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Pa extends ve{constructor(e){super(),be(this,e,Ry,Fy,_e,{tooltip:0})}}function qy(n){let e,t,i,s,l;const o=n[6].default,r=Ct(o,n,n[5],null);return{c(){e=y("th"),r&&r.c(),h(e,"tabindex","0"),h(e,"title",n[2]),h(e,"class",t="col-sort "+n[1]),x(e,"col-sort-disabled",n[3]),x(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),x(e,"sort-desc",n[0]==="-"+n[2]),x(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Ot(r,o,a,a[5],i?Mt(o,a[5],u,null):Dt(a[5]),null),(!i||u&4)&&h(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&h(e,"class",t),(!i||u&10)&&x(e,"col-sort-disabled",a[3]),(!i||u&7)&&x(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&x(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&x(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,De(l)}}}function jy(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),d=p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),u())};return n.$$set=p=>{"class"in p&&t(1,l=p.class),"name"in p&&t(2,o=p.name),"sort"in p&&t(0,r=p.sort),"disable"in p&&t(3,a=p.disable),"$$scope"in p&&t(5,s=p.$$scope)},[r,l,o,a,u,s,i,f,d]}class xt extends ve{constructor(e){super(),be(this,e,jy,qy,_e,{class:1,name:2,sort:0,disable:3})}}function Vy(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Hy(n){let e,t,i,s,l,o,r;return{c(){e=y("div"),t=y("div"),i=U(n[2]),s=E(),l=y("div"),o=U(n[1]),r=U(" UTC"),h(t,"class","date"),h(l,"class","time svelte-zdiknu"),h(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(e,s),v(e,l),v(l,o),v(l,r)},p(a,u){u&4&&le(i,a[2]),u&2&&le(o,a[1])},d(a){a&&w(e)}}}function zy(n){let e;function t(l,o){return l[0]?Hy:Vy}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function By(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class mi extends ve{constructor(e){super(),be(this,e,By,zy,_e,{date:0})}}const Uy=n=>({}),ef=n=>({}),Wy=n=>({}),tf=n=>({});function Yy(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ct(u,n,n[4],tf),d=n[5].default,p=Ct(d,n,n[4],null),m=n[5].after,_=Ct(m,n,n[4],ef);return{c(){e=y("div"),f&&f.c(),t=E(),i=y("div"),p&&p.c(),l=E(),_&&_.c(),h(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),h(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),v(e,t),v(e,i),p&&p.m(i,null),n[6](i),v(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&Ot(f,u,g,g[4],o?Mt(u,g[4],b,Wy):Dt(g[4]),tf),p&&p.p&&(!o||b&16)&&Ot(p,d,g,g[4],o?Mt(d,g[4],b,null):Dt(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&h(i,"class",s),_&&_.p&&(!o||b&16)&&Ot(_,m,g,g[4],o?Mt(m,g[4],b,Uy):Dt(g[4]),ef)},i(g){o||(A(f,g),A(p,g),A(_,g),o=!0)},o(g){P(f,g),P(p,g),P(_,g),o=!1},d(g){g&&w(e),f&&f.d(g),p&&p.d(g),n[6](null),_&&_.d(g),r=!1,De(a)}}}function Ky(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const p=o.offsetWidth,m=o.scrollWidth;m-p?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+p==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}Xt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function d(p){se[p?"unshift":"push"](()=>{o=p,t(2,o)})}return n.$$set=p=>{"class"in p&&t(0,l=p.class),"$$scope"in p&&t(4,s=p.$$scope)},[l,f,o,r,s,i,d]}class La extends ve{constructor(e){super(),be(this,e,Ky,Yy,_e,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function nf(n,e,t){const i=n.slice();return i[23]=e[t],i}function Jy(n){let e;return{c(){e=y("div"),e.innerHTML=` Method`,h(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Zy(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="URL",h(t,"class",z.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Gy(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Referer",h(t,"class",z.getFieldTypeIcon("url")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Xy(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="User IP",h(t,"class",z.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function Qy(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Status",h(t,"class",z.getFieldTypeIcon("number")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function xy(n){let e,t,i,s;return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),s.textContent="Created",h(t,"class",z.getFieldTypeIcon("date")),h(s,"class","txt"),h(e,"class","col-header-content")},m(l,o){S(l,e,o),v(e,t),v(e,i),v(e,s)},p:Q,d(l){l&&w(e)}}}function sf(n){let e;function t(l,o){return l[6]?t2:e2}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function e2(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&lf(n);return{c(){e=y("tr"),t=y("td"),i=y("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),h(t,"colspan","99"),h(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),v(e,t),v(t,i),v(t,s),o&&o.m(t,null),v(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=lf(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function t2(n){let e;return{c(){e=y("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function lf(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear filters',h(e,"type","button"),h(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function of(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),h(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function rf(n,e){var Ce,Je,ht;let t,i,s,l=((Ce=e[23].method)==null?void 0:Ce.toUpperCase())+"",o,r,a,u,f,d=e[23].url+"",p,m,_,g,b,k,$=(e[23].referer||"N/A")+"",T,C,O,M,D,I=(e[23].userIp||"N/A")+"",L,F,R,N,q,Y=e[23].status+"",B,Z,ee,ie,X,fe,G,ce,ge,Me,je=(((Je=e[23].meta)==null?void 0:Je.errorMessage)||((ht=e[23].meta)==null?void 0:ht.errorData))&&of();ie=new mi({props:{date:e[23].created}});function He(){return e[17](e[23])}function we(...Ze){return e[18](e[23],...Ze)}return{key:n,first:null,c(){t=y("tr"),i=y("td"),s=y("span"),o=U(l),a=E(),u=y("td"),f=y("span"),p=U(d),_=E(),je&&je.c(),g=E(),b=y("td"),k=y("span"),T=U($),O=E(),M=y("td"),D=y("span"),L=U(I),R=E(),N=y("td"),q=y("span"),B=U(Y),Z=E(),ee=y("td"),H(ie.$$.fragment),X=E(),fe=y("td"),fe.innerHTML='',G=E(),h(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),h(i,"class","col-type-text col-field-method min-width"),h(f,"class","txt txt-ellipsis"),h(f,"title",m=e[23].url),h(u,"class","col-type-text col-field-url"),h(k,"class","txt txt-ellipsis"),h(k,"title",C=e[23].referer),x(k,"txt-hint",!e[23].referer),h(b,"class","col-type-text col-field-referer"),h(D,"class","txt txt-ellipsis"),h(D,"title",F=e[23].userIp),x(D,"txt-hint",!e[23].userIp),h(M,"class","col-type-number col-field-userIp"),h(q,"class","label"),x(q,"label-danger",e[23].status>=400),h(N,"class","col-type-number col-field-status"),h(ee,"class","col-type-date col-field-created"),h(fe,"class","col-type-action min-width"),h(t,"tabindex","0"),h(t,"class","row-handle"),this.first=t},m(Ze,We){S(Ze,t,We),v(t,i),v(i,s),v(s,o),v(t,a),v(t,u),v(u,f),v(f,p),v(u,_),je&&je.m(u,null),v(t,g),v(t,b),v(b,k),v(k,T),v(t,O),v(t,M),v(M,D),v(D,L),v(t,R),v(t,N),v(N,q),v(q,B),v(t,Z),v(t,ee),j(ie,ee,null),v(t,X),v(t,fe),v(t,G),ce=!0,ge||(Me=[J(t,"click",He),J(t,"keydown",we)],ge=!0)},p(Ze,We){var Re,Qe,Jt;e=Ze,(!ce||We&8)&&l!==(l=((Re=e[23].method)==null?void 0:Re.toUpperCase())+"")&&le(o,l),(!ce||We&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&h(s,"class",r),(!ce||We&8)&&d!==(d=e[23].url+"")&&le(p,d),(!ce||We&8&&m!==(m=e[23].url))&&h(f,"title",m),(Qe=e[23].meta)!=null&&Qe.errorMessage||(Jt=e[23].meta)!=null&&Jt.errorData?je||(je=of(),je.c(),je.m(u,null)):je&&(je.d(1),je=null),(!ce||We&8)&&$!==($=(e[23].referer||"N/A")+"")&&le(T,$),(!ce||We&8&&C!==(C=e[23].referer))&&h(k,"title",C),(!ce||We&8)&&x(k,"txt-hint",!e[23].referer),(!ce||We&8)&&I!==(I=(e[23].userIp||"N/A")+"")&&le(L,I),(!ce||We&8&&F!==(F=e[23].userIp))&&h(D,"title",F),(!ce||We&8)&&x(D,"txt-hint",!e[23].userIp),(!ce||We&8)&&Y!==(Y=e[23].status+"")&&le(B,Y),(!ce||We&8)&&x(q,"label-danger",e[23].status>=400);const te={};We&8&&(te.date=e[23].created),ie.$set(te)},i(Ze){ce||(A(ie.$$.fragment,Ze),ce=!0)},o(Ze){P(ie.$$.fragment,Ze),ce=!1},d(Ze){Ze&&w(t),je&&je.d(),V(ie),ge=!1,De(Me)}}}function n2(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L=[],F=new Map,R;function N(we){n[11](we)}let q={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Jy]},$$scope:{ctx:n}};n[1]!==void 0&&(q.sort=n[1]),s=new xt({props:q}),se.push(()=>me(s,"sort",N));function Y(we){n[12](we)}let B={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Zy]},$$scope:{ctx:n}};n[1]!==void 0&&(B.sort=n[1]),r=new xt({props:B}),se.push(()=>me(r,"sort",Y));function Z(we){n[13](we)}let ee={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Gy]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),f=new xt({props:ee}),se.push(()=>me(f,"sort",Z));function ie(we){n[14](we)}let X={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Xy]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),m=new xt({props:X}),se.push(()=>me(m,"sort",ie));function fe(we){n[15](we)}let G={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Qy]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),b=new xt({props:G}),se.push(()=>me(b,"sort",fe));function ce(we){n[16](we)}let ge={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[xy]},$$scope:{ctx:n}};n[1]!==void 0&&(ge.sort=n[1]),T=new xt({props:ge}),se.push(()=>me(T,"sort",ce));let Me=n[3];const je=we=>we[23].id;for(let we=0;wel=!1)),s.$set(Je);const ht={};Ce&67108864&&(ht.$$scope={dirty:Ce,ctx:we}),!a&&Ce&2&&(a=!0,ht.sort=we[1],ye(()=>a=!1)),r.$set(ht);const Ze={};Ce&67108864&&(Ze.$$scope={dirty:Ce,ctx:we}),!d&&Ce&2&&(d=!0,Ze.sort=we[1],ye(()=>d=!1)),f.$set(Ze);const We={};Ce&67108864&&(We.$$scope={dirty:Ce,ctx:we}),!_&&Ce&2&&(_=!0,We.sort=we[1],ye(()=>_=!1)),m.$set(We);const te={};Ce&67108864&&(te.$$scope={dirty:Ce,ctx:we}),!k&&Ce&2&&(k=!0,te.sort=we[1],ye(()=>k=!1)),b.$set(te);const Re={};Ce&67108864&&(Re.$$scope={dirty:Ce,ctx:we}),!C&&Ce&2&&(C=!0,Re.sort=we[1],ye(()=>C=!1)),T.$set(Re),Ce&841&&(Me=we[3],re(),L=kt(L,Ce,je,1,we,Me,F,I,Kt,rf,null,nf),ae(),!Me.length&&He?He.p(we,Ce):Me.length?He&&(He.d(1),He=null):(He=sf(we),He.c(),He.m(I,null))),(!R||Ce&64)&&x(e,"table-loading",we[6])},i(we){if(!R){A(s.$$.fragment,we),A(r.$$.fragment,we),A(f.$$.fragment,we),A(m.$$.fragment,we),A(b.$$.fragment,we),A(T.$$.fragment,we);for(let Ce=0;Ce{if(F<=1&&g(),t(6,p=!1),t(5,f=N.page),t(4,d=N.totalItems),s("load",u.concat(N.items)),R){const q=++m;for(;N.items.length&&m==q;)t(3,u=u.concat(N.items.splice(0,10))),await z.yieldToMain()}else t(3,u=u.concat(N.items))}).catch(N=>{N!=null&&N.isAbort||(t(6,p=!1),console.warn(N),g(),he.errorResponseHandler(N,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,d=0)}function b(F){a=F,t(1,a)}function k(F){a=F,t(1,a)}function $(F){a=F,t(1,a)}function T(F){a=F,t(1,a)}function C(F){a=F,t(1,a)}function O(F){a=F,t(1,a)}const M=F=>s("select",F),D=(F,R)=>{R.code==="Enter"&&(R.preventDefault(),s("select",F))},I=()=>t(0,o=""),L=()=>_(f+1);return n.$$set=F=>{"filter"in F&&t(0,o=F.filter),"presets"in F&&t(10,r=F.presets),"sort"in F&&t(1,a=F.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),_(1)),n.$$.dirty&24&&t(7,i=d>u.length)},[o,a,_,u,d,f,p,i,s,l,r,b,k,$,T,C,O,M,D,I,L]}class l2 extends ve{constructor(e){super(),be(this,e,s2,i2,_e,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 @@ -49,7 +49,7 @@ `),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}k.textContent=M,t.highlightElement(k)},function(M){b.setAttribute(r,f),k.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var k=(b||document).querySelectorAll(d),$=0,T;T=k[$++];)t.highlightElement(T)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(HS);const Gs=ma;var $c={},zS={get exports(){return $c},set exports(n){$c=n}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[p]=` `+f[p],d=m)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",_="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function BS(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&h(e,"class",i)},i:Q,o:Q,d(s){s&&w(e)}}}function US(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Gs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Gs.highlight(a,Gs.languages[l]||Gs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Gs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class x1 extends ve{constructor(e){super(),be(this,e,US,BS,_e,{class:0,content:2,language:3})}}const WS=n=>({}),Tc=n=>({}),YS=n=>({}),Cc=n=>({});function Mc(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T=n[4]&&!n[2]&&Oc(n);const C=n[19].header,O=Ct(C,n,n[18],Cc);let M=n[4]&&n[2]&&Dc(n);const D=n[19].default,I=Ct(D,n,n[18],null),L=n[19].footer,F=Ct(L,n,n[18],Tc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),O&&O.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(R,N){S(R,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),O&&O.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",ct(n[20])),J(f,"scroll",n[22])],k=!0)},p(R,N){n=R,n[4]&&!n[2]?T?T.p(n,N):(T=Oc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),O&&O.p&&(!b||N[0]&262144)&&Ot(O,C,n,n[18],b?Mt(C,n[18],N,YS):Dt(n[18]),Cc),n[4]&&n[2]?M?M.p(n,N):(M=Dc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&Ot(I,D,n,n[18],b?Mt(D,n[18],N,null):Dt(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&Ot(F,L,n,n[18],b?Mt(L,n[18],N,WS):Dt(n[18]),Tc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(R){b||(R&&tt(()=>{b&&(i||(i=Ve(t,yo,{duration:gs,opacity:0},!0)),i.run(1))}),A(O,R),A(I,R),A(F,R),tt(()=>{b&&(g&&g.end(1),_=Lb(l,ni,n[2]?{duration:gs,y:-10}:{duration:gs,x:50}),_.start())}),b=!0)},o(R){R&&(i||(i=Ve(t,yo,{duration:gs,opacity:0},!1)),i.run(0)),P(O,R),P(I,R),P(F,R),_&&_.invalidate(),g=Nb(l,ni,n[2]?{duration:gs,y:10}:{duration:gs,x:50}),b=!1},d(R){R&&w(e),R&&i&&i.end(),T&&T.d(),O&&O.d(R),M&&M.d(),I&&I.d(R),n[21](null),F&&F.d(R),R&&g&&g.end(),k=!1,De($)}}}function Oc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",ct(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Dc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",ct(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function KS(n){let e,t,i,s,l=n[0]&&Mc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Mc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,De(s)}}}let Wi,Mr=[];function eb(){return Wi=Wi||document.querySelector(".overlays"),Wi||(Wi=document.createElement("div"),Wi.classList.add("overlays"),document.body.appendChild(Wi)),Wi}let gs=150;function Ec(){return 1e3+eb().querySelectorAll(".overlay-panel-container.active").length}function JS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:d=void 0}=e,{beforeHide:p=void 0}=e;const m=wt(),_="op_"+z.randomString(10);let g,b,k,$,T="",C=o;function O(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function D(){return o}async function I(X){t(17,C=X),X?(k=document.activeElement,g==null||g.focus(),m("show")):(clearTimeout($),k==null||k.focus(),m("hide")),await un(),L()}function L(){g&&(o?t(6,g.style.zIndex=Ec(),g):t(6,g.style="",g))}function F(){z.pushUnique(Mr,_),document.body.classList.add("overlay-active")}function R(){z.removeByValue(Mr,_),Mr.length||document.body.classList.remove("overlay-active")}function N(X){o&&f&&X.code=="Escape"&&!z.isInput(X.target)&&g&&g.style.zIndex==Ec()&&(X.preventDefault(),M())}function q(X){o&&Y(b)}function Y(X,fe){fe&&t(8,T=""),X&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!X)return;if(X.scrollHeight-X.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}X.scrollTop==0?t(8,T+=" scroll-top-reached"):X.scrollTop+X.offsetHeight==X.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}Xt(()=>(eb().appendChild(g),()=>{var X;clearTimeout($),R(),(X=g==null?void 0:g.classList)==null||X.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const B=()=>a?M():!0;function Z(X){se[X?"unshift":"push"](()=>{b=X,t(7,b)})}const ee=X=>Y(X.target);function ie(X){se[X?"unshift":"push"](()=>{g=X,t(6,g)})}return n.$$set=X=>{"class"in X&&t(1,l=X.class),"active"in X&&t(0,o=X.active),"popup"in X&&t(2,r=X.popup),"overlayClose"in X&&t(3,a=X.overlayClose),"btnClose"in X&&t(4,u=X.btnClose),"escClose"in X&&t(12,f=X.escClose),"beforeOpen"in X&&t(13,d=X.beforeOpen),"beforeHide"in X&&t(14,p=X.beforeHide),"$$scope"in X&&t(18,s=X.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&Y(b,!0),n.$$.dirty[0]&64&&g&&L(),n.$$.dirty[0]&1&&(o?F():R())},[o,l,r,a,u,M,g,b,T,N,q,Y,f,d,p,O,D,C,s,i,B,Z,ee,ie]}class cn extends ve{constructor(e){super(),be(this,e,JS,KS,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function ZS(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function GS(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=U(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function XS(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function QS(n){let e,t,i;return t=new x1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),H(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),V(t)}}}function xS(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,_,g=n[2].status+"",b,k,$,T,C,O,M=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",D,I,L,F,R,N,q=n[2].auth+"",Y,B,Z,ee,ie,X,fe=n[2].url+"",G,ce,ge,Me,je,He,we,Ce,Je,ht,Ze,We=n[2].remoteIp+"",te,Re,Qe,Jt,Ne,$e,Xe=n[2].userIp+"",ke,Pe,nt,vt,En,rt,Zn=n[2].userAgent+"",os,Nl,bi,rs,Fl,Ri,as,dn,et,us,li,fs,qi,ji,Zt,nn;function Rl(Le,Oe){return Le[2].referer?GS:ZS}let W=Rl(n),K=W(n);const ne=[QS,XS],oe=[];function Te(Le,Oe){return Oe&4&&(as=null),as==null&&(as=!z.isEmpty(Le[2].meta)),as?0:1}return dn=Te(n,-1),et=oe[dn]=ne[dn](n),Zt=new mi({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=U(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),_=y("span"),b=U(g),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),O=y("td"),D=U(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",R=E(),N=y("td"),Y=U(q),B=E(),Z=y("tr"),ee=y("td"),ee.textContent="URL",ie=E(),X=y("td"),G=U(fe),ce=E(),ge=y("tr"),Me=y("td"),Me.textContent="Referer",je=E(),He=y("td"),K.c(),we=E(),Ce=y("tr"),Je=y("td"),Je.textContent="Remote IP",ht=E(),Ze=y("td"),te=U(We),Re=E(),Qe=y("tr"),Jt=y("td"),Jt.textContent="User IP",Ne=E(),$e=y("td"),ke=U(Xe),Pe=E(),nt=y("tr"),vt=y("td"),vt.textContent="UserAgent",En=E(),rt=y("td"),os=U(Zn),Nl=E(),bi=y("tr"),rs=y("td"),rs.textContent="Meta",Fl=E(),Ri=y("td"),et.c(),us=E(),li=y("tr"),fs=y("td"),fs.textContent="Created",qi=E(),ji=y("td"),H(Zt.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(_,"class","label"),x(_,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h(Me,"class","min-width txt-hint txt-bold"),h(Je,"class","min-width txt-hint txt-bold"),h(Jt,"class","min-width txt-hint txt-bold"),h(vt,"class","min-width txt-hint txt-bold"),h(rs,"class","min-width txt-hint txt-bold"),h(fs,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Le,Oe){S(Le,e,Oe),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,_),v(_,b),v(t,k),v(t,$),v($,T),v($,C),v($,O),v(O,D),v(t,I),v(t,L),v(L,F),v(L,R),v(L,N),v(N,Y),v(t,B),v(t,Z),v(Z,ee),v(Z,ie),v(Z,X),v(X,G),v(t,ce),v(t,ge),v(ge,Me),v(ge,je),v(ge,He),K.m(He,null),v(t,we),v(t,Ce),v(Ce,Je),v(Ce,ht),v(Ce,Ze),v(Ze,te),v(t,Re),v(t,Qe),v(Qe,Jt),v(Qe,Ne),v(Qe,$e),v($e,ke),v(t,Pe),v(t,nt),v(nt,vt),v(nt,En),v(nt,rt),v(rt,os),v(t,Nl),v(t,bi),v(bi,rs),v(bi,Fl),v(bi,Ri),oe[dn].m(Ri,null),v(t,us),v(t,li),v(li,fs),v(li,qi),v(li,ji),j(Zt,ji,null),nn=!0},p(Le,Oe){var Be;(!nn||Oe&4)&&r!==(r=Le[2].id+"")&&le(a,r),(!nn||Oe&4)&&g!==(g=Le[2].status+"")&&le(b,g),(!nn||Oe&4)&&x(_,"label-danger",Le[2].status>=400),(!nn||Oe&4)&&M!==(M=((Be=Le[2].method)==null?void 0:Be.toUpperCase())+"")&&le(D,M),(!nn||Oe&4)&&q!==(q=Le[2].auth+"")&&le(Y,q),(!nn||Oe&4)&&fe!==(fe=Le[2].url+"")&&le(G,fe),W===(W=Rl(Le))&&K?K.p(Le,Oe):(K.d(1),K=W(Le),K&&(K.c(),K.m(He,null))),(!nn||Oe&4)&&We!==(We=Le[2].remoteIp+"")&&le(te,We),(!nn||Oe&4)&&Xe!==(Xe=Le[2].userIp+"")&&le(ke,Xe),(!nn||Oe&4)&&Zn!==(Zn=Le[2].userAgent+"")&&le(os,Zn);let Ye=dn;dn=Te(Le,Oe),dn===Ye?oe[dn].p(Le,Oe):(re(),P(oe[Ye],1,1,()=>{oe[Ye]=null}),ae(),et=oe[dn],et?et.p(Le,Oe):(et=oe[dn]=ne[dn](Le),et.c()),A(et,1),et.m(Ri,null));const Fe={};Oe&4&&(Fe.date=Le[2].created),Zt.$set(Fe)},i(Le){nn||(A(et),A(Zt.$$.fragment,Le),nn=!0)},o(Le){P(et),P(Zt.$$.fragment,Le),nn=!1},d(Le){Le&&w(e),K.d(),oe[dn].d(),V(Zt)}}}function e$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function t$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function n$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[t$],header:[e$],default:[xS]},$$scope:{ctx:n}};return e=new cn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),V(e,s)}}}function i$(n,e,t){let i,s=new Br;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){se[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){pe.call(this,n,d)}function f(d){pe.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class s$ extends ve{constructor(e){super(),be(this,e,i$,n$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function l$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Ac(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new VS({props:l}),se.push(()=>me(e,"filter",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function Ic(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new l2({props:l}),se.push(()=>me(e,"filter",s)),e.$on("select",n[12]),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function o$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$=n[3],T,C=n[3],O,M;r=new Pa({}),r.$on("refresh",n[7]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[l$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Ko({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),_.$on("submit",n[9]);let D=Ac(n),I=Ic(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=U(n[5]),o=E(),H(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),H(p.$$.fragment),m=E(),H(_.$$.fragment),g=E(),b=y("div"),k=E(),D.c(),T=E(),I.c(),O=Se(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),j(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),j(p,d,null),v(e,m),j(_,e,null),v(e,g),v(e,b),v(e,k),D.m(e,null),S(L,T,F),I.m(L,F),S(L,O,F),M=!0},p(L,F){(!M||F&32)&&le(l,L[5]);const R={};F&49153&&(R.$$scope={dirty:F,ctx:L}),p.$set(R);const N={};F&4&&(N.value=L[2]),_.$set(N),F&8&&_e($,$=L[3])?(re(),P(D,1,1,Q),ae(),D=Ac(L),D.c(),A(D,1),D.m(e,null)):D.p(L,F),F&8&&_e(C,C=L[3])?(re(),P(I,1,1,Q),ae(),I=Ic(L),I.c(),A(I,1),I.m(O.parentNode,O)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(_.$$.fragment,L),A(D),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(_.$$.fragment,L),P(D),P(I),M=!1},d(L){L&&w(e),V(r),V(p),V(_),D.d(L),L&&w(T),L&&w(O),I.d(L)}}}function r$(n){let e,t,i,s;e=new Dn({props:{$$slots:{default:[o$]},$$scope:{ctx:n}}});let l={};return i=new s$({props:l}),n[13](i),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){V(e,o),o&&w(t),n[13](null),V(i,o)}}}const Pc="includeAdminLogs";function a$(n,e,t){var k;let i,s;Ke(n,Lt,$=>t(5,s=$)),tn(Lt,s="Request logs",s);let l,o="",r=((k=window.localStorage)==null?void 0:k.getItem(Pc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function d(){r=this.checked,t(0,r)}const p=$=>t(2,o=$.detail);function m($){o=$,t(2,o)}function _($){o=$,t(2,o)}const g=$=>l==null?void 0:l.show($==null?void 0:$.detail);function b($){se[$?"unshift":"push"](()=>{l=$,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(Pc,r<<0)},[r,l,o,a,i,s,u,f,d,p,m,_,g,b]}class u$ extends ve{constructor(e){super(),be(this,e,a$,r$,_e,{})}}const ii=On([]),hi=On({}),No=On(!1),tb=On({});function f$(n){ii.update(e=>{const t=z.findByKey(e,"id",n);return t?hi.set(t):e.length&&hi.set(e[0]),e})}function c$(n){hi.update(e=>z.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ii.update(e=>(z.pushOrReplaceByKey(e,n,"id"),iu(),z.sortCollections(e)))}function d$(n){ii.update(e=>(z.removeByKey(e,"id",n.id),hi.update(t=>t.id===n.id?e[0]:t),iu(),e))}async function p$(n=null){No.set(!0);try{let e=await he.collections.getFullList(200,{sort:"+name"});e=z.sortCollections(e),ii.set(e);const t=n&&z.findByKey(e,"id",n);t?hi.set(t):e.length&&hi.set(e[0]),iu()}catch(e){he.errorResponseHandler(e)}No.set(!1)}function iu(){tb.update(n=>(ii.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.private)}));return e}),n))}const su=On({});function _n(n,e,t){su.set({text:n,yesCallback:e,noCallback:t})}function nb(){su.set({})}function Lc(n){let e,t,i;const s=n[17].default,l=Ct(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&Ot(l,s,o,o[16],i?Mt(s,o[16],r,null):Dt(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&tt(()=>{i&&(t||(t=Ve(e,ni,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=Ve(e,ni,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function m$(n){let e,t,i,s,l=n[0]&&Lc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Lc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,De(s)}}}function h$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,_,g=!1;const b=wt();function k(){t(0,o=!1),g=!1,clearTimeout(_)}function $(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(B){return!d||B.classList.contains(u)||(m==null?void 0:m.contains(B))&&!d.contains(B)||d.contains(B)&&B.closest&&B.closest("."+u)}function O(B){(!o||C(B.target))&&(B.preventDefault(),B.stopPropagation(),T())}function M(B){(B.code==="Enter"||B.code==="Space")&&(!o||C(B.target))&&(B.preventDefault(),B.stopPropagation(),T())}function D(B){o&&r&&B.code==="Escape"&&(B.preventDefault(),k())}function I(B){o&&!(d!=null&&d.contains(B.target))?g=!0:g&&(g=!1)}function L(B){var Z;o&&g&&!(d!=null&&d.contains(B.target))&&!(m!=null&&m.contains(B.target))&&!((Z=B.target)!=null&&Z.closest(".flatpickr-calendar"))&&k()}function F(B){I(B),L(B)}function R(B){N(),t(15,m=B||(d==null?void 0:d.parentNode)),m&&(d==null||d.addEventListener("click",O),m.addEventListener("click",O),m.addEventListener("keydown",M))}function N(){clearTimeout(_),m&&(d==null||d.removeEventListener("click",O),m.removeEventListener("click",O),m.removeEventListener("keydown",M))}Xt(()=>(R(),()=>N()));function q(B){se[B?"unshift":"push"](()=>{p=B,t(3,p)})}function Y(B){se[B?"unshift":"push"](()=>{d=B,t(2,d)})}return n.$$set=B=>{"trigger"in B&&t(8,l=B.trigger),"active"in B&&t(0,o=B.active),"escClose"in B&&t(9,r=B.escClose),"autoScroll"in B&&t(10,a=B.autoScroll),"closableClass"in B&&t(11,u=B.closableClass),"class"in B&&t(1,f=B.class),"$$scope"in B&&t(16,s=B.$$scope)},n.$$.update=()=>{var B,Z;n.$$.dirty&260&&d&&R(l),n.$$.dirty&32769&&(o?((B=m==null?void 0:m.classList)==null||B.add("active"),b("show")):((Z=m==null?void 0:m.classList)==null||Z.remove("active"),b("hide")))},[o,f,d,p,D,I,L,F,l,r,a,u,k,$,T,m,s,i,q,Y]}class Hn extends ve{constructor(e){super(),be(this,e,h$,m$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function Nc(n,e,t){const i=n.slice();return i[27]=e[t],i}function _$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=U("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function g$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Pt(o,r(n)),se.push(()=>me(e,"value",l))),{c(){e&&H(e.$$.fragment),i=Se()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ye(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){re();const p=e;P(p.$$.fragment,1,0,()=>{V(p,1)}),ae()}o?(e=Pt(o,r(a)),se.push(()=>me(e,"value",l)),H(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&V(e,a)}}}function b$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function v$(n){let e,t,i,s;const l=[b$,g$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Fc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[v$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Fc(n);return{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),r&&r.c(),l=Se()},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=Fc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){V(e,a),a&&w(t),V(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function k$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=U(t),s=U(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&le(i,t)},d(l){l&&w(e)}}}function qc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[Ee(Ue.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:Q,d(s){s&&w(e),t=!1,De(i)}}}function w$(n){let e,t,i,s,l,o,r=n[5]!=""&&qc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=qc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,De(o)}}}function S$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[w$],header:[k$],default:[y$]},$$scope:{ctx:n}};for(let l=0;lie.name==B);ee?z.removeByValue(Z.columns,ee):z.pushUnique(Z.columns,{name:B}),t(2,p=z.buildIndex(Z))}Xt(async()=>{t(8,g=!0);try{t(7,_=(await at(()=>import("./CodeEditor-462b7ad0.js"),["./CodeEditor-462b7ad0.js","./index-6f704b4c.js"],import.meta.url)).default)}catch(B){console.warn(B)}t(8,g=!1)});const M=()=>T(),D=()=>k(),I=()=>C(),L=B=>{t(3,s.unique=B.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=z.buildIndex(s))};function F(B){p=B,t(2,p)}const R=B=>O(B);function N(B){se[B?"unshift":"push"](()=>{f=B,t(4,f)})}function q(B){pe.call(this,n,B)}function Y(B){pe.call(this,n,B)}return n.$$set=B=>{e=qe(qe({},e),Ut(B)),t(14,r=Ge(e,o)),"collection"in B&&t(0,u=B.collection)},n.$$.update=()=>{var B,Z,ee;n.$$.dirty[0]&1&&t(10,i=(((Z=(B=u==null?void 0:u.schema)==null?void 0:B.filter(ie=>!ie.toDelete))==null?void 0:Z.map(ie=>ie.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=z.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(ie=>ie.name))||[])},[u,k,p,s,f,d,m,_,g,l,i,T,C,O,r,b,M,D,I,L,F,R,N,q,Y]}class T$ extends ve{constructor(e){super(),be(this,e,$$,S$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function jc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=z.parseIndex(i[10]);return i[11]=s,i}function Vc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(zc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Vc();function d(){return n[4](n[10],n[13])}return{c(){var m,_;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=U(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var g,b;S(m,e,_),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[Ee(r=Ue.call(null,e,((b=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,_){var g,b,k,$,T;n=m,n[11].unique?f||(f=Vc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(zc).join(", "))+"")&&le(l,s),_&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&zt(r.update)&&_&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,De(u)}}}function C$(n){var C,O,M;let e,t,i=(((O=(C=n[0])==null?void 0:C.indexes)==null?void 0:O.length)||0)+"",s,l,o,r,a,u,f,d,p,m,_,g,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let D=0;Dme(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=U("Unique constraints and indexes ("),s=U(i),l=U(")"),o=E(),r=y("div");for(let D=0;D+ +`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var d=JSON.parse(a.getAttribute("data-"+u)||"true");typeof d===f&&(o.settings[u]=d)}catch{}}for(var p=a.childNodes,m="",_="",g=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function BS(n){let e,t,i;return{c(){e=y("div"),t=y("code"),h(t,"class","svelte-10s5tkd"),h(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),v(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&h(e,"class",i)},i:Q,o:Q,d(s){s&&w(e)}}}function US(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Gs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Gs.highlight(a,Gs.languages[l]||Gs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Gs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class x1 extends ve{constructor(e){super(),be(this,e,US,BS,_e,{class:0,content:2,language:3})}}const WS=n=>({}),Tc=n=>({}),YS=n=>({}),Cc=n=>({});function Mc(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T=n[4]&&!n[2]&&Oc(n);const C=n[19].header,O=Ct(C,n,n[18],Cc);let M=n[4]&&n[2]&&Dc(n);const D=n[19].default,I=Ct(D,n,n[18],null),L=n[19].footer,F=Ct(L,n,n[18],Tc);return{c(){e=y("div"),t=y("div"),s=E(),l=y("div"),o=y("div"),T&&T.c(),r=E(),O&&O.c(),a=E(),M&&M.c(),u=E(),f=y("div"),I&&I.c(),d=E(),p=y("div"),F&&F.c(),h(t,"class","overlay"),h(o,"class","overlay-panel-section panel-header"),h(f,"class","overlay-panel-section panel-content"),h(p,"class","overlay-panel-section panel-footer"),h(l,"class",m="overlay-panel "+n[1]+" "+n[8]),x(l,"popup",n[2]),h(e,"class","overlay-panel-container"),x(e,"padded",n[2]),x(e,"active",n[0])},m(R,N){S(R,e,N),v(e,t),v(e,s),v(e,l),v(l,o),T&&T.m(o,null),v(o,r),O&&O.m(o,null),v(o,a),M&&M.m(o,null),v(l,u),v(l,f),I&&I.m(f,null),n[21](f),v(l,d),v(l,p),F&&F.m(p,null),b=!0,k||($=[J(t,"click",ct(n[20])),J(f,"scroll",n[22])],k=!0)},p(R,N){n=R,n[4]&&!n[2]?T?T.p(n,N):(T=Oc(n),T.c(),T.m(o,r)):T&&(T.d(1),T=null),O&&O.p&&(!b||N[0]&262144)&&Ot(O,C,n,n[18],b?Mt(C,n[18],N,YS):Dt(n[18]),Cc),n[4]&&n[2]?M?M.p(n,N):(M=Dc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),I&&I.p&&(!b||N[0]&262144)&&Ot(I,D,n,n[18],b?Mt(D,n[18],N,null):Dt(n[18]),null),F&&F.p&&(!b||N[0]&262144)&&Ot(F,L,n,n[18],b?Mt(L,n[18],N,WS):Dt(n[18]),Tc),(!b||N[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&h(l,"class",m),(!b||N[0]&262)&&x(l,"popup",n[2]),(!b||N[0]&4)&&x(e,"padded",n[2]),(!b||N[0]&1)&&x(e,"active",n[0])},i(R){b||(R&&tt(()=>{b&&(i||(i=Ve(t,yo,{duration:gs,opacity:0},!0)),i.run(1))}),A(O,R),A(I,R),A(F,R),tt(()=>{b&&(g&&g.end(1),_=Lb(l,ni,n[2]?{duration:gs,y:-10}:{duration:gs,x:50}),_.start())}),b=!0)},o(R){R&&(i||(i=Ve(t,yo,{duration:gs,opacity:0},!1)),i.run(0)),P(O,R),P(I,R),P(F,R),_&&_.invalidate(),g=Nb(l,ni,n[2]?{duration:gs,y:10}:{duration:gs,x:50}),b=!1},d(R){R&&w(e),R&&i&&i.end(),T&&T.d(),O&&O.d(R),M&&M.d(),I&&I.d(R),n[21](null),F&&F.d(R),R&&g&&g.end(),k=!1,De($)}}}function Oc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",ct(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Dc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=J(e,"click",ct(n[5])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function KS(n){let e,t,i,s,l=n[0]&&Mc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Mc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[23](null),i=!1,De(s)}}}let Wi,Mr=[];function eb(){return Wi=Wi||document.querySelector(".overlays"),Wi||(Wi=document.createElement("div"),Wi.classList.add("overlays"),document.body.appendChild(Wi)),Wi}let gs=150;function Ec(){return 1e3+eb().querySelectorAll(".overlay-panel-container.active").length}function JS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:d=void 0}=e,{beforeHide:p=void 0}=e;const m=wt(),_="op_"+z.randomString(10);let g,b,k,$,T="",C=o;function O(){typeof d=="function"&&d()===!1||t(0,o=!0)}function M(){typeof p=="function"&&p()===!1||t(0,o=!1)}function D(){return o}async function I(X){t(17,C=X),X?(k=document.activeElement,g==null||g.focus(),m("show")):(clearTimeout($),k==null||k.focus(),m("hide")),await un(),L()}function L(){g&&(o?t(6,g.style.zIndex=Ec(),g):t(6,g.style="",g))}function F(){z.pushUnique(Mr,_),document.body.classList.add("overlay-active")}function R(){z.removeByValue(Mr,_),Mr.length||document.body.classList.remove("overlay-active")}function N(X){o&&f&&X.code=="Escape"&&!z.isInput(X.target)&&g&&g.style.zIndex==Ec()&&(X.preventDefault(),M())}function q(X){o&&Y(b)}function Y(X,fe){fe&&t(8,T=""),X&&($||($=setTimeout(()=>{if(clearTimeout($),$=null,!X)return;if(X.scrollHeight-X.offsetHeight>0)t(8,T="scrollable");else{t(8,T="");return}X.scrollTop==0?t(8,T+=" scroll-top-reached"):X.scrollTop+X.offsetHeight==X.scrollHeight&&t(8,T+=" scroll-bottom-reached")},100)))}Xt(()=>(eb().appendChild(g),()=>{var X;clearTimeout($),R(),(X=g==null?void 0:g.classList)==null||X.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const B=()=>a?M():!0;function Z(X){se[X?"unshift":"push"](()=>{b=X,t(7,b)})}const ee=X=>Y(X.target);function ie(X){se[X?"unshift":"push"](()=>{g=X,t(6,g)})}return n.$$set=X=>{"class"in X&&t(1,l=X.class),"active"in X&&t(0,o=X.active),"popup"in X&&t(2,r=X.popup),"overlayClose"in X&&t(3,a=X.overlayClose),"btnClose"in X&&t(4,u=X.btnClose),"escClose"in X&&t(12,f=X.escClose),"beforeOpen"in X&&t(13,d=X.beforeOpen),"beforeHide"in X&&t(14,p=X.beforeHide),"$$scope"in X&&t(18,s=X.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&C!=o&&I(o),n.$$.dirty[0]&128&&Y(b,!0),n.$$.dirty[0]&64&&g&&L(),n.$$.dirty[0]&1&&(o?F():R())},[o,l,r,a,u,M,g,b,T,N,q,Y,f,d,p,O,D,C,s,i,B,Z,ee,ie]}class cn extends ve{constructor(e){super(),be(this,e,JS,KS,_e,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function ZS(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function GS(n){let e,t=n[2].referer+"",i,s;return{c(){e=y("a"),i=U(t),h(e,"href",s=n[2].referer),h(e,"target","_blank"),h(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),v(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&h(e,"href",s)},d(l){l&&w(e)}}}function XS(n){let e;return{c(){e=y("span"),e.textContent="N/A",h(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function QS(n){let e,t,i;return t=new x1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=y("div"),H(t.$$.fragment),h(e,"class","block")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),V(t)}}}function xS(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,d,p,m,_,g=n[2].status+"",b,k,$,T,C,O,M=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",D,I,L,F,R,N,q=n[2].auth+"",Y,B,Z,ee,ie,X,fe=n[2].url+"",G,ce,ge,Me,je,He,we,Ce,Je,ht,Ze,We=n[2].remoteIp+"",te,Re,Qe,Jt,Ne,$e,Xe=n[2].userIp+"",ke,Pe,nt,vt,En,rt,Zn=n[2].userAgent+"",os,Nl,bi,rs,Fl,Ri,as,dn,et,us,li,fs,qi,ji,Zt,nn;function Rl(Le,Oe){return Le[2].referer?GS:ZS}let W=Rl(n),K=W(n);const ne=[QS,XS],oe=[];function Te(Le,Oe){return Oe&4&&(as=null),as==null&&(as=!z.isEmpty(Le[2].meta)),as?0:1}return dn=Te(n,-1),et=oe[dn]=ne[dn](n),Zt=new mi({props:{date:n[2].created}}),{c(){e=y("table"),t=y("tbody"),i=y("tr"),s=y("td"),s.textContent="ID",l=E(),o=y("td"),a=U(r),u=E(),f=y("tr"),d=y("td"),d.textContent="Status",p=E(),m=y("td"),_=y("span"),b=U(g),k=E(),$=y("tr"),T=y("td"),T.textContent="Method",C=E(),O=y("td"),D=U(M),I=E(),L=y("tr"),F=y("td"),F.textContent="Auth",R=E(),N=y("td"),Y=U(q),B=E(),Z=y("tr"),ee=y("td"),ee.textContent="URL",ie=E(),X=y("td"),G=U(fe),ce=E(),ge=y("tr"),Me=y("td"),Me.textContent="Referer",je=E(),He=y("td"),K.c(),we=E(),Ce=y("tr"),Je=y("td"),Je.textContent="Remote IP",ht=E(),Ze=y("td"),te=U(We),Re=E(),Qe=y("tr"),Jt=y("td"),Jt.textContent="User IP",Ne=E(),$e=y("td"),ke=U(Xe),Pe=E(),nt=y("tr"),vt=y("td"),vt.textContent="UserAgent",En=E(),rt=y("td"),os=U(Zn),Nl=E(),bi=y("tr"),rs=y("td"),rs.textContent="Meta",Fl=E(),Ri=y("td"),et.c(),us=E(),li=y("tr"),fs=y("td"),fs.textContent="Created",qi=E(),ji=y("td"),H(Zt.$$.fragment),h(s,"class","min-width txt-hint txt-bold"),h(d,"class","min-width txt-hint txt-bold"),h(_,"class","label"),x(_,"label-danger",n[2].status>=400),h(T,"class","min-width txt-hint txt-bold"),h(F,"class","min-width txt-hint txt-bold"),h(ee,"class","min-width txt-hint txt-bold"),h(Me,"class","min-width txt-hint txt-bold"),h(Je,"class","min-width txt-hint txt-bold"),h(Jt,"class","min-width txt-hint txt-bold"),h(vt,"class","min-width txt-hint txt-bold"),h(rs,"class","min-width txt-hint txt-bold"),h(fs,"class","min-width txt-hint txt-bold"),h(e,"class","table-border")},m(Le,Oe){S(Le,e,Oe),v(e,t),v(t,i),v(i,s),v(i,l),v(i,o),v(o,a),v(t,u),v(t,f),v(f,d),v(f,p),v(f,m),v(m,_),v(_,b),v(t,k),v(t,$),v($,T),v($,C),v($,O),v(O,D),v(t,I),v(t,L),v(L,F),v(L,R),v(L,N),v(N,Y),v(t,B),v(t,Z),v(Z,ee),v(Z,ie),v(Z,X),v(X,G),v(t,ce),v(t,ge),v(ge,Me),v(ge,je),v(ge,He),K.m(He,null),v(t,we),v(t,Ce),v(Ce,Je),v(Ce,ht),v(Ce,Ze),v(Ze,te),v(t,Re),v(t,Qe),v(Qe,Jt),v(Qe,Ne),v(Qe,$e),v($e,ke),v(t,Pe),v(t,nt),v(nt,vt),v(nt,En),v(nt,rt),v(rt,os),v(t,Nl),v(t,bi),v(bi,rs),v(bi,Fl),v(bi,Ri),oe[dn].m(Ri,null),v(t,us),v(t,li),v(li,fs),v(li,qi),v(li,ji),j(Zt,ji,null),nn=!0},p(Le,Oe){var Be;(!nn||Oe&4)&&r!==(r=Le[2].id+"")&&le(a,r),(!nn||Oe&4)&&g!==(g=Le[2].status+"")&&le(b,g),(!nn||Oe&4)&&x(_,"label-danger",Le[2].status>=400),(!nn||Oe&4)&&M!==(M=((Be=Le[2].method)==null?void 0:Be.toUpperCase())+"")&&le(D,M),(!nn||Oe&4)&&q!==(q=Le[2].auth+"")&&le(Y,q),(!nn||Oe&4)&&fe!==(fe=Le[2].url+"")&&le(G,fe),W===(W=Rl(Le))&&K?K.p(Le,Oe):(K.d(1),K=W(Le),K&&(K.c(),K.m(He,null))),(!nn||Oe&4)&&We!==(We=Le[2].remoteIp+"")&&le(te,We),(!nn||Oe&4)&&Xe!==(Xe=Le[2].userIp+"")&&le(ke,Xe),(!nn||Oe&4)&&Zn!==(Zn=Le[2].userAgent+"")&&le(os,Zn);let Ye=dn;dn=Te(Le,Oe),dn===Ye?oe[dn].p(Le,Oe):(re(),P(oe[Ye],1,1,()=>{oe[Ye]=null}),ae(),et=oe[dn],et?et.p(Le,Oe):(et=oe[dn]=ne[dn](Le),et.c()),A(et,1),et.m(Ri,null));const Fe={};Oe&4&&(Fe.date=Le[2].created),Zt.$set(Fe)},i(Le){nn||(A(et),A(Zt.$$.fragment,Le),nn=!0)},o(Le){P(et),P(Zt.$$.fragment,Le),nn=!1},d(Le){Le&&w(e),K.d(),oe[dn].d(),V(Zt)}}}function e$(n){let e;return{c(){e=y("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function t$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Close',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function n$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[t$],header:[e$],default:[xS]},$$scope:{ctx:n}};return e=new cn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),V(e,s)}}}function i$(n,e,t){let i,s=new Br;function l(d){return t(2,s=d),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(d){se[d?"unshift":"push"](()=>{i=d,t(1,i)})}function u(d){pe.call(this,n,d)}function f(d){pe.call(this,n,d)}return[o,i,s,l,r,a,u,f]}class s$ extends ve{constructor(e){super(),be(this,e,i$,n$,_e,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function l$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Include requests by admins"),h(e,"type","checkbox"),h(e,"id",t=n[14]),h(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&h(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Ac(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new VS({props:l}),se.push(()=>me(e,"filter",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function Ic(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new l2({props:l}),se.push(()=>me(e,"filter",s)),e.$on("select",n[12]),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function o$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$=n[3],T,C=n[3],O,M;r=new Pa({}),r.$on("refresh",n[7]),p=new de({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[l$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Ko({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),_.$on("submit",n[9]);let D=Ac(n),I=Ic(n);return{c(){e=y("div"),t=y("header"),i=y("nav"),s=y("div"),l=U(n[5]),o=E(),H(r.$$.fragment),a=E(),u=y("div"),f=E(),d=y("div"),H(p.$$.fragment),m=E(),H(_.$$.fragment),g=E(),b=y("div"),k=E(),D.c(),T=E(),I.c(),O=Se(),h(s,"class","breadcrumb-item"),h(i,"class","breadcrumbs"),h(u,"class","flex-fill"),h(d,"class","inline-flex"),h(t,"class","page-header"),h(b,"class","clearfix m-b-base"),h(e,"class","page-header-wrapper m-b-0")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(t,o),j(r,t,null),v(t,a),v(t,u),v(t,f),v(t,d),j(p,d,null),v(e,m),j(_,e,null),v(e,g),v(e,b),v(e,k),D.m(e,null),S(L,T,F),I.m(L,F),S(L,O,F),M=!0},p(L,F){(!M||F&32)&&le(l,L[5]);const R={};F&49153&&(R.$$scope={dirty:F,ctx:L}),p.$set(R);const N={};F&4&&(N.value=L[2]),_.$set(N),F&8&&_e($,$=L[3])?(re(),P(D,1,1,Q),ae(),D=Ac(L),D.c(),A(D,1),D.m(e,null)):D.p(L,F),F&8&&_e(C,C=L[3])?(re(),P(I,1,1,Q),ae(),I=Ic(L),I.c(),A(I,1),I.m(O.parentNode,O)):I.p(L,F)},i(L){M||(A(r.$$.fragment,L),A(p.$$.fragment,L),A(_.$$.fragment,L),A(D),A(I),M=!0)},o(L){P(r.$$.fragment,L),P(p.$$.fragment,L),P(_.$$.fragment,L),P(D),P(I),M=!1},d(L){L&&w(e),V(r),V(p),V(_),D.d(L),L&&w(T),L&&w(O),I.d(L)}}}function r$(n){let e,t,i,s;e=new Dn({props:{$$slots:{default:[o$]},$$scope:{ctx:n}}});let l={};return i=new s$({props:l}),n[13](i),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(o,r){j(e,o,r),S(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){V(e,o),o&&w(t),n[13](null),V(i,o)}}}const Pc="includeAdminLogs";function a$(n,e,t){var k;let i,s;Ke(n,Lt,$=>t(5,s=$)),tn(Lt,s="Request logs",s);let l,o="",r=((k=window.localStorage)==null?void 0:k.getItem(Pc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function d(){r=this.checked,t(0,r)}const p=$=>t(2,o=$.detail);function m($){o=$,t(2,o)}function _($){o=$,t(2,o)}const g=$=>l==null?void 0:l.show($==null?void 0:$.detail);function b($){se[$?"unshift":"push"](()=>{l=$,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(Pc,r<<0)},[r,l,o,a,i,s,u,f,d,p,m,_,g,b]}class u$ extends ve{constructor(e){super(),be(this,e,a$,r$,_e,{})}}const ii=On([]),hi=On({}),No=On(!1),tb=On({});function f$(n){ii.update(e=>{const t=z.findByKey(e,"id",n);return t?hi.set(t):e.length&&hi.set(e[0]),e})}function c$(n){hi.update(e=>z.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ii.update(e=>(z.pushOrReplaceByKey(e,n,"id"),iu(),z.sortCollections(e)))}function d$(n){ii.update(e=>(z.removeByKey(e,"id",n.id),hi.update(t=>t.id===n.id?e[0]:t),iu(),e))}async function p$(n=null){No.set(!0);try{let e=await he.collections.getFullList(200,{sort:"+name"});e=z.sortCollections(e),ii.set(e);const t=n&&z.findByKey(e,"id",n);t?hi.set(t):e.length&&hi.set(e[0]),iu()}catch(e){he.errorResponseHandler(e)}No.set(!1)}function iu(){tb.update(n=>(ii.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.private)}));return e}),n))}const su=On({});function _n(n,e,t){su.set({text:n,yesCallback:e,noCallback:t})}function nb(){su.set({})}function Lc(n){let e,t,i;const s=n[17].default,l=Ct(s,n,n[16],null);return{c(){e=y("div"),l&&l.c(),h(e,"class",n[1]),x(e,"active",n[0])},m(o,r){S(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&Ot(l,s,o,o[16],i?Mt(s,o[16],r,null):Dt(o[16]),null),(!i||r&2)&&h(e,"class",o[1]),(!i||r&3)&&x(e,"active",o[0])},i(o){i||(A(l,o),o&&tt(()=>{i&&(t||(t=Ve(e,ni,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=Ve(e,ni,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function m$(n){let e,t,i,s,l=n[0]&&Lc(n);return{c(){e=y("div"),l&&l.c(),h(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=Lc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[19](null),i=!1,De(s)}}}function h$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,d,p,m,_,g=!1;const b=wt();function k(){t(0,o=!1),g=!1,clearTimeout(_)}function $(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(p!=null&&p.scrollIntoViewIfNeeded?p==null||p.scrollIntoViewIfNeeded():p!=null&&p.scrollIntoView&&(p==null||p.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function T(){o?k():$()}function C(B){return!d||B.classList.contains(u)||(m==null?void 0:m.contains(B))&&!d.contains(B)||d.contains(B)&&B.closest&&B.closest("."+u)}function O(B){(!o||C(B.target))&&(B.preventDefault(),B.stopPropagation(),T())}function M(B){(B.code==="Enter"||B.code==="Space")&&(!o||C(B.target))&&(B.preventDefault(),B.stopPropagation(),T())}function D(B){o&&r&&B.code==="Escape"&&(B.preventDefault(),k())}function I(B){o&&!(d!=null&&d.contains(B.target))?g=!0:g&&(g=!1)}function L(B){var Z;o&&g&&!(d!=null&&d.contains(B.target))&&!(m!=null&&m.contains(B.target))&&!((Z=B.target)!=null&&Z.closest(".flatpickr-calendar"))&&k()}function F(B){I(B),L(B)}function R(B){N(),t(15,m=B||(d==null?void 0:d.parentNode)),m&&(d==null||d.addEventListener("click",O),m.addEventListener("click",O),m.addEventListener("keydown",M))}function N(){clearTimeout(_),m&&(d==null||d.removeEventListener("click",O),m.removeEventListener("click",O),m.removeEventListener("keydown",M))}Xt(()=>(R(),()=>N()));function q(B){se[B?"unshift":"push"](()=>{p=B,t(3,p)})}function Y(B){se[B?"unshift":"push"](()=>{d=B,t(2,d)})}return n.$$set=B=>{"trigger"in B&&t(8,l=B.trigger),"active"in B&&t(0,o=B.active),"escClose"in B&&t(9,r=B.escClose),"autoScroll"in B&&t(10,a=B.autoScroll),"closableClass"in B&&t(11,u=B.closableClass),"class"in B&&t(1,f=B.class),"$$scope"in B&&t(16,s=B.$$scope)},n.$$.update=()=>{var B,Z;n.$$.dirty&260&&d&&R(l),n.$$.dirty&32769&&(o?((B=m==null?void 0:m.classList)==null||B.add("active"),b("show")):((Z=m==null?void 0:m.classList)==null||Z.remove("active"),b("hide")))},[o,f,d,p,D,I,L,F,l,r,a,u,k,$,T,m,s,i,q,Y]}class Hn extends ve{constructor(e){super(),be(this,e,h$,m$,_e,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function Nc(n,e,t){const i=n.slice();return i[27]=e[t],i}function _$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("input"),s=E(),l=y("label"),o=U("Unique"),h(e,"type","checkbox"),h(e,"id",t=n[30]),e.checked=i=n[3].unique,h(l,"for",r=n[30])},m(f,d){S(f,e,d),S(f,s,d),S(f,l,d),v(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,d){d[0]&1073741824&&t!==(t=f[30])&&h(e,"id",t),d[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),d[0]&1073741824&&r!==(r=f[30])&&h(l,"for",r)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function g$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Pt(o,r(n)),se.push(()=>me(e,"value",l))),{c(){e&&H(e.$$.fragment),i=Se()},m(a,u){e&&j(e,a,u),S(a,i,u),s=!0},p(a,u){var d;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(d=a[0])==null?void 0:d.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],ye(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){re();const p=e;P(p.$$.fragment,1,0,()=>{V(p,1)}),ae()}o?(e=Pt(o,r(a)),se.push(()=>me(e,"value",l)),H(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&V(e,a)}}}function b$(n){let e;return{c(){e=y("textarea"),e.disabled=!0,h(e,"rows","7"),h(e,"placeholder","Loading...")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function v$(n){let e,t,i,s;const l=[b$,g$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function Fc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[v$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Fc(n);return{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),r&&r.c(),l=Se()},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),r&&r.m(a,u),S(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const d={};u[0]&64&&(d.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(d.$$scope={dirty:u,ctx:a}),i.$set(d),a[10].length>0?r?r.p(a,u):(r=Fc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),o=!1},d(a){V(e,a),a&&w(t),V(i,a),a&&w(s),r&&r.d(a),a&&w(l)}}}function k$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=y("h4"),i=U(t),s=U(" index")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&le(i,t)},d(l){l&&w(e)}}}function qc(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){S(s,e,l),t||(i=[Ee(Ue.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:Q,d(s){s&&w(e),t=!1,De(i)}}}function w$(n){let e,t,i,s,l,o,r=n[5]!=""&&qc(n);return{c(){r&&r.c(),e=E(),t=y("button"),t.innerHTML='Cancel',i=E(),s=y("button"),s.innerHTML='Set index',h(t,"type","button"),h(t,"class","btn btn-transparent"),h(s,"type","button"),h(s,"class","btn"),x(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=qc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&x(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&w(i),a&&w(s),l=!1,De(o)}}}function S$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[w$],header:[k$],default:[y$]},$$scope:{ctx:n}};for(let l=0;lie.name==B);ee?z.removeByValue(Z.columns,ee):z.pushUnique(Z.columns,{name:B}),t(2,p=z.buildIndex(Z))}Xt(async()=>{t(8,g=!0);try{t(7,_=(await at(()=>import("./CodeEditor-becbd613.js"),["./CodeEditor-becbd613.js","./index-6f704b4c.js"],import.meta.url)).default)}catch(B){console.warn(B)}t(8,g=!1)});const M=()=>T(),D=()=>k(),I=()=>C(),L=B=>{t(3,s.unique=B.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,p=z.buildIndex(s))};function F(B){p=B,t(2,p)}const R=B=>O(B);function N(B){se[B?"unshift":"push"](()=>{f=B,t(4,f)})}function q(B){pe.call(this,n,B)}function Y(B){pe.call(this,n,B)}return n.$$set=B=>{e=qe(qe({},e),Ut(B)),t(14,r=Ge(e,o)),"collection"in B&&t(0,u=B.collection)},n.$$.update=()=>{var B,Z,ee;n.$$.dirty[0]&1&&t(10,i=(((Z=(B=u==null?void 0:u.schema)==null?void 0:B.filter(ie=>!ie.toDelete))==null?void 0:Z.map(ie=>ie.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=z.parseIndex(p)),n.$$.dirty[0]&8&&t(9,l=((ee=s.columns)==null?void 0:ee.map(ie=>ie.name))||[])},[u,k,p,s,f,d,m,_,g,l,i,T,C,O,r,b,M,D,I,L,F,R,N,q,Y]}class T$ extends ve{constructor(e){super(),be(this,e,$$,S$,_e,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function jc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=z.parseIndex(i[10]);return i[11]=s,i}function Vc(n){let e;return{c(){e=y("strong"),e.textContent="Unique:"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hc(n){var p;let e,t,i,s=((p=n[11].columns)==null?void 0:p.map(zc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Vc();function d(){return n[4](n[10],n[13])}return{c(){var m,_;e=y("button"),f&&f.c(),t=E(),i=y("span"),l=U(s),h(i,"class","txt"),h(e,"type","button"),h(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var g,b;S(m,e,_),f&&f.m(e,null),v(e,t),v(e,i),v(i,l),a||(u=[Ee(r=Ue.call(null,e,((b=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:b.message)||"")),J(e,"click",d)],a=!0)},p(m,_){var g,b,k,$,T;n=m,n[11].unique?f||(f=Vc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(zc).join(", "))+"")&&le(l,s),_&4&&o!==(o="label link-primary "+((k=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&k.message?"label-danger":"")+" svelte-167lbwu")&&h(e,"class",o),r&&zt(r.update)&&_&4&&r.update.call(null,((T=($=n[2].indexes)==null?void 0:$[n[13]])==null?void 0:T.message)||"")},d(m){m&&w(e),f&&f.d(),a=!1,De(u)}}}function C$(n){var C,O,M;let e,t,i=(((O=(C=n[0])==null?void 0:C.indexes)==null?void 0:O.length)||0)+"",s,l,o,r,a,u,f,d,p,m,_,g,b=((M=n[0])==null?void 0:M.indexes)||[],k=[];for(let D=0;Dme(d,"collection",$)),d.$on("remove",n[8]),d.$on("submit",n[9]),{c(){e=y("div"),t=U("Unique constraints and indexes ("),s=U(i),l=U(")"),o=E(),r=y("div");for(let D=0;D+ New index`,f=E(),H(d.$$.fragment),h(e,"class","section-title"),h(u,"type","button"),h(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),h(r,"class","indexes-list svelte-167lbwu")},m(D,I){S(D,e,I),v(e,t),v(e,s),v(e,l),S(D,o,I),S(D,r,I);for(let L=0;Lp=!1)),d.$set(L)},i(D){m||(A(d.$$.fragment,D),m=!0)},o(D){P(d.$$.fragment,D),m=!1},d(D){D&&w(e),D&&w(o),D&&w(r),pt(k,D),D&&w(f),n[6](null),V(d,D),_=!1,g()}}}const zc=n=>n.name;function M$(n,e,t){let i;Ke(n,_i,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let g=0;gl==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function u(m){se[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const d=m=>{for(let _=0;_{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,d,p]}class O$ extends ve{constructor(e){super(),be(this,e,M$,C$,_e,{collection:0})}}function Bc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Uc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function d(...p){return n[5](n[6],...p)}return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),o=U(l),r=E(),h(t,"class","icon "+n[6].icon+" svelte-1p626x7"),h(s,"class","txt"),h(e,"tabindex","0"),h(e,"class","dropdown-item closable svelte-1p626x7")},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),v(s,o),v(e,r),a||(u=[J(e,"click",Mn(f)),J(e,"keydown",Mn(d))],a=!0)},p(p,m){n=p},d(p){p&&w(e),a=!1,De(u)}}}function D$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class I$ extends ve{constructor(e){super(),be(this,e,A$,E$,_e,{class:0})}}const P$=n=>({interactive:n&128,hasErrors:n&64}),Wc=n=>({interactive:n[7],hasErrors:n[6]}),L$=n=>({interactive:n&128,hasErrors:n&64}),Yc=n=>({interactive:n[7],hasErrors:n[6]}),N$=n=>({interactive:n&128,hasErrors:n&64}),Kc=n=>({interactive:n[7],hasErrors:n[6]}),F$=n=>({interactive:n&128,hasErrors:n&64}),Jc=n=>({interactive:n[7],hasErrors:n[6]});function Zc(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","drag-handle-wrapper"),h(e,"draggable","true"),h(e,"aria-label","Sort")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gc(n){let e,t,i,s;return{c(){e=y("span"),h(e,"class","marker marker-required")},m(l,o){S(l,e,o),i||(s=Ee(t=Ue.call(null,e,n[5])),i=!0)},p(l,o){t&&zt(t.update)&&o&32&&t.update.call(null,l[5])},d(l){l&&w(e),i=!1,s()}}}function R$(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_=n[0].required&&Gc(n);return{c(){e=y("div"),_&&_.c(),t=E(),i=y("div"),s=y("i"),o=E(),r=y("input"),h(e,"class","markers"),h(s,"class",l=z.getFieldTypeIcon(n[0].type)),h(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),x(i,"txt-disabled",!n[7]),h(r,"type","text"),r.required=!0,r.disabled=a=!n[7],r.readOnly=u=n[0].id&&n[0].system,h(r,"spellcheck","false"),r.autofocus=f=!n[0].id,h(r,"placeholder","Field name"),r.value=d=n[0].name},m(g,b){S(g,e,b),_&&_.m(e,null),S(g,t,b),S(g,i,b),v(i,s),S(g,o,b),S(g,r,b),n[15](r),n[0].id||r.focus(),p||(m=J(r,"input",n[16]),p=!0)},p(g,b){g[0].required?_?_.p(g,b):(_=Gc(g),_.c(),_.m(e,null)):_&&(_.d(1),_=null),b&1&&l!==(l=z.getFieldTypeIcon(g[0].type))&&h(s,"class",l),b&128&&x(i,"txt-disabled",!g[7]),b&128&&a!==(a=!g[7])&&(r.disabled=a),b&1&&u!==(u=g[0].id&&g[0].system)&&(r.readOnly=u),b&1&&f!==(f=!g[0].id)&&(r.autofocus=f),b&1&&d!==(d=g[0].name)&&r.value!==d&&(r.value=d)},d(g){g&&w(e),_&&_.d(),g&&w(t),g&&w(i),g&&w(o),g&&w(r),n[15](null),p=!1,m()}}}function q$(n){let e,t,i;return{c(){e=y("button"),t=y("i"),h(t,"class","ri-settings-3-line"),h(e,"type","button"),h(e,"aria-label","Field options"),h(e,"class",i="btn btn-sm btn-circle btn-transparent options-trigger "+(n[6]?"btn-danger":"btn-hint"))},m(s,l){S(s,e,l),v(e,t),n[17](e)},p(s,l){l&64&&i!==(i="btn btn-sm btn-circle btn-transparent options-trigger "+(s[6]?"btn-danger":"btn-hint"))&&h(e,"class",i)},d(s){s&&w(e),n[17](null)}}}function j$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),h(e,"aria-label","Restore")},m(s,l){S(s,e,l),t||(i=[Ee(Ue.call(null,e,"Restore")),J(e,"click",n[10])],t=!0)},p:Q,d(s){s&&w(e),t=!1,De(i)}}}function Xc(n){let e,t;return e=new Hn({props:{class:"dropdown dropdown-block schema-field-dropdown",trigger:n[3],$$slots:{default:[z$]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.trigger=i[3]),s&8388833&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function V$(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),o=U(n[5]),r=E(),a=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(a,"class","ri-information-line link-hint"),h(s,"for",f=n[25])},m(m,_){S(m,e,_),e.checked=n[0].required,S(m,i,_),S(m,s,_),v(s,l),v(l,o),v(s,r),v(s,a),d||(p=[J(e,"change",n[18]),Ee(u=Ue.call(null,a,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(n[0])}.`,position:"right"}))],d=!0)},p(m,_){_&33554432&&t!==(t=m[25])&&h(e,"id",t),_&1&&(e.checked=m[0].required),_&32&&le(o,m[5]),u&&zt(u.update)&&_&1&&u.update.call(null,{text:`Requires the field value NOT to be ${z.zeroDefaultStr(m[0])}.`,position:"right"}),_&33554432&&f!==(f=m[25])&&h(s,"for",f)},d(m){m&&w(e),m&&w(i),m&&w(s),d=!1,De(p)}}}function Qc(n){let e,t,i,s,l,o,r,a,u;return a=new Hn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[H$]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=E(),s=y("div"),l=y("button"),o=y("i"),r=E(),H(a.$$.fragment),h(t,"class","flex-fill"),h(o,"class","ri-more-line"),h(l,"type","button"),h(l,"aria-label","More"),h(l,"class","btn btn-circle btn-sm btn-transparent"),h(s,"class","inline-flex flex-gap-sm flex-nowrap"),h(e,"class","col-sm-4 m-l-auto txt-right")},m(f,d){S(f,e,d),v(e,t),v(e,i),v(e,s),v(s,l),v(l,o),v(l,r),j(a,l,null),u=!0},p(f,d){const p={};d&8388608&&(p.$$scope={dirty:d,ctx:f}),a.$set(p)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){P(a.$$.fragment,f),u=!1},d(f){f&&w(e),V(a)}}}function H$(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Remove',h(e,"type","button"),h(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[9]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function z$(n){let e,t,i,s,l,o,r,a,u;const f=n[13].options,d=Ct(f,n,n[23],Kc),p=n[13].beforeNonempty,m=Ct(p,n,n[23],Yc);o=new de({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[V$,({uniqueId:k})=>({25:k}),({uniqueId:k})=>k?33554432:0]},$$scope:{ctx:n}}});const _=n[13].afterNonempty,g=Ct(_,n,n[23],Wc);let b=!n[0].toDelete&&Qc(n);return{c(){e=y("div"),t=y("div"),d&&d.c(),i=E(),m&&m.c(),s=E(),l=y("div"),H(o.$$.fragment),r=E(),g&&g.c(),a=E(),b&&b.c(),h(t,"class","col-sm-12 hidden-empty"),h(l,"class","col-sm-4"),h(e,"class","grid grid-sm")},m(k,$){S(k,e,$),v(e,t),d&&d.m(t,null),v(e,i),m&&m.m(e,null),v(e,s),v(e,l),j(o,l,null),v(e,r),g&&g.m(e,null),v(e,a),b&&b.m(e,null),u=!0},p(k,$){d&&d.p&&(!u||$&8388800)&&Ot(d,f,k,k[23],u?Mt(f,k[23],$,N$):Dt(k[23]),Kc),m&&m.p&&(!u||$&8388800)&&Ot(m,p,k,k[23],u?Mt(p,k[23],$,L$):Dt(k[23]),Yc);const T={};$&41943073&&(T.$$scope={dirty:$,ctx:k}),o.$set(T),g&&g.p&&(!u||$&8388800)&&Ot(g,_,k,k[23],u?Mt(_,k[23],$,P$):Dt(k[23]),Wc),k[0].toDelete?b&&(re(),P(b,1,1,()=>{b=null}),ae()):b?(b.p(k,$),$&1&&A(b,1)):(b=Qc(k),b.c(),A(b,1),b.m(e,null))},i(k){u||(A(d,k),A(m,k),A(o.$$.fragment,k),A(g,k),A(b),u=!0)},o(k){P(d,k),P(m,k),P(o.$$.fragment,k),P(g,k),P(b),u=!1},d(k){k&&w(e),d&&d.d(k),m&&m.d(k),V(o),g&&g.d(k),b&&b.d()}}}function B$(n){let e,t,i,s,l,o,r,a,u,f,d,p=n[7]&&Zc();s=new de({props:{class:"form-field required m-0 "+(n[7]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[R$]},$$scope:{ctx:n}}});const m=n[13].default,_=Ct(m,n,n[23],Jc);function g(T,C){if(T[0].toDelete)return j$;if(T[7])return q$}let b=g(n),k=b&&b(n),$=n[7]&&Xc(n);return{c(){e=y("div"),t=y("div"),p&&p.c(),i=E(),H(s.$$.fragment),l=E(),_&&_.c(),o=E(),k&&k.c(),r=E(),$&&$.c(),h(t,"class","schema-field-header"),h(e,"draggable",!0),h(e,"class","schema-field"),x(e,"drag-over",n[4])},m(T,C){S(T,e,C),v(e,t),p&&p.m(t,null),v(t,i),j(s,t,null),v(t,l),_&&_.m(t,null),v(t,o),k&&k.m(t,null),v(e,r),$&&$.m(e,null),u=!0,f||(d=[J(e,"dragstart",n[19]),J(e,"dragenter",n[20]),J(e,"drop",ct(n[21])),J(e,"dragleave",n[22]),J(e,"dragover",ct(n[14]))],f=!0)},p(T,[C]){T[7]?p||(p=Zc(),p.c(),p.m(t,i)):p&&(p.d(1),p=null);const O={};C&128&&(O.class="form-field required m-0 "+(T[7]?"":"disabled")),C&2&&(O.name="schema."+T[1]+".name"),C&8388773&&(O.$$scope={dirty:C,ctx:T}),s.$set(O),_&&_.p&&(!u||C&8388800)&&Ot(_,m,T,T[23],u?Mt(m,T[23],C,F$):Dt(T[23]),Jc),b===(b=g(T))&&k?k.p(T,C):(k&&k.d(1),k=b&&b(T),k&&(k.c(),k.m(t,null))),T[7]?$?($.p(T,C),C&128&&A($,1)):($=Xc(T),$.c(),A($,1),$.m(e,null)):$&&(re(),P($,1,1,()=>{$=null}),ae()),(!u||C&16)&&x(e,"drag-over",T[4])},i(T){u||(A(s.$$.fragment,T),A(_,T),A($),T&&tt(()=>{u&&(a||(a=Ve(e,St,{duration:150},!0)),a.run(1))}),u=!0)},o(T){P(s.$$.fragment,T),P(_,T),P($),T&&(a||(a=Ve(e,St,{duration:150},!1)),a.run(0)),u=!1},d(T){T&&w(e),p&&p.d(),V(s),_&&_.d(T),k&&k.d(),$&&$.d(),T&&a&&a.end(),f=!1,De(d)}}}function U$(n,e,t){let i,s,l,o;Ke(n,_i,N=>t(12,o=N));let{$$slots:r={},$$scope:a}=e,{key:u=""}=e,{field:f=new vn}=e,d,p,m=!1;const _=wt(),g={bool:"Nonfalsey",number:"Nonzero"};function b(){f.id?t(0,f.toDelete=!0,f):_("remove")}function k(){t(0,f.toDelete=!1,f),fn({})}function $(N){return z.slugify(N)}Xt(()=>{f.onMountSelect&&(t(0,f.onMountSelect=!1,f),d==null||d.select())});function T(N){pe.call(this,n,N)}function C(N){se[N?"unshift":"push"](()=>{d=N,t(2,d)})}const O=N=>{const q=f.name;t(0,f.name=$(N.target.value),f),N.target.value=f.name,_("rename",{oldName:q,newName:f.name})};function M(N){se[N?"unshift":"push"](()=>{p=N,t(3,p)})}function D(){f.required=this.checked,t(0,f)}const I=N=>{if(!N.target.classList.contains("drag-handle-wrapper")){N.preventDefault();return}const q=document.createElement("div");N.dataTransfer.setDragImage(q,0,0),i&&_("dragstart",N)},L=N=>{i&&(t(4,m=!0),_("dragenter",N))},F=N=>{i&&(t(4,m=!1),_("drop",N))},R=N=>{i&&(t(4,m=!1),_("dragleave",N))};return n.$$set=N=>{"key"in N&&t(1,u=N.key),"field"in N&&t(0,f=N.field),"$$scope"in N&&t(23,a=N.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&f.toDelete&&f.originalName&&f.name!==f.originalName&&t(0,f.name=f.originalName,f),n.$$.dirty&1&&!f.originalName&&f.name&&t(0,f.originalName=f.name,f),n.$$.dirty&1&&typeof f.toDelete>"u"&&t(0,f.toDelete=!1,f),n.$$.dirty&1&&f.required&&t(0,f.nullable=!1,f),n.$$.dirty&1&&t(7,i=!f.toDelete&&!(f.id&&f.system)),n.$$.dirty&4098&&t(6,s=!z.isEmpty(z.getNestedVal(o,`schema.${u}`))),n.$$.dirty&1&&t(5,l=g[f==null?void 0:f.type]||"Nonempty")},[f,u,d,p,m,l,s,i,_,b,k,$,o,r,T,C,O,M,D,I,L,F,R,a]}class si extends ve{constructor(e){super(),be(this,e,U$,B$,_e,{key:1,field:0})}}function W$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Min length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min","0")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&ue(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Y$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=U("Max length"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","number"),h(l,"id",o=n[13]),h(l,"step","1"),h(l,"min",r=n[0].options.min||0)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),ue(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&8192&&i!==(i=f[13])&&h(e,"for",i),d&8192&&o!==(o=f[13])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min||0)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&ue(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function K$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Regex pattern"),s=E(),l=y("input"),h(e,"for",i=n[13]),h(l,"type","text"),h(l,"id",o=n[13]),h(l,"placeholder","Valid Go regular expression, eg. ^w+$")},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&h(e,"for",i),f&8192&&o!==(o=u[13])&&h(l,"id",o),f&1&&l.value!==u[0].options.pattern&&ue(l,u[0].options.pattern)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function J$(n){let e,t,i,s,l,o,r,a,u,f;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[W$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[Y$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[K$,({uniqueId:d})=>({13:d}),({uniqueId:d})=>d?8192:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),H(u.$$.fragment),h(t,"class","col-sm-3"),h(l,"class","col-sm-3"),h(a,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(d,p){S(d,e,p),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),v(e,r),v(e,a),j(u,a,null),f=!0},p(d,p){const m={};p&2&&(m.name="schema."+d[1]+".options.min"),p&24577&&(m.$$scope={dirty:p,ctx:d}),i.$set(m);const _={};p&2&&(_.name="schema."+d[1]+".options.max"),p&24577&&(_.$$scope={dirty:p,ctx:d}),o.$set(_);const g={};p&2&&(g.name="schema."+d[1]+".options.pattern"),p&24577&&(g.$$scope={dirty:p,ctx:d}),u.$set(g)},i(d){f||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),f=!0)},o(d){P(i.$$.fragment,d),P(o.$$.fragment,d),P(u.$$.fragment,d),f=!1},d(d){d&&w(e),V(i),V(o),V(u)}}}function Z$(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[J$]},$$scope:{ctx:n}};for(let r=0;rme(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),e.$on("drop",n[9]),e.$on("dragstart",n[10]),e.$on("dragenter",n[11]),e.$on("dragleave",n[12]),{c(){H(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?$t(s,[a&2&&{key:r[1]},a&4&&Wt(r[2])]):{};a&16387&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function G$(n,e,t){const i=["field","key"];let s=Ge(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(k){l=k,t(0,l)}function d(k){pe.call(this,n,k)}function p(k){pe.call(this,n,k)}function m(k){pe.call(this,n,k)}function _(k){pe.call(this,n,k)}function g(k){pe.call(this,n,k)}function b(k){pe.call(this,n,k)}return n.$$set=k=>{e=qe(qe({},e),Ut(k)),t(2,s=Ge(e,i)),"field"in k&&t(0,l=k.field),"key"in k&&t(1,o=k.key)},[l,o,s,r,a,u,f,d,p,m,_,g,b]}class X$ extends ve{constructor(e){super(),be(this,e,G$,Z$,_e,{field:0,key:1})}}function Q$(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Min"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&h(e,"for",i),f&4096&&o!==(o=u[12])&&h(l,"id",o),f&1&>(l.value)!==u[0].options.min&&ue(l,u[0].options.min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function x$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=U("Max"),s=E(),l=y("input"),h(e,"for",i=n[12]),h(l,"type","number"),h(l,"id",o=n[12]),h(l,"min",r=n[0].options.min)},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),ue(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,d){d&4096&&i!==(i=f[12])&&h(e,"for",i),d&4096&&o!==(o=f[12])&&h(l,"id",o),d&1&&r!==(r=f[0].options.min)&&h(l,"min",r),d&1&>(l.value)!==f[0].options.max&&ue(l,f[0].options.max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function eT(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[Q$,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[x$,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.max"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),V(i),V(o)}}}function tT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[eT]},$$scope:{ctx:n}};for(let r=0;rme(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){H(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?$t(s,[a&2&&{key:r[1]},a&4&&Wt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function nT(n,e,t){const i=["field","key"];let s=Ge(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=gt(this.value),t(0,l)}function a(){l.options.max=gt(this.value),t(0,l)}function u(b){l=b,t(0,l)}function f(b){pe.call(this,n,b)}function d(b){pe.call(this,n,b)}function p(b){pe.call(this,n,b)}function m(b){pe.call(this,n,b)}function _(b){pe.call(this,n,b)}function g(b){pe.call(this,n,b)}return n.$$set=b=>{e=qe(qe({},e),Ut(b)),t(2,s=Ge(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class iT extends ve{constructor(e){super(),be(this,e,nT,tT,_e,{field:0,key:1})}}function sT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rme(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){H(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?$t(s,[a&2&&{key:r[1]},a&4&&Wt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function lT(n,e,t){const i=["field","key"];let s=Ge(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){pe.call(this,n,_)}function u(_){pe.call(this,n,_)}function f(_){pe.call(this,n,_)}function d(_){pe.call(this,n,_)}function p(_){pe.call(this,n,_)}function m(_){pe.call(this,n,_)}return n.$$set=_=>{e=qe(qe({},e),Ut(_)),t(2,s=Ge(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class oT extends ve{constructor(e){super(),be(this,e,lT,sT,_e,{field:0,key:1})}}function rT(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=z.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=qe(qe({},e),Ut(u)),t(3,l=Ge(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class Rs extends ve{constructor(e){super(),be(this,e,aT,rT,_e,{value:0,separator:1})}}function uT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[3](b)}let g={id:n[12],disabled:!z.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(g.value=n[0].options.exceptDomains),r=new Rs({props:g}),se.push(()=>me(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),H(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),j(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ue.call(null,s,{text:`List of domains that are NOT allowed. This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!z.isEmpty(b[0].options.onlyDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),V(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function fT(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[4](b)}let g={id:n[12]+".options.onlyDomains",disabled:!z.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(g.value=n[0].options.onlyDomains),r=new Rs({props:g}),se.push(()=>me(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),H(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]+".options.onlyDomains"),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),j(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ue.call(null,s,{text:`List of domains that are ONLY allowed. This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]+".options.onlyDomains"))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]+".options.onlyDomains"),k&1&&($.disabled=!z.isEmpty(b[0].options.exceptDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),V(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function cT(n){let e,t,i,s,l,o,r;return i=new de({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[uT,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[fT,({uniqueId:a})=>({12:a}),({uniqueId:a})=>a?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),h(t,"class","col-sm-6"),h(l,"class","col-sm-6"),h(e,"class","grid grid-sm")},m(a,u){S(a,e,u),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&12289&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};u&2&&(d.name="schema."+a[1]+".options.onlyDomains"),u&12289&&(d.$$scope={dirty:u,ctx:a}),o.$set(d)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),V(i),V(o)}}}function dT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[cT]},$$scope:{ctx:n}};for(let r=0;rme(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),e.$on("drop",n[8]),e.$on("dragstart",n[9]),e.$on("dragenter",n[10]),e.$on("dragleave",n[11]),{c(){H(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?$t(s,[a&2&&{key:r[1]},a&4&&Wt(r[2])]):{};a&8195&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function pT(n,e,t){const i=["field","key"];let s=Ge(e,i),{field:l}=e,{key:o=""}=e;function r(b){n.$$.not_equal(l.options.exceptDomains,b)&&(l.options.exceptDomains=b,t(0,l))}function a(b){n.$$.not_equal(l.options.onlyDomains,b)&&(l.options.onlyDomains=b,t(0,l))}function u(b){l=b,t(0,l)}function f(b){pe.call(this,n,b)}function d(b){pe.call(this,n,b)}function p(b){pe.call(this,n,b)}function m(b){pe.call(this,n,b)}function _(b){pe.call(this,n,b)}function g(b){pe.call(this,n,b)}return n.$$set=b=>{e=qe(qe({},e),Ut(b)),t(2,s=Ge(e,i)),"field"in b&&t(0,l=b.field),"key"in b&&t(1,o=b.key)},[l,o,s,r,a,u,f,d,p,m,_,g]}class ib extends ve{constructor(e){super(),be(this,e,pT,dT,_e,{field:0,key:1})}}function mT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rme(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){H(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?$t(s,[a&2&&{key:r[1]},a&4&&Wt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function hT(n,e,t){const i=["field","key"];let s=Ge(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){pe.call(this,n,_)}function u(_){pe.call(this,n,_)}function f(_){pe.call(this,n,_)}function d(_){pe.call(this,n,_)}function p(_){pe.call(this,n,_)}function m(_){pe.call(this,n,_)}return n.$$set=_=>{e=qe(qe({},e),Ut(_)),t(2,s=Ge(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class _T extends ve{constructor(e){super(),be(this,e,hT,mT,_e,{field:0,key:1})}}function gT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rme(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),e.$on("drop",n[6]),e.$on("dragstart",n[7]),e.$on("dragenter",n[8]),e.$on("dragleave",n[9]),{c(){H(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?$t(s,[a&2&&{key:r[1]},a&4&&Wt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ye(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function bT(n,e,t){const i=["field","key"];let s=Ge(e,i),{field:l}=e,{key:o=""}=e;function r(_){l=_,t(0,l)}function a(_){pe.call(this,n,_)}function u(_){pe.call(this,n,_)}function f(_){pe.call(this,n,_)}function d(_){pe.call(this,n,_)}function p(_){pe.call(this,n,_)}function m(_){pe.call(this,n,_)}return n.$$set=_=>{e=qe(qe({},e),Ut(_)),t(2,s=Ge(e,i)),"field"in _&&t(0,l=_.field),"key"in _&&t(1,o=_.key)},[l,o,s,r,a,u,f,d,p,m]}class vT extends ve{constructor(e){super(),be(this,e,bT,gT,_e,{field:0,key:1})}}var Or=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ss={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},yl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},pn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Ln=function(n){return n===!0?1:0};function xc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Dr=function(n){return n instanceof Array?n:[n]};function sn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function so(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function sb(n,e){if(e(n))return n;if(n.parentNode)return sb(n.parentNode,e)}function lo(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function kn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Er=function(){},Fo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},yT={D:Er,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Ln(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Er,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Er,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},Zi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},al={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[al.w(n,e,t)]},F:function(n,e,t){return Fo(al.n(n,e,t)-1,!1,e)},G:function(n,e,t){return pn(al.h(n,e,t))},H:function(n){return pn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Ln(n.getHours()>11)]},M:function(n,e){return Fo(n.getMonth(),!0,e)},S:function(n){return pn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return pn(n.getFullYear(),4)},d:function(n){return pn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return pn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return pn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},lb=function(n){var e=n.config,t=e===void 0?Ss:e,i=n.l10n,s=i===void 0?yl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(d,p,m){return al[d]&&m[p-1]!=="\\"?al[d](r,f,t):d!=="\\"?d:""}).join("")}},ha=function(n){var e=n.config,t=e===void 0?Ss:e,i=n.l10n,s=i===void 0?yl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,d=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var p=o||(t||Ss).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,p);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var _=void 0,g=[],b=0,k=0,$="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ne=Ir(t.config);K.setHours(ne.hours,ne.minutes,ne.seconds,K.getMilliseconds()),t.selectedDates=[K],t.latestSelectedDateObj=K}W!==void 0&&W.type!=="blur"&&Rl(W);var oe=t._input.value;d(),Zt(),t._input.value!==oe&&t._debouncedChange()}function u(W,K){return W%12+12*Ln(K===t.l10n.amPM[1])}function f(W){switch(W%24){case 0:case 12:return 12;default:return W%12}}function d(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var W=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,K=(parseInt(t.minuteElement.value,10)||0)%60,ne=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(W=u(W,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&wn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&wn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Ie=Ar(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Le=Ar(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Oe=Ar(W,K,ne);if(Oe>Le&&Oe=12)]),t.secondElement!==void 0&&(t.secondElement.value=pn(ne)))}function _(W){var K=kn(W),ne=parseInt(K.value)+(W.delta||0);(ne/1e3>1||W.key==="Enter"&&!/[^\d]/.test(ne.toString()))&&we(ne)}function g(W,K,ne,oe){if(K instanceof Array)return K.forEach(function(Te){return g(W,Te,ne,oe)});if(W instanceof Array)return W.forEach(function(Te){return g(Te,K,ne,oe)});W.addEventListener(K,ne,oe),t._handlers.push({remove:function(){return W.removeEventListener(K,ne,oe)}})}function b(){et("onChange")}function k(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ne){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ne+"]"),function(oe){return g(oe,"click",t[ne])})}),t.isMobile){as();return}var W=xc(te,50);if(t._debouncedChange=xc(b,$T),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(ne){t.config.mode==="range"&&We(kn(ne))}),g(t._input,"keydown",Ze),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Ze),!t.config.inline&&!t.config.static&&g(window,"resize",W),window.ontouchstart!==void 0?g(window.document,"touchstart",He):g(window.document,"mousedown",He),g(window.document,"focus",He,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",nn),g(t.monthNav,["keyup","increment"],_),g(t.daysContainer,"click",En)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var K=function(ne){return kn(ne).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",T),g([t.hourElement,t.minuteElement],["focus","click"],K),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(ne){a(ne)})}t.config.allowInput&&g(t._input,"blur",ht)}function $(W,K){var ne=W!==void 0?t.parseDate(W):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(W);var Te=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Te&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ie=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ie,t.element),Ie.appendChild(t.element),t.altInput&&Ie.appendChild(t.altInput),Ie.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(W,K,ne,oe){var Te=Ce(K,!0),Ie=ft("span",W,K.getDate().toString());return Ie.dateObj=K,Ie.$i=oe,Ie.setAttribute("aria-label",t.formatDate(K,t.config.ariaDateFormat)),W.indexOf("hidden")===-1&&wn(K,t.now)===0&&(t.todayDateElem=Ie,Ie.classList.add("today"),Ie.setAttribute("aria-current","date")),Te?(Ie.tabIndex=-1,li(K)&&(Ie.classList.add("selected"),t.selectedDateElem=Ie,t.config.mode==="range"&&(sn(Ie,"startRange",t.selectedDates[0]&&wn(K,t.selectedDates[0],!0)===0),sn(Ie,"endRange",t.selectedDates[1]&&wn(K,t.selectedDates[1],!0)===0),W==="nextMonthDay"&&Ie.classList.add("inRange")))):Ie.classList.add("flatpickr-disabled"),t.config.mode==="range"&&fs(K)&&!li(K)&&Ie.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&W!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(K)+""),et("onDayCreate",Ie),Ie}function D(W){W.focus(),t.config.mode==="range"&&We(W)}function I(W){for(var K=W>0?0:t.config.showMonths-1,ne=W>0?t.config.showMonths:-1,oe=K;oe!=ne;oe+=W)for(var Te=t.daysContainer.children[oe],Ie=W>0?0:Te.children.length-1,Le=W>0?Te.children.length:-1,Oe=Ie;Oe!=Le;Oe+=W){var Ye=Te.children[Oe];if(Ye.className.indexOf("hidden")===-1&&Ce(Ye.dateObj))return Ye}}function L(W,K){for(var ne=W.className.indexOf("Month")===-1?W.dateObj.getMonth():t.currentMonth,oe=K>0?t.config.showMonths:-1,Te=K>0?1:-1,Ie=ne-t.currentMonth;Ie!=oe;Ie+=Te)for(var Le=t.daysContainer.children[Ie],Oe=ne-t.currentMonth===Ie?W.$i+K:K<0?Le.children.length-1:0,Ye=Le.children.length,Fe=Oe;Fe>=0&&Fe0?Ye:-1);Fe+=Te){var Be=Le.children[Fe];if(Be.className.indexOf("hidden")===-1&&Ce(Be.dateObj)&&Math.abs(W.$i-Fe)>=Math.abs(K))return D(Be)}t.changeMonth(Te),F(I(Te),0)}function F(W,K){var ne=l(),oe=Je(ne||document.body),Te=W!==void 0?W:oe?ne:t.selectedDateElem!==void 0&&Je(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Je(t.todayDateElem)?t.todayDateElem:I(K>0?1:-1);Te===void 0?t._input.focus():oe?L(Te,K):D(Te)}function R(W,K){for(var ne=(new Date(W,K,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((K-1+12)%12,W),Te=t.utils.getDaysInMonth(K,W),Ie=window.document.createDocumentFragment(),Le=t.config.showMonths>1,Oe=Le?"prevMonthDay hidden":"prevMonthDay",Ye=Le?"nextMonthDay hidden":"nextMonthDay",Fe=oe+1-ne,Be=0;Fe<=oe;Fe++,Be++)Ie.appendChild(M("flatpickr-day "+Oe,new Date(W,K-1,Fe),Fe,Be));for(Fe=1;Fe<=Te;Fe++,Be++)Ie.appendChild(M("flatpickr-day",new Date(W,K,Fe),Fe,Be));for(var bt=Te+1;bt<=42-ne&&(t.config.showMonths===1||Be%7!==0);bt++,Be++)Ie.appendChild(M("flatpickr-day "+Ye,new Date(W,K+1,bt%Te),bt,Be));var Gn=ft("div","dayContainer");return Gn.appendChild(Ie),Gn}function N(){if(t.daysContainer!==void 0){so(t.daysContainer),t.weekNumbers&&so(t.weekNumbers);for(var W=document.createDocumentFragment(),K=0;K1||t.config.monthSelectorType!=="dropdown")){var W=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var K=0;K<12;K++)if(W(K)){var ne=ft("option","flatpickr-monthDropdown-month");ne.value=new Date(t.currentYear,K).getMonth().toString(),ne.textContent=Fo(K,t.config.shorthandCurrentMonth,t.l10n),ne.tabIndex=-1,t.currentMonth===K&&(ne.selected=!0),t.monthsDropdownContainer.appendChild(ne)}}}function Y(){var W=ft("div","flatpickr-month"),K=window.document.createDocumentFragment(),ne;t.config.showMonths>1||t.config.monthSelectorType==="static"?ne=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Le){var Oe=kn(Le),Ye=parseInt(Oe.value,10);t.changeMonth(Ye-t.currentMonth),et("onMonthChange")}),q(),ne=t.monthsDropdownContainer);var oe=lo("cur-year",{tabindex:"-1"}),Te=oe.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ie=ft("div","flatpickr-current-month");return Ie.appendChild(ne),Ie.appendChild(oe),K.appendChild(Ie),W.appendChild(K),{container:W,yearElement:Te,monthElement:ne}}function B(){so(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var W=t.config.showMonths;W--;){var K=Y();t.yearElements.push(K.yearElement),t.monthElements.push(K.monthElement),t.monthNav.appendChild(K.container)}t.monthNav.appendChild(t.nextMonthNav)}function Z(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,B(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(W){t.__hidePrevMonthArrow!==W&&(sn(t.prevMonthNav,"flatpickr-disabled",W),t.__hidePrevMonthArrow=W)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(W){t.__hideNextMonthArrow!==W&&(sn(t.nextMonthNav,"flatpickr-disabled",W),t.__hideNextMonthArrow=W)}}),t.currentYearElement=t.yearElements[0],qi(),t.monthNav}function ee(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var W=Ir(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var K=ft("span","flatpickr-time-separator",":"),ne=lo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ne.getElementsByTagName("input")[0];var oe=lo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=pn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?W.hours:f(W.hours)),t.minuteElement.value=pn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():W.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ne),t.timeContainer.appendChild(K),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=lo("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=pn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():W.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[Ln((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function ie(){t.weekdayContainer?so(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var W=t.config.showMonths;W--;){var K=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(K)}return X(),t.weekdayContainer}function X(){if(t.weekdayContainer){var W=t.l10n.firstDayOfWeek,K=ed(t.l10n.weekdays.shorthand);W>0&&WO=!1)),C.$set(Y)},i(N){if(!M){for(let q=0;qO.name===C)}function f(C){return i.findIndex(O=>O===C)}function d(C,O){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||C===O||!O||t(0,s.indexes=s.indexes.map(D=>z.replaceIndexColumn(D,C,O)),s)}function p(C,O){if(!C)return;C.dataTransfer.dropEffect="move";const M=parseInt(C.dataTransfer.getData("text/plain")),D=s.schema;Mo(C),g=C=>d(C.detail.oldName,C.detail.newName),b=(C,O)=>zC(O.detail,C),k=(C,O)=>p(O.detail,C),$=C=>r(C.detail);function T(C){s=C,t(0,s)}return n.$$set=C=>{"collection"in C&&t(0,s=C.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new bn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter(C=>!C.toDelete)||[])},[s,l,o,r,f,d,p,m,_,g,b,k,$,T]}class UC extends ve{constructor(e){super(),be(this,e,BC,HC,_e,{collection:0})}}const WC=n=>({isAdminOnly:n&512}),Md=n=>({isAdminOnly:n[9]});function YC(n){let e,t;return e=new de({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[JC,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function KC(n){let e;return{c(){e=y("div"),e.innerHTML='',h(e,"class","txt-center")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function Od(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` Set Admins only`,h(e,"type","button"),h(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function Dd(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=`Unlock and set custom rule -
`,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:Q,i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Ht,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function JC(n){let e,t,i,s,l,o=n[9]?"- Admins only":"",r,a,u,f,d,p,m,_,g,b,k=!n[9]&&Od(n);function $(I){n[14](I)}var T=n[7];function C(I){let L={id:I[18],baseCollection:I[1],disabled:I[9],placeholder:I[9]?"":I[5]};return I[0]!==void 0&&(L.value=I[0]),{props:L}}T&&(d=Pt(T,C(n)),n[13](d),se.push(()=>me(d,"value",$)));let O=n[9]&&Dd(n);const M=n[12].default,D=Ct(M,n,n[15],Md);return{c(){e=y("div"),t=y("label"),i=y("span"),s=U(n[2]),l=E(),r=U(o),a=E(),k&&k.c(),f=E(),d&&H(d.$$.fragment),m=E(),O&&O.c(),_=E(),g=y("div"),D&&D.c(),h(i,"class","txt"),x(i,"txt-hint",n[9]),h(t,"for",u=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(g,"class","help-block")},m(I,L){S(I,e,L),v(e,t),v(t,i),v(i,s),v(i,l),v(i,r),v(t,a),k&&k.m(t,null),v(e,f),d&&j(d,e,null),v(e,m),O&&O.m(e,null),S(I,_,L),S(I,g,L),D&&D.m(g,null),b=!0},p(I,L){(!b||L&4)&&le(s,I[2]),(!b||L&512)&&o!==(o=I[9]?"- Admins only":"")&&le(r,o),(!b||L&512)&&x(i,"txt-hint",I[9]),I[9]?k&&(k.d(1),k=null):k?k.p(I,L):(k=Od(I),k.c(),k.m(t,null)),(!b||L&262144&&u!==(u=I[18]))&&h(t,"for",u);const F={};if(L&262144&&(F.id=I[18]),L&2&&(F.baseCollection=I[1]),L&512&&(F.disabled=I[9]),L&544&&(F.placeholder=I[9]?"":I[5]),!p&&L&1&&(p=!0,F.value=I[0],ye(()=>p=!1)),L&128&&T!==(T=I[7])){if(d){re();const R=d;P(R.$$.fragment,1,0,()=>{V(R,1)}),ae()}T?(d=Pt(T,C(I)),I[13](d),se.push(()=>me(d,"value",$)),H(d.$$.fragment),A(d.$$.fragment,1),j(d,e,m)):d=null}else T&&d.$set(F);I[9]?O?(O.p(I,L),L&512&&A(O,1)):(O=Dd(I),O.c(),A(O,1),O.m(e,null)):O&&(re(),P(O,1,1,()=>{O=null}),ae()),D&&D.p&&(!b||L&33280)&&Ot(D,M,I,I[15],b?Mt(M,I[15],L,WC):Dt(I[15]),Md)},i(I){b||(d&&A(d.$$.fragment,I),A(O),A(D,I),b=!0)},o(I){d&&P(d.$$.fragment,I),P(O),P(D,I),b=!1},d(I){I&&w(e),k&&k.d(),n[13](null),d&&V(d),O&&O.d(),I&&w(_),I&&w(g),D&&D.d(I)}}}function ZC(n){let e,t,i,s;const l=[KC,YC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Ed;function GC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,_=Ed,g=!1;b();async function b(){_||g||(t(8,g=!0),t(7,_=(await at(()=>import("./FilterAutocompleteInput-d952f6bd.js"),["./FilterAutocompleteInput-d952f6bd.js","./index-6f704b4c.js"],import.meta.url)).default),Ed=_,t(8,g=!1))}async function k(){t(0,r=m||""),await un(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(O){se[O?"unshift":"push"](()=>{p=O,t(6,p)})}function C(O){r=O,t(0,r)}return n.$$set=O=>{"collection"in O&&t(1,o=O.collection),"rule"in O&&t(0,r=O.rule),"label"in O&&t(2,a=O.label),"formKey"in O&&t(3,u=O.formKey),"required"in O&&t(4,f=O.required),"placeholder"in O&&t(5,d=O.placeholder),"$$scope"in O&&t(15,l=O.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,_,g,i,k,$,s,T,C,l]}class Ts extends ve{constructor(e){super(),be(this,e,GC,ZC,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Ad(n,e,t){const i=n.slice();return i[10]=e[t],i}function Id(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L=n[2],F=[];for(let R=0;R@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* +
`,h(e,"type","button"),h(e,"class","unlock-overlay svelte-1akuazq"),h(e,"aria-label","Unlock and set custom rule")},m(o,r){S(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:Q,i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Ht,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function JC(n){let e,t,i,s,l,o=n[9]?"- Admins only":"",r,a,u,f,d,p,m,_,g,b,k=!n[9]&&Od(n);function $(I){n[14](I)}var T=n[7];function C(I){let L={id:I[18],baseCollection:I[1],disabled:I[9],placeholder:I[9]?"":I[5]};return I[0]!==void 0&&(L.value=I[0]),{props:L}}T&&(d=Pt(T,C(n)),n[13](d),se.push(()=>me(d,"value",$)));let O=n[9]&&Dd(n);const M=n[12].default,D=Ct(M,n,n[15],Md);return{c(){e=y("div"),t=y("label"),i=y("span"),s=U(n[2]),l=E(),r=U(o),a=E(),k&&k.c(),f=E(),d&&H(d.$$.fragment),m=E(),O&&O.c(),_=E(),g=y("div"),D&&D.c(),h(i,"class","txt"),x(i,"txt-hint",n[9]),h(t,"for",u=n[18]),h(e,"class","input-wrapper svelte-1akuazq"),h(g,"class","help-block")},m(I,L){S(I,e,L),v(e,t),v(t,i),v(i,s),v(i,l),v(i,r),v(t,a),k&&k.m(t,null),v(e,f),d&&j(d,e,null),v(e,m),O&&O.m(e,null),S(I,_,L),S(I,g,L),D&&D.m(g,null),b=!0},p(I,L){(!b||L&4)&&le(s,I[2]),(!b||L&512)&&o!==(o=I[9]?"- Admins only":"")&&le(r,o),(!b||L&512)&&x(i,"txt-hint",I[9]),I[9]?k&&(k.d(1),k=null):k?k.p(I,L):(k=Od(I),k.c(),k.m(t,null)),(!b||L&262144&&u!==(u=I[18]))&&h(t,"for",u);const F={};if(L&262144&&(F.id=I[18]),L&2&&(F.baseCollection=I[1]),L&512&&(F.disabled=I[9]),L&544&&(F.placeholder=I[9]?"":I[5]),!p&&L&1&&(p=!0,F.value=I[0],ye(()=>p=!1)),L&128&&T!==(T=I[7])){if(d){re();const R=d;P(R.$$.fragment,1,0,()=>{V(R,1)}),ae()}T?(d=Pt(T,C(I)),I[13](d),se.push(()=>me(d,"value",$)),H(d.$$.fragment),A(d.$$.fragment,1),j(d,e,m)):d=null}else T&&d.$set(F);I[9]?O?(O.p(I,L),L&512&&A(O,1)):(O=Dd(I),O.c(),A(O,1),O.m(e,null)):O&&(re(),P(O,1,1,()=>{O=null}),ae()),D&&D.p&&(!b||L&33280)&&Ot(D,M,I,I[15],b?Mt(M,I[15],L,WC):Dt(I[15]),Md)},i(I){b||(d&&A(d.$$.fragment,I),A(O),A(D,I),b=!0)},o(I){d&&P(d.$$.fragment,I),P(O),P(D,I),b=!1},d(I){I&&w(e),k&&k.d(),n[13](null),d&&V(d),O&&O.d(),I&&w(_),I&&w(g),D&&D.d(I)}}}function ZC(n){let e,t,i,s;const l=[KC,YC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Se()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(re(),P(o[f],1,1,()=>{o[f]=null}),ae(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let Ed;function GC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:d="Leave empty to grant everyone access..."}=e,p=null,m=null,_=Ed,g=!1;b();async function b(){_||g||(t(8,g=!0),t(7,_=(await at(()=>import("./FilterAutocompleteInput-e1414ff6.js"),["./FilterAutocompleteInput-e1414ff6.js","./index-6f704b4c.js"],import.meta.url)).default),Ed=_,t(8,g=!1))}async function k(){t(0,r=m||""),await un(),p==null||p.focus()}async function $(){m=r,t(0,r=null)}function T(O){se[O?"unshift":"push"](()=>{p=O,t(6,p)})}function C(O){r=O,t(0,r)}return n.$$set=O=>{"collection"in O&&t(1,o=O.collection),"rule"in O&&t(0,r=O.rule),"label"in O&&t(2,a=O.label),"formKey"in O&&t(3,u=O.formKey),"required"in O&&t(4,f=O.required),"placeholder"in O&&t(5,d=O.placeholder),"$$scope"in O&&t(15,l=O.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,d,p,_,g,i,k,$,s,T,C,l]}class Ts extends ve{constructor(e){super(),be(this,e,GC,ZC,_e,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Ad(n,e,t){const i=n.slice();return i[10]=e[t],i}function Id(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L=n[2],F=[];for(let R=0;R@request filter:",d=E(),p=y("div"),p.innerHTML=`@request.headers.* @request.query.* @request.data.* @request.auth.*`,m=E(),_=y("hr"),g=E(),b=y("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",k=E(),$=y("div"),$.innerHTML="@collection.ANY_COLLECTION_NAME.*",T=E(),C=y("hr"),O=E(),M=y("p"),M.innerHTML=`Example rule: @@ -102,7 +102,7 @@ Authenticated user can pass a file token via the "token" query param.`,position: If your query doesn't have a suitable one, you can use the universal (ROW_NUMBER() OVER()) as id.
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,u=E(),g&&g.c(),f=Se(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=_(b),l===$?m[l].p(b,k):(re(),P(m[$],1,1,()=>{m[$]=null}),ae(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=Rd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function s4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[i4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function l4(n,e,t){let i;Ke(n,_i,d=>t(4,i=d));let{collection:s=new bn}=e,l,o=!1,r=[];function a(d){var _;t(3,r=[]);const p=z.getNestedVal(d,"schema",null);if(z.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=z.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);z.removeByValue(m,"id"),z.removeByValue(m,"created"),z.removeByValue(m,"updated");for(let g in p)for(let b in p[g]){const k=p[g][b].message,$=m[g]||g;r.push(z.sentenize($+": "+k))}}Xt(async()=>{t(2,o=!0);try{t(1,l=(await at(()=>import("./CodeEditor-462b7ad0.js"),["./CodeEditor-462b7ad0.js","./index-6f704b4c.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Di("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class o4 extends ve{constructor(e){super(),be(this,e,l4,s4,_e,{collection:0})}}const r4=n=>({active:n&1}),jd=n=>({active:n[0]});function Vd(n){let e,t,i;const s=n[15].default,l=Ct(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Ot(l,s,o,o[14],i?Mt(s,o[14],r,null):Dt(o[14]),null)},i(o){i||(A(l,o),o&&tt(()=>{i&&(t||(t=Ve(e,St,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=Ve(e,St,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function a4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Ct(a,n,n[14],jd);let f=n[0]&&Vd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",ct(n[17])),J(t,"drop",ct(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",ct(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&Ot(u,a,d,d[14],l?Mt(a,d[14],p,r4):Dt(d[14]),jd),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Vd(d),f.c(),A(f,1),f.m(e,null)):f&&(re(),P(f,1,1,()=>{f=null}),ae()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,De(r)}}}function u4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function _(){return!!f}function g(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const R of F)R.click()}}Xt(()=>()=>clearTimeout(r));function T(F){pe.call(this,n,F)}const C=()=>d&&k(),O=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),D=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){se[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,_,g,b,r,s,i,T,C,O,M,D,I,L]}class po extends ve{constructor(e){super(),be(this,e,u4,a4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function f4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function c4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[f4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function d4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function p4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function m4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?p4:d4}let u=a(n),f=u(n),d=n[3]&&Hd();return{c(){e=y("div"),e.innerHTML=` + MAX(balance) as maxBalance).`,u=E(),g&&g.c(),f=Se(),h(t,"class","txt"),h(e,"for",i=n[8]),h(a,"class","help-block")},m(b,k){S(b,e,k),v(e,t),S(b,s,k),m[l].m(b,k),S(b,r,k),S(b,a,k),S(b,u,k),g&&g.m(b,k),S(b,f,k),d=!0},p(b,k){(!d||k&256&&i!==(i=b[8]))&&h(e,"for",i);let $=l;l=_(b),l===$?m[l].p(b,k):(re(),P(m[$],1,1,()=>{m[$]=null}),ae(),o=m[l],o?o.p(b,k):(o=m[l]=p[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?g?g.p(b,k):(g=Rd(b),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(b){d||(A(o),d=!0)},o(b){P(o),d=!1},d(b){b&&w(e),b&&w(s),m[l].d(b),b&&w(r),b&&w(a),b&&w(u),g&&g.d(b),b&&w(f)}}}function s4(n){let e,t;return e=new de({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[i4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function l4(n,e,t){let i;Ke(n,_i,d=>t(4,i=d));let{collection:s=new bn}=e,l,o=!1,r=[];function a(d){var _;t(3,r=[]);const p=z.getNestedVal(d,"schema",null);if(z.isEmpty(p))return;if(p!=null&&p.message){r.push(p==null?void 0:p.message);return}const m=z.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);z.removeByValue(m,"id"),z.removeByValue(m,"created"),z.removeByValue(m,"updated");for(let g in p)for(let b in p[g]){const k=p[g][b].message,$=m[g]||g;r.push(z.sentenize($+": "+k))}}Xt(async()=>{t(2,o=!0);try{t(1,l=(await at(()=>import("./CodeEditor-becbd613.js"),["./CodeEditor-becbd613.js","./index-6f704b4c.js"],import.meta.url)).default)}catch(d){console.warn(d)}t(2,o=!1)});function u(d){n.$$.not_equal(s.options.query,d)&&(s.options.query=d,t(0,s))}const f=()=>{r.length&&Di("schema")};return n.$$set=d=>{"collection"in d&&t(0,s=d.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class o4 extends ve{constructor(e){super(),be(this,e,l4,s4,_e,{collection:0})}}const r4=n=>({active:n&1}),jd=n=>({active:n[0]});function Vd(n){let e,t,i;const s=n[15].default,l=Ct(s,n,n[14],null);return{c(){e=y("div"),l&&l.c(),h(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Ot(l,s,o,o[14],i?Mt(s,o[14],r,null):Dt(o[14]),null)},i(o){i||(A(l,o),o&&tt(()=>{i&&(t||(t=Ve(e,St,{duration:150},!0)),t.run(1))}),i=!0)},o(o){P(l,o),o&&(t||(t=Ve(e,St,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function a4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Ct(a,n,n[14],jd);let f=n[0]&&Vd(n);return{c(){e=y("div"),t=y("button"),u&&u.c(),i=E(),f&&f.c(),h(t,"type","button"),h(t,"class","accordion-header"),h(t,"draggable",n[2]),x(t,"interactive",n[3]),h(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),x(e,"active",n[0])},m(d,p){S(d,e,p),v(e,t),u&&u.m(t,null),v(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",ct(n[17])),J(t,"drop",ct(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",ct(n[16]))],o=!0)},p(d,[p]){u&&u.p&&(!l||p&16385)&&Ot(u,a,d,d[14],l?Mt(a,d[14],p,r4):Dt(d[14]),jd),(!l||p&4)&&h(t,"draggable",d[2]),(!l||p&8)&&x(t,"interactive",d[3]),d[0]?f?(f.p(d,p),p&1&&A(f,1)):(f=Vd(d),f.c(),A(f,1),f.m(e,null)):f&&(re(),P(f,1,1,()=>{f=null}),ae()),(!l||p&130&&s!==(s="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&h(e,"class",s),(!l||p&131)&&x(e,"active",d[0])},i(d){l||(A(u,d),A(f),l=!0)},o(d){P(u,d),P(f),l=!1},d(d){d&&w(e),u&&u.d(d),f&&f.d(),n[22](null),o=!1,De(r)}}}function u4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=wt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:d=!0}=e,{single:p=!1}=e,m=!1;function _(){return!!f}function g(){$(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function k(){l("toggle"),f?b():g()}function $(){if(p&&o.closest(".accordions")){const F=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const R of F)R.click()}}Xt(()=>()=>clearTimeout(r));function T(F){pe.call(this,n,F)}const C=()=>d&&k(),O=F=>{u&&(t(7,m=!1),$(),l("drop",F))},M=F=>u&&l("dragstart",F),D=F=>{u&&(t(7,m=!0),l("dragenter",F))},I=F=>{u&&(t(7,m=!1),l("dragleave",F))};function L(F){se[F?"unshift":"push"](()=>{o=F,t(6,o)})}return n.$$set=F=>{"class"in F&&t(1,a=F.class),"draggable"in F&&t(2,u=F.draggable),"active"in F&&t(0,f=F.active),"interactive"in F&&t(3,d=F.interactive),"single"in F&&t(9,p=F.single),"$$scope"in F&&t(14,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,d,k,$,o,m,l,p,_,g,b,r,s,i,T,C,O,M,D,I,L]}class po extends ve{constructor(e){super(),be(this,e,u4,a4,_e,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function f4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function c4(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[f4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function d4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function p4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function m4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowUsernameAuth?p4:d4}let u=a(n),f=u(n),d=n[3]&&Hd();return{c(){e=y("div"),e.innerHTML=` Username/Password`,t=E(),i=y("div"),s=E(),f.c(),l=E(),d&&d.c(),o=Se(),h(e,"class","inline-flex"),h(i,"class","flex-fill")},m(p,m){S(p,e,m),S(p,t,m),S(p,i,m),S(p,s,m),f.m(p,m),S(p,l,m),d&&d.m(p,m),S(p,o,m),r=!0},p(p,m){u!==(u=a(p))&&(f.d(1),f=u(p),f&&(f.c(),f.m(l.parentNode,l))),p[3]?d?m&8&&A(d,1):(d=Hd(),d.c(),A(d,1),d.m(o.parentNode,o)):d&&(re(),P(d,1,1,()=>{d=null}),ae())},i(p){r||(A(d),r=!0)},o(p){P(d),r=!1},d(p){p&&w(e),p&&w(t),p&&w(i),p&&w(s),f.d(p),p&&w(l),d&&d.d(p),p&&w(o)}}}function h4(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(z.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[_4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+(z.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[g4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),a=!0},p(u,f){const d={};f&1&&(d.class="form-field "+(z.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(z.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(p.$$scope={dirty:f,ctx:u}),o.$set(p)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&tt(()=>{a&&(r||(r=Ve(e,St,{duration:150},!0)),r.run(1))}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=Ve(e,St,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),V(i),V(o),u&&r&&r.end()}}}function _4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[7](b)}let g={id:n[12],disabled:!z.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new Rs({props:g}),se.push(()=>me(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Except domains",i=E(),s=y("i"),o=E(),H(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),j(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ue.call(null,s,{text:`Email domains that are NOT allowed to sign up. This field is disabled if "Only domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!z.isEmpty(b[0].options.onlyEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.exceptEmailDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),V(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function g4(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;function _(b){n[8](b)}let g={id:n[12],disabled:!z.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new Rs({props:g}),se.push(()=>me(r,"value",_)),{c(){e=y("label"),t=y("span"),t.textContent="Only domains",i=E(),s=y("i"),o=E(),H(r.$$.fragment),u=E(),f=y("div"),f.textContent="Use comma as separator.",h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[12]),h(f,"class","help-block")},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),S(b,o,k),j(r,b,k),S(b,u,k),S(b,f,k),d=!0,p||(m=Ee(Ue.call(null,s,{text:`Email domains that are ONLY allowed to sign up. This field is disabled if "Except domains" is set.`,position:"top"})),p=!0)},p(b,k){(!d||k&4096&&l!==(l=b[12]))&&h(e,"for",l);const $={};k&4096&&($.id=b[12]),k&1&&($.disabled=!z.isEmpty(b[0].options.exceptEmailDomains)),!a&&k&1&&(a=!0,$.value=b[0].options.onlyEmailDomains,ye(()=>a=!1)),r.$set($)},i(b){d||(A(r.$$.fragment,b),d=!0)},o(b){P(r.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(o),V(r,b),b&&w(u),b&&w(f),p=!1,m()}}}function b4(n){let e,t,i,s;e=new de({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[h4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&zd(n);return{c(){H(e.$$.fragment),t=E(),l&&l.c(),i=Se()},m(o,r){j(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=zd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){V(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function v4(n){let e;return{c(){e=y("span"),e.textContent="Disabled",h(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function y4(n){let e;return{c(){e=y("span"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Bd(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function k4(n){let e,t,i,s,l,o,r;function a(p,m){return p[0].options.allowEmailAuth?y4:v4}let u=a(n),f=u(n),d=n[2]&&Bd();return{c(){e=y("div"),e.innerHTML=` @@ -115,7 +115,7 @@ Also note that some OAuth2 providers (like Twitter), don't return an email and t you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=Se(),h(t,"class","icon"),h(s,"class","content txt-bold"),h(e,"class","alert alert-warning")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),u&&u.m(s,null),S(d,r,p),f&&f.m(d,p),S(d,a,p)},p(d,p){d[6].length?u||(u=Zd(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),d[8]?f?f.p(d,p):(f=Gd(d),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(d){d&&w(e),u&&u.d(),d&&w(r),f&&f.d(d),d&&w(a)}}}function P4(n){let e;return{c(){e=y("h4"),e.textContent="Confirm collection changes"},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function L4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML='Cancel',t=E(),i=y("button"),i.innerHTML='Confirm',e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent"),h(i,"type","button"),h(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,De(l)}}}function N4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[L4],header:[P4],default:[I4]},$$scope:{ctx:n}};return e=new cn({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[13](null),V(e,s)}}}function F4(n,e,t){let i,s,l,o,r;const a=wt();let u,f,d;async function p(C,O){t(1,f=C),t(2,d=O),await un(),i||s.length||l.length||o.length?u==null||u.show():_()}function m(){u==null||u.hide()}function _(){m(),a("confirm")}const g=()=>m(),b=()=>_();function k(C){se[C?"unshift":"push"](()=>{u=C,t(4,u)})}function $(C){pe.call(this,n,C)}function T(C){pe.call(this,n,C)}return n.$$.update=()=>{var C,O,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(7,s=((C=d==null?void 0:d.schema)==null?void 0:C.filter(D=>D.id&&!D.toDelete&&D.originalName!=D.name))||[]),n.$$.dirty&4&&t(6,l=((O=d==null?void 0:d.schema)==null?void 0:O.filter(D=>D.id&&D.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(D=>{var L,F,R;const I=(L=f==null?void 0:f.schema)==null?void 0:L.find(N=>N.id==D.id);return I?((F=I.options)==null?void 0:F.maxSelect)!=1&&((R=D.options)==null?void 0:R.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(d!=null&&d.$isView)||i)},[m,f,d,i,u,o,l,s,r,_,p,g,b,k,$,T]}class R4 extends ve{constructor(e){super(),be(this,e,F4,N4,_e,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function np(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function q4(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new UC({props:l}),se.push(()=>me(e,"collection",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function j4(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new o4({props:l}),se.push(()=>me(e,"collection",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function ip(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new e4({props:o}),se.push(()=>me(t,"collection",l)),{c(){e=y("div"),H(t.$$.fragment),h(e,"class","tab-item active")},m(r,a){S(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ye(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),V(t)}}}function sp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new A4({props:o}),se.push(()=>me(t,"collection",l)),{c(){e=y("div"),H(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[3]===As)},m(r,a){S(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ye(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&x(e,"active",r[3]===As)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),V(t)}}}function V4(n){let e,t,i,s,l,o,r;const a=[j4,q4],u=[];function f(m,_){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let d=n[3]===kl&&ip(n),p=n[2].$isAuth&&sp(n);return{c(){e=y("div"),t=y("div"),s.c(),l=E(),d&&d.c(),o=E(),p&&p.c(),h(t,"class","tab-item"),x(t,"active",n[3]===Ti),h(e,"class","tabs-content svelte-12y0yzb")},m(m,_){S(m,e,_),v(e,t),u[i].m(t,null),v(e,l),d&&d.m(e,null),v(e,o),p&&p.m(e,null),r=!0},p(m,_){let g=i;i=f(m),i===g?u[i].p(m,_):(re(),P(u[g],1,1,()=>{u[g]=null}),ae(),s=u[i],s?s.p(m,_):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&x(t,"active",m[3]===Ti),m[3]===kl?d?(d.p(m,_),_[0]&8&&A(d,1)):(d=ip(m),d.c(),A(d,1),d.m(e,o)):d&&(re(),P(d,1,1,()=>{d=null}),ae()),m[2].$isAuth?p?(p.p(m,_),_[0]&4&&A(p,1)):(p=sp(m),p.c(),A(p,1),p.m(e,null)):p&&(re(),P(p,1,1,()=>{p=null}),ae())},i(m){r||(A(s),A(d),A(p),r=!0)},o(m){P(s),P(d),P(p),r=!1},d(m){m&&w(e),u[i].d(),d&&d.d(),p&&p.d()}}}function lp(n){let e,t,i,s,l,o,r;return o=new Hn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[H4]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=E(),i=y("button"),s=y("i"),l=E(),H(o.$$.fragment),h(e,"class","flex-fill"),h(s,"class","ri-more-line"),h(i,"type","button"),h(i,"aria-label","More"),h(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),v(i,s),v(i,l),j(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),V(o)}}}function H4(n){let e,t,i,s,l;return{c(){e=y("button"),e.innerHTML=` Duplicate`,t=E(),i=y("button"),i.innerHTML=` Delete`,h(e,"type","button"),h(e,"class","dropdown-item closable"),h(i,"type","button"),h(i,"class","dropdown-item txt-danger closable")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",Mn(ct(n[25])))],s=!0)},p:Q,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,De(l)}}}function op(n){let e,t,i,s;return i=new Hn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[z4]},$$scope:{ctx:n}}}),{c(){e=y("i"),t=E(),H(i.$$.fragment),h(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),V(i,l)}}}function rp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,d;function p(){return n[27](n[47])}return{c(){e=y("button"),t=y("i"),s=E(),l=y("span"),r=U(o),a=U(" collection"),u=E(),h(t,"class",i=Oi(z.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),h(l,"class","txt"),h(e,"type","button"),h(e,"class","dropdown-item closable"),x(e,"selected",n[47]==n[2].type)},m(m,_){S(m,e,_),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),v(e,u),f||(d=J(e,"click",p),f=!0)},p(m,_){n=m,_[0]&64&&i!==(i=Oi(z.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&h(t,"class",i),_[0]&64&&o!==(o=n[48]+"")&&le(r,o),_[0]&68&&x(e,"selected",n[47]==n[2].type)},d(m){m&&w(e),f=!1,d()}}}function z4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{R=null}),ae()),(!I||Y[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(q[2].$isNew?"btn-outline":"btn-transparent")))&&h(p,"class",C),(!I||Y[0]&4&&O!==(O=!q[2].$isNew))&&(p.disabled=O),q[2].system?N||(N=ap(),N.c(),N.m(D.parentNode,D)):N&&(N.d(1),N=null)},i(q){I||(A(R),I=!0)},o(q){P(R),I=!1},d(q){q&&w(e),q&&w(s),q&&w(l),q&&w(f),q&&w(d),R&&R.d(),q&&w(M),N&&N.d(q),q&&w(D),L=!1,F()}}}function up(n){let e,t,i,s,l,o;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Ee(t=Ue.call(null,e,n[11])),l=!0)},p(r,a){t&&zt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&tt(()=>{s&&(i||(i=Ve(e,Ht,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=Ve(e,Ht,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function fp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function cp(n){var a,u,f;let e,t,i,s=!z.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&dp();return{c(){e=y("button"),t=y("span"),t.textContent="Options",i=E(),r&&r.c(),h(t,"class","txt"),h(e,"type","button"),h(e,"class","tab-item"),x(e,"active",n[3]===As)},m(d,p){S(d,e,p),v(e,t),v(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(d,p){var m,_,g;p[0]&32&&(s=!z.isEmpty((m=d[5])==null?void 0:m.options)&&!((g=(_=d[5])==null?void 0:_.options)!=null&&g.manageRule)),s?r?p[0]&32&&A(r,1):(r=dp(),r.c(),A(r,1),r.m(e,null)):r&&(re(),P(r,1,1,()=>{r=null}),ae()),p[0]&8&&x(e,"active",d[3]===As)},d(d){d&&w(e),r&&r.d(),l=!1,o()}}}function dp(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function U4(n){var B,Z,ee,ie,X,fe,G,ce;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,d,p,m,_=(B=n[2])!=null&&B.$isView?"Query":"Fields",g,b,k=!z.isEmpty(n[11]),$,T,C,O,M=!z.isEmpty((Z=n[5])==null?void 0:Z.listRule)||!z.isEmpty((ee=n[5])==null?void 0:ee.viewRule)||!z.isEmpty((ie=n[5])==null?void 0:ie.createRule)||!z.isEmpty((X=n[5])==null?void 0:X.updateRule)||!z.isEmpty((fe=n[5])==null?void 0:fe.deleteRule)||!z.isEmpty((ce=(G=n[5])==null?void 0:G.options)==null?void 0:ce.manageRule),D,I,L,F,R=!n[2].$isNew&&!n[2].system&&lp(n);r=new de({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[B4,({uniqueId:ge})=>({46:ge}),({uniqueId:ge})=>[0,ge?32768:0]]},$$scope:{ctx:n}}});let N=k&&up(n),q=M&&fp(),Y=n[2].$isAuth&&cp(n);return{c(){e=y("h4"),i=U(t),s=E(),R&&R.c(),l=E(),o=y("form"),H(r.$$.fragment),a=E(),u=y("input"),f=E(),d=y("div"),p=y("button"),m=y("span"),g=U(_),b=E(),N&&N.c(),$=E(),T=y("button"),C=y("span"),C.textContent="API Rules",O=E(),q&&q.c(),D=E(),Y&&Y.c(),h(e,"class","upsert-panel-title svelte-12y0yzb"),h(u,"type","submit"),h(u,"class","hidden"),h(u,"tabindex","-1"),h(o,"class","block"),h(m,"class","txt"),h(p,"type","button"),h(p,"class","tab-item"),x(p,"active",n[3]===Ti),h(C,"class","txt"),h(T,"type","button"),h(T,"class","tab-item"),x(T,"active",n[3]===kl),h(d,"class","tabs-header stretched")},m(ge,Me){S(ge,e,Me),v(e,i),S(ge,s,Me),R&&R.m(ge,Me),S(ge,l,Me),S(ge,o,Me),j(r,o,null),v(o,a),v(o,u),S(ge,f,Me),S(ge,d,Me),v(d,p),v(p,m),v(m,g),v(p,b),N&&N.m(p,null),v(d,$),v(d,T),v(T,C),v(T,O),q&&q.m(T,null),v(d,D),Y&&Y.m(d,null),I=!0,L||(F=[J(o,"submit",ct(n[28])),J(p,"click",n[29]),J(T,"click",n[30])],L=!0)},p(ge,Me){var He,we,Ce,Je,ht,Ze,We,te;(!I||Me[0]&4)&&t!==(t=ge[2].$isNew?"New collection":"Edit collection")&&le(i,t),!ge[2].$isNew&&!ge[2].system?R?(R.p(ge,Me),Me[0]&4&&A(R,1)):(R=lp(ge),R.c(),A(R,1),R.m(l.parentNode,l)):R&&(re(),P(R,1,1,()=>{R=null}),ae());const je={};Me[0]&8192&&(je.class="form-field collection-field-name required m-b-0 "+(ge[13]?"disabled":"")),Me[0]&8260|Me[1]&1081344&&(je.$$scope={dirty:Me,ctx:ge}),r.$set(je),(!I||Me[0]&4)&&_!==(_=(He=ge[2])!=null&&He.$isView?"Query":"Fields")&&le(g,_),Me[0]&2048&&(k=!z.isEmpty(ge[11])),k?N?(N.p(ge,Me),Me[0]&2048&&A(N,1)):(N=up(ge),N.c(),A(N,1),N.m(p,null)):N&&(re(),P(N,1,1,()=>{N=null}),ae()),(!I||Me[0]&8)&&x(p,"active",ge[3]===Ti),Me[0]&32&&(M=!z.isEmpty((we=ge[5])==null?void 0:we.listRule)||!z.isEmpty((Ce=ge[5])==null?void 0:Ce.viewRule)||!z.isEmpty((Je=ge[5])==null?void 0:Je.createRule)||!z.isEmpty((ht=ge[5])==null?void 0:ht.updateRule)||!z.isEmpty((Ze=ge[5])==null?void 0:Ze.deleteRule)||!z.isEmpty((te=(We=ge[5])==null?void 0:We.options)==null?void 0:te.manageRule)),M?q?Me[0]&32&&A(q,1):(q=fp(),q.c(),A(q,1),q.m(T,null)):q&&(re(),P(q,1,1,()=>{q=null}),ae()),(!I||Me[0]&8)&&x(T,"active",ge[3]===kl),ge[2].$isAuth?Y?Y.p(ge,Me):(Y=cp(ge),Y.c(),Y.m(d,null)):Y&&(Y.d(1),Y=null)},i(ge){I||(A(R),A(r.$$.fragment,ge),A(N),A(q),I=!0)},o(ge){P(R),P(r.$$.fragment,ge),P(N),P(q),I=!1},d(ge){ge&&w(e),ge&&w(s),R&&R.d(ge),ge&&w(l),ge&&w(o),V(r),ge&&w(f),ge&&w(d),N&&N.d(),q&&q.d(),Y&&Y.d(),L=!1,De(F)}}}function W4(n){let e,t,i,s,l,o=n[2].$isNew?"Create":"Save changes",r,a,u,f;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),r=U(o),h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[9],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],x(s,"btn-loading",n[9])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(d,p){p[0]&512&&(e.disabled=d[9]),p[0]&4&&o!==(o=d[2].$isNew?"Create":"Save changes")&&le(r,o),p[0]&4608&&a!==(a=!d[12]||d[9])&&(s.disabled=a),p[0]&512&&x(s,"btn-loading",d[9])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function Y4(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[W4],header:[U4],default:[V4]},$$scope:{ctx:n}};e=new cn({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new R4({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[37](null),V(e,r),r&&w(t),n[40](null),V(i,r)}}}const Ti="schema",kl="api_rules",As="options",K4="base",pp="auth",mp="view";function Pr(n){return JSON.stringify(n)}function J4(n,e,t){let i,s,l,o;Ke(n,_i,te=>t(5,o=te));const r={};r[K4]="Base",r[mp]="View",r[pp]="Auth";const a=wt();let u,f,d=null,p=new bn,m=!1,_=!1,g=Ti,b=Pr(p),k="";function $(te){t(3,g=te)}function T(te){return O(te),t(10,_=!0),$(Ti),u==null?void 0:u.show()}function C(){return u==null?void 0:u.hide()}async function O(te){fn({}),typeof te<"u"?(t(20,d=te),t(2,p=te.$clone())):(t(20,d=null),t(2,p=new bn)),t(2,p.schema=p.schema||[],p),t(2,p.originalName=p.name||"",p),await un(),t(21,b=Pr(p))}function M(){p.$isNew?D():f==null||f.show(d,p)}function D(){if(m)return;t(9,m=!0);const te=I();let Re;p.$isNew?Re=he.collections.create(te):Re=he.collections.update(p.id,te),Re.then(Qe=>{Ea(),c$(Qe),t(10,_=!1),C(),Yt(p.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:p.$isNew,collection:Qe})}).catch(Qe=>{he.errorResponseHandler(Qe)}).finally(()=>{t(9,m=!1)})}function I(){const te=p.$export();te.schema=te.schema.slice(0);for(let Re=te.schema.length-1;Re>=0;Re--)te.schema[Re].toDelete&&te.schema.splice(Re,1);return te}function L(){d!=null&&d.id&&_n(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>he.collections.delete(d==null?void 0:d.id).then(()=>{C(),Yt(`Successfully deleted collection "${d==null?void 0:d.name}".`),a("delete",d),d$(d)}).catch(te=>{he.errorResponseHandler(te)}))}function F(te){t(2,p.type=te,p),Di("schema")}function R(){s?_n("You have unsaved changes. Do you really want to discard them?",()=>{N()}):N()}async function N(){const te=d==null?void 0:d.$clone();if(te){if(te.id="",te.created="",te.updated="",te.name+="_duplicate",!z.isEmpty(te.schema))for(const Re of te.schema)Re.id="";if(!z.isEmpty(te.indexes))for(let Re=0;ReC(),Y=()=>M(),B=()=>R(),Z=()=>L(),ee=te=>{t(2,p.name=z.slugify(te.target.value),p),te.target.value=p.name},ie=te=>F(te),X=()=>{l&&M()},fe=()=>$(Ti),G=()=>$(kl),ce=()=>$(As);function ge(te){p=te,t(2,p),t(20,d)}function Me(te){p=te,t(2,p),t(20,d)}function je(te){p=te,t(2,p),t(20,d)}function He(te){p=te,t(2,p),t(20,d)}const we=()=>s&&_?(_n("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),C()}),!1):!0;function Ce(te){se[te?"unshift":"push"](()=>{u=te,t(7,u)})}function Je(te){pe.call(this,n,te)}function ht(te){pe.call(this,n,te)}function Ze(te){se[te?"unshift":"push"](()=>{f=te,t(8,f)})}const We=()=>D();return n.$$.update=()=>{var te,Re;n.$$.dirty[0]&32&&(o.schema||(te=o.options)!=null&&te.query?t(11,k=z.getNestedVal(o,"schema.message")||"Has errors"):t(11,k="")),n.$$.dirty[0]&4&&p.type===mp&&(t(2,p.createRule=null,p),t(2,p.updateRule=null,p),t(2,p.deleteRule=null,p),t(2,p.indexes=[],p)),n.$$.dirty[0]&1048580&&p!=null&&p.name&&(d==null?void 0:d.name)!=(p==null?void 0:p.name)&&t(2,p.indexes=(Re=p.indexes)==null?void 0:Re.map(Qe=>z.replaceIndexTableName(Qe,p.name)),p),n.$$.dirty[0]&4&&t(13,i=!p.$isNew&&p.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Pr(p)),n.$$.dirty[0]&20&&t(12,l=p.$isNew||s),n.$$.dirty[0]&12&&g===As&&p.type!==pp&&$(Ti)},[$,C,p,g,s,o,r,u,f,m,_,k,l,i,M,D,L,F,R,T,d,b,q,Y,B,Z,ee,ie,X,fe,G,ce,ge,Me,je,He,we,Ce,Je,ht,Ze,We]}class ru extends ve{constructor(e){super(),be(this,e,J4,Y4,_e,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function hp(n,e,t){const i=n.slice();return i[15]=e[t],i}function _p(n){let e,t=n[1].length&&gp();return{c(){t&&t.c(),e=Se()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=gp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function gp(n){let e;return{c(){e=y("p"),e.textContent="No collections found.",h(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function bp(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,d,p;return{key:n,first:null,c(){var m;t=y("a"),i=y("i"),l=E(),o=y("span"),a=U(r),u=E(),h(i,"class",s=z.getCollectionTypeIcon(e[15].type)),h(o,"class","txt"),h(t,"href",f="/collections?collectionId="+e[15].id),h(t,"class","sidebar-list-item"),x(t,"active",((m=e[5])==null?void 0:m.id)===e[15].id),this.first=t},m(m,_){S(m,t,_),v(t,i),v(t,l),v(t,o),v(o,a),v(t,u),d||(p=Ee(ln.call(null,t)),d=!0)},p(m,_){var g;e=m,_&8&&s!==(s=z.getCollectionTypeIcon(e[15].type))&&h(i,"class",s),_&8&&r!==(r=e[15].name+"")&&le(a,r),_&8&&f!==(f="/collections?collectionId="+e[15].id)&&h(t,"href",f),_&40&&x(t,"active",((g=e[5])==null?void 0:g.id)===e[15].id)},d(m){m&&w(t),d=!1,p()}}}function vp(n){let e,t,i,s;return{c(){e=y("footer"),t=y("button"),t.innerHTML=` - New collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function Z4(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[3];const O=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),ue(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let R=0;R20),L[7]?D&&(D.d(1),D=null):D?D.p(L,F):(D=vp(L),D.c(),D.m(e,null));const R={};b.$set(R)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function X4(n,e,t){let i,s,l,o,r,a,u;Ke(n,hi,$=>t(5,o=$)),Ke(n,ii,$=>t(9,r=$)),Ke(n,No,$=>t(6,a=$)),Ke(n,Ms,$=>t(7,u=$));let f,d="";function p($){tn(hi,o=$,o)}const m=()=>t(0,d="");function _(){d=this.value,t(0,d)}const g=()=>f==null?void 0:f.show();function b($){se[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&G4(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,_,g,b,k]}class Q4 extends ve{constructor(e){super(),be(this,e,X4,Z4,_e,{})}}function yp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function kp(n){n[18]=n[19].default}function wp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Sp(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $p(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Sp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=Se(),d&&d.c(),s=E(),l=y("button"),r=U(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,_){S(m,t,_),d&&d.m(m,_),S(m,s,_),S(m,l,_),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Sp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),_&8&&o!==(o=e[15].label+"")&&le(r,o),_&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Tp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:t5,then:e5,catch:x4,value:19,blocks:[,,,]};return pu(t=n[15].component,s),{c(){e=Se(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&pu(t,s)||Fb(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function x4(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function e5(n){kp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){H(e.$$.fragment),t=E()},m(s,l){j(e,s,l),S(s,t,l),i=!0},p(s,l){kp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){V(e,s),s&&w(t)}}}function t5(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function Cp(n,e){let t,i,s,l=e[5]===e[14]&&Tp(e);return{key:n,first:null,c(){t=Se(),l&&l.c(),i=Se(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Tp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function n5(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function s5(n){let e,t,i={class:"docs-panel",$$slots:{footer:[i5],default:[n5]},$$scope:{ctx:n}};return e=new cn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function l5(n,e,t){const i={list:{label:"List/Search",component:at(()=>import("./ListApiDocs-68b40cd3.js"),["./ListApiDocs-68b40cd3.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:at(()=>import("./ViewApiDocs-299214ca.js"),["./ViewApiDocs-299214ca.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:at(()=>import("./CreateApiDocs-d361cb4d.js"),["./CreateApiDocs-d361cb4d.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:at(()=>import("./UpdateApiDocs-a9a0e159.js"),["./UpdateApiDocs-a9a0e159.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:at(()=>import("./DeleteApiDocs-da6f5a32.js"),["./DeleteApiDocs-da6f5a32.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:at(()=>import("./RealtimeApiDocs-1c7e54af.js"),["./RealtimeApiDocs-1c7e54af.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:at(()=>import("./AuthWithPasswordDocs-fa38cbdf.js"),["./AuthWithPasswordDocs-fa38cbdf.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:at(()=>import("./AuthWithOAuth2Docs-937df869.js"),["./AuthWithOAuth2Docs-937df869.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:at(()=>import("./AuthRefreshDocs-6e6bdd49.js"),["./AuthRefreshDocs-6e6bdd49.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:at(()=>import("./RequestVerificationDocs-3b079aad.js"),["./RequestVerificationDocs-3b079aad.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:at(()=>import("./ConfirmVerificationDocs-ec8e972e.js"),["./ConfirmVerificationDocs-ec8e972e.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:at(()=>import("./RequestPasswordResetDocs-dea655c6.js"),["./RequestPasswordResetDocs-dea655c6.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:at(()=>import("./ConfirmPasswordResetDocs-1c23cc2f.js"),["./ConfirmPasswordResetDocs-1c23cc2f.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:at(()=>import("./RequestEmailChangeDocs-04c11750.js"),["./RequestEmailChangeDocs-04c11750.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:at(()=>import("./ConfirmEmailChangeDocs-c4135ea3.js"),["./ConfirmEmailChangeDocs-c4135ea3.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:at(()=>import("./AuthMethodsDocs-99d1684a.js"),["./AuthMethodsDocs-99d1684a.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:at(()=>import("./ListExternalAuthsDocs-294ce65e.js"),["./ListExternalAuthsDocs-294ce65e.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:at(()=>import("./UnlinkExternalAuthDocs-d8bee752.js"),["./UnlinkExternalAuthDocs-d8bee752.js","./SdkTabs-98b01dec.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new bn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function _(k){se[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){pe.call(this,n,k)}function b(k){pe.call(this,n,k)}return n.$$.update=()=>{n.$$.dirty&12&&(o.$isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,_,g,b]}class o5 extends ve{constructor(e){super(),be(this,e,l5,s5,_e,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function r5(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",z.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[12]),h(r,"type","text"),h(r,"requried",a=!n[0].$isNew),h(r,"placeholder",u=n[0].$isNew?"Leave empty to auto generate...":n[3]),h(r,"id",f=n[12])},m(m,_){S(m,e,_),v(e,t),v(e,i),v(e,s),S(m,o,_),S(m,r,_),ue(r,n[0].username),d||(p=J(r,"input",n[4]),d=!0)},p(m,_){_&4096&&l!==(l=m[12])&&h(e,"for",l),_&1&&a!==(a=!m[0].$isNew)&&h(r,"requried",a),_&1&&u!==(u=m[0].$isNew?"Leave empty to auto generate...":m[3])&&h(r,"placeholder",u),_&4096&&f!==(f=m[12])&&h(r,"id",f),_&1&&r.value!==m[0].username&&ue(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function a5(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,_,g,b,k,$,T,C;return{c(){var O;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=U("Public: "),p=U(d),_=E(),g=y("input"),h(t,"class",z.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[12]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(g,"type","email"),g.autofocus=b=n[0].$isNew,h(g,"autocomplete","off"),h(g,"id",k=n[12]),g.required=$=(O=n[1].options)==null?void 0:O.requireEmail,h(g,"class","svelte-1751a4d")},m(O,M){S(O,e,M),v(e,t),v(e,i),v(e,s),S(O,o,M),S(O,r,M),v(r,a),v(a,u),v(u,f),v(u,p),S(O,_,M),S(O,g,M),ue(g,n[0].email),n[0].$isNew&&g.focus(),T||(C=[Ee(Ue.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[5]),J(g,"input",n[6])],T=!0)},p(O,M){var D;M&4096&&l!==(l=O[12])&&h(e,"for",l),M&1&&d!==(d=O[0].emailVisibility?"On":"Off")&&le(p,d),M&1&&m!==(m="btn btn-sm btn-transparent "+(O[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),M&1&&b!==(b=O[0].$isNew)&&(g.autofocus=b),M&4096&&k!==(k=O[12])&&h(g,"id",k),M&2&&$!==($=(D=O[1].options)==null?void 0:D.requireEmail)&&(g.required=$),M&1&&g.value!==O[0].email&&ue(g,O[0].email)},d(O){O&&w(e),O&&w(o),O&&w(r),O&&w(_),O&&w(g),T=!1,De(C)}}}function Mp(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[u5,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12292&&(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){V(e,i)}}}function u5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Op(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[f5,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[c5,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),H(s.$$.fragment),l=E(),o=y("div"),H(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[2]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),j(s,i,null),v(t,l),v(t,o),j(r,o,null),u=!0},p(f,d){const p={};d&12289&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&12289&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&4)&&x(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&tt(()=>{u&&(a||(a=Ve(e,St,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Ve(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),V(s),V(r),f&&a&&a.end()}}}function f5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[12]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[12]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),ue(r,n[0].password),u||(f=J(r,"input",n[8]),u=!0)},p(d,p){p&4096&&l!==(l=d[12])&&h(e,"for",l),p&4096&&a!==(a=d[12])&&h(r,"id",a),p&1&&r.value!==d[0].password&&ue(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function c5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[12]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[12]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),ue(r,n[0].passwordConfirm),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&4096&&l!==(l=d[12])&&h(e,"for",l),p&4096&&a!==(a=d[12])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&ue(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function d5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[10]),J(e,"change",ct(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,De(a)}}}function p5(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[0].$isNew?"":"required"),name:"username",$$slots:{default:[r5,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[a5,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}});let _=!n[0].$isNew&&Mp(n),g=(n[0].$isNew||n[2])&&Op(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[d5,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),_&&_.c(),u=E(),g&&g.c(),f=E(),d=y("div"),H(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),v(e,r),v(e,a),_&&_.m(a,null),v(a,u),g&&g.m(a,null),v(e,f),v(e,d),j(p,d,null),m=!0},p(k,[$]){var M;const T={};$&1&&(T.class="form-field "+(k[0].$isNew?"":"required")),$&12289&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&12291&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[0].$isNew?_&&(re(),P(_,1,1,()=>{_=null}),ae()):_?(_.p(k,$),$&1&&A(_,1)):(_=Mp(k),_.c(),A(_,1),_.m(a,u)),k[0].$isNew||k[2]?g?(g.p(k,$),$&5&&A(g,1)):(g=Op(k),g.c(),A(g,1),g.m(a,null)):g&&(re(),P(g,1,1,()=>{g=null}),ae());const O={};$&12289&&(O.$$scope={dirty:$,ctx:k}),p.$set(O)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(_),A(g),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(_),P(g),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),V(i),V(o),_&&_.d(),g&&g.d(),V(p)}}}function m5(n,e,t){let{collection:i=new bn}=e,{record:s=new di}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function d(){s.password=this.value,t(0,s),t(2,o)}function p(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function m(){s.verified=this.checked,t(0,s),t(2,o)}const _=g=>{s.$isNew||_n("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Di("password"),Di("passwordConfirm")))},[s,i,o,l,r,a,u,f,d,p,m,_]}class h5 extends ve{constructor(e){super(),be(this,e,m5,p5,_e,{collection:1,record:0})}}function _5(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}Xt(()=>(u(),()=>clearTimeout(a)));function d(m){se[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Ut(m)),t(3,s=Ge(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class b5 extends ve{constructor(e){super(),be(this,e,g5,_5,_e,{value:0,maxHeight:4})}}function v5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new b5({props:_}),se.push(()=>me(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),H(f.$$.fragment),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),j(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=z.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!d&&b&1&&(d=!0,k.value=g[0],ye(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),V(f,g)}}}function y5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[v5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function k5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class w5 extends ve{constructor(e){super(),be(this,e,k5,y5,_e,{field:1,value:0})}}function S5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("input"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",_=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),ue(f,n[0]),g||(b=J(f,"input",n[2]),g=!0)},p(k,$){var T,C;$&2&&i!==(i=z.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&le(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&_!==(_=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",_),$&1&>(f.value)!==k[0]&&ue(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function $5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[S5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function T5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(){s=gt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class C5 extends ve{constructor(e){super(),be(this,e,T5,$5,_e,{field:1,value:0})}}function M5(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=U(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&le(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function O5(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[M5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function D5(n,e,t){let{field:i=new vn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class E5 extends ve{constructor(e){super(),be(this,e,D5,O5,_e,{field:1,value:0})}}function A5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("input"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),ue(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&ue(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function I5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[A5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function P5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class L5 extends ve{constructor(e){super(),be(this,e,P5,I5,_e,{field:1,value:0})}}function N5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("input"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),ue(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&ue(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function F5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[N5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function R5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class q5 extends ve{constructor(e){super(),be(this,e,R5,F5,_e,{field:1,value:0})}}function Dp(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[Ee(Ue.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:Q,d(l){l&&w(e),i=!1,De(s)}}}function j5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b=n[0]&&!n[1].required&&Dp(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:z.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new lu({props:T}),se.push(()=>me(p,"value",k)),se.push(()=>me(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),a=U(" (UTC)"),f=E(),b&&b.c(),d=E(),H(p.$$.fragment),h(t,"class",i=Oi(z.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,O){S(C,e,O),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,O),b&&b.m(C,O),S(C,d,O),j(p,C,O),g=!0},p(C,O){(!g||O&2&&i!==(i=Oi(z.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!g||O&2)&&o!==(o=C[1].name+"")&&le(r,o),(!g||O&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,O):(b=Dp(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};O&256&&(M.id=C[8]),!m&&O&4&&(m=!0,M.value=C[2],ye(()=>m=!1)),!_&&O&1&&(_=!0,M.formattedValue=C[0],ye(()=>_=!1)),p.$set(M)},i(C){g||(A(p.$$.fragment,C),g=!0)},o(C){P(p.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),V(p,C)}}}function V5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[j5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function H5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class z5 extends ve{constructor(e){super(),be(this,e,H5,V5,_e,{field:1,value:0})}}function Ep(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=U("Select up to "),s=U(i),l=U(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&w(e)}}}function B5(n){var $,T,C,O,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;function g(D){n[3](D)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((O=n[1].options)==null?void 0:O.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new ou({props:b}),se.push(()=>me(f,"selected",g));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Ep(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),H(f.$$.fragment),p=E(),k&&k.c(),m=Se(),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(D,I){S(D,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(D,u,I),j(f,D,I),S(D,p,I),k&&k.m(D,I),S(D,m,I),_=!0},p(D,I){var F,R,N,q,Y;(!_||I&2&&i!==(i=z.getFieldTypeIcon(D[1].type)))&&h(t,"class",i),(!_||I&2)&&o!==(o=D[1].name+"")&&le(r,o),(!_||I&16&&a!==(a=D[4]))&&h(e,"for",a);const L={};I&16&&(L.id=D[4]),I&6&&(L.toggle=!D[1].required||D[2]),I&4&&(L.multiple=D[2]),I&7&&(L.closable=!D[2]||((F=D[0])==null?void 0:F.length)>=((R=D[1].options)==null?void 0:R.maxSelect)),I&2&&(L.items=(N=D[1].options)==null?void 0:N.values),I&2&&(L.searchable=((q=D[1].options)==null?void 0:q.values)>5),!d&&I&1&&(d=!0,L.selected=D[0],ye(()=>d=!1)),f.$set(L),((Y=D[1].options)==null?void 0:Y.maxSelect)>1?k?k.p(D,I):(k=Ep(D),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(D){_||(A(f.$$.fragment,D),_=!0)},o(D){P(f.$$.fragment,D),_=!1},d(D){D&&w(e),D&&w(u),V(f,D),D&&w(p),k&&k.d(D),D&&w(m)}}}function U5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[B5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function W5(n,e,t){let i,{field:s=new vn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class Y5 extends ve{constructor(e){super(),be(this,e,W5,U5,_e,{field:1,value:0})}}function K5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("textarea"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&16&&a!==(a=g[4])&&h(e,"for",a),b&16&&d!==(d=g[4])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function J5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[K5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Z5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class G5 extends ve{constructor(e){super(),be(this,e,Z5,J5,_e,{field:1,value:0})}}function X5(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function Q5(n){let e,t,i;return{c(){e=y("img"),Cn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Cn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function x5(n){let e;function t(l,o){return l[2]?Q5:X5}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function eM(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),z.hasImageExtension(s==null?void 0:s.name)&&z.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class tM extends ve{constructor(e){super(),be(this,e,eM,x5,_e,{file:0,size:1})}}function Ap(n){let e;function t(l,o){return l[4]==="image"?iM:nM}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function nM(n){let e,t;return{c(){e=y("object"),t=U("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function iM(n){let e,t,i;return{c(){e=y("img"),Cn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!Cn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function sM(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Ap(n);return{c(){i&&i.c(),t=Se()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Ap(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function lM(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",ct(n[0])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function oM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=U(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&le(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function rM(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[oM],header:[lM],default:[sM]},$$scope:{ctx:n}};return e=new cn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),V(e,s)}}}function aM(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){se[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){pe.call(this,n,m)}function p(m){pe.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=z.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class uM extends ve{constructor(e){super(),be(this,e,aM,rM,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function fM(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?mM:u[3]==="video"||u[3]==="audio"?pM:dM}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",Mn(n[13])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function cM(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function dM(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function pM(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function mM(n){let e,t,i,s,l;return{c(){e=y("img"),Cn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!Cn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function hM(n){let e,t,i;function s(a,u){return a[2]?cM:fM}let l=s(n),o=l(n),r={};return t=new uM({props:r}),n[14](t),{c(){o.c(),e=E(),H(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),j(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[14](null),V(t,a)}}}function _M(n,e,t){let i,s,l,o;Ke(n,tb,T=>t(12,o=T));let{record:r=null}=e,{filename:a=""}=e,{size:u=""}=e,f,d="",p="",m="",_=!1;async function g(){t(2,_=!0);try{t(10,m=await he.getAdminFileToken())}catch(T){console.warn("File token failure:",T)}t(2,_=!1)}function b(){t(5,d="")}const k=T=>{l&&(T.preventDefault(),f==null||f.show(p))};function $(T){se[T?"unshift":"push"](()=>{f=T,t(4,f)})}return n.$$set=T=>{"record"in T&&t(9,r=T.record),"filename"in T&&t(0,a=T.filename),"size"in T&&t(1,u=T.size)},n.$$.update=()=>{n.$$.dirty&4608&&t(11,i=typeof o[r==null?void 0:r.collectionId]<"u"?o[r==null?void 0:r.collectionId]:!0),n.$$.dirty&2048&&(i?g():t(10,m="")),n.$$.dirty&1&&t(3,s=z.getFileType(a)),n.$$.dirty&9&&t(7,l=["image","audio","video"].includes(s)||a.endsWith(".pdf")),n.$$.dirty&1541&&t(6,p=_?"":he.files.getUrl(r,a,{token:m})),n.$$.dirty&1541&&t(5,d=_?"":he.files.getUrl(r,a,{thumb:"100x100",token:m}))},[a,u,_,s,f,d,p,l,b,r,m,i,o,k,$]}class au extends ve{constructor(e){super(),be(this,e,_M,hM,_e,{record:9,filename:0,size:1})}}function Ip(n,e,t){const i=n.slice();return i[26]=e[t],i[28]=t,i}function Pp(n,e,t){const i=n.slice();i[29]=e[t],i[28]=t;const s=i[1].includes(i[28]);return i[30]=s,i}function gM(n){let e,t,i;function s(){return n[16](n[28])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Ee(Ue.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,De(i)}}}function bM(n){let e,t,i;function s(){return n[15](n[28])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Lp(n,e){let t,i,s,l,o,r,a=e[29]+"",u,f,d,p,m,_,g;s=new au({props:{record:e[2],filename:e[29]}});function b(T,C){return C[0]&18&&(_=null),_==null&&(_=!!T[1].includes(T[28])),_?bM:gM}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),H(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=U(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[28])),h(r,"href",f=he.files.getUrl(e[2],e[29])),h(r,"class",d="txt-ellipsis "+(e[30]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),j(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),g=!0},p(T,C){e=T;const O={};C[0]&4&&(O.record=e[2]),C[0]&16&&(O.filename=e[29]),s.$set(O),(!g||C[0]&18)&&x(i,"fade",e[1].includes(e[28])),(!g||C[0]&16)&&a!==(a=e[29]+"")&&le(u,a),(!g||C[0]&20&&f!==(f=he.files.getUrl(e[2],e[29])))&&h(r,"href",f),(!g||C[0]&18&&d!==(d="txt-ellipsis "+(e[30]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),V(s),$.d()}}}function Np(n){let e,t,i,s,l,o,r,a,u=n[26].name+"",f,d,p,m,_,g,b;i=new tM({props:{file:n[26]}});function k(){return n[17](n[28])}return{c(){e=y("div"),t=y("figure"),H(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=U(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[26].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),j(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),_=!0,g||(b=[Ee(Ue.call(null,m,"Remove file")),J(m,"click",k)],g=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[26]),i.$set(C),(!_||T[0]&1)&&u!==(u=n[26].name+"")&&le(f,u),(!_||T[0]&1&&d!==(d=n[26].name))&&h(l,"title",d)},i($){_||(A(i.$$.fragment,$),_=!0)},o($){P(i.$$.fragment,$),_=!1},d($){$&&w(e),V(i),g=!1,De(b)}}}function vM(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,_,g,b,k,$,T,C,O,M,D,I,L=n[4];const F=Y=>Y[29]+Y[2].id;for(let Y=0;YP(N[Y],1,1,()=>{N[Y]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("div");for(let Y=0;YNew collection`,h(t,"type","button"),h(t,"class","btn btn-block btn-outline"),h(e,"class","sidebar-footer")},m(l,o){S(l,e,o),v(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:Q,d(l){l&&w(e),i=!1,s()}}}function Z4(n){let e,t,i,s,l,o,r,a,u,f,d,p=[],m=new Map,_,g,b,k,$,T,C=n[3];const O=L=>L[15].id;for(let L=0;L',o=E(),r=y("input"),a=E(),u=y("hr"),f=E(),d=y("div");for(let L=0;L20),h(e,"class","page-sidebar collection-sidebar")},m(L,F){S(L,e,F),v(e,t),v(t,i),v(i,s),v(s,l),v(i,o),v(i,r),ue(r,n[0]),v(e,a),v(e,u),v(e,f),v(e,d);for(let R=0;R20),L[7]?D&&(D.d(1),D=null):D?D.p(L,F):(D=vp(L),D.c(),D.m(e,null));const R={};b.$set(R)},i(L){k||(A(b.$$.fragment,L),k=!0)},o(L){P(b.$$.fragment,L),k=!1},d(L){L&&w(e);for(let F=0;F{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function X4(n,e,t){let i,s,l,o,r,a,u;Ke(n,hi,$=>t(5,o=$)),Ke(n,ii,$=>t(9,r=$)),Ke(n,No,$=>t(6,a=$)),Ke(n,Ms,$=>t(7,u=$));let f,d="";function p($){tn(hi,o=$,o)}const m=()=>t(0,d="");function _(){d=this.value,t(0,d)}const g=()=>f==null?void 0:f.show();function b($){se[$?"unshift":"push"](()=>{f=$,t(2,f)})}const k=$=>{var T;(T=$.detail)!=null&&T.isNew&&$.detail.collection&&p($.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&G4(),n.$$.dirty&1&&t(1,i=d.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=d!==""),n.$$.dirty&515&&t(3,l=r.filter($=>$.id==d||$.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[d,i,f,l,s,o,a,u,p,r,m,_,g,b,k]}class Q4 extends ve{constructor(e){super(),be(this,e,X4,Z4,_e,{})}}function yp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function kp(n){n[18]=n[19].default}function wp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Sp(n){let e;return{c(){e=y("hr"),h(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $p(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,d=i&&Sp();function p(){return e[9](e[14])}return{key:n,first:null,c(){t=Se(),d&&d.c(),s=E(),l=y("button"),r=U(o),a=E(),h(l,"type","button"),h(l,"class","sidebar-item"),x(l,"active",e[5]===e[14]),this.first=t},m(m,_){S(m,t,_),d&&d.m(m,_),S(m,s,_),S(m,l,_),v(l,r),v(l,a),u||(f=J(l,"click",p),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?d||(d=Sp(),d.c(),d.m(s.parentNode,s)):d&&(d.d(1),d=null),_&8&&o!==(o=e[15].label+"")&&le(r,o),_&40&&x(l,"active",e[5]===e[14])},d(m){m&&w(t),d&&d.d(m),m&&w(s),m&&w(l),u=!1,f()}}}function Tp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:t5,then:e5,catch:x4,value:19,blocks:[,,,]};return pu(t=n[15].component,s),{c(){e=Se(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&pu(t,s)||Fb(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function x4(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function e5(n){kp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){H(e.$$.fragment),t=E()},m(s,l){j(e,s,l),S(s,t,l),i=!0},p(s,l){kp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){V(e,s),s&&w(t)}}}function t5(n){return{c:Q,m:Q,p:Q,i:Q,o:Q,d:Q}}function Cp(n,e){let t,i,s,l=e[5]===e[14]&&Tp(e);return{key:n,first:null,c(){t=Se(),l&&l.c(),i=Se(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Tp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),P(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function n5(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,d=Object.entries(n[3]);const p=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',h(e,"type","button"),h(e,"class","btn btn-transparent")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function s5(n){let e,t,i={class:"docs-panel",$$slots:{footer:[i5],default:[n5]},$$scope:{ctx:n}};return e=new cn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function l5(n,e,t){const i={list:{label:"List/Search",component:at(()=>import("./ListApiDocs-efd300f9.js"),["./ListApiDocs-efd300f9.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:at(()=>import("./ViewApiDocs-3ad3880e.js"),["./ViewApiDocs-3ad3880e.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:at(()=>import("./CreateApiDocs-85009ca9.js"),["./CreateApiDocs-85009ca9.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:at(()=>import("./UpdateApiDocs-20297978.js"),["./UpdateApiDocs-20297978.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:at(()=>import("./DeleteApiDocs-42b997b1.js"),["./DeleteApiDocs-42b997b1.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:at(()=>import("./RealtimeApiDocs-c7e23f83.js"),["./RealtimeApiDocs-c7e23f83.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:at(()=>import("./AuthWithPasswordDocs-2ad19a54.js"),["./AuthWithPasswordDocs-2ad19a54.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:at(()=>import("./AuthWithOAuth2Docs-b6d55bee.js"),["./AuthWithOAuth2Docs-b6d55bee.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:at(()=>import("./AuthRefreshDocs-643f84c5.js"),["./AuthRefreshDocs-643f84c5.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:at(()=>import("./RequestVerificationDocs-1db2dc91.js"),["./RequestVerificationDocs-1db2dc91.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:at(()=>import("./ConfirmVerificationDocs-ce2e1893.js"),["./ConfirmVerificationDocs-ce2e1893.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:at(()=>import("./RequestPasswordResetDocs-7a66f98e.js"),["./RequestPasswordResetDocs-7a66f98e.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:at(()=>import("./ConfirmPasswordResetDocs-04a66652.js"),["./ConfirmPasswordResetDocs-04a66652.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:at(()=>import("./RequestEmailChangeDocs-e827d67e.js"),["./RequestEmailChangeDocs-e827d67e.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:at(()=>import("./ConfirmEmailChangeDocs-224ee7c9.js"),["./ConfirmEmailChangeDocs-224ee7c9.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:at(()=>import("./AuthMethodsDocs-5804e5c2.js"),["./AuthMethodsDocs-5804e5c2.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:at(()=>import("./ListExternalAuthsDocs-3234c8ee.js"),["./ListExternalAuthsDocs-3234c8ee.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:at(()=>import("./UnlinkExternalAuthDocs-c9dfb1c2.js"),["./UnlinkExternalAuthDocs-c9dfb1c2.js","./SdkTabs-2b871527.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new bn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(k){return t(2,o=k),d(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function d(k){t(5,r=k)}const p=()=>f(),m=k=>d(k);function _(k){se[k?"unshift":"push"](()=>{l=k,t(4,l)})}function g(k){pe.call(this,n,k)}function b(k){pe.call(this,n,k)}return n.$$.update=()=>{n.$$.dirty&12&&(o.$isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,d,o,a,l,r,i,u,p,m,_,g,b]}class o5 extends ve{constructor(e){super(),be(this,e,l5,s5,_e,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function r5(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Username",o=E(),r=y("input"),h(t,"class",z.getFieldTypeIcon("user")),h(s,"class","txt"),h(e,"for",l=n[12]),h(r,"type","text"),h(r,"requried",a=!n[0].$isNew),h(r,"placeholder",u=n[0].$isNew?"Leave empty to auto generate...":n[3]),h(r,"id",f=n[12])},m(m,_){S(m,e,_),v(e,t),v(e,i),v(e,s),S(m,o,_),S(m,r,_),ue(r,n[0].username),d||(p=J(r,"input",n[4]),d=!0)},p(m,_){_&4096&&l!==(l=m[12])&&h(e,"for",l),_&1&&a!==(a=!m[0].$isNew)&&h(r,"requried",a),_&1&&u!==(u=m[0].$isNew?"Leave empty to auto generate...":m[3])&&h(r,"placeholder",u),_&4096&&f!==(f=m[12])&&h(r,"id",f),_&1&&r.value!==m[0].username&&ue(r,m[0].username)},d(m){m&&w(e),m&&w(o),m&&w(r),d=!1,p()}}}function a5(n){let e,t,i,s,l,o,r,a,u,f,d=n[0].emailVisibility?"On":"Off",p,m,_,g,b,k,$,T,C;return{c(){var O;e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Email",o=E(),r=y("div"),a=y("button"),u=y("span"),f=U("Public: "),p=U(d),_=E(),g=y("input"),h(t,"class",z.getFieldTypeIcon("email")),h(s,"class","txt"),h(e,"for",l=n[12]),h(u,"class","txt"),h(a,"type","button"),h(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),h(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),h(g,"type","email"),g.autofocus=b=n[0].$isNew,h(g,"autocomplete","off"),h(g,"id",k=n[12]),g.required=$=(O=n[1].options)==null?void 0:O.requireEmail,h(g,"class","svelte-1751a4d")},m(O,M){S(O,e,M),v(e,t),v(e,i),v(e,s),S(O,o,M),S(O,r,M),v(r,a),v(a,u),v(u,f),v(u,p),S(O,_,M),S(O,g,M),ue(g,n[0].email),n[0].$isNew&&g.focus(),T||(C=[Ee(Ue.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[5]),J(g,"input",n[6])],T=!0)},p(O,M){var D;M&4096&&l!==(l=O[12])&&h(e,"for",l),M&1&&d!==(d=O[0].emailVisibility?"On":"Off")&&le(p,d),M&1&&m!==(m="btn btn-sm btn-transparent "+(O[0].emailVisibility?"btn-success":"btn-hint"))&&h(a,"class",m),M&1&&b!==(b=O[0].$isNew)&&(g.autofocus=b),M&4096&&k!==(k=O[12])&&h(g,"id",k),M&2&&$!==($=(D=O[1].options)==null?void 0:D.requireEmail)&&(g.required=$),M&1&&g.value!==O[0].email&&ue(g,O[0].email)},d(O){O&&w(e),O&&w(o),O&&w(r),O&&w(_),O&&w(g),T=!1,De(C)}}}function Mp(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[u5,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12292&&(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){V(e,i)}}}function u5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Change password"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Op(n){let e,t,i,s,l,o,r,a,u;return s=new de({props:{class:"form-field required",name:"password",$$slots:{default:[f5,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[c5,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),i=y("div"),H(s.$$.fragment),l=E(),o=y("div"),H(r.$$.fragment),h(i,"class","col-sm-6"),h(o,"class","col-sm-6"),h(t,"class","grid"),x(t,"p-t-xs",n[2]),h(e,"class","block")},m(f,d){S(f,e,d),v(e,t),v(t,i),j(s,i,null),v(t,l),v(t,o),j(r,o,null),u=!0},p(f,d){const p={};d&12289&&(p.$$scope={dirty:d,ctx:f}),s.$set(p);const m={};d&12289&&(m.$$scope={dirty:d,ctx:f}),r.$set(m),(!u||d&4)&&x(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&tt(()=>{u&&(a||(a=Ve(e,St,{duration:150},!0)),a.run(1))}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=Ve(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),V(s),V(r),f&&a&&a.end()}}}function f5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[12]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[12]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),ue(r,n[0].password),u||(f=J(r,"input",n[8]),u=!0)},p(d,p){p&4096&&l!==(l=d[12])&&h(e,"for",l),p&4096&&a!==(a=d[12])&&h(r,"id",a),p&1&&r.value!==d[0].password&&ue(r,d[0].password)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function c5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="Password confirm",o=E(),r=y("input"),h(t,"class","ri-lock-line"),h(s,"class","txt"),h(e,"for",l=n[12]),h(r,"type","password"),h(r,"autocomplete","new-password"),h(r,"id",a=n[12]),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),ue(r,n[0].passwordConfirm),u||(f=J(r,"input",n[9]),u=!0)},p(d,p){p&4096&&l!==(l=d[12])&&h(e,"for",l),p&4096&&a!==(a=d[12])&&h(r,"id",a),p&1&&r.value!==d[0].passwordConfirm&&ue(r,d[0].passwordConfirm)},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,f()}}}function d5(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Verified"),h(e,"type","checkbox"),h(e,"id",t=n[12]),h(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"change",n[10]),J(e,"change",ct(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&h(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,De(a)}}}function p5(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field "+(n[0].$isNew?"":"required"),name:"username",$$slots:{default:[r5,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[a5,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}});let _=!n[0].$isNew&&Mp(n),g=(n[0].$isNew||n[2])&&Op(n);return p=new de({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[d5,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),_&&_.c(),u=E(),g&&g.c(),f=E(),d=y("div"),H(p.$$.fragment),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(a,"class","col-lg-12"),h(d,"class","col-lg-12"),h(e,"class","grid m-b-base")},m(k,$){S(k,e,$),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),v(e,r),v(e,a),_&&_.m(a,null),v(a,u),g&&g.m(a,null),v(e,f),v(e,d),j(p,d,null),m=!0},p(k,[$]){var M;const T={};$&1&&(T.class="form-field "+(k[0].$isNew?"":"required")),$&12289&&(T.$$scope={dirty:$,ctx:k}),i.$set(T);const C={};$&2&&(C.class="form-field "+((M=k[1].options)!=null&&M.requireEmail?"required":"")),$&12291&&(C.$$scope={dirty:$,ctx:k}),o.$set(C),k[0].$isNew?_&&(re(),P(_,1,1,()=>{_=null}),ae()):_?(_.p(k,$),$&1&&A(_,1)):(_=Mp(k),_.c(),A(_,1),_.m(a,u)),k[0].$isNew||k[2]?g?(g.p(k,$),$&5&&A(g,1)):(g=Op(k),g.c(),A(g,1),g.m(a,null)):g&&(re(),P(g,1,1,()=>{g=null}),ae());const O={};$&12289&&(O.$$scope={dirty:$,ctx:k}),p.$set(O)},i(k){m||(A(i.$$.fragment,k),A(o.$$.fragment,k),A(_),A(g),A(p.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),P(o.$$.fragment,k),P(_),P(g),P(p.$$.fragment,k),m=!1},d(k){k&&w(e),V(i),V(o),_&&_.d(),g&&g.d(),V(p)}}}function m5(n,e,t){let{collection:i=new bn}=e,{record:s=new di}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function d(){s.password=this.value,t(0,s),t(2,o)}function p(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function m(){s.verified=this.checked,t(0,s),t(2,o)}const _=g=>{s.$isNew||_n("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Di("password"),Di("passwordConfirm")))},[s,i,o,l,r,a,u,f,d,p,m,_]}class h5 extends ve{constructor(e){super(),be(this,e,m5,p5,_e,{collection:1,record:0})}}function _5(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}Xt(()=>(u(),()=>clearTimeout(a)));function d(m){se[m?"unshift":"push"](()=>{r=m,t(1,r)})}function p(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Ut(m)),t(3,s=Ge(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,d,p]}class b5 extends ve{constructor(e){super(),be(this,e,g5,_5,_e,{value:0,maxHeight:4})}}function v5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new b5({props:_}),se.push(()=>me(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),H(f.$$.fragment),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),j(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=z.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),b&2&&(k.required=g[1].required),!d&&b&1&&(d=!0,k.value=g[0],ye(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),V(f,g)}}}function y5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[v5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function k5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class w5 extends ve{constructor(e){super(),be(this,e,k5,y5,_e,{field:1,value:0})}}function S5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b;return{c(){var k,$;e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("input"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","number"),h(f,"id",d=n[3]),f.required=p=n[1].required,h(f,"min",m=(k=n[1].options)==null?void 0:k.min),h(f,"max",_=($=n[1].options)==null?void 0:$.max),h(f,"step","any")},m(k,$){S(k,e,$),v(e,t),v(e,s),v(e,l),v(l,r),S(k,u,$),S(k,f,$),ue(f,n[0]),g||(b=J(f,"input",n[2]),g=!0)},p(k,$){var T,C;$&2&&i!==(i=z.getFieldTypeIcon(k[1].type))&&h(t,"class",i),$&2&&o!==(o=k[1].name+"")&&le(r,o),$&8&&a!==(a=k[3])&&h(e,"for",a),$&8&&d!==(d=k[3])&&h(f,"id",d),$&2&&p!==(p=k[1].required)&&(f.required=p),$&2&&m!==(m=(T=k[1].options)==null?void 0:T.min)&&h(f,"min",m),$&2&&_!==(_=(C=k[1].options)==null?void 0:C.max)&&h(f,"max",_),$&1&>(f.value)!==k[0]&&ue(f,k[0])},d(k){k&&w(e),k&&w(u),k&&w(f),g=!1,b()}}}function $5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[S5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function T5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(){s=gt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class C5 extends ve{constructor(e){super(),be(this,e,T5,$5,_e,{field:1,value:0})}}function M5(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=y("input"),i=E(),s=y("label"),o=U(l),h(e,"type","checkbox"),h(e,"id",t=n[3]),h(s,"for",r=n[3])},m(f,d){S(f,e,d),e.checked=n[0],S(f,i,d),S(f,s,d),v(s,o),a||(u=J(e,"change",n[2]),a=!0)},p(f,d){d&8&&t!==(t=f[3])&&h(e,"id",t),d&1&&(e.checked=f[0]),d&2&&l!==(l=f[1].name+"")&&le(o,l),d&8&&r!==(r=f[3])&&h(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function O5(n){let e,t;return e=new de({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[M5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function D5(n,e,t){let{field:i=new vn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class E5 extends ve{constructor(e){super(),be(this,e,D5,O5,_e,{field:1,value:0})}}function A5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("input"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","email"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),ue(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&ue(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function I5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[A5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function P5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class L5 extends ve{constructor(e){super(),be(this,e,P5,I5,_e,{field:1,value:0})}}function N5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("input"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3]),h(f,"type","url"),h(f,"id",d=n[3]),f.required=p=n[1].required},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),ue(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&8&&a!==(a=g[3])&&h(e,"for",a),b&8&&d!==(d=g[3])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&1&&f.value!==g[0]&&ue(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function F5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[N5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function R5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class q5 extends ve{constructor(e){super(),be(this,e,R5,F5,_e,{field:1,value:0})}}function Dp(n){let e,t,i,s;return{c(){e=y("div"),t=y("button"),t.innerHTML='',h(t,"type","button"),h(t,"class","link-hint clear-btn svelte-11df51y"),h(e,"class","form-field-addon")},m(l,o){S(l,e,o),v(e,t),i||(s=[Ee(Ue.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:Q,d(l){l&&w(e),i=!1,De(s)}}}function j5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_,g,b=n[0]&&!n[1].required&&Dp(n);function k(C){n[6](C)}function $(C){n[7](C)}let T={id:n[8],options:z.defaultFlatpickrOptions()};return n[2]!==void 0&&(T.value=n[2]),n[0]!==void 0&&(T.formattedValue=n[0]),p=new lu({props:T}),se.push(()=>me(p,"value",k)),se.push(()=>me(p,"formattedValue",$)),p.$on("close",n[3]),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),a=U(" (UTC)"),f=E(),b&&b.c(),d=E(),H(p.$$.fragment),h(t,"class",i=Oi(z.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),h(l,"class","txt"),h(e,"for",u=n[8])},m(C,O){S(C,e,O),v(e,t),v(e,s),v(e,l),v(l,r),v(l,a),S(C,f,O),b&&b.m(C,O),S(C,d,O),j(p,C,O),g=!0},p(C,O){(!g||O&2&&i!==(i=Oi(z.getFieldTypeIcon(C[1].type))+" svelte-11df51y"))&&h(t,"class",i),(!g||O&2)&&o!==(o=C[1].name+"")&&le(r,o),(!g||O&256&&u!==(u=C[8]))&&h(e,"for",u),C[0]&&!C[1].required?b?b.p(C,O):(b=Dp(C),b.c(),b.m(d.parentNode,d)):b&&(b.d(1),b=null);const M={};O&256&&(M.id=C[8]),!m&&O&4&&(m=!0,M.value=C[2],ye(()=>m=!1)),!_&&O&1&&(_=!0,M.formattedValue=C[0],ye(()=>_=!1)),p.$set(M)},i(C){g||(A(p.$$.fragment,C),g=!0)},o(C){P(p.$$.fragment,C),g=!1},d(C){C&&w(e),C&&w(f),b&&b.d(C),C&&w(d),V(p,C)}}}function V5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[j5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function H5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e,l=s;function o(d){d.detail&&d.detail.length==3&&t(0,s=d.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(d){l=d,t(2,l),t(0,s)}function f(d){s=d,t(0,s)}return n.$$set=d=>{"field"in d&&t(1,i=d.field),"value"in d&&t(0,s=d.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class z5 extends ve{constructor(e){super(),be(this,e,H5,V5,_e,{field:1,value:0})}}function Ep(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=y("div"),t=U("Select up to "),s=U(i),l=U(" items."),h(e,"class","help-block")},m(o,r){S(o,e,r),v(e,t),v(e,s),v(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&w(e)}}}function B5(n){var $,T,C,O,M;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;function g(D){n[3](D)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||(($=n[0])==null?void 0:$.length)>=((T=n[1].options)==null?void 0:T.maxSelect),items:(C=n[1].options)==null?void 0:C.values,searchable:((O=n[1].options)==null?void 0:O.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new ou({props:b}),se.push(()=>me(f,"selected",g));let k=((M=n[1].options)==null?void 0:M.maxSelect)>1&&Ep(n);return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),H(f.$$.fragment),p=E(),k&&k.c(),m=Se(),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4])},m(D,I){S(D,e,I),v(e,t),v(e,s),v(e,l),v(l,r),S(D,u,I),j(f,D,I),S(D,p,I),k&&k.m(D,I),S(D,m,I),_=!0},p(D,I){var F,R,N,q,Y;(!_||I&2&&i!==(i=z.getFieldTypeIcon(D[1].type)))&&h(t,"class",i),(!_||I&2)&&o!==(o=D[1].name+"")&&le(r,o),(!_||I&16&&a!==(a=D[4]))&&h(e,"for",a);const L={};I&16&&(L.id=D[4]),I&6&&(L.toggle=!D[1].required||D[2]),I&4&&(L.multiple=D[2]),I&7&&(L.closable=!D[2]||((F=D[0])==null?void 0:F.length)>=((R=D[1].options)==null?void 0:R.maxSelect)),I&2&&(L.items=(N=D[1].options)==null?void 0:N.values),I&2&&(L.searchable=((q=D[1].options)==null?void 0:q.values)>5),!d&&I&1&&(d=!0,L.selected=D[0],ye(()=>d=!1)),f.$set(L),((Y=D[1].options)==null?void 0:Y.maxSelect)>1?k?k.p(D,I):(k=Ep(D),k.c(),k.m(m.parentNode,m)):k&&(k.d(1),k=null)},i(D){_||(A(f.$$.fragment,D),_=!0)},o(D){P(f.$$.fragment,D),_=!1},d(D){D&&w(e),D&&w(u),V(f,D),D&&w(p),k&&k.d(D),D&&w(m)}}}function U5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[B5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function W5(n,e,t){let i,{field:s=new vn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class Y5 extends ve{constructor(e){super(),be(this,e,W5,U5,_e,{field:1,value:0})}}function K5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p,m,_;return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("textarea"),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[4]),h(f,"id",d=n[4]),h(f,"class","txt-mono"),f.required=p=n[1].required,f.value=n[2]},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),S(g,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(g,b){b&2&&i!==(i=z.getFieldTypeIcon(g[1].type))&&h(t,"class",i),b&2&&o!==(o=g[1].name+"")&&le(r,o),b&16&&a!==(a=g[4])&&h(e,"for",a),b&16&&d!==(d=g[4])&&h(f,"id",d),b&2&&p!==(p=g[1].required)&&(f.required=p),b&4&&(f.value=g[2])},d(g){g&&w(e),g&&w(u),g&&w(f),m=!1,_()}}}function J5(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[K5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Z5(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class G5 extends ve{constructor(e){super(),be(this,e,Z5,J5,_e,{field:1,value:0})}}function X5(n){let e,t;return{c(){e=y("i"),h(e,"class","ri-file-line"),h(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&h(e,"alt",t)},d(i){i&&w(e)}}}function Q5(n){let e,t,i;return{c(){e=y("img"),Cn(e.src,t=n[2])||h(e,"src",t),h(e,"width",n[1]),h(e,"height",n[1]),h(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Cn(e.src,t=s[2])&&h(e,"src",t),l&2&&h(e,"width",s[1]),l&2&&h(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&h(e,"alt",i)},d(s){s&&w(e)}}}function x5(n){let e;function t(l,o){return l[2]?Q5:X5}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function eM(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),z.hasImageExtension(s==null?void 0:s.name)&&z.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class tM extends ve{constructor(e){super(),be(this,e,eM,x5,_e,{file:0,size:1})}}function Ap(n){let e;function t(l,o){return l[4]==="image"?iM:nM}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function nM(n){let e,t;return{c(){e=y("object"),t=U("Cannot preview the file."),h(e,"title",n[2]),h(e,"data",n[1])},m(i,s){S(i,e,s),v(e,t)},p(i,s){s&4&&h(e,"title",i[2]),s&2&&h(e,"data",i[1])},d(i){i&&w(e)}}}function iM(n){let e,t,i;return{c(){e=y("img"),Cn(e.src,t=n[1])||h(e,"src",t),h(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&2&&!Cn(e.src,t=s[1])&&h(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&h(e,"alt",i)},d(s){s&&w(e)}}}function sM(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Ap(n);return{c(){i&&i.c(),t=Se()},m(l,o){i&&i.m(l,o),S(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Ap(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&w(t)}}}function lM(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=J(e,"click",ct(n[0])),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function oM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("a"),t=U(n[2]),i=E(),s=y("i"),l=E(),o=y("div"),r=E(),a=y("button"),a.textContent="Close",h(s,"class","ri-external-link-line"),h(e,"href",n[1]),h(e,"title",n[2]),h(e,"target","_blank"),h(e,"rel","noreferrer noopener"),h(e,"class","link-hint txt-ellipsis inline-flex"),h(o,"class","flex-fill"),h(a,"type","button"),h(a,"class","btn btn-transparent")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,l,p),S(d,o,p),S(d,r,p),S(d,a,p),u||(f=J(a,"click",n[0]),u=!0)},p(d,p){p&4&&le(t,d[2]),p&2&&h(e,"href",d[1]),p&4&&h(e,"title",d[2])},d(d){d&&w(e),d&&w(l),d&&w(o),d&&w(r),d&&w(a),u=!1,f()}}}function rM(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[oM],header:[lM],default:[sM]},$$scope:{ctx:n}};return e=new cn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[7](null),V(e,s)}}}function aM(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){se[m?"unshift":"push"](()=>{o=m,t(3,o)})}function d(m){pe.call(this,n,m)}function p(m){pe.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=z.getFileType(s))},[u,r,s,o,l,a,i,f,d,p]}class uM extends ve{constructor(e){super(),be(this,e,aM,rM,_e,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function fM(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?mM:u[3]==="video"||u[3]==="audio"?pM:dM}let r=o(n),a=r(n);return{c(){e=y("a"),a.c(),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),h(e,"href",n[6]),h(e,"target","_blank"),h(e,"rel","noreferrer"),h(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){S(u,e,f),a.m(e,null),s||(l=J(e,"click",Mn(n[13])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&h(e,"class",t),f&64&&h(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&h(e,"title",i)},d(u){u&&w(e),a.d(),s=!1,l()}}}function cM(n){let e,t;return{c(){e=y("div"),h(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){S(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&h(e,"class",t)},d(i){i&&w(e)}}}function dM(n){let e;return{c(){e=y("i"),h(e,"class","ri-file-3-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function pM(n){let e;return{c(){e=y("i"),h(e,"class","ri-video-line")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function mM(n){let e,t,i,s,l;return{c(){e=y("img"),Cn(e.src,t=n[5])||h(e,"src",t),h(e,"alt",n[0]),h(e,"title",i="Preview "+n[0])},m(o,r){S(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!Cn(e.src,t=o[5])&&h(e,"src",t),r&1&&h(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&h(e,"title",i)},d(o){o&&w(e),s=!1,l()}}}function hM(n){let e,t,i;function s(a,u){return a[2]?cM:fM}let l=s(n),o=l(n),r={};return t=new uM({props:r}),n[14](t),{c(){o.c(),e=E(),H(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),j(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[14](null),V(t,a)}}}function _M(n,e,t){let i,s,l,o;Ke(n,tb,T=>t(12,o=T));let{record:r=null}=e,{filename:a=""}=e,{size:u=""}=e,f,d="",p="",m="",_=!1;async function g(){t(2,_=!0);try{t(10,m=await he.getAdminFileToken())}catch(T){console.warn("File token failure:",T)}t(2,_=!1)}function b(){t(5,d="")}const k=T=>{l&&(T.preventDefault(),f==null||f.show(p))};function $(T){se[T?"unshift":"push"](()=>{f=T,t(4,f)})}return n.$$set=T=>{"record"in T&&t(9,r=T.record),"filename"in T&&t(0,a=T.filename),"size"in T&&t(1,u=T.size)},n.$$.update=()=>{n.$$.dirty&4608&&t(11,i=typeof o[r==null?void 0:r.collectionId]<"u"?o[r==null?void 0:r.collectionId]:!0),n.$$.dirty&2048&&(i?g():t(10,m="")),n.$$.dirty&1&&t(3,s=z.getFileType(a)),n.$$.dirty&9&&t(7,l=["image","audio","video"].includes(s)||a.endsWith(".pdf")),n.$$.dirty&1541&&t(6,p=_?"":he.files.getUrl(r,a,{token:m})),n.$$.dirty&1541&&t(5,d=_?"":he.files.getUrl(r,a,{thumb:"100x100",token:m}))},[a,u,_,s,f,d,p,l,b,r,m,i,o,k,$]}class au extends ve{constructor(e){super(),be(this,e,_M,hM,_e,{record:9,filename:0,size:1})}}function Ip(n,e,t){const i=n.slice();return i[26]=e[t],i[28]=t,i}function Pp(n,e,t){const i=n.slice();i[29]=e[t],i[28]=t;const s=i[1].includes(i[28]);return i[30]=s,i}function gM(n){let e,t,i;function s(){return n[16](n[28])}return{c(){e=y("button"),e.innerHTML='',h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){S(l,e,o),t||(i=[Ee(Ue.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,De(i)}}}function bM(n){let e,t,i;function s(){return n[15](n[28])}return{c(){e=y("button"),e.innerHTML='Restore',h(e,"type","button"),h(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){S(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Lp(n,e){let t,i,s,l,o,r,a=e[29]+"",u,f,d,p,m,_,g;s=new au({props:{record:e[2],filename:e[29]}});function b(T,C){return C[0]&18&&(_=null),_==null&&(_=!!T[1].includes(T[28])),_?bM:gM}let k=b(e,[-1,-1]),$=k(e);return{key:n,first:null,c(){t=y("div"),i=y("div"),H(s.$$.fragment),l=E(),o=y("div"),r=y("a"),u=U(a),p=E(),m=y("div"),$.c(),x(i,"fade",e[1].includes(e[28])),h(r,"href",f=he.files.getUrl(e[2],e[29])),h(r,"class",d="txt-ellipsis "+(e[30]?"txt-strikethrough txt-hint":"link-primary")),h(r,"title","Download"),h(r,"target","_blank"),h(r,"rel","noopener noreferrer"),h(o,"class","content"),h(m,"class","actions"),h(t,"class","list-item"),this.first=t},m(T,C){S(T,t,C),v(t,i),j(s,i,null),v(t,l),v(t,o),v(o,r),v(r,u),v(t,p),v(t,m),$.m(m,null),g=!0},p(T,C){e=T;const O={};C[0]&4&&(O.record=e[2]),C[0]&16&&(O.filename=e[29]),s.$set(O),(!g||C[0]&18)&&x(i,"fade",e[1].includes(e[28])),(!g||C[0]&16)&&a!==(a=e[29]+"")&&le(u,a),(!g||C[0]&20&&f!==(f=he.files.getUrl(e[2],e[29])))&&h(r,"href",f),(!g||C[0]&18&&d!==(d="txt-ellipsis "+(e[30]?"txt-strikethrough txt-hint":"link-primary")))&&h(r,"class",d),k===(k=b(e,C))&&$?$.p(e,C):($.d(1),$=k(e),$&&($.c(),$.m(m,null)))},i(T){g||(A(s.$$.fragment,T),g=!0)},o(T){P(s.$$.fragment,T),g=!1},d(T){T&&w(t),V(s),$.d()}}}function Np(n){let e,t,i,s,l,o,r,a,u=n[26].name+"",f,d,p,m,_,g,b;i=new tM({props:{file:n[26]}});function k(){return n[17](n[28])}return{c(){e=y("div"),t=y("figure"),H(i.$$.fragment),s=E(),l=y("div"),o=y("small"),o.textContent="New",r=E(),a=y("span"),f=U(u),p=E(),m=y("button"),m.innerHTML='',h(t,"class","thumb"),h(o,"class","label label-success m-r-5"),h(a,"class","txt"),h(l,"class","filename m-r-auto"),h(l,"title",d=n[26].name),h(m,"type","button"),h(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),h(e,"class","list-item")},m($,T){S($,e,T),v(e,t),j(i,t,null),v(e,s),v(e,l),v(l,o),v(l,r),v(l,a),v(a,f),v(e,p),v(e,m),_=!0,g||(b=[Ee(Ue.call(null,m,"Remove file")),J(m,"click",k)],g=!0)},p($,T){n=$;const C={};T[0]&1&&(C.file=n[26]),i.$set(C),(!_||T[0]&1)&&u!==(u=n[26].name+"")&&le(f,u),(!_||T[0]&1&&d!==(d=n[26].name))&&h(l,"title",d)},i($){_||(A(i.$$.fragment,$),_=!0)},o($){P(i.$$.fragment,$),_=!1},d($){$&&w(e),V(i),g=!1,De(b)}}}function vM(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,d=[],p=new Map,m,_,g,b,k,$,T,C,O,M,D,I,L=n[4];const F=Y=>Y[29]+Y[2].id;for(let Y=0;YP(N[Y],1,1,()=>{N[Y]=null});return{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),f=y("div");for(let Y=0;YOpen picker`,h(t,"class",i=Oi(z.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),h(l,"class","txt"),h(e,"for",a=n[14]),h(d,"class","relations-list svelte-1ynw0pc"),h(_,"type","button"),h(_,"class","btn btn-transparent btn-sm btn-block"),h(m,"class","list-item list-item-btn"),h(f,"class","list")},m(M,D){S(M,e,D),v(e,t),v(e,s),v(e,l),v(l,r),S(M,u,D),S(M,f,D),v(f,d);for(let I=0;I({14:r}),({uniqueId:r})=>r?16384:0]},$$scope:{ctx:n}};e=new de({props:l}),n[10](e);let o={value:n[0],field:n[2]};return i=new zM({props:o}),n[11](i),i.$on("save",n[12]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&2113591&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[10](null),V(e,r),r&&w(t),n[11](null),V(i,r)}}}const sm=100;function WM(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new vn}=e,r,a=[],u=!1;f();async function f(){var C,O;const k=z.toArray(s);if(!((C=o==null?void 0:o.options)!=null&&C.collectionId)||!k.length){t(4,a=[]),t(5,u=!1);return}t(5,u=!0);const $=k.slice(),T=[];for(;$.length>0;){const M=[];for(const D of $.splice(0,sm))M.push(`id="${D}"`);T.push(he.collection((O=o==null?void 0:o.options)==null?void 0:O.collectionId).getFullList(sm,{filter:M.join("||"),$autoCancel:!1}))}try{let M=[];await Promise.all(T).then(D=>{M=M.concat(...D)});for(const D of k){const I=z.findByKey(M,"id",D);I&&a.push(I)}t(4,a)}catch(M){he.errorResponseHandler(M)}t(5,u=!1)}function d(k){var $;z.removeByKey(a,"id",k.id),t(4,a),i?t(0,s=a.map(T=>T.id)):t(0,s=(($=a[0])==null?void 0:$.id)||"")}const p=k=>d(k),m=()=>l==null?void 0:l.show();function _(k){se[k?"unshift":"push"](()=>{r=k,t(3,r)})}function g(k){se[k?"unshift":"push"](()=>{l=k,t(1,l)})}const b=k=>{var $;t(4,a=k.detail||[]),t(0,s=i?a.map(T=>T.id):(($=a[0])==null?void 0:$.id)||"")};return n.$$set=k=>{"value"in k&&t(0,s=k.value),"picker"in k&&t(1,l=k.picker),"field"in k&&t(2,o=k.field)},n.$$.update=()=>{var k;n.$$.dirty&4&&t(6,i=((k=o.options)==null?void 0:k.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed())},[s,l,o,r,a,u,i,d,p,m,_,g,b]}class YM extends ve{constructor(e){super(),be(this,e,WM,UM,_e,{value:0,picker:1,field:2})}}const KM=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],JM=(n,e)=>{KM.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function ZM(n){let e;return{c(){e=y("textarea"),h(e,"id",n[0]),qr(e,"visibility","hidden")},m(t,i){S(t,e,i),n[18](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[18](null)}}}function GM(n){let e;return{c(){e=y("div"),h(e,"id",n[0])},m(t,i){S(t,e,i),n[17](e)},p(t,i){i&1&&h(e,"id",t[0])},d(t){t&&w(e),n[17](null)}}}function XM(n){let e;function t(l,o){return l[1]?GM:ZM}let i=t(n),s=i(n);return{c(){e=y("div"),s.c(),h(e,"class",n[2])},m(l,o){S(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&h(e,"class",l[2])},i:Q,o:Q,d(l){l&&w(e),s.d(),n[19](null)}}}const ob=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),QM=()=>{let n={listeners:[],scriptId:ob("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let xM=QM();function eO(n,e,t){var i;let{id:s=ob("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:d="change input undo redo"}=e,{value:p=""}=e,{text:m=""}=e,{cssClass:_="tinymce-wrapper"}=e,g,b,k,$=p,T=o;const C=wt(),O=()=>{const R=(()=>typeof window<"u"?window:global)();return R&&R.tinymce?R.tinymce:null},M=()=>{const F=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:R=>{t(14,k=R),R.on("init",()=>{R.setContent(p),R.on(d,()=>{t(15,$=R.getContent()),$!==p&&(t(5,p=$),t(6,m=R.getContent({format:"text"})))})}),JM(R,C),typeof f.setup=="function"&&f.setup(R)}});t(4,b.style.visibility="",b),O().init(F)};Xt(()=>{if(O()!==null)M();else{const F=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;xM.load(g.ownerDocument,F,()=>{M()})}}),z_(()=>{var F;k&&((F=O())===null||F===void 0||F.remove(k))});function D(F){se[F?"unshift":"push"](()=>{b=F,t(4,b)})}function I(F){se[F?"unshift":"push"](()=>{b=F,t(4,b)})}function L(F){se[F?"unshift":"push"](()=>{g=F,t(3,g)})}return n.$$set=F=>{"id"in F&&t(0,s=F.id),"inline"in F&&t(1,l=F.inline),"disabled"in F&&t(7,o=F.disabled),"apiKey"in F&&t(8,r=F.apiKey),"channel"in F&&t(9,a=F.channel),"scriptSrc"in F&&t(10,u=F.scriptSrc),"conf"in F&&t(11,f=F.conf),"modelEvents"in F&&t(12,d=F.modelEvents),"value"in F&&t(5,p=F.value),"text"in F&&t(6,m=F.text),"cssClass"in F&&t(2,_=F.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(k&&$!==p&&(k.setContent(p),t(6,m=k.getContent({format:"text"}))),k&&o!==T&&(t(16,T=o),typeof(t(13,i=k.mode)===null||i===void 0?void 0:i.set)=="function"?k.mode.set(o?"readonly":"design"):k.setMode(o?"readonly":"design")))},[s,l,_,g,b,p,m,o,r,a,u,f,d,i,k,$,T,D,I,L]}class uu extends ve{constructor(e){super(),be(this,e,eO,XM,_e,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function tO(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,d,p;function m(g){n[2](g)}let _={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:z.defaultEditorOptions()};return n[0]!==void 0&&(_.value=n[0]),f=new uu({props:_}),se.push(()=>me(f,"value",m)),{c(){e=y("label"),t=y("i"),s=E(),l=y("span"),r=U(o),u=E(),H(f.$$.fragment),h(t,"class",i=z.getFieldTypeIcon(n[1].type)),h(l,"class","txt"),h(e,"for",a=n[3])},m(g,b){S(g,e,b),v(e,t),v(e,s),v(e,l),v(l,r),S(g,u,b),j(f,g,b),p=!0},p(g,b){(!p||b&2&&i!==(i=z.getFieldTypeIcon(g[1].type)))&&h(t,"class",i),(!p||b&2)&&o!==(o=g[1].name+"")&&le(r,o),(!p||b&8&&a!==(a=g[3]))&&h(e,"for",a);const k={};b&8&&(k.id=g[3]),!d&&b&1&&(d=!0,k.value=g[0],ye(()=>d=!1)),f.$set(k)},i(g){p||(A(f.$$.fragment,g),p=!0)},o(g){P(f.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(u),V(f,g)}}}function nO(n){let e,t;return e=new de({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[tO,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function iO(n,e,t){let{field:i=new vn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class sO extends ve{constructor(e){super(),be(this,e,iO,nO,_e,{field:1,value:0})}}function lO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Auth URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].authUrl),r||(a=J(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].authUrl&&ue(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function oO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Token URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].tokenUrl),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&ue(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("User API URL"),s=E(),l=y("input"),h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].userApiUrl),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&h(e,"for",i),f&32&&o!==(o=u[5])&&h(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&ue(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aO(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[lO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[oO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[rO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Selfhosted endpoints (optional)",t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment),o=E(),H(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),j(i,u,f),S(u,s,f),j(l,u,f),S(u,o,f),j(r,u,f),a=!0},p(u,[f]){const d={};f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),V(i,u),u&&w(s),V(l,u),u&&w(o),V(r,u)}}}function uO(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class lm extends ve{constructor(e){super(),be(this,e,uO,aO,_e,{key:1,config:0})}}function fO(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=U("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),ue(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&ue(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function cO(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=U("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",h(e,"for",i=n[4]),h(l,"type","url"),h(l,"id",o=n[4]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),ue(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&16&&i!==(i=p[4])&&h(e,"for",i),m&16&&o!==(o=p[4])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&ue(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function dO(n){let e,t,i,s,l,o;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[fO,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[cO,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Azure AD endpoints",t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment),h(e,"class","section-title")},m(r,a){S(r,e,a),S(r,t,a),j(i,r,a),S(r,s,a),j(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){r&&w(e),r&&w(t),V(i,r),r&&w(s),V(l,r)}}}function pO(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class mO extends ve{constructor(e){super(),be(this,e,pO,dO,_e,{key:1,config:0})}}function hO(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=U("Auth URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/authorize/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),ue(l,n[0].authUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[2]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].authUrl&&ue(l,p[0].authUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function _O(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=U("Token URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/token/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),ue(l,n[0].tokenUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[3]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].tokenUrl&&ue(l,p[0].tokenUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function gO(n){let e,t,i,s,l,o,r,a,u,f,d;return{c(){e=y("label"),t=U("User API URL"),s=E(),l=y("input"),a=E(),u=y("div"),u.textContent="Eg. https://example.com/userinfo/",h(e,"for",i=n[5]),h(l,"type","url"),h(l,"id",o=n[5]),l.required=r=n[0].enabled,h(u,"class","help-block")},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),ue(l,n[0].userApiUrl),S(p,a,m),S(p,u,m),f||(d=J(l,"input",n[4]),f=!0)},p(p,m){m&32&&i!==(i=p[5])&&h(e,"for",i),m&32&&o!==(o=p[5])&&h(l,"id",o),m&1&&r!==(r=p[0].enabled)&&(l.required=r),m&1&&l.value!==p[0].userApiUrl&&ue(l,p[0].userApiUrl)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(a),p&&w(u),f=!1,d()}}}function bO(n){let e,t,i,s,l,o,r,a;return i=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[hO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[_O,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[gO,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),e.textContent="Endpoints",t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment),o=E(),H(r.$$.fragment),h(e,"class","section-title")},m(u,f){S(u,e,f),S(u,t,f),j(i,u,f),S(u,s,f),j(l,u,f),S(u,o,f),j(r,u,f),a=!0},p(u,[f]){const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".authUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),i.$set(d);const p={};f&1&&(p.class="form-field "+(u[0].enabled?"required":"")),f&2&&(p.name=u[1]+".tokenUrl"),f&97&&(p.$$scope={dirty:f,ctx:u}),l.$set(p);const m={};f&1&&(m.class="form-field "+(u[0].enabled?"required":"")),f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){P(i.$$.fragment,u),P(l.$$.fragment,u),P(r.$$.fragment,u),a=!1},d(u){u&&w(e),u&&w(t),V(i,u),u&&w(s),V(l,u),u&&w(o),V(r,u)}}}function vO(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class Nr extends ve{constructor(e){super(),be(this,e,vO,bO,_e,{key:1,config:0})}}function yO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[2]),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&4&&l.value!==u[2]&&ue(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function kO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Team ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[3]),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&8&&l.value!==u[3]&&ue(l,u[3])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function wO(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Key ID"),s=E(),l=y("input"),h(e,"for",i=n[23]),h(l,"type","text"),h(l,"id",o=n[23]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[4]),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&h(e,"for",i),f&8388608&&o!==(o=u[23])&&h(l,"id",o),f&16&&l.value!==u[4]&&ue(l,u[4])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=y("span"),t.textContent="Duration (in seconds)",i=E(),s=y("i"),o=E(),r=y("input"),h(t,"class","txt"),h(s,"class","ri-information-line link-hint"),h(e,"for",l=n[23]),h(r,"type","text"),h(r,"id",a=n[23]),h(r,"max",mo),r.required=!0},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),S(d,o,p),S(d,r,p),ue(r,n[6]),u||(f=[Ee(Ue.call(null,s,{text:`Max ${mo} seconds (~${mo/(60*60*24*30)<<0} months).`,position:"top"})),J(r,"input",n[15])],u=!0)},p(d,p){p&8388608&&l!==(l=d[23])&&h(e,"for",l),p&8388608&&a!==(a=d[23])&&h(r,"id",a),p&64&&r.value!==d[6]&&ue(r,d[6])},d(d){d&&w(e),d&&w(o),d&&w(r),u=!1,De(f)}}}function $O(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("label"),t=U("Private key"),s=E(),l=y("textarea"),r=E(),a=y("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",h(e,"for",i=n[23]),h(l,"id",o=n[23]),l.required=!0,h(l,"rows","8"),h(l,"placeholder",`-----BEGIN PRIVATE KEY----- ... ------END PRIVATE KEY-----`),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),ue(l,n[5]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[16]),u=!0)},p(d,p){p&8388608&&i!==(i=d[23])&&h(e,"for",i),p&8388608&&o!==(o=d[23])&&h(l,"id",o),p&32&&ue(l,d[5])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function TO(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return s=new de({props:{class:"form-field required",name:"clientId",$$slots:{default:[yO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"teamId",$$slots:{default:[kO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"keyId",$$slots:{default:[wO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new de({props:{class:"form-field required",name:"duration",$$slots:{default:[SO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"privateKey",$$slots:{default:[$O,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),i=y("div"),H(s.$$.fragment),l=E(),o=y("div"),H(r.$$.fragment),a=E(),u=y("div"),H(f.$$.fragment),d=E(),p=y("div"),H(m.$$.fragment),_=E(),H(g.$$.fragment),h(i,"class","col-lg-6"),h(o,"class","col-lg-6"),h(u,"class","col-lg-6"),h(p,"class","col-lg-6"),h(t,"class","grid"),h(e,"id",n[9]),h(e,"autocomplete","off")},m(T,C){S(T,e,C),v(e,t),v(t,i),j(s,i,null),v(t,l),v(t,o),j(r,o,null),v(t,a),v(t,u),j(f,u,null),v(t,d),v(t,p),j(m,p,null),v(t,_),j(g,t,null),b=!0,k||($=J(e,"submit",ct(n[17])),k=!0)},p(T,C){const O={};C&25165828&&(O.$$scope={dirty:C,ctx:T}),s.$set(O);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:T}),r.$set(M);const D={};C&25165840&&(D.$$scope={dirty:C,ctx:T}),f.$set(D);const I={};C&25165888&&(I.$$scope={dirty:C,ctx:T}),m.$set(I);const L={};C&25165856&&(L.$$scope={dirty:C,ctx:T}),g.$set(L)},i(T){b||(A(s.$$.fragment,T),A(r.$$.fragment,T),A(f.$$.fragment,T),A(m.$$.fragment,T),A(g.$$.fragment,T),b=!0)},o(T){P(s.$$.fragment,T),P(r.$$.fragment,T),P(f.$$.fragment,T),P(m.$$.fragment,T),P(g.$$.fragment,T),b=!1},d(T){T&&w(e),V(s),V(r),V(f),V(m),V(g),k=!1,$()}}}function CO(n){let e;return{c(){e=y("h4"),e.textContent="Generate Apple client secret",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function MO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=U("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Generate and set secret",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[7],h(l,"class","ri-key-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[9]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],x(s,"btn-loading",n[7])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&128&&(e.disabled=d[7]),p&384&&a!==(a=!d[8]||d[7])&&(s.disabled=a),p&128&&x(s,"btn-loading",d[7])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function OO(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[MO],header:[CO],default:[TO]},$$scope:{ctx:n}};return e=new cn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[19](null),V(e,s)}}}const mo=15777e3;function DO(n,e,t){let i;const s=wt(),l="apple_secret_"+z.randomString(5);let o,r,a,u,f,d,p=!1;function m(F={}){t(2,r=F.clientId||""),t(3,a=F.teamId||""),t(4,u=F.keyId||""),t(5,f=F.privateKey||""),t(6,d=F.duration||mo),fn({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function g(){t(7,p=!0);try{const F=await he.settings.generateAppleClientSecret(r,a,u,f.trim(),d);t(7,p=!1),Yt("Successfully generated client secret."),s("submit",F),o==null||o.hide()}catch(F){he.errorResponseHandler(F)}t(7,p=!1)}function b(){r=this.value,t(2,r)}function k(){a=this.value,t(3,a)}function $(){u=this.value,t(4,u)}function T(){d=this.value,t(6,d)}function C(){f=this.value,t(5,f)}const O=()=>g(),M=()=>!p;function D(F){se[F?"unshift":"push"](()=>{o=F,t(1,o)})}function I(F){pe.call(this,n,F)}function L(F){pe.call(this,n,F)}return t(8,i=!0),[_,o,r,a,u,f,d,p,i,l,g,m,b,k,$,T,C,O,M,D,I,L]}class EO extends ve{constructor(e){super(),be(this,e,DO,OO,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function AO(n){let e,t,i,s,l,o,r,a,u,f,d={};return r=new EO({props:d}),n[4](r),r.$on("submit",n[5]),{c(){e=y("button"),t=y("i"),i=E(),s=y("span"),s.textContent="Generate secret",o=E(),H(r.$$.fragment),h(t,"class","ri-key-line"),h(s,"class","txt"),h(e,"type","button"),h(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),S(p,o,m),j(r,p,m),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(p,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+p[1]))&&h(e,"class",l);const _={};r.$set(_)},i(p){a||(A(r.$$.fragment,p),a=!0)},o(p){P(r.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(o),n[4](null),V(r,p),u=!1,f()}}}function IO(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class PO extends ve{constructor(e){super(),be(this,e,IO,AO,_e,{key:1,config:0})}}const ul=[{key:"appleAuth",title:"Apple",logo:"/images/oauth2/apple.svg",optionsComponent:PO},{key:"googleAuth",title:"Google",logo:"/images/oauth2/google.svg"},{key:"facebookAuth",title:"Facebook",logo:"/images/oauth2/facebook.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"/images/oauth2/microsoft.svg",optionsComponent:mO},{key:"githubAuth",title:"GitHub",logo:"/images/oauth2/github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"/images/oauth2/gitlab.svg",optionsComponent:lm},{key:"giteeAuth",title:"Gitee",logo:"/images/oauth2/gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"/images/oauth2/gitea.svg",optionsComponent:lm},{key:"discordAuth",title:"Discord",logo:"/images/oauth2/discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"/images/oauth2/twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"/images/oauth2/kakao.svg"},{key:"spotifyAuth",title:"Spotify",logo:"/images/oauth2/spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"/images/oauth2/twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"/images/oauth2/strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"/images/oauth2/livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"/images/oauth2/oidc.svg",optionsComponent:Nr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"/images/oauth2/oidc.svg",optionsComponent:Nr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"/images/oauth2/oidc.svg",optionsComponent:Nr}];function om(n,e,t){const i=n.slice();return i[9]=e[t],i}function LO(n){let e;return{c(){e=y("h6"),e.textContent="No linked OAuth2 providers.",h(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function NO(n){let e,t=n[1],i=[];for(let s=0;s',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function rm(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,d=n[9].providerId+"",p,m,_,g,b,k;function $(){return n[6](n[9])}return{c(){e=y("div"),t=y("i"),s=E(),l=y("span"),r=U(o),a=E(),u=y("div"),f=U("ID: "),p=U(d),m=E(),_=y("button"),_.innerHTML='',g=E(),h(t,"class",i=n[4](n[9].provider)),h(l,"class","txt"),h(u,"class","txt-hint"),h(_,"type","button"),h(_,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),h(e,"class","list-item")},m(T,C){S(T,e,C),v(e,t),v(e,s),v(e,l),v(l,r),v(e,a),v(e,u),v(u,f),v(u,p),v(e,m),v(e,_),v(e,g),b||(k=J(_,"click",$),b=!0)},p(T,C){n=T,C&2&&i!==(i=n[4](n[9].provider))&&h(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&le(r,o),C&2&&d!==(d=n[9].providerId+"")&&le(p,d)},d(T){T&&w(e),b=!1,k()}}}function RO(n){let e;function t(l,o){var r;return l[2]?FO:(r=l[0])!=null&&r.id&&l[1].length?NO:LO}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function qO(n,e,t){const i=wt();let{record:s}=e,l=[],o=!1;function r(p){var m;return((m=ul[p+"Auth"])==null?void 0:m.title)||z.sentenize(p,!1)}function a(p){var m;return((m=ul[p+"Auth"])==null?void 0:m.icon)||`ri-${p}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await he.collection(s.collectionId).listExternalAuths(s.id))}catch(p){he.errorResponseHandler(p)}t(2,o=!1)}function f(p){!(s!=null&&s.id)||!p||_n(`Do you really want to unlink the ${r(p)} provider?`,()=>he.collection(s.collectionId).unlinkExternalAuth(s.id,p).then(()=>{Yt(`Successfully unlinked the ${r(p)} provider.`),i("unlink",p),u()}).catch(m=>{he.errorResponseHandler(m)}))}u();const d=p=>f(p.provider);return n.$$set=p=>{"record"in p&&t(0,s=p.record)},[s,l,o,r,a,f,d]}class jO extends ve{constructor(e){super(),be(this,e,qO,RO,_e,{record:0})}}function am(n,e,t){const i=n.slice();return i[53]=e[t],i[54]=e,i[55]=t,i}function um(n){let e,t,i,s,l;return{c(){e=y("div"),t=y("i"),h(t,"class","ri-calendar-event-line txt-disabled"),h(e,"class","form-field-addon")},m(o,r){S(o,e,r),v(e,t),s||(l=Ee(i=Ue.call(null,t,{text:`Created: ${n[3].created} +-----END PRIVATE KEY-----`),h(a,"class","help-block")},m(d,p){S(d,e,p),v(e,t),S(d,s,p),S(d,l,p),ue(l,n[5]),S(d,r,p),S(d,a,p),u||(f=J(l,"input",n[16]),u=!0)},p(d,p){p&8388608&&i!==(i=d[23])&&h(e,"for",i),p&8388608&&o!==(o=d[23])&&h(l,"id",o),p&32&&ue(l,d[5])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),u=!1,f()}}}function TO(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return s=new de({props:{class:"form-field required",name:"clientId",$$slots:{default:[yO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field required",name:"teamId",$$slots:{default:[kO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),f=new de({props:{class:"form-field required",name:"keyId",$$slots:{default:[wO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),m=new de({props:{class:"form-field required",name:"duration",$$slots:{default:[SO,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"privateKey",$$slots:{default:[$O,({uniqueId:T})=>({23:T}),({uniqueId:T})=>T?8388608:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),t=y("div"),i=y("div"),H(s.$$.fragment),l=E(),o=y("div"),H(r.$$.fragment),a=E(),u=y("div"),H(f.$$.fragment),d=E(),p=y("div"),H(m.$$.fragment),_=E(),H(g.$$.fragment),h(i,"class","col-lg-6"),h(o,"class","col-lg-6"),h(u,"class","col-lg-6"),h(p,"class","col-lg-6"),h(t,"class","grid"),h(e,"id",n[9]),h(e,"autocomplete","off")},m(T,C){S(T,e,C),v(e,t),v(t,i),j(s,i,null),v(t,l),v(t,o),j(r,o,null),v(t,a),v(t,u),j(f,u,null),v(t,d),v(t,p),j(m,p,null),v(t,_),j(g,t,null),b=!0,k||($=J(e,"submit",ct(n[17])),k=!0)},p(T,C){const O={};C&25165828&&(O.$$scope={dirty:C,ctx:T}),s.$set(O);const M={};C&25165832&&(M.$$scope={dirty:C,ctx:T}),r.$set(M);const D={};C&25165840&&(D.$$scope={dirty:C,ctx:T}),f.$set(D);const I={};C&25165888&&(I.$$scope={dirty:C,ctx:T}),m.$set(I);const L={};C&25165856&&(L.$$scope={dirty:C,ctx:T}),g.$set(L)},i(T){b||(A(s.$$.fragment,T),A(r.$$.fragment,T),A(f.$$.fragment,T),A(m.$$.fragment,T),A(g.$$.fragment,T),b=!0)},o(T){P(s.$$.fragment,T),P(r.$$.fragment,T),P(f.$$.fragment,T),P(m.$$.fragment,T),P(g.$$.fragment,T),b=!1},d(T){T&&w(e),V(s),V(r),V(f),V(m),V(g),k=!1,$()}}}function CO(n){let e;return{c(){e=y("h4"),e.textContent="Generate Apple client secret",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function MO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=U("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Generate and set secret",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[7],h(l,"class","ri-key-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[9]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],x(s,"btn-loading",n[7])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&128&&(e.disabled=d[7]),p&384&&a!==(a=!d[8]||d[7])&&(s.disabled=a),p&128&&x(s,"btn-loading",d[7])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function OO(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[MO],header:[CO],default:[TO]},$$scope:{ctx:n}};return e=new cn({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[19](null),V(e,s)}}}const mo=15777e3;function DO(n,e,t){let i;const s=wt(),l="apple_secret_"+z.randomString(5);let o,r,a,u,f,d,p=!1;function m(F={}){t(2,r=F.clientId||""),t(3,a=F.teamId||""),t(4,u=F.keyId||""),t(5,f=F.privateKey||""),t(6,d=F.duration||mo),fn({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function g(){t(7,p=!0);try{const F=await he.settings.generateAppleClientSecret(r,a,u,f.trim(),d);t(7,p=!1),Yt("Successfully generated client secret."),s("submit",F),o==null||o.hide()}catch(F){he.errorResponseHandler(F)}t(7,p=!1)}function b(){r=this.value,t(2,r)}function k(){a=this.value,t(3,a)}function $(){u=this.value,t(4,u)}function T(){d=this.value,t(6,d)}function C(){f=this.value,t(5,f)}const O=()=>g(),M=()=>!p;function D(F){se[F?"unshift":"push"](()=>{o=F,t(1,o)})}function I(F){pe.call(this,n,F)}function L(F){pe.call(this,n,F)}return t(8,i=!0),[_,o,r,a,u,f,d,p,i,l,g,m,b,k,$,T,C,O,M,D,I,L]}class EO extends ve{constructor(e){super(),be(this,e,DO,OO,_e,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function AO(n){let e,t,i,s,l,o,r,a,u,f,d={};return r=new EO({props:d}),n[4](r),r.$on("submit",n[5]),{c(){e=y("button"),t=y("i"),i=E(),s=y("span"),s.textContent="Generate secret",o=E(),H(r.$$.fragment),h(t,"class","ri-key-line"),h(s,"class","txt"),h(e,"type","button"),h(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(p,m){S(p,e,m),v(e,t),v(e,i),v(e,s),S(p,o,m),j(r,p,m),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(p,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+p[1]))&&h(e,"class",l);const _={};r.$set(_)},i(p){a||(A(r.$$.fragment,p),a=!0)},o(p){P(r.$$.fragment,p),a=!1},d(p){p&&w(e),p&&w(o),n[4](null),V(r,p),u=!1,f()}}}function IO(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class PO extends ve{constructor(e){super(),be(this,e,IO,AO,_e,{key:1,config:0})}}const ul=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:PO},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:mO},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:lm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:lm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Nr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Nr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Nr}];function om(n,e,t){const i=n.slice();return i[9]=e[t],i}function LO(n){let e;return{c(){e=y("h6"),e.textContent="No linked OAuth2 providers.",h(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function NO(n){let e,t=n[1],i=[];for(let s=0;s',h(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function rm(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,d=n[9].providerId+"",p,m,_,g,b,k;function $(){return n[6](n[9])}return{c(){e=y("div"),t=y("i"),s=E(),l=y("span"),r=U(o),a=E(),u=y("div"),f=U("ID: "),p=U(d),m=E(),_=y("button"),_.innerHTML='',g=E(),h(t,"class",i=n[4](n[9].provider)),h(l,"class","txt"),h(u,"class","txt-hint"),h(_,"type","button"),h(_,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),h(e,"class","list-item")},m(T,C){S(T,e,C),v(e,t),v(e,s),v(e,l),v(l,r),v(e,a),v(e,u),v(u,f),v(u,p),v(e,m),v(e,_),v(e,g),b||(k=J(_,"click",$),b=!0)},p(T,C){n=T,C&2&&i!==(i=n[4](n[9].provider))&&h(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&le(r,o),C&2&&d!==(d=n[9].providerId+"")&&le(p,d)},d(T){T&&w(e),b=!1,k()}}}function RO(n){let e;function t(l,o){var r;return l[2]?FO:(r=l[0])!=null&&r.id&&l[1].length?NO:LO}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:Q,o:Q,d(l){s.d(l),l&&w(e)}}}function qO(n,e,t){const i=wt();let{record:s}=e,l=[],o=!1;function r(p){var m;return((m=ul[p+"Auth"])==null?void 0:m.title)||z.sentenize(p,!1)}function a(p){var m;return((m=ul[p+"Auth"])==null?void 0:m.icon)||`ri-${p}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await he.collection(s.collectionId).listExternalAuths(s.id))}catch(p){he.errorResponseHandler(p)}t(2,o=!1)}function f(p){!(s!=null&&s.id)||!p||_n(`Do you really want to unlink the ${r(p)} provider?`,()=>he.collection(s.collectionId).unlinkExternalAuth(s.id,p).then(()=>{Yt(`Successfully unlinked the ${r(p)} provider.`),i("unlink",p),u()}).catch(m=>{he.errorResponseHandler(m)}))}u();const d=p=>f(p.provider);return n.$$set=p=>{"record"in p&&t(0,s=p.record)},[s,l,o,r,a,f,d]}class jO extends ve{constructor(e){super(),be(this,e,qO,RO,_e,{record:0})}}function am(n,e,t){const i=n.slice();return i[53]=e[t],i[54]=e,i[55]=t,i}function um(n){let e,t,i,s,l;return{c(){e=y("div"),t=y("i"),h(t,"class","ri-calendar-event-line txt-disabled"),h(e,"class","form-field-addon")},m(o,r){S(o,e,r),v(e,t),s||(l=Ee(i=Ue.call(null,t,{text:`Created: ${n[3].created} Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&zt(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created} Updated: ${o[3].updated}`,position:"left"})},d(o){o&&w(e),s=!1,l()}}}function VO(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g=!n[6]&&um(n);return{c(){e=y("label"),t=y("i"),i=E(),s=y("span"),s.textContent="id",l=E(),o=y("span"),a=E(),g&&g.c(),u=E(),f=y("input"),h(t,"class",z.getFieldTypeIcon("primary")),h(s,"class","txt"),h(o,"class","flex-fill"),h(e,"for",r=n[56]),h(f,"type","text"),h(f,"id",d=n[56]),h(f,"placeholder","Leave empty to auto generate..."),h(f,"minlength","15"),f.readOnly=p=!n[6]},m(b,k){S(b,e,k),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),S(b,a,k),g&&g.m(b,k),S(b,u,k),S(b,f,k),ue(f,n[3].id),m||(_=J(f,"input",n[30]),m=!0)},p(b,k){k[1]&33554432&&r!==(r=b[56])&&h(e,"for",r),b[6]?g&&(g.d(1),g=null):g?g.p(b,k):(g=um(b),g.c(),g.m(u.parentNode,u)),k[1]&33554432&&d!==(d=b[56])&&h(f,"id",d),k[0]&64&&p!==(p=!b[6])&&(f.readOnly=p),k[0]&8&&f.value!==b[3].id&&ue(f,b[3].id)},d(b){b&&w(e),b&&w(a),g&&g.d(b),b&&w(u),b&&w(f),m=!1,_()}}}function fm(n){var u,f;let e,t,i,s,l;function o(d){n[31](d)}let r={collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new h5({props:r}),se.push(()=>me(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&cm();return{c(){H(e.$$.fragment),i=E(),a&&a.c(),s=Se()},m(d,p){j(e,d,p),S(d,i,p),a&&a.m(d,p),S(d,s,p),l=!0},p(d,p){var _,g;const m={};p[0]&1&&(m.collection=d[0]),!t&&p[0]&8&&(t=!0,m.record=d[3],ye(()=>t=!1)),e.$set(m),(g=(_=d[0])==null?void 0:_.schema)!=null&&g.length?a||(a=cm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(d){l||(A(e.$$.fragment,d),l=!0)},o(d){P(e.$$.fragment,d),l=!1},d(d){V(e,d),d&&w(i),a&&a.d(d),d&&w(s)}}}function cm(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function HO(n){let e,t,i;function s(o){n[44](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new YM({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function zO(n){let e,t,i,s,l;function o(f){n[41](f,n[53])}function r(f){n[42](f,n[53])}function a(f){n[43](f,n[53])}let u={field:n[53],record:n[3]};return n[3][n[53].name]!==void 0&&(u.value=n[3][n[53].name]),n[4][n[53].name]!==void 0&&(u.uploadedFiles=n[4][n[53].name]),n[5][n[53].name]!==void 0&&(u.deletedFileIndexes=n[5][n[53].name]),e=new wM({props:u}),se.push(()=>me(e,"value",o)),se.push(()=>me(e,"uploadedFiles",r)),se.push(()=>me(e,"deletedFileIndexes",a)),{c(){H(e.$$.fragment)},m(f,d){j(e,f,d),l=!0},p(f,d){n=f;const p={};d[0]&1&&(p.field=n[53]),d[0]&8&&(p.record=n[3]),!t&&d[0]&9&&(t=!0,p.value=n[3][n[53].name],ye(()=>t=!1)),!i&&d[0]&17&&(i=!0,p.uploadedFiles=n[4][n[53].name],ye(()=>i=!1)),!s&&d[0]&33&&(s=!0,p.deletedFileIndexes=n[5][n[53].name],ye(()=>s=!1)),e.$set(p)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){V(e,f)}}}function BO(n){let e,t,i;function s(o){n[40](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new G5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function UO(n){let e,t,i;function s(o){n[39](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new Y5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function WO(n){let e,t,i;function s(o){n[38](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new z5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function YO(n){let e,t,i;function s(o){n[37](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new sO({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function KO(n){let e,t,i;function s(o){n[36](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new q5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function JO(n){let e,t,i;function s(o){n[35](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new L5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function ZO(n){let e,t,i;function s(o){n[34](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new E5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function GO(n){let e,t,i;function s(o){n[33](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new C5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function XO(n){let e,t,i;function s(o){n[32](o,n[53])}let l={field:n[53]};return n[3][n[53].name]!==void 0&&(l.value=n[3][n[53].name]),e=new w5({props:l}),se.push(()=>me(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[53]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[53].name],ye(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function dm(n,e){let t,i,s,l,o;const r=[XO,GO,ZO,JO,KO,YO,WO,UO,BO,zO,HO],a=[];function u(f,d){return f[53].type==="text"?0:f[53].type==="number"?1:f[53].type==="bool"?2:f[53].type==="email"?3:f[53].type==="url"?4:f[53].type==="editor"?5:f[53].type==="date"?6:f[53].type==="select"?7:f[53].type==="json"?8:f[53].type==="file"?9:f[53].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Se(),s&&s.c(),l=Se(),this.first=t},m(f,d){S(f,t,d),~i&&a[i].m(f,d),S(f,l,d),o=!0},p(f,d){e=f;let p=i;i=u(e),i===p?~i&&a[i].p(e,d):(s&&(re(),P(a[p],1,1,()=>{a[p]=null}),ae()),~i?(s=a[i],s?s.p(e,d):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function pm(n){let e,t,i;return t=new jO({props:{record:n[3]}}),{c(){e=y("div"),H(t.$$.fragment),h(e,"class","tab-item"),x(e,"active",n[11]===wl)},m(s,l){S(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&2048)&&x(e,"active",s[11]===wl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),V(t)}}}function QO(n){var b,k;let e,t,i,s,l,o=[],r=new Map,a,u,f,d;i=new de({props:{class:"form-field readonly",name:"id",$$slots:{default:[VO,({uniqueId:$})=>({56:$}),({uniqueId:$})=>[0,$?33554432:0]]},$$scope:{ctx:n}}});let p=((b=n[0])==null?void 0:b.isAuth)&&fm(n),m=((k=n[0])==null?void 0:k.schema)||[];const _=$=>$[53].name;for(let $=0;${p=null}),ae()),T[0]&57&&(m=((M=$[0])==null?void 0:M.schema)||[],re(),o=kt(o,T,_,1,$,m,r,t,Kt,dm,null,am),ae()),(!u||T[0]&2048)&&x(t,"active",$[11]===es),$[0].$isAuth&&!$[6]?g?(g.p($,T),T[0]&65&&A(g,1)):(g=pm($),g.c(),A(g,1),g.m(e,null)):g&&(re(),P(g,1,1,()=>{g=null}),ae())},i($){if(!u){A(i.$$.fragment,$),A(p);for(let T=0;T Send verification email`,h(e,"type","button"),h(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[24]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function _m(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` @@ -182,7 +182,7 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `),_=y("button"),_.textContent=`{TOKEN} `,g=U(`, `),b=y("button"),b.textContent=`{ACTION_URL} - `,k=U("."),h(e,"for",i=n[31]),h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(b,"type","button"),h(b,"class","label label-sm link-primary txt-mono"),h(b,"title","Required parameter"),h(a,"class","help-block")},m(I,L){S(I,e,L),v(e,t),S(I,s,L),M[l].m(I,L),S(I,r,L),S(I,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),v(a,b),v(a,k),$=!0,T||(C=[J(f,"click",n[22]),J(p,"click",n[23]),J(_,"click",n[24]),J(b,"click",n[25])],T=!0)},p(I,L){(!$||L[1]&1&&i!==(i=I[31]))&&h(e,"for",i);let F=l;l=D(I),l===F?M[l].p(I,L):(re(),P(M[F],1,1,()=>{M[F]=null}),ae(),o=M[l],o?o.p(I,L):(o=M[l]=O[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,De(C)}}}function dA(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[rA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[aA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[cA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),S(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){V(e,r),r&&w(t),V(i,r),r&&w(s),V(l,r)}}}function Sh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function pA(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Sh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=U(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=Se(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&le(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Sh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),P(f,1,1,()=>{f=null}),ae())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function mA(n){let e,t;const i=[n[8]];let s={$$slots:{header:[pA],default:[dA]},$$scope:{ctx:n}};for(let l=0;lt(12,o=X));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=$h,p=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await at(()=>import("./CodeEditor-462b7ad0.js"),["./CodeEditor-462b7ad0.js","./index-6f704b4c.js"],import.meta.url)).default),$h=d,t(5,p=!1))}function k(X){z.copyToClipboard(X),Qg(`Copied ${X} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function O(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),D=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(X){n.$$.not_equal(u.body,X)&&(u.body=X,t(0,u))}function F(){u.body=this.value,t(0,u)}const R=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),q=()=>k("{TOKEN}"),Y=()=>k("{ACTION_URL}");function B(X){se[X?"unshift":"push"](()=>{f=X,t(3,f)})}function Z(X){pe.call(this,n,X)}function ee(X){pe.call(this,n,X)}function ie(X){pe.call(this,n,X)}return n.$$set=X=>{e=qe(qe({},e),Ut(X)),t(8,l=Ge(e,s)),"key"in X&&t(1,r=X.key),"title"in X&&t(2,a=X.title),"config"in X&&t(0,u=X.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Di(r))},[u,r,a,f,d,p,i,k,l,m,_,g,o,$,T,C,O,M,D,I,L,F,R,N,q,Y,B,Z,ee,ie]}class Fr extends ve{constructor(e){super(),be(this,e,hA,mA,_e,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Th(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ch(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=$b(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=U(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(_,g){S(_,t,g),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(_,g){e=_,g&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(_){_&&w(t),d.r(),p=!1,m()}}}function _A(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[gA,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),H(t.$$.fragment),i=E(),H(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),j(t,e,null),v(e,i),j(s,e,null),l=!0,o||(r=J(e,"submit",ct(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),V(t),V(s),o=!1,r()}}}function vA(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function yA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=U("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function kA(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[yA],header:[vA],default:[bA]},$$scope:{ctx:n}};return e=new cn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),V(e,s)}}}const Rr="last_email_test",Mh="email_test_request";function wA(n,e,t){let i;const s=wt(),l="email_test_"+z.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Rr),u=o[0].value,f=!1,d=null;function p(D="",I=""){t(1,a=D||localStorage.getItem(Rr)),t(2,u=I||o[0].value),fn({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Rr,a),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(Mh),ml("Test email send timeout.")},3e4);try{await he.settings.testEmail(a,u,{$cancelKey:Mh}),Yt("Successfully sent test email."),s("submit"),t(4,f=!1),await un(),m()}catch(D){t(4,f=!1),he.errorResponseHandler(D)}clearTimeout(d)}}const g=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>_(),T=()=>!f;function C(D){se[D?"unshift":"push"](()=>{r=D,t(3,r)})}function O(D){pe.call(this,n,D)}function M(D){pe.call(this,n,D)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,p,b,g,k,$,T,C,O,M]}class SA extends ve{constructor(e){super(),be(this,e,wA,kA,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function $A(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[CA,({uniqueId:G})=>({31:G}),({uniqueId:G})=>[0,G?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[MA,({uniqueId:G})=>({31:G}),({uniqueId:G})=>[0,G?1:0]]},$$scope:{ctx:n}}});function R(G){n[14](G)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Fr({props:N}),se.push(()=>me(u,"config",R));function q(G){n[15](G)}let Y={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(Y.config=n[0].meta.resetPasswordTemplate),p=new Fr({props:Y}),se.push(()=>me(p,"config",q));function B(G){n[16](G)}let Z={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(Z.config=n[0].meta.confirmEmailChangeTemplate),g=new Fr({props:Z}),se.push(()=>me(g,"config",B)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[OA,({uniqueId:G})=>({31:G}),({uniqueId:G})=>[0,G?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Oh(n);function ie(G,ce){return G[4]?FA:NA}let X=ie(n),fe=X(n);return{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),H(u.$$.fragment),d=E(),H(p.$$.fragment),_=E(),H(g.$$.fragment),k=E(),$=y("hr"),T=E(),H(C.$$.fragment),O=E(),ee&&ee.c(),M=E(),D=y("div"),I=y("div"),L=E(),fe.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(D,"class","flex")},m(G,ce){S(G,e,ce),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),S(G,r,ce),S(G,a,ce),j(u,a,null),v(a,d),j(p,a,null),v(a,_),j(g,a,null),S(G,k,ce),S(G,$,ce),S(G,T,ce),j(C,G,ce),S(G,O,ce),ee&&ee.m(G,ce),S(G,M,ce),S(G,D,ce),v(D,I),v(D,L),fe.m(D,null),F=!0},p(G,ce){const ge={};ce[0]&1|ce[1]&3&&(ge.$$scope={dirty:ce,ctx:G}),i.$set(ge);const Me={};ce[0]&1|ce[1]&3&&(Me.$$scope={dirty:ce,ctx:G}),o.$set(Me);const je={};!f&&ce[0]&1&&(f=!0,je.config=G[0].meta.verificationTemplate,ye(()=>f=!1)),u.$set(je);const He={};!m&&ce[0]&1&&(m=!0,He.config=G[0].meta.resetPasswordTemplate,ye(()=>m=!1)),p.$set(He);const we={};!b&&ce[0]&1&&(b=!0,we.config=G[0].meta.confirmEmailChangeTemplate,ye(()=>b=!1)),g.$set(we);const Ce={};ce[0]&1|ce[1]&3&&(Ce.$$scope={dirty:ce,ctx:G}),C.$set(Ce),G[0].smtp.enabled?ee?(ee.p(G,ce),ce[0]&1&&A(ee,1)):(ee=Oh(G),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(re(),P(ee,1,1,()=>{ee=null}),ae()),X===(X=ie(G))&&fe?fe.p(G,ce):(fe.d(1),fe=X(G),fe&&(fe.c(),fe.m(D,null)))},i(G){F||(A(i.$$.fragment,G),A(o.$$.fragment,G),A(u.$$.fragment,G),A(p.$$.fragment,G),A(g.$$.fragment,G),A(C.$$.fragment,G),A(ee),F=!0)},o(G){P(i.$$.fragment,G),P(o.$$.fragment,G),P(u.$$.fragment,G),P(p.$$.fragment,G),P(g.$$.fragment,G),P(C.$$.fragment,G),P(ee),F=!1},d(G){G&&w(e),V(i),V(o),G&&w(r),G&&w(a),V(u),V(p),V(g),G&&w(k),G&&w($),G&&w(T),V(C,G),G&&w(O),ee&&ee.d(G),G&&w(M),G&&w(D),fe.d()}}}function TA(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function CA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&ue(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function MA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&ue(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function OA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),Ee(Ue.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function Oh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[DA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[EA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[AA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[IA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[PA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[LA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),H(u.$$.fragment),f=E(),d=y("div"),H(p.$$.fragment),m=E(),_=y("div"),H(g.$$.fragment),b=E(),k=y("div"),H($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(_,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(D,I){S(D,e,I),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),v(e,r),v(e,a),j(u,a,null),v(e,f),v(e,d),j(p,d,null),v(e,m),v(e,_),j(g,_,null),v(e,b),v(e,k),j($,k,null),v(e,T),v(e,C),M=!0},p(D,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:D}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:D}),o.$set(F);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:D}),u.$set(R);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:D}),p.$set(N);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:D}),g.$set(q);const Y={};I[0]&1|I[1]&3&&(Y.$$scope={dirty:I,ctx:D}),$.$set(Y)},i(D){M||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(p.$$.fragment,D),A(g.$$.fragment,D),A($.$$.fragment,D),D&&tt(()=>{M&&(O||(O=Ve(e,St,{duration:150},!0)),O.run(1))}),M=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(p.$$.fragment,D),P(g.$$.fragment,D),P($.$$.fragment,D),D&&(O||(O=Ve(e,St,{duration:150},!1)),O.run(0)),M=!1},d(D){D&&w(e),V(i),V(o),V(u),V(p),V(g),V($),D&&O&&O.end()}}}function DA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&ue(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function EA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&ue(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AA(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ni({props:u}),se.push(()=>me(l,"keyOfSelected",a)),{c(){e=y("label"),t=U("TLS encryption"),s=E(),H(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function IA(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ni({props:u}),se.push(()=>me(l,"keyOfSelected",a)),{c(){e=y("label"),t=U("AUTH method"),s=E(),H(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function PA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&ue(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function LA(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new fu({props:u}),se.push(()=>me(l,"value",a)),{c(){e=y("label"),t=U("Password"),s=E(),H(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function NA(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` + `,k=U("."),h(e,"for",i=n[31]),h(f,"type","button"),h(f,"class","label label-sm link-primary txt-mono"),h(p,"type","button"),h(p,"class","label label-sm link-primary txt-mono"),h(_,"type","button"),h(_,"class","label label-sm link-primary txt-mono"),h(b,"type","button"),h(b,"class","label label-sm link-primary txt-mono"),h(b,"title","Required parameter"),h(a,"class","help-block")},m(I,L){S(I,e,L),v(e,t),S(I,s,L),M[l].m(I,L),S(I,r,L),S(I,a,L),v(a,u),v(a,f),v(a,d),v(a,p),v(a,m),v(a,_),v(a,g),v(a,b),v(a,k),$=!0,T||(C=[J(f,"click",n[22]),J(p,"click",n[23]),J(_,"click",n[24]),J(b,"click",n[25])],T=!0)},p(I,L){(!$||L[1]&1&&i!==(i=I[31]))&&h(e,"for",i);let F=l;l=D(I),l===F?M[l].p(I,L):(re(),P(M[F],1,1,()=>{M[F]=null}),ae(),o=M[l],o?o.p(I,L):(o=M[l]=O[l](I),o.c()),A(o,1),o.m(r.parentNode,r))},i(I){$||(A(o),$=!0)},o(I){P(o),$=!1},d(I){I&&w(e),I&&w(s),M[l].d(I),I&&w(r),I&&w(a),T=!1,De(C)}}}function dA(n){let e,t,i,s,l,o;return e=new de({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[rA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new de({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[aA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new de({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[cA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(r,a){j(e,r,a),S(r,t,a),j(i,r,a),S(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const d={};a[0]&2&&(d.name=r[1]+".body"),a[0]&49|a[1]&3&&(d.$$scope={dirty:a,ctx:r}),l.$set(d)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){V(e,r),r&&w(t),V(i,r),r&&w(s),V(l,r)}}}function Sh(n){let e,t,i,s,l;return{c(){e=y("i"),h(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&tt(()=>{i&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=Ve(e,Ht,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function pA(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Sh();return{c(){e=y("div"),t=y("i"),i=E(),s=y("span"),l=U(n[2]),o=E(),r=y("div"),a=E(),f&&f.c(),u=Se(),h(t,"class","ri-draft-line"),h(s,"class","txt"),h(e,"class","inline-flex"),h(r,"class","flex-fill")},m(d,p){S(d,e,p),v(e,t),v(e,i),v(e,s),v(s,l),S(d,o,p),S(d,r,p),S(d,a,p),f&&f.m(d,p),S(d,u,p)},p(d,p){p[0]&4&&le(l,d[2]),d[6]?f?p[0]&64&&A(f,1):(f=Sh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),P(f,1,1,()=>{f=null}),ae())},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),f&&f.d(d),d&&w(u)}}}function mA(n){let e,t;const i=[n[8]];let s={$$slots:{header:[pA],default:[dA]},$$scope:{ctx:n}};for(let l=0;lt(12,o=X));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,d=$h,p=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){d||p||(t(5,p=!0),t(4,d=(await at(()=>import("./CodeEditor-becbd613.js"),["./CodeEditor-becbd613.js","./index-6f704b4c.js"],import.meta.url)).default),$h=d,t(5,p=!1))}function k(X){z.copyToClipboard(X),Qg(`Copied ${X} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const T=()=>k("{APP_NAME}"),C=()=>k("{APP_URL}");function O(){u.actionUrl=this.value,t(0,u)}const M=()=>k("{APP_NAME}"),D=()=>k("{APP_URL}"),I=()=>k("{TOKEN}");function L(X){n.$$.not_equal(u.body,X)&&(u.body=X,t(0,u))}function F(){u.body=this.value,t(0,u)}const R=()=>k("{APP_NAME}"),N=()=>k("{APP_URL}"),q=()=>k("{TOKEN}"),Y=()=>k("{ACTION_URL}");function B(X){se[X?"unshift":"push"](()=>{f=X,t(3,f)})}function Z(X){pe.call(this,n,X)}function ee(X){pe.call(this,n,X)}function ie(X){pe.call(this,n,X)}return n.$$set=X=>{e=qe(qe({},e),Ut(X)),t(8,l=Ge(e,s)),"key"in X&&t(1,r=X.key),"title"in X&&t(2,a=X.title),"config"in X&&t(0,u=X.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!z.isEmpty(z.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Di(r))},[u,r,a,f,d,p,i,k,l,m,_,g,o,$,T,C,O,M,D,I,L,F,R,N,q,Y,B,Z,ee,ie]}class Fr extends ve{constructor(e){super(),be(this,e,hA,mA,_e,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Th(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ch(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,d,p,m;return d=$b(e[11][0]),{key:n,first:null,c(){t=y("div"),i=y("input"),l=E(),o=y("label"),a=U(r),f=E(),h(i,"type","radio"),h(i,"name","template"),h(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,h(o,"for",u=e[20]+e[21].value),h(t,"class","form-field-block"),d.p(i),this.first=t},m(_,g){S(_,t,g),v(t,i),i.checked=i.__value===e[2],v(t,l),v(t,o),v(o,a),v(t,f),p||(m=J(i,"change",e[10]),p=!0)},p(_,g){e=_,g&1048576&&s!==(s=e[20]+e[21].value)&&h(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&h(o,"for",u)},d(_){_&&w(t),d.r(),p=!1,m()}}}function _A(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new de({props:{class:"form-field required m-0",name:"email",$$slots:{default:[gA,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=y("form"),H(t.$$.fragment),i=E(),H(s.$$.fragment),h(e,"id",n[6]),h(e,"autocomplete","off")},m(a,u){S(a,e,u),j(t,e,null),v(e,i),j(s,e,null),l=!0,o||(r=J(e,"submit",ct(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const d={};u&17825794&&(d.$$scope={dirty:u,ctx:a}),s.$set(d)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),V(t),V(s),o=!1,r()}}}function vA(n){let e;return{c(){e=y("h4"),e.textContent="Send test email",h(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function yA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("button"),t=U("Close"),i=E(),s=y("button"),l=y("i"),o=E(),r=y("span"),r.textContent="Send",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","ri-mail-send-line"),h(r,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],x(s,"btn-loading",n[4])},m(d,p){S(d,e,p),v(e,t),S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(d,p){p&16&&(e.disabled=d[4]),p&48&&a!==(a=!d[5]||d[4])&&(s.disabled=a),p&16&&x(s,"btn-loading",d[4])},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,f()}}}function kA(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[yA],header:[vA],default:[bA]},$$scope:{ctx:n}};return e=new cn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[15](null),V(e,s)}}}const Rr="last_email_test",Mh="email_test_request";function wA(n,e,t){let i;const s=wt(),l="email_test_"+z.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Rr),u=o[0].value,f=!1,d=null;function p(D="",I=""){t(1,a=D||localStorage.getItem(Rr)),t(2,u=I||o[0].value),fn({}),r==null||r.show()}function m(){return clearTimeout(d),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Rr,a),clearTimeout(d),d=setTimeout(()=>{he.cancelRequest(Mh),ml("Test email send timeout.")},3e4);try{await he.settings.testEmail(a,u,{$cancelKey:Mh}),Yt("Successfully sent test email."),s("submit"),t(4,f=!1),await un(),m()}catch(D){t(4,f=!1),he.errorResponseHandler(D)}clearTimeout(d)}}const g=[[]];function b(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>_(),T=()=>!f;function C(D){se[D?"unshift":"push"](()=>{r=D,t(3,r)})}function O(D){pe.call(this,n,D)}function M(D){pe.call(this,n,D)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,p,b,g,k,$,T,C,O,M]}class SA extends ve{constructor(e){super(),be(this,e,wA,kA,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function $A(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M,D,I,L,F;i=new de({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[CA,({uniqueId:G})=>({31:G}),({uniqueId:G})=>[0,G?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[MA,({uniqueId:G})=>({31:G}),({uniqueId:G})=>[0,G?1:0]]},$$scope:{ctx:n}}});function R(G){n[14](G)}let N={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(N.config=n[0].meta.verificationTemplate),u=new Fr({props:N}),se.push(()=>me(u,"config",R));function q(G){n[15](G)}let Y={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(Y.config=n[0].meta.resetPasswordTemplate),p=new Fr({props:Y}),se.push(()=>me(p,"config",q));function B(G){n[16](G)}let Z={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(Z.config=n[0].meta.confirmEmailChangeTemplate),g=new Fr({props:Z}),se.push(()=>me(g,"config",B)),C=new de({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[OA,({uniqueId:G})=>({31:G}),({uniqueId:G})=>[0,G?1:0]]},$$scope:{ctx:n}}});let ee=n[0].smtp.enabled&&Oh(n);function ie(G,ce){return G[4]?FA:NA}let X=ie(n),fe=X(n);return{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),H(u.$$.fragment),d=E(),H(p.$$.fragment),_=E(),H(g.$$.fragment),k=E(),$=y("hr"),T=E(),H(C.$$.fragment),O=E(),ee&&ee.c(),M=E(),D=y("div"),I=y("div"),L=E(),fe.c(),h(t,"class","col-lg-6"),h(l,"class","col-lg-6"),h(e,"class","grid m-b-base"),h(a,"class","accordions"),h(I,"class","flex-fill"),h(D,"class","flex")},m(G,ce){S(G,e,ce),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),S(G,r,ce),S(G,a,ce),j(u,a,null),v(a,d),j(p,a,null),v(a,_),j(g,a,null),S(G,k,ce),S(G,$,ce),S(G,T,ce),j(C,G,ce),S(G,O,ce),ee&&ee.m(G,ce),S(G,M,ce),S(G,D,ce),v(D,I),v(D,L),fe.m(D,null),F=!0},p(G,ce){const ge={};ce[0]&1|ce[1]&3&&(ge.$$scope={dirty:ce,ctx:G}),i.$set(ge);const Me={};ce[0]&1|ce[1]&3&&(Me.$$scope={dirty:ce,ctx:G}),o.$set(Me);const je={};!f&&ce[0]&1&&(f=!0,je.config=G[0].meta.verificationTemplate,ye(()=>f=!1)),u.$set(je);const He={};!m&&ce[0]&1&&(m=!0,He.config=G[0].meta.resetPasswordTemplate,ye(()=>m=!1)),p.$set(He);const we={};!b&&ce[0]&1&&(b=!0,we.config=G[0].meta.confirmEmailChangeTemplate,ye(()=>b=!1)),g.$set(we);const Ce={};ce[0]&1|ce[1]&3&&(Ce.$$scope={dirty:ce,ctx:G}),C.$set(Ce),G[0].smtp.enabled?ee?(ee.p(G,ce),ce[0]&1&&A(ee,1)):(ee=Oh(G),ee.c(),A(ee,1),ee.m(M.parentNode,M)):ee&&(re(),P(ee,1,1,()=>{ee=null}),ae()),X===(X=ie(G))&&fe?fe.p(G,ce):(fe.d(1),fe=X(G),fe&&(fe.c(),fe.m(D,null)))},i(G){F||(A(i.$$.fragment,G),A(o.$$.fragment,G),A(u.$$.fragment,G),A(p.$$.fragment,G),A(g.$$.fragment,G),A(C.$$.fragment,G),A(ee),F=!0)},o(G){P(i.$$.fragment,G),P(o.$$.fragment,G),P(u.$$.fragment,G),P(p.$$.fragment,G),P(g.$$.fragment,G),P(C.$$.fragment,G),P(ee),F=!1},d(G){G&&w(e),V(i),V(o),G&&w(r),G&&w(a),V(u),V(p),V(g),G&&w(k),G&&w($),G&&w(T),V(C,G),G&&w(O),ee&&ee.d(G),G&&w(M),G&&w(D),fe.d()}}}function TA(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function CA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Sender name"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&ue(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function MA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Sender address"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","email"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&ue(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function OA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[31]),e.required=!0,h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[31])},m(d,p){S(d,e,p),e.checked=n[0].smtp.enabled,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),Ee(Ue.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(d,p){p[1]&1&&t!==(t=d[31])&&h(e,"id",t),p[0]&1&&(e.checked=d[0].smtp.enabled),p[1]&1&&a!==(a=d[31])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function Oh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M;return i=new de({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[DA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[EA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[AA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[IA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field",name:"smtp.username",$$slots:{default:[PA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"smtp.password",$$slots:{default:[LA,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),H(u.$$.fragment),f=E(),d=y("div"),H(p.$$.fragment),m=E(),_=y("div"),H(g.$$.fragment),b=E(),k=y("div"),H($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-4"),h(l,"class","col-lg-2"),h(a,"class","col-lg-3"),h(d,"class","col-lg-3"),h(_,"class","col-lg-6"),h(k,"class","col-lg-6"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(D,I){S(D,e,I),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),v(e,r),v(e,a),j(u,a,null),v(e,f),v(e,d),j(p,d,null),v(e,m),v(e,_),j(g,_,null),v(e,b),v(e,k),j($,k,null),v(e,T),v(e,C),M=!0},p(D,I){const L={};I[0]&1|I[1]&3&&(L.$$scope={dirty:I,ctx:D}),i.$set(L);const F={};I[0]&1|I[1]&3&&(F.$$scope={dirty:I,ctx:D}),o.$set(F);const R={};I[0]&1|I[1]&3&&(R.$$scope={dirty:I,ctx:D}),u.$set(R);const N={};I[0]&1|I[1]&3&&(N.$$scope={dirty:I,ctx:D}),p.$set(N);const q={};I[0]&1|I[1]&3&&(q.$$scope={dirty:I,ctx:D}),g.$set(q);const Y={};I[0]&1|I[1]&3&&(Y.$$scope={dirty:I,ctx:D}),$.$set(Y)},i(D){M||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(p.$$.fragment,D),A(g.$$.fragment,D),A($.$$.fragment,D),D&&tt(()=>{M&&(O||(O=Ve(e,St,{duration:150},!0)),O.run(1))}),M=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(p.$$.fragment,D),P(g.$$.fragment,D),P($.$$.fragment,D),D&&(O||(O=Ve(e,St,{duration:150},!1)),O.run(0)),M=!1},d(D){D&&w(e),V(i),V(o),V(u),V(p),V(g),V($),D&&O&&O.end()}}}function DA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("SMTP server host"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&ue(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function EA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Port"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","number"),h(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&>(l.value)!==u[0].smtp.port&&ue(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AA(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ni({props:u}),se.push(()=>me(l,"keyOfSelected",a)),{c(){e=y("label"),t=U("TLS encryption"),s=E(),H(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.tls,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function IA(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ni({props:u}),se.push(()=>me(l,"keyOfSelected",a)),{c(){e=y("label"),t=U("AUTH method"),s=E(),H(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.keyOfSelected=f[0].smtp.authMethod,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function PA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Username"),s=E(),l=y("input"),h(e,"for",i=n[31]),h(l,"type","text"),h(l,"id",o=n[31])},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&h(e,"for",i),f[1]&1&&o!==(o=u[31])&&h(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&ue(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function LA(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new fu({props:u}),se.push(()=>me(l,"value",a)),{c(){e=y("label"),t=U("Password"),s=E(),H(l.$$.fragment),h(e,"for",i=n[31])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d[1]&1&&i!==(i=f[31]))&&h(e,"for",i);const p={};d[1]&1&&(p.id=f[31]),!o&&d[0]&1&&(o=!0,p.value=f[0].smtp.password,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function NA(n){let e,t,i;return{c(){e=y("button"),e.innerHTML=` Send test email`,h(e,"type","button"),h(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function FA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],h(l,"class","txt"),h(s,"type","submit"),h(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],x(s,"btn-loading",n[3])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=[J(e,"click",n[24]),J(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&x(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,De(a)}}}function RA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[TA,$A],$=[];function T(C,O){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[5]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",ct(n[27])),g=!0)},p(C,O){(!_||O[0]&32)&&le(o,C[5]);let M=p;p=T(C),p===M?$[p].p(C,O):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function qA(n){let e,t,i,s,l,o;e=new Fi({}),i=new Dn({props:{$$slots:{default:[RA]},$$scope:{ctx:n}}});let r={};return l=new SA({props:r}),n[28](l),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){V(e,a),a&&w(t),V(i,a),a&&w(s),n[28](null),V(l,a)}}}function jA(n,e,t){let i,s,l;Ke(n,Lt,ie=>t(5,l=ie));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];tn(Lt,l="Mail settings",l);let a,u={},f={},d=!1,p=!1;m();async function m(){t(2,d=!0);try{const ie=await he.settings.getAll()||{};g(ie)}catch(ie){he.errorResponseHandler(ie)}t(2,d=!1)}async function _(){if(!(p||!s)){t(3,p=!0);try{const ie=await he.settings.update(z.filterRedactedProps(f));g(ie),fn({}),Yt("Successfully saved mail settings.")}catch(ie){he.errorResponseHandler(ie)}t(3,p=!1)}}function g(ie={}){t(0,f={meta:(ie==null?void 0:ie.meta)||{},smtp:(ie==null?void 0:ie.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function k(){f.meta.senderName=this.value,t(0,f)}function $(){f.meta.senderAddress=this.value,t(0,f)}function T(ie){n.$$.not_equal(f.meta.verificationTemplate,ie)&&(f.meta.verificationTemplate=ie,t(0,f))}function C(ie){n.$$.not_equal(f.meta.resetPasswordTemplate,ie)&&(f.meta.resetPasswordTemplate=ie,t(0,f))}function O(ie){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ie)&&(f.meta.confirmEmailChangeTemplate=ie,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=gt(this.value),t(0,f)}function L(ie){n.$$.not_equal(f.smtp.tls,ie)&&(f.smtp.tls=ie,t(0,f))}function F(ie){n.$$.not_equal(f.smtp.authMethod,ie)&&(f.smtp.authMethod=ie,t(0,f))}function R(){f.smtp.username=this.value,t(0,f)}function N(ie){n.$$.not_equal(f.smtp.password,ie)&&(f.smtp.password=ie,t(0,f))}const q=()=>b(),Y=()=>_(),B=()=>a==null?void 0:a.show(),Z=()=>_();function ee(ie){se[ie?"unshift":"push"](()=>{a=ie,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,d,p,s,l,o,r,_,b,u,i,k,$,T,C,O,M,D,I,L,F,R,N,q,Y,B,Z,ee]}class VA extends ve{constructor(e){super(),be(this,e,jA,qA,_e,{},null,[-1,-1])}}function HA(n){var C,O;let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g;e=new de({props:{class:"form-field form-field-toggle",$$slots:{default:[BA,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&Dh(n),k=n[1].s3.enabled&&Eh(n),$=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&Ah(n),T=n[6]&&Ih(n);return{c(){H(e.$$.fragment),t=E(),b&&b.c(),i=E(),k&&k.c(),s=E(),l=y("div"),o=y("div"),r=E(),$&&$.c(),a=E(),T&&T.c(),u=E(),f=y("button"),d=y("span"),d.textContent="Save changes",h(o,"class","flex-fill"),h(d,"class","txt"),h(f,"type","submit"),h(f,"class","btn btn-expanded"),f.disabled=p=!n[6]||n[3],x(f,"btn-loading",n[3]),h(l,"class","flex")},m(M,D){j(e,M,D),S(M,t,D),b&&b.m(M,D),S(M,i,D),k&&k.m(M,D),S(M,s,D),S(M,l,D),v(l,o),v(l,r),$&&$.m(l,null),v(l,a),T&&T.m(l,null),v(l,u),v(l,f),v(f,d),m=!0,_||(g=J(f,"click",n[19]),_=!0)},p(M,D){var L,F;const I={};D&100663298&&(I.$$scope={dirty:D,ctx:M}),e.$set(I),((L=M[0].s3)==null?void 0:L.enabled)!=M[1].s3.enabled?b?(b.p(M,D),D&3&&A(b,1)):(b=Dh(M),b.c(),A(b,1),b.m(i.parentNode,i)):b&&(re(),P(b,1,1,()=>{b=null}),ae()),M[1].s3.enabled?k?(k.p(M,D),D&2&&A(k,1)):(k=Eh(M),k.c(),A(k,1),k.m(s.parentNode,s)):k&&(re(),P(k,1,1,()=>{k=null}),ae()),(F=M[1].s3)!=null&&F.enabled&&!M[6]&&!M[3]?$?$.p(M,D):($=Ah(M),$.c(),$.m(l,a)):$&&($.d(1),$=null),M[6]?T?T.p(M,D):(T=Ih(M),T.c(),T.m(l,u)):T&&(T.d(1),T=null),(!m||D&72&&p!==(p=!M[6]||M[3]))&&(f.disabled=p),(!m||D&8)&&x(f,"btn-loading",M[3])},i(M){m||(A(e.$$.fragment,M),A(b),A(k),m=!0)},o(M){P(e.$$.fragment,M),P(b),P(k),m=!1},d(M){V(e,M),M&&w(t),b&&b.d(M),M&&w(i),k&&k.d(M),M&&w(s),M&&w(l),$&&$.d(),T&&T.d(),_=!1,g()}}}function zA(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function BA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Use S3 storage"),h(e,"type","checkbox"),h(e,"id",t=n[25]),e.required=!0,h(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&h(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Dh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,d,p=n[1].s3.enabled?"S3 storage":"local file system",m,_,g,b,k,$,T,C,O,M,D,I;return{c(){e=y("div"),t=y("div"),i=y("div"),i.innerHTML='',s=E(),l=y("div"),o=U(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=y("strong"),u=U(a),f=U(` @@ -196,7 +196,7 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `,C=U(", etc."),O=E(),M=y("div"),h(i,"class","icon"),h(k,"href","https://github.com/rclone/rclone"),h(k,"target","_blank"),h(k,"rel","noopener noreferrer"),h(k,"class","txt-bold"),h(T,"href","https://github.com/peak/s5cmd"),h(T,"target","_blank"),h(T,"rel","noopener noreferrer"),h(T,"class","txt-bold"),h(l,"class","content"),h(t,"class","alert alert-warning m-0"),h(M,"class","clearfix m-t-base")},m(F,R){S(F,e,R),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),v(l,r),v(r,u),v(l,f),v(l,d),v(d,m),v(l,_),v(l,g),v(l,b),v(l,k),v(l,$),v(l,T),v(l,C),v(e,O),v(e,M),I=!0},p(F,R){var N;(!I||R&1)&&a!==(a=(N=F[0].s3)!=null&&N.enabled?"S3 storage":"local file system")&&le(u,a),(!I||R&2)&&p!==(p=F[1].s3.enabled?"S3 storage":"local file system")&&le(m,p)},i(F){I||(F&&tt(()=>{I&&(D||(D=Ve(e,St,{duration:150},!0)),D.run(1))}),I=!0)},o(F){F&&(D||(D=Ve(e,St,{duration:150},!1)),D.run(0)),I=!1},d(F){F&&w(e),F&&D&&D.end()}}}function Eh(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$,T,C,O,M;return i=new de({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[UA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new de({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[WA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field required",name:"s3.region",$$slots:{default:[YA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),p=new de({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[KA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),g=new de({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[JA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),$=new de({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[ZA,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=y("div"),t=y("div"),H(i.$$.fragment),s=E(),l=y("div"),H(o.$$.fragment),r=E(),a=y("div"),H(u.$$.fragment),f=E(),d=y("div"),H(p.$$.fragment),m=E(),_=y("div"),H(g.$$.fragment),b=E(),k=y("div"),H($.$$.fragment),T=E(),C=y("div"),h(t,"class","col-lg-6"),h(l,"class","col-lg-3"),h(a,"class","col-lg-3"),h(d,"class","col-lg-6"),h(_,"class","col-lg-6"),h(k,"class","col-lg-12"),h(C,"class","col-lg-12"),h(e,"class","grid")},m(D,I){S(D,e,I),v(e,t),j(i,t,null),v(e,s),v(e,l),j(o,l,null),v(e,r),v(e,a),j(u,a,null),v(e,f),v(e,d),j(p,d,null),v(e,m),v(e,_),j(g,_,null),v(e,b),v(e,k),j($,k,null),v(e,T),v(e,C),M=!0},p(D,I){const L={};I&100663298&&(L.$$scope={dirty:I,ctx:D}),i.$set(L);const F={};I&100663298&&(F.$$scope={dirty:I,ctx:D}),o.$set(F);const R={};I&100663298&&(R.$$scope={dirty:I,ctx:D}),u.$set(R);const N={};I&100663298&&(N.$$scope={dirty:I,ctx:D}),p.$set(N);const q={};I&100663298&&(q.$$scope={dirty:I,ctx:D}),g.$set(q);const Y={};I&100663298&&(Y.$$scope={dirty:I,ctx:D}),$.$set(Y)},i(D){M||(A(i.$$.fragment,D),A(o.$$.fragment,D),A(u.$$.fragment,D),A(p.$$.fragment,D),A(g.$$.fragment,D),A($.$$.fragment,D),D&&tt(()=>{M&&(O||(O=Ve(e,St,{duration:150},!0)),O.run(1))}),M=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(p.$$.fragment,D),P(g.$$.fragment,D),P($.$$.fragment,D),D&&(O||(O=Ve(e,St,{duration:150},!1)),O.run(0)),M=!1},d(D){D&&w(e),V(i),V(o),V(u),V(p),V(g),V($),D&&O&&O.end()}}}function UA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Endpoint"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[1].s3.endpoint),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&ue(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function WA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Bucket"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[1].s3.bucket),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&ue(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function YA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Region"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[1].s3.region),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.region&&ue(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function KA(n){let e,t,i,s,l,o,r,a;return{c(){e=y("label"),t=U("Access key"),s=E(),l=y("input"),h(e,"for",i=n[25]),h(l,"type","text"),h(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),v(e,t),S(u,s,f),S(u,l,f),ue(l,n[1].s3.accessKey),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&h(e,"for",i),f&33554432&&o!==(o=u[25])&&h(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&ue(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function JA(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new fu({props:u}),se.push(()=>me(l,"value",a)),{c(){e=y("label"),t=U("Secret"),s=E(),H(l.$$.fragment),h(e,"for",i=n[25])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d&33554432&&i!==(i=f[25]))&&h(e,"for",i);const p={};d&33554432&&(p.id=f[25]),!o&&d&2&&(o=!0,p.value=f[1].s3.secret,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function ZA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=y("input"),i=E(),s=y("label"),l=y("span"),l.textContent="Force path-style addressing",o=E(),r=y("i"),h(e,"type","checkbox"),h(e,"id",t=n[25]),h(l,"class","txt"),h(r,"class","ri-information-line link-hint"),h(s,"for",a=n[25])},m(d,p){S(d,e,p),e.checked=n[1].s3.forcePathStyle,S(d,i,p),S(d,s,p),v(s,l),v(s,o),v(s,r),u||(f=[J(e,"change",n[17]),Ee(Ue.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(d,p){p&33554432&&t!==(t=d[25])&&h(e,"id",t),p&2&&(e.checked=d[1].s3.forcePathStyle),p&33554432&&a!==(a=d[25])&&h(s,"for",a)},d(d){d&&w(e),d&&w(i),d&&w(s),u=!1,De(f)}}}function Ah(n){let e;function t(l,o){return l[4]?QA:l[5]?XA:GA}let i=t(n),s=i(n);return{c(){s.c(),e=Se()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function GA(n){let e;return{c(){e=y("div"),e.innerHTML=` S3 connected successfully`,h(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function XA(n){let e,t,i,s;return{c(){e=y("div"),e.innerHTML=` Failed to establish S3 connection`,h(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Ee(t=Ue.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&zt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function QA(n){let e;return{c(){e=y("span"),h(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:Q,d(t){t&&w(e)}}}function Ih(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function xA(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[zA,HA],$=[];function T(C,O){return C[2]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[7]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML=`

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

    -

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

    `,d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",ct(n[20])),g=!0)},p(C,O){(!_||O&128)&&le(o,C[7]);let M=p;p=T(C),p===M?$[p].p(C,O):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function e6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[xA]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}const oo="s3_test_request";function t6(n,e,t){let i,s,l;Ke(n,Lt,N=>t(7,l=N)),tn(Lt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,d=null,p=null;m();async function m(){t(2,a=!0);try{const N=await he.settings.getAll()||{};g(N)}catch(N){he.errorResponseHandler(N)}t(2,a=!1)}async function _(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(oo);const N=await he.settings.update(z.filterRedactedProps(r));fn({}),await g(N),Ea(),d?uy("Successfully saved but failed to establish S3 connection."):Yt("Successfully saved files storage settings.")}catch(N){he.errorResponseHandler(N)}t(3,u=!1)}}async function g(N={}){t(1,r={s3:(N==null?void 0:N.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await k()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await k()}async function k(){if(t(5,d=null),!!r.s3.enabled){he.cancelRequest(oo),clearTimeout(p),p=setTimeout(()=>{he.cancelRequest(oo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:oo})}catch(N){t(5,d=N)}t(4,f=!1),clearTimeout(p)}}Xt(()=>()=>{clearTimeout(p)});function $(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function O(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function D(N){n.$$.not_equal(r.s3.secret,N)&&(r.s3.secret=N,t(1,r))}function I(){r.s3.forcePathStyle=this.checked,t(1,r)}const L=()=>b(),F=()=>_(),R=()=>_();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,d,s,l,_,b,i,$,T,C,O,M,D,I,L,F,R]}class n6 extends ve{constructor(e){super(),be(this,e,t6,e6,_e,{})}}function i6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[20]),h(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[1].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&h(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function s6(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=U("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[20]),h(l,"type","text"),h(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),ue(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,d){d&1048576&&i!==(i=f[20])&&h(e,"for",i),d&1048576&&o!==(o=f[20])&&h(l,"id",o),d&2&&r!==(r=f[1].enabled)&&(l.required=r),d&2&&l.value!==f[1].clientId&&ue(l,f[1].clientId)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function l6(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new fu({props:u}),se.push(()=>me(l,"value",a)),{c(){e=y("label"),t=U("Client secret"),s=E(),H(l.$$.fragment),h(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&h(e,"for",i);const p={};d&1048576&&(p.id=f[20]),d&2&&(p.required=f[1].enabled),!o&&d&2&&(o=!0,p.value=f[1].clientSecret,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function Ph(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Pt(o,r(n)),se.push(()=>me(t,"config",l))),{c(){e=y("div"),t&&H(t.$$.fragment),h(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&j(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],ye(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){re();const d=t;P(d.$$.fragment,1,0,()=>{V(d,1)}),ae()}o?(t=Pt(o,r(a)),se.push(()=>me(t,"config",l)),H(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&V(t)}}}function o6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[i6,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[s6,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[l6,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&Ph(n);return{c(){e=y("form"),t=y("div"),H(i.$$.fragment),s=E(),l=y("button"),l.innerHTML='Clear all fields',o=E(),H(r.$$.fragment),a=E(),H(u.$$.fragment),f=E(),_&&_.c(),h(l,"type","button"),h(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),h(t,"class","flex m-b-base"),h(e,"id",n[6]),h(e,"autocomplete","off")},m(g,b){S(g,e,b),v(e,t),j(i,t,null),v(t,s),v(t,l),v(e,o),j(r,e,null),v(e,a),j(u,e,null),v(e,f),_&&_.m(e,null),d=!0,p||(m=[J(l,"click",n[8]),J(e,"submit",ct(n[15]))],p=!0)},p(g,b){const k={};b&8&&(k.name=g[3].key+".enabled"),b&3145730&&(k.$$scope={dirty:b,ctx:g}),i.$set(k);const $={};b&2&&($.class="form-field "+(g[1].enabled?"required":"")),b&8&&($.name=g[3].key+".clientId"),b&3145730&&($.$$scope={dirty:b,ctx:g}),r.$set($);const T={};b&2&&(T.class="form-field "+(g[1].enabled?"required":"")),b&8&&(T.name=g[3].key+".clientSecret"),b&3145730&&(T.$$scope={dirty:b,ctx:g}),u.$set(T),g[3].optionsComponent?_?(_.p(g,b),b&8&&A(_,1)):(_=Ph(g),_.c(),A(_,1),_.m(e,null)):_&&(re(),P(_,1,1,()=>{_=null}),ae())},i(g){d||(A(i.$$.fragment,g),A(r.$$.fragment,g),A(u.$$.fragment,g),A(_),d=!0)},o(g){P(i.$$.fragment,g),P(r.$$.fragment,g),P(u.$$.fragment,g),P(_),d=!1},d(g){g&&w(e),V(i),V(r),V(u),_&&_.d(),p=!1,De(m)}}}function r6(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=y("h4"),i=U(t),s=U(" provider"),h(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&le(i,t)},d(l){l&&w(e)}}}function a6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=U("Close"),i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function u6(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[a6],header:[r6],default:[o6]},$$scope:{ctx:n}};return e=new cn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),V(e,s)}}}function f6(n,e,t){let i;const s=wt(),l="provider_popup_"+z.randomString(5);let o,r={},a={},u=!1,f="";function d(D,I){fn({}),t(3,r=Object.assign({},D)),t(1,a=Object.assign({enabled:!0},I)),t(10,f=JSON.stringify(a)),o==null||o.show()}function p(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const D={};D[r.key]=z.filterRedactedProps(a);const I=await he.settings.update(D);fn({}),Yt("Successfully updated provider settings."),s("submit",I),p()}catch(D){he.errorResponseHandler(D)}t(4,u=!1)}function _(){for(let D in a)t(1,a[D]="",a);t(1,a.enabled=!1,a)}function g(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function k(D){n.$$.not_equal(a.clientSecret,D)&&(a.clientSecret=D,t(1,a))}function $(D){a=D,t(1,a)}const T=()=>m();function C(D){se[D?"unshift":"push"](()=>{o=D,t(2,o)})}function O(D){pe.call(this,n,D)}function M(D){pe.call(this,n,D)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[p,a,o,r,u,i,l,m,_,d,f,g,b,k,$,T,C,O,M]}class c6 extends ve{constructor(e){super(),be(this,e,f6,u6,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Lh(n){let e,t,i;return{c(){e=y("img"),Cn(e.src,t=n[1].logo)||h(e,"src",t),h(e,"alt",i=n[1].title+" logo"),h(e,"class","svelte-1jz4aqj")},m(s,l){S(s,e,l)},p(s,l){l&2&&!Cn(e.src,t=s[1].logo)&&h(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&h(e,"alt",i)},d(s){s&&w(e)}}}function Nh(n){let e;return{c(){e=y("div"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function d6(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",d,p,m,_,g,b,k,$,T,C,O=n[1].logo&&Lh(n),M=n[0].enabled&&Nh(),D={};return k=new c6({props:D}),n[4](k),k.$on("submit",n[5]),{c(){e=y("div"),t=y("figure"),O&&O.c(),i=E(),s=y("div"),o=U(l),r=E(),a=y("em"),u=U("("),d=U(f),p=U(")"),m=E(),M&&M.c(),_=E(),g=y("button"),g.innerHTML='',b=E(),H(k.$$.fragment),h(t,"class","provider-logo svelte-1jz4aqj"),h(s,"class","title"),h(a,"class","txt-hint txt-sm m-r-auto"),h(g,"type","button"),h(g,"class","btn btn-circle btn-hint btn-transparent"),h(g,"aria-label","Provider settings"),h(e,"class","provider-card svelte-1jz4aqj")},m(I,L){S(I,e,L),v(e,t),O&&O.m(t,null),v(e,i),v(e,s),v(s,o),v(e,r),v(e,a),v(a,u),v(a,d),v(a,p),v(e,m),M&&M.m(e,null),v(e,_),v(e,g),S(I,b,L),j(k,I,L),$=!0,T||(C=J(g,"click",n[3]),T=!0)},p(I,[L]){I[1].logo?O?O.p(I,L):(O=Lh(I),O.c(),O.m(t,null)):O&&(O.d(1),O=null),(!$||L&2)&&l!==(l=I[1].title+"")&&le(o,l),(!$||L&2)&&f!==(f=I[1].key.slice(0,-4)+"")&&le(d,f),I[0].enabled?M||(M=Nh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const F={};k.$set(F)},i(I){$||(A(k.$$.fragment,I),$=!0)},o(I){P(k.$$.fragment,I),$=!1},d(I){I&&w(e),O&&O.d(),M&&M.d(),I&&w(b),n[4](null),V(k,I),T=!1,C()}}}function p6(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class ub extends ve{constructor(e){super(),be(this,e,p6,d6,_e,{provider:1,config:0})}}function Fh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Rh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function m6(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const d=g=>g[9].key;for(let g=0;g0&&n[2].length>0&&jh(),m=n[2];const _=g=>g[9].key;for(let g=0;g0&&g[2].length>0?p||(p=jh(),p.c(),p.m(l.parentNode,l)):p&&(p.d(1),p=null),b&5&&(m=g[2],re(),r=kt(r,b,_,1,g,m,a,o,Kt,Vh,null,Fh),ae())},i(g){if(!u){for(let b=0;bme(i,"config",r)),{key:n,first:null,c(){t=y("div"),H(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),j(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&8&&(d.provider=e[9]),!s&&f&9&&(s=!0,d.config=e[0][e[9].key],ye(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),V(i)}}}function jh(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Vh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new ub({props:a}),se.push(()=>me(i,"config",r)),{key:n,first:null,c(){t=y("div"),H(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),j(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&4&&(d.provider=e[9]),!s&&f&5&&(s=!0,d.config=e[0][e[9].key],ye(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),V(i)}}}function _6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;const g=[h6,m6],b=[];function k($,T){return $[1]?0:1}return p=k(n),m=b[p]=g[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[4]),r=E(),a=y("div"),u=y("div"),f=y("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","m-b-base"),h(u,"class","panel"),h(a,"class","wrapper")},m($,T){S($,e,T),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S($,r,T),S($,a,T),v(a,u),v(u,f),v(u,d),b[p].m(u,null),_=!0},p($,T){(!_||T&16)&&le(o,$[4]);let C=p;p=k($),p===C?b[p].p($,T):(re(),P(b[C],1,1,()=>{b[C]=null}),ae(),m=b[p],m?m.p($,T):(m=b[p]=g[p]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){P(m),_=!1},d($){$&&w(e),$&&w(r),$&&w(a),b[p].d()}}}function g6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[_6]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}function b6(n,e,t){let i,s,l;Ke(n,Lt,p=>t(4,l=p)),tn(Lt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const p=await he.settings.getAll()||{};u(p)}catch(p){he.errorResponseHandler(p)}t(1,o=!1)}function u(p){p=p||{},t(0,r={});for(const m of ul)t(0,r[m.key]=Object.assign({enabled:!1},p[m.key]),r)}function f(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}function d(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=ul.filter(p=>{var m;return(m=r[p.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=ul.filter(p=>{var m;return!((m=r[p.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,d]}class v6 extends ve{constructor(e){super(),be(this,e,b6,g6,_e,{})}}function y6(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=U(n[3]),i=U(" duration (in seconds)"),l=E(),o=y("input"),a=E(),u=y("div"),f=y("span"),f.textContent="Invalidate all previously issued tokens",h(e,"for",s=n[6]),h(o,"type","number"),h(o,"id",r=n[6]),o.required=!0,h(f,"class","link-primary"),x(f,"txt-success",!!n[1]),h(u,"class","help-block")},m(m,_){S(m,e,_),v(e,t),v(e,i),S(m,l,_),S(m,o,_),ue(o,n[0]),S(m,a,_),S(m,u,_),v(u,f),d||(p=[J(o,"input",n[4]),J(f,"click",n[5])],d=!0)},p(m,_){_&8&&le(t,m[3]),_&64&&s!==(s=m[6])&&h(e,"for",s),_&64&&r!==(r=m[6])&&h(o,"id",r),_&1&>(o.value)!==m[0]&&ue(o,m[0]),_&2&&x(f,"txt-success",!!m[1])},d(m){m&&w(e),m&&w(l),m&&w(o),m&&w(a),m&&w(u),d=!1,De(p)}}}function k6(n){let e,t;return e=new de({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[y6,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function w6(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=gt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=z.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class fb extends ve{constructor(e){super(),be(this,e,w6,k6,_e,{key:2,label:3,duration:0,secret:1})}}function Hh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function zh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function S6(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],d=new Map,p,m,_,g,b,k,$,T,C,O,M,D=n[5];const I=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nme(i,"duration",r)),se.push(()=>me(i,"secret",a)),{key:n,first:null,c(){t=Se(),H(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),j(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&33&&(s=!0,p.duration=e[0][e[19].key].duration,ye(()=>s=!1)),!l&&d&33&&(l=!0,p.secret=e[0][e[19].key].secret,ye(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),V(i,f)}}}function Uh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new fb({props:u}),se.push(()=>me(i,"duration",r)),se.push(()=>me(i,"secret",a)),{key:n,first:null,c(){t=Se(),H(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),j(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&65&&(s=!0,p.duration=e[0][e[19].key].duration,ye(()=>s=!1)),!l&&d&65&&(l=!0,p.secret=e[0][e[19].key].secret,ye(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),V(i,f)}}}function Wh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function T6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[$6,S6],$=[];function T(C,O){return C[1]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[4]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Adjust common token options.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content m-b-sm txt-xl"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",ct(n[7])),g=!0)},p(C,O){(!_||O&16)&&le(o,C[4]);let M=p;p=T(C),p===M?$[p].p(C,O):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function C6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[T6]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}function M6(n,e,t){let i,s,l;Ke(n,Lt,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records private file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins private file access token"}];tn(Lt,l="Token options",l);let a={},u={},f=!1,d=!1;p();async function p(){t(1,f=!0);try{const M=await he.settings.getAll()||{};_(M)}catch(M){he.errorResponseHandler(M)}t(1,f=!1)}async function m(){if(!(d||!s)){t(2,d=!0);try{const M=await he.settings.update(z.filterRedactedProps(u));_(M),Yt("Successfully saved tokens options.")}catch(M){he.errorResponseHandler(M)}t(2,d=!1)}}function _(M){var I;M=M||{},t(0,u={});const D=o.concat(r);for(const L of D)t(0,u[L.key]={duration:((I=M[L.key])==null?void 0:I.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function g(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,D){n.$$.not_equal(u[D.key].duration,M)&&(u[D.key].duration=M,t(0,u))}function k(M,D){n.$$.not_equal(u[D.key].secret,M)&&(u[D.key].secret=M,t(0,u))}function $(M,D){n.$$.not_equal(u[D.key].duration,M)&&(u[D.key].duration=M,t(0,u))}function T(M,D){n.$$.not_equal(u[D.key].secret,M)&&(u[D.key].secret=M,t(0,u))}const C=()=>g(),O=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,d,s,l,o,r,m,g,a,i,b,k,$,T,C,O]}class O6 extends ve{constructor(e){super(),be(this,e,M6,C6,_e,{})}}function D6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;return o=new x1({props:{content:n[2]}}),{c(){e=y("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in +

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

    `,d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content txt-xl m-b-base"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",ct(n[20])),g=!0)},p(C,O){(!_||O&128)&&le(o,C[7]);let M=p;p=T(C),p===M?$[p].p(C,O):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function e6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[xA]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}const oo="s3_test_request";function t6(n,e,t){let i,s,l;Ke(n,Lt,N=>t(7,l=N)),tn(Lt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,d=null,p=null;m();async function m(){t(2,a=!0);try{const N=await he.settings.getAll()||{};g(N)}catch(N){he.errorResponseHandler(N)}t(2,a=!1)}async function _(){if(!(u||!s)){t(3,u=!0);try{he.cancelRequest(oo);const N=await he.settings.update(z.filterRedactedProps(r));fn({}),await g(N),Ea(),d?uy("Successfully saved but failed to establish S3 connection."):Yt("Successfully saved files storage settings.")}catch(N){he.errorResponseHandler(N)}t(3,u=!1)}}async function g(N={}){t(1,r={s3:(N==null?void 0:N.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await k()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await k()}async function k(){if(t(5,d=null),!!r.s3.enabled){he.cancelRequest(oo),clearTimeout(p),p=setTimeout(()=>{he.cancelRequest(oo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await he.settings.testS3({$cancelKey:oo})}catch(N){t(5,d=N)}t(4,f=!1),clearTimeout(p)}}Xt(()=>()=>{clearTimeout(p)});function $(){r.s3.enabled=this.checked,t(1,r)}function T(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function O(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function D(N){n.$$.not_equal(r.s3.secret,N)&&(r.s3.secret=N,t(1,r))}function I(){r.s3.forcePathStyle=this.checked,t(1,r)}const L=()=>b(),F=()=>_(),R=()=>_();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,d,s,l,_,b,i,$,T,C,O,M,D,I,L,F,R]}class n6 extends ve{constructor(e){super(),be(this,e,t6,e6,_e,{})}}function i6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("input"),i=E(),s=y("label"),l=U("Enable"),h(e,"type","checkbox"),h(e,"id",t=n[20]),h(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[1].enabled,S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&h(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&h(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function s6(n){let e,t,i,s,l,o,r,a,u;return{c(){e=y("label"),t=U("Client ID"),s=E(),l=y("input"),h(e,"for",i=n[20]),h(l,"type","text"),h(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,d){S(f,e,d),v(e,t),S(f,s,d),S(f,l,d),ue(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,d){d&1048576&&i!==(i=f[20])&&h(e,"for",i),d&1048576&&o!==(o=f[20])&&h(l,"id",o),d&2&&r!==(r=f[1].enabled)&&(l.required=r),d&2&&l.value!==f[1].clientId&&ue(l,f[1].clientId)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function l6(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new fu({props:u}),se.push(()=>me(l,"value",a)),{c(){e=y("label"),t=U("Client secret"),s=E(),H(l.$$.fragment),h(e,"for",i=n[20])},m(f,d){S(f,e,d),v(e,t),S(f,s,d),j(l,f,d),r=!0},p(f,d){(!r||d&1048576&&i!==(i=f[20]))&&h(e,"for",i);const p={};d&1048576&&(p.id=f[20]),d&2&&(p.required=f[1].enabled),!o&&d&2&&(o=!0,p.value=f[1].clientSecret,ye(()=>o=!1)),l.$set(p)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),V(l,f)}}}function Ph(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Pt(o,r(n)),se.push(()=>me(t,"config",l))),{c(){e=y("div"),t&&H(t.$$.fragment),h(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&j(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],ye(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){re();const d=t;P(d.$$.fragment,1,0,()=>{V(d,1)}),ae()}o?(t=Pt(o,r(a)),se.push(()=>me(t,"config",l)),H(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&V(t)}}}function o6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m;i=new de({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[i6,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),r=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[s6,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}}),u=new de({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[l6,({uniqueId:g})=>({20:g}),({uniqueId:g})=>g?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&Ph(n);return{c(){e=y("form"),t=y("div"),H(i.$$.fragment),s=E(),l=y("button"),l.innerHTML='Clear all fields',o=E(),H(r.$$.fragment),a=E(),H(u.$$.fragment),f=E(),_&&_.c(),h(l,"type","button"),h(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),h(t,"class","flex m-b-base"),h(e,"id",n[6]),h(e,"autocomplete","off")},m(g,b){S(g,e,b),v(e,t),j(i,t,null),v(t,s),v(t,l),v(e,o),j(r,e,null),v(e,a),j(u,e,null),v(e,f),_&&_.m(e,null),d=!0,p||(m=[J(l,"click",n[8]),J(e,"submit",ct(n[15]))],p=!0)},p(g,b){const k={};b&8&&(k.name=g[3].key+".enabled"),b&3145730&&(k.$$scope={dirty:b,ctx:g}),i.$set(k);const $={};b&2&&($.class="form-field "+(g[1].enabled?"required":"")),b&8&&($.name=g[3].key+".clientId"),b&3145730&&($.$$scope={dirty:b,ctx:g}),r.$set($);const T={};b&2&&(T.class="form-field "+(g[1].enabled?"required":"")),b&8&&(T.name=g[3].key+".clientSecret"),b&3145730&&(T.$$scope={dirty:b,ctx:g}),u.$set(T),g[3].optionsComponent?_?(_.p(g,b),b&8&&A(_,1)):(_=Ph(g),_.c(),A(_,1),_.m(e,null)):_&&(re(),P(_,1,1,()=>{_=null}),ae())},i(g){d||(A(i.$$.fragment,g),A(r.$$.fragment,g),A(u.$$.fragment,g),A(_),d=!0)},o(g){P(i.$$.fragment,g),P(r.$$.fragment,g),P(u.$$.fragment,g),P(_),d=!1},d(g){g&&w(e),V(i),V(r),V(u),_&&_.d(),p=!1,De(m)}}}function r6(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=y("h4"),i=U(t),s=U(" provider"),h(e,"class","center txt-break")},m(l,o){S(l,e,o),v(e,i),v(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&le(i,t)},d(l){l&&w(e)}}}function a6(n){let e,t,i,s,l,o,r,a;return{c(){e=y("button"),t=U("Close"),i=E(),s=y("button"),l=y("span"),l.textContent="Save changes",h(e,"type","button"),h(e,"class","btn btn-transparent"),e.disabled=n[4],h(l,"class","txt"),h(s,"type","submit"),h(s,"form",n[6]),h(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],x(s,"btn-loading",n[4])},m(u,f){S(u,e,f),v(e,t),S(u,i,f),S(u,s,f),v(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&x(s,"btn-loading",u[4])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function u6(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[a6],header:[r6],default:[o6]},$$scope:{ctx:n}};return e=new cn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),V(e,s)}}}function f6(n,e,t){let i;const s=wt(),l="provider_popup_"+z.randomString(5);let o,r={},a={},u=!1,f="";function d(D,I){fn({}),t(3,r=Object.assign({},D)),t(1,a=Object.assign({enabled:!0},I)),t(10,f=JSON.stringify(a)),o==null||o.show()}function p(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const D={};D[r.key]=z.filterRedactedProps(a);const I=await he.settings.update(D);fn({}),Yt("Successfully updated provider settings."),s("submit",I),p()}catch(D){he.errorResponseHandler(D)}t(4,u=!1)}function _(){for(let D in a)t(1,a[D]="",a);t(1,a.enabled=!1,a)}function g(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function k(D){n.$$.not_equal(a.clientSecret,D)&&(a.clientSecret=D,t(1,a))}function $(D){a=D,t(1,a)}const T=()=>m();function C(D){se[D?"unshift":"push"](()=>{o=D,t(2,o)})}function O(D){pe.call(this,n,D)}function M(D){pe.call(this,n,D)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[p,a,o,r,u,i,l,m,_,d,f,g,b,k,$,T,C,O,M]}class c6 extends ve{constructor(e){super(),be(this,e,f6,u6,_e,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Lh(n){let e,t,i;return{c(){e=y("img"),Cn(e.src,t="./images/oauth2/"+n[1].logo)||h(e,"src",t),h(e,"alt",i=n[1].title+" logo"),h(e,"class","svelte-1jz4aqj")},m(s,l){S(s,e,l)},p(s,l){l&2&&!Cn(e.src,t="./images/oauth2/"+s[1].logo)&&h(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&h(e,"alt",i)},d(s){s&&w(e)}}}function Nh(n){let e;return{c(){e=y("div"),e.textContent="Enabled",h(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function d6(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",d,p,m,_,g,b,k,$,T,C,O=n[1].logo&&Lh(n),M=n[0].enabled&&Nh(),D={};return k=new c6({props:D}),n[4](k),k.$on("submit",n[5]),{c(){e=y("div"),t=y("figure"),O&&O.c(),i=E(),s=y("div"),o=U(l),r=E(),a=y("em"),u=U("("),d=U(f),p=U(")"),m=E(),M&&M.c(),_=E(),g=y("button"),g.innerHTML='',b=E(),H(k.$$.fragment),h(t,"class","provider-logo svelte-1jz4aqj"),h(s,"class","title"),h(a,"class","txt-hint txt-sm m-r-auto"),h(g,"type","button"),h(g,"class","btn btn-circle btn-hint btn-transparent"),h(g,"aria-label","Provider settings"),h(e,"class","provider-card svelte-1jz4aqj")},m(I,L){S(I,e,L),v(e,t),O&&O.m(t,null),v(e,i),v(e,s),v(s,o),v(e,r),v(e,a),v(a,u),v(a,d),v(a,p),v(e,m),M&&M.m(e,null),v(e,_),v(e,g),S(I,b,L),j(k,I,L),$=!0,T||(C=J(g,"click",n[3]),T=!0)},p(I,[L]){I[1].logo?O?O.p(I,L):(O=Lh(I),O.c(),O.m(t,null)):O&&(O.d(1),O=null),(!$||L&2)&&l!==(l=I[1].title+"")&&le(o,l),(!$||L&2)&&f!==(f=I[1].key.slice(0,-4)+"")&&le(d,f),I[0].enabled?M||(M=Nh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const F={};k.$set(F)},i(I){$||(A(k.$$.fragment,I),$=!0)},o(I){P(k.$$.fragment,I),$=!1},d(I){I&&w(e),O&&O.d(),M&&M.d(),I&&w(b),n[4](null),V(k,I),T=!1,C()}}}function p6(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){se[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class ub extends ve{constructor(e){super(),be(this,e,p6,d6,_e,{provider:1,config:0})}}function Fh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Rh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function m6(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const d=g=>g[9].key;for(let g=0;g0&&n[2].length>0&&jh(),m=n[2];const _=g=>g[9].key;for(let g=0;g0&&g[2].length>0?p||(p=jh(),p.c(),p.m(l.parentNode,l)):p&&(p.d(1),p=null),b&5&&(m=g[2],re(),r=kt(r,b,_,1,g,m,a,o,Kt,Vh,null,Fh),ae())},i(g){if(!u){for(let b=0;bme(i,"config",r)),{key:n,first:null,c(){t=y("div"),H(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),j(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&8&&(d.provider=e[9]),!s&&f&9&&(s=!0,d.config=e[0][e[9].key],ye(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),V(i)}}}function jh(n){let e;return{c(){e=y("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Vh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new ub({props:a}),se.push(()=>me(i,"config",r)),{key:n,first:null,c(){t=y("div"),H(i.$$.fragment),l=E(),h(t,"class","col-lg-6"),this.first=t},m(u,f){S(u,t,f),j(i,t,null),v(t,l),o=!0},p(u,f){e=u;const d={};f&4&&(d.provider=e[9]),!s&&f&5&&(s=!0,d.config=e[0][e[9].key],ye(()=>s=!1)),i.$set(d)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){P(i.$$.fragment,u),o=!1},d(u){u&&w(t),V(i)}}}function _6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;const g=[h6,m6],b=[];function k($,T){return $[1]?0:1}return p=k(n),m=b[p]=g[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[4]),r=E(),a=y("div"),u=y("div"),f=y("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","m-b-base"),h(u,"class","panel"),h(a,"class","wrapper")},m($,T){S($,e,T),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S($,r,T),S($,a,T),v(a,u),v(u,f),v(u,d),b[p].m(u,null),_=!0},p($,T){(!_||T&16)&&le(o,$[4]);let C=p;p=k($),p===C?b[p].p($,T):(re(),P(b[C],1,1,()=>{b[C]=null}),ae(),m=b[p],m?m.p($,T):(m=b[p]=g[p]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){P(m),_=!1},d($){$&&w(e),$&&w(r),$&&w(a),b[p].d()}}}function g6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[_6]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}function b6(n,e,t){let i,s,l;Ke(n,Lt,p=>t(4,l=p)),tn(Lt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const p=await he.settings.getAll()||{};u(p)}catch(p){he.errorResponseHandler(p)}t(1,o=!1)}function u(p){p=p||{},t(0,r={});for(const m of ul)t(0,r[m.key]=Object.assign({enabled:!1},p[m.key]),r)}function f(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}function d(p,m){n.$$.not_equal(r[m.key],p)&&(r[m.key]=p,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=ul.filter(p=>{var m;return(m=r[p.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=ul.filter(p=>{var m;return!((m=r[p.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,d]}class v6 extends ve{constructor(e){super(),be(this,e,b6,g6,_e,{})}}function y6(n){let e,t,i,s,l,o,r,a,u,f,d,p;return{c(){e=y("label"),t=U(n[3]),i=U(" duration (in seconds)"),l=E(),o=y("input"),a=E(),u=y("div"),f=y("span"),f.textContent="Invalidate all previously issued tokens",h(e,"for",s=n[6]),h(o,"type","number"),h(o,"id",r=n[6]),o.required=!0,h(f,"class","link-primary"),x(f,"txt-success",!!n[1]),h(u,"class","help-block")},m(m,_){S(m,e,_),v(e,t),v(e,i),S(m,l,_),S(m,o,_),ue(o,n[0]),S(m,a,_),S(m,u,_),v(u,f),d||(p=[J(o,"input",n[4]),J(f,"click",n[5])],d=!0)},p(m,_){_&8&&le(t,m[3]),_&64&&s!==(s=m[6])&&h(e,"for",s),_&64&&r!==(r=m[6])&&h(o,"id",r),_&1&>(o.value)!==m[0]&&ue(o,m[0]),_&2&&x(f,"txt-success",!!m[1])},d(m){m&&w(e),m&&w(l),m&&w(o),m&&w(a),m&&w(u),d=!1,De(p)}}}function k6(n){let e,t;return e=new de({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[y6,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function w6(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=gt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=z.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class fb extends ve{constructor(e){super(),be(this,e,w6,k6,_e,{key:2,label:3,duration:0,secret:1})}}function Hh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function zh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function S6(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],d=new Map,p,m,_,g,b,k,$,T,C,O,M,D=n[5];const I=N=>N[19].key;for(let N=0;NN[19].key;for(let N=0;Nme(i,"duration",r)),se.push(()=>me(i,"secret",a)),{key:n,first:null,c(){t=Se(),H(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),j(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&33&&(s=!0,p.duration=e[0][e[19].key].duration,ye(()=>s=!1)),!l&&d&33&&(l=!0,p.secret=e[0][e[19].key].secret,ye(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),V(i,f)}}}function Uh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new fb({props:u}),se.push(()=>me(i,"duration",r)),se.push(()=>me(i,"secret",a)),{key:n,first:null,c(){t=Se(),H(i.$$.fragment),this.first=t},m(f,d){S(f,t,d),j(i,f,d),o=!0},p(f,d){e=f;const p={};!s&&d&65&&(s=!0,p.duration=e[0][e[19].key].duration,ye(()=>s=!1)),!l&&d&65&&(l=!0,p.secret=e[0][e[19].key].secret,ye(()=>l=!1)),i.$set(p)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){P(i.$$.fragment,f),o=!1},d(f){f&&w(t),V(i,f)}}}function Wh(n){let e,t,i,s;return{c(){e=y("button"),t=y("span"),t.textContent="Cancel",h(t,"class","txt"),h(e,"type","button"),h(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),v(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function T6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b;const k=[$6,S6],$=[];function T(C,O){return C[1]?0:1}return p=T(n),m=$[p]=k[p](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[4]),r=E(),a=y("div"),u=y("form"),f=y("div"),f.innerHTML="

    Adjust common token options.

    ",d=E(),m.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(f,"class","content m-b-sm txt-xl"),h(u,"class","panel"),h(u,"autocomplete","off"),h(a,"class","wrapper")},m(C,O){S(C,e,O),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(C,r,O),S(C,a,O),v(a,u),v(u,f),v(u,d),$[p].m(u,null),_=!0,g||(b=J(u,"submit",ct(n[7])),g=!0)},p(C,O){(!_||O&16)&&le(o,C[4]);let M=p;p=T(C),p===M?$[p].p(C,O):(re(),P($[M],1,1,()=>{$[M]=null}),ae(),m=$[p],m?m.p(C,O):(m=$[p]=k[p](C),m.c()),A(m,1),m.m(u,null))},i(C){_||(A(m),_=!0)},o(C){P(m),_=!1},d(C){C&&w(e),C&&w(r),C&&w(a),$[p].d(),g=!1,b()}}}function C6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[T6]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}function M6(n,e,t){let i,s,l;Ke(n,Lt,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records private file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins private file access token"}];tn(Lt,l="Token options",l);let a={},u={},f=!1,d=!1;p();async function p(){t(1,f=!0);try{const M=await he.settings.getAll()||{};_(M)}catch(M){he.errorResponseHandler(M)}t(1,f=!1)}async function m(){if(!(d||!s)){t(2,d=!0);try{const M=await he.settings.update(z.filterRedactedProps(u));_(M),Yt("Successfully saved tokens options.")}catch(M){he.errorResponseHandler(M)}t(2,d=!1)}}function _(M){var I;M=M||{},t(0,u={});const D=o.concat(r);for(const L of D)t(0,u[L.key]={duration:((I=M[L.key])==null?void 0:I.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function g(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,D){n.$$.not_equal(u[D.key].duration,M)&&(u[D.key].duration=M,t(0,u))}function k(M,D){n.$$.not_equal(u[D.key].secret,M)&&(u[D.key].secret=M,t(0,u))}function $(M,D){n.$$.not_equal(u[D.key].duration,M)&&(u[D.key].duration=M,t(0,u))}function T(M,D){n.$$.not_equal(u[D.key].secret,M)&&(u[D.key].secret=M,t(0,u))}const C=()=>g(),O=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,d,s,l,o,r,m,g,a,i,b,k,$,T,C,O]}class O6 extends ve{constructor(e){super(),be(this,e,M6,C6,_e,{})}}function D6(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_;return o=new x1({props:{content:n[2]}}),{c(){e=y("div"),e.innerHTML=`

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

    `,t=E(),i=y("div"),s=y("button"),s.innerHTML='Copy',l=E(),H(o.$$.fragment),r=E(),a=y("div"),u=y("div"),f=E(),d=y("button"),d.innerHTML=` Download as JSON`,h(e,"class","content txt-xl m-b-base"),h(s,"type","button"),h(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),h(i,"tabindex","0"),h(i,"class","export-preview svelte-jm5c4z"),h(u,"class","flex-fill"),h(d,"type","button"),h(d,"class","btn btn-expanded"),h(a,"class","flex m-t-base")},m(g,b){S(g,e,b),S(g,t,b),S(g,i,b),v(i,s),v(i,l),j(o,i,null),n[8](i),S(g,r,b),S(g,a,b),v(a,u),v(a,f),v(a,d),p=!0,m||(_=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(d,"click",n[10])],m=!0)},p(g,b){const k={};b&4&&(k.content=g[2]),o.$set(k)},i(g){p||(A(o.$$.fragment,g),p=!0)},o(g){P(o.$$.fragment,g),p=!1},d(g){g&&w(e),g&&w(t),g&&w(i),V(o),n[8](null),g&&w(r),g&&w(a),m=!1,De(_)}}}function E6(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function A6(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[E6,D6],_=[];function g(b,k){return b[1]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[3]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k&8)&&le(o,b[3]);let $=f;f=g(b),f===$?_[f].p(b,k):(re(),P(_[$],1,1,()=>{_[$]=null}),ae(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function I6(n){let e,t,i,s;return e=new Fi({}),i=new Dn({props:{$$slots:{default:[A6]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){j(e,l,o),S(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&w(t),V(i,l)}}}function P6(n,e,t){let i,s;Ke(n,Lt,b=>t(3,s=b)),tn(Lt,s="Export collections",s);const l="export_"+z.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await he.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){he.errorResponseHandler(b)}t(1,a=!1)}function f(){z.downloadJson(r,"pb_schema")}function d(){z.copyToClipboard(i),Qg("The configuration was copied to your clipboard!",3e3)}const p=()=>d();function m(b){se[b?"unshift":"push"](()=>{o=b,t(0,o)})}const _=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const k=window.getSelection(),$=document.createRange();$.selectNodeContents(o),k.removeAllRanges(),k.addRange($)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,d,r,p,m,_,g]}class L6 extends ve{constructor(e){super(),be(this,e,P6,I6,_e,{})}}function Yh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Kh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Jh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Zh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function Gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Qh(n,e,t){const i=n.slice();return i[30]=e[t],i}function N6(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&xh(),a=n[0].name!==n[1].name&&e_(n);return{c(){e=y("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=y("strong"),o=U(l),h(s,"class","txt"),h(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),v(e,t),a&&a.m(e,null),v(e,i),v(e,s),v(s,o)},p(u,f){u[9]?r||(r=xh(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=e_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&le(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function F6(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Deleted",t=E(),i=y("strong"),l=U(s),h(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function R6(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=y("span"),e.textContent="Added",t=E(),i=y("strong"),l=U(s),h(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),v(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&le(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function xh(n){let e;return{c(){e=y("span"),e.textContent="Changed",h(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function e_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=y("strong"),i=U(t),s=E(),l=y("i"),h(e,"class","txt-strikethrough txt-hint"),h(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),v(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&le(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function t_(n){var b,k;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,d,p,m,_=n[12]((k=n[1])==null?void 0:k[n[30]])+"",g;return{c(){var $,T,C,O,M,D;e=y("tr"),t=y("td"),i=y("span"),l=U(s),o=E(),r=y("td"),a=y("pre"),f=U(u),d=E(),p=y("td"),m=y("pre"),g=U(_),h(t,"class","min-width svelte-lmkr38"),h(a,"class","txt"),h(r,"class","svelte-lmkr38"),x(r,"changed-old-col",!n[10]&&mn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),x(r,"changed-none-col",n[10]),h(m,"class","txt"),h(p,"class","svelte-lmkr38"),x(p,"changed-new-col",!n[5]&&mn((C=n[0])==null?void 0:C[n[30]],(O=n[1])==null?void 0:O[n[30]])),x(p,"changed-none-col",n[5]),h(e,"class","svelte-lmkr38"),x(e,"txt-primary",mn((M=n[0])==null?void 0:M[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m($,T){S($,e,T),v(e,t),v(t,i),v(i,l),v(e,o),v(e,r),v(r,a),v(a,f),v(e,d),v(e,p),v(p,m),v(m,g)},p($,T){var C,O,M,D,I,L,F,R;T[0]&1&&u!==(u=$[12]((C=$[0])==null?void 0:C[$[30]])+"")&&le(f,u),T[0]&3075&&x(r,"changed-old-col",!$[10]&&mn((O=$[0])==null?void 0:O[$[30]],(M=$[1])==null?void 0:M[$[30]])),T[0]&1024&&x(r,"changed-none-col",$[10]),T[0]&2&&_!==(_=$[12]((D=$[1])==null?void 0:D[$[30]])+"")&&le(g,_),T[0]&2083&&x(p,"changed-new-col",!$[5]&&mn((I=$[0])==null?void 0:I[$[30]],(L=$[1])==null?void 0:L[$[30]])),T[0]&32&&x(p,"changed-none-col",$[5]),T[0]&2051&&x(e,"txt-primary",mn((F=$[0])==null?void 0:F[$[30]],(R=$[1])==null?void 0:R[$[30]]))},d($){$&&w(e)}}}function n_(n){let e,t=n[6],i=[];for(let s=0;sProps Old @@ -206,6 +206,6 @@ Updated: ${b[1].updated}`,position:"left"}),k[0]&536870912&&p!==(p=b[29])&&h(d," `),o=y("button"),o.innerHTML='Load from JSON file',r=E(),H(a.$$.fragment),u=E(),f=E(),L&&L.c(),d=E(),F&&F.c(),p=E(),R&&R.c(),m=E(),_=y("div"),N&&N.c(),g=E(),b=y("div"),k=E(),$=y("button"),T=y("span"),T.textContent="Review",h(e,"type","file"),h(e,"class","hidden"),h(e,"accept",".json"),h(o,"class","btn btn-outline btn-sm m-l-5"),x(o,"btn-loading",n[12]),h(i,"class","content txt-xl m-b-base"),h(b,"class","flex-fill"),h(T,"class","txt"),h($,"type","button"),h($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=C=!n[14],h(_,"class","flex m-t-base")},m(q,Y){S(q,e,Y),n[19](e),S(q,t,Y),S(q,i,Y),v(i,s),v(s,l),v(s,o),S(q,r,Y),j(a,q,Y),S(q,u,Y),S(q,f,Y),L&&L.m(q,Y),S(q,d,Y),F&&F.m(q,Y),S(q,p,Y),R&&R.m(q,Y),S(q,m,Y),S(q,_,Y),N&&N.m(_,null),v(_,g),v(_,b),v(_,k),v(_,$),v($,T),O=!0,M||(D=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(q,Y){(!O||Y[0]&4096)&&x(o,"btn-loading",q[12]);const B={};Y[0]&64&&(B.class="form-field "+(q[6]?"":"field-error")),Y[0]&65|Y[1]&1536&&(B.$$scope={dirty:Y,ctx:q}),a.$set(B),q[6]&&q[1].length&&!q[7]?L||(L=__(),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),q[6]&&q[1].length&&q[7]?F?F.p(q,Y):(F=g_(q),F.c(),F.m(p.parentNode,p)):F&&(F.d(1),F=null),q[13].length?R?R.p(q,Y):(R=O_(q),R.c(),R.m(m.parentNode,m)):R&&(R.d(1),R=null),q[0]?N?N.p(q,Y):(N=D_(q),N.c(),N.m(_,g)):N&&(N.d(1),N=null),(!O||Y[0]&16384&&C!==(C=!q[14]))&&($.disabled=C)},i(q){O||(A(a.$$.fragment,q),A(I),O=!0)},o(q){P(a.$$.fragment,q),P(I),O=!1},d(q){q&&w(e),n[19](null),q&&w(t),q&&w(i),q&&w(r),V(a,q),q&&w(u),q&&w(f),L&&L.d(q),q&&w(d),F&&F.d(q),q&&w(p),R&&R.d(q),q&&w(m),q&&w(_),N&&N.d(),M=!1,De(D)}}}function J6(n){let e;return{c(){e=y("div"),h(e,"class","loader")},m(t,i){S(t,e,i)},p:Q,i:Q,o:Q,d(t){t&&w(e)}}}function h_(n){let e;return{c(){e=y("div"),e.textContent="Invalid collections configuration.",h(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Z6(n){let e,t,i,s,l,o,r,a,u,f,d=!!n[0]&&!n[6]&&h_();return{c(){e=y("label"),t=U("Collections"),s=E(),l=y("textarea"),r=E(),d&&d.c(),a=Se(),h(e,"for",i=n[40]),h(e,"class","p-b-10"),h(l,"id",o=n[40]),h(l,"class","code"),h(l,"spellcheck","false"),h(l,"rows","15"),l.required=!0},m(p,m){S(p,e,m),v(e,t),S(p,s,m),S(p,l,m),ue(l,n[0]),S(p,r,m),d&&d.m(p,m),S(p,a,m),u||(f=J(l,"input",n[22]),u=!0)},p(p,m){m[1]&512&&i!==(i=p[40])&&h(e,"for",i),m[1]&512&&o!==(o=p[40])&&h(l,"id",o),m[0]&1&&ue(l,p[0]),p[0]&&!p[6]?d||(d=h_(),d.c(),d.m(a.parentNode,a)):d&&(d.d(1),d=null)},d(p){p&&w(e),p&&w(s),p&&w(l),p&&w(r),d&&d.d(p),p&&w(a),u=!1,f()}}}function __(n){let e;return{c(){e=y("div"),e.innerHTML=`
    Your collections configuration is already up-to-date!
    `,h(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function g_(n){let e,t,i,s,l,o=n[9].length&&b_(n),r=n[4].length&&k_(n),a=n[8].length&&T_(n);return{c(){e=y("h5"),e.textContent="Detected changes",t=E(),i=y("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),h(e,"class","section-title"),h(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),v(i,s),r&&r.m(i,null),v(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=b_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=k_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=T_(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function b_(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=E(),s=y("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:Q,d(u){u&&w(e),r=!1,a()}}}function D_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function G6(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[J6,K6],_=[];function g(b,k){return b[5]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&le(o,b[15]);let $=f;f=g(b),f===$?_[f].p(b,k):(re(),P(_[$],1,1,()=>{_[$]=null}),ae(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function X6(n){let e,t,i,s,l,o;e=new Fi({}),i=new Dn({props:{$$slots:{default:[G6]},$$scope:{ctx:n}}});let r={};return l=new Y6({props:r}),n[27](l),l.$on("submit",n[28]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){V(e,a),a&&w(t),V(i,a),a&&w(s),n[27](null),V(l,a)}}}function Q6(n,e,t){let i,s,l,o,r,a,u;Ke(n,Lt,X=>t(15,u=X)),tn(Lt,u="Import collections",u);let f,d,p="",m=!1,_=[],g=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,g=await he.collections.getFullList(200));for(let X of g)delete X.created,delete X.updated}catch(X){he.errorResponseHandler(X)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let X of _){const fe=z.findByKey(g,"id",X.id);!(fe!=null&&fe.id)||!z.hasCollectionChanges(fe,X,b)||k.push({new:X,old:fe})}}function O(){t(1,_=[]);try{t(1,_=JSON.parse(p))}catch{}Array.isArray(_)?t(1,_=z.filterDuplicatesByKey(_)):t(1,_=[]);for(let X of _)delete X.created,delete X.updated,X.schema=z.filterDuplicatesByKey(X.schema)}function M(){var X,fe;for(let G of _){const ce=z.findByKey(g,"name",G.name)||z.findByKey(g,"id",G.id);if(!ce)continue;const ge=G.id,Me=ce.id;G.id=Me;const je=Array.isArray(ce.schema)?ce.schema:[],He=Array.isArray(G.schema)?G.schema:[];for(const we of He){const Ce=z.findByKey(je,"name",we.name);Ce&&Ce.id&&(we.id=Ce.id)}for(let we of _)if(Array.isArray(we.schema))for(let Ce of we.schema)(X=Ce.options)!=null&&X.collectionId&&((fe=Ce.options)==null?void 0:fe.collectionId)===ge&&(Ce.options.collectionId=Me)}t(0,p=JSON.stringify(_,null,4))}function D(X){t(12,m=!0);const fe=new FileReader;fe.onload=async G=>{t(12,m=!1),t(10,f.value="",f),t(0,p=G.target.result),await un(),_.length||(ml("Invalid collections configuration."),I())},fe.onerror=G=>{console.warn(G),ml("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},fe.readAsText(X)}function I(){t(0,p=""),t(10,f.value="",f),fn({})}function L(X){se[X?"unshift":"push"](()=>{f=X,t(10,f)})}const F=()=>{f.files.length&&D(f.files[0])},R=()=>{f.click()};function N(){p=this.value,t(0,p)}function q(){b=this.checked,t(3,b)}const Y=()=>M(),B=()=>I(),Z=()=>d==null?void 0:d.show(g,_,b);function ee(X){se[X?"unshift":"push"](()=>{d=X,t(11,d)})}const ie=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&O(),n.$$.dirty[0]&3&&t(6,i=!!p&&_.length&&_.length===_.filter(X=>!!X.id&&!!X.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(X=>i&&b&&!z.findByKey(_,"id",X.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(X=>i&&!z.findByKey(g,"id",X.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(X=>{let fe=z.findByKey(g,"name",X.name)||z.findByKey(g,"id",X.id);if(!fe)return!1;if(fe.id!=X.id)return!0;const G=Array.isArray(fe.schema)?fe.schema:[],ce=Array.isArray(X.schema)?X.schema:[];for(const ge of ce){if(z.findByKey(G,"id",ge.id))continue;const je=z.findByKey(G,"name",ge.name);if(je&&ge.id!=je.id)return!0}return!1}))},[p,_,g,b,k,$,i,o,l,s,f,d,m,a,r,u,M,D,I,L,F,R,N,q,Y,B,Z,ee,ie]}class x6 extends ve{constructor(e){super(),be(this,e,Q6,X6,_e,{},null,[-1,-1])}}const qt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ii("/"):!0}],eI={"/login":Ft({component:YE,conditions:qt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Ft({asyncComponent:()=>at(()=>import("./PageAdminRequestPasswordReset-5492dbdb.js"),[],import.meta.url),conditions:qt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Ft({asyncComponent:()=>at(()=>import("./PageAdminConfirmPasswordReset-137c6b4a.js"),[],import.meta.url),conditions:qt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Ft({component:_E,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Ft({component:u$,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Ft({component:nA,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Ft({component:VE,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Ft({component:VA,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Ft({component:n6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Ft({component:v6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Ft({component:O6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Ft({component:L6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Ft({component:x6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-16742fdd.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-16742fdd.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-2f7ec2dd.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-2f7ec2dd.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-0307ca05.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-0307ca05.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":Ft({asyncComponent:()=>at(()=>import("./PageOAuth2Redirect-0ed6174e.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"*":Ft({component:Ay,userData:{showAppSidebar:!1}})};function tI(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:d=m=>Math.sqrt(m)*120,easing:p=Yo}=i;return{delay:f,duration:zt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,_)=>{const g=_*a,b=_*u,k=m+_*e.width/t.width,$=m+_*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${$});`}}}function E_(n,e,t){const i=n.slice();return i[2]=e[t],i}function nI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function iI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function sI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function lI(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function A_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m=Q,_,g,b;function k(O,M){return O[2].type==="info"?lI:O[2].type==="success"?sI:O[2].type==="warning"?iI:nI}let $=k(e),T=$(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),T.c(),s=E(),l=y("div"),r=U(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(O,M){S(O,t,M),v(t,i),T.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),_=!0,g||(b=J(u,"click",ct(C)),g=!0)},p(O,M){e=O,$!==($=k(e))&&(T.d(1),T=$(e),T&&(T.c(),T.m(i,null))),(!_||M&1)&&o!==(o=e[2].message+"")&&le(r,o),(!_||M&1)&&x(t,"alert-info",e[2].type=="info"),(!_||M&1)&&x(t,"alert-success",e[2].type=="success"),(!_||M&1)&&x(t,"alert-danger",e[2].type=="error"),(!_||M&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){p=t.getBoundingClientRect()},f(){Eb(t),m(),H_(t,p)},a(){m(),m=Db(t,p,tI,{duration:150})},i(O){_||(tt(()=>{_&&(d||(d=Ve(t,yo,{duration:150},!0)),d.run(1))}),_=!0)},o(O){d||(d=Ve(t,yo,{duration:150},!1)),d.run(0),_=!1},d(O){O&&w(t),T.d(),O&&d&&d.end(),g=!1,b()}}}function oI(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>xg(l)]}class aI extends ve{constructor(e){super(),be(this,e,rI,oI,_e,{})}}function uI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=U(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&w(e)}}}function fI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,De(r)}}}function cI(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[fI],header:[uI]},$$scope:{ctx:n}};return e=new cn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),V(e,s)}}}function dI(n,e,t){let i;Ke(n,su,d=>t(1,i=d));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(d){se[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await un(),t(3,o=!1),nb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class pI extends ve{constructor(e){super(),be(this,e,dI,cI,_e,{})}}function I_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return g=new Hn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[mI]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),_=E(),H(g.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),Cn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,_),j(g,d,null),b=!0,k||($=[Ee(ln.call(null,t)),Ee(ln.call(null,l)),Ee(Un.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ee(Ue.call(null,l,{text:"Collections",position:"right"})),Ee(ln.call(null,r)),Ee(Un.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ee(Ue.call(null,r,{text:"Logs",position:"right"})),Ee(ln.call(null,u)),Ee(Un.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ee(Ue.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!Cn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const O={};C&4096&&(O.$$scope={dirty:C,ctx:T}),g.$set(O)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),V(g),k=!1,De($)}}}function mI(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` + to.`,l=E(),o=y("button"),o.innerHTML='Replace with original ids',h(t,"class","icon"),h(s,"class","content"),h(o,"type","button"),h(o,"class","btn btn-warning btn-sm btn-outline"),h(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),v(e,t),v(e,i),v(e,s),v(e,l),v(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:Q,d(u){u&&w(e),r=!1,a()}}}function D_(n){let e,t,i;return{c(){e=y("button"),e.innerHTML='Clear',h(e,"type","button"),h(e,"class","btn btn-transparent link-hint")},m(s,l){S(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:Q,d(s){s&&w(e),t=!1,i()}}}function G6(n){let e,t,i,s,l,o,r,a,u,f,d,p;const m=[J6,K6],_=[];function g(b,k){return b[5]?0:1}return f=g(n),d=_[f]=m[f](n),{c(){e=y("header"),t=y("nav"),i=y("div"),i.textContent="Settings",s=E(),l=y("div"),o=U(n[15]),r=E(),a=y("div"),u=y("div"),d.c(),h(i,"class","breadcrumb-item"),h(l,"class","breadcrumb-item"),h(t,"class","breadcrumbs"),h(e,"class","page-header"),h(u,"class","panel"),h(a,"class","wrapper")},m(b,k){S(b,e,k),v(e,t),v(t,i),v(t,s),v(t,l),v(l,o),S(b,r,k),S(b,a,k),v(a,u),_[f].m(u,null),p=!0},p(b,k){(!p||k[0]&32768)&&le(o,b[15]);let $=f;f=g(b),f===$?_[f].p(b,k):(re(),P(_[$],1,1,()=>{_[$]=null}),ae(),d=_[f],d?d.p(b,k):(d=_[f]=m[f](b),d.c()),A(d,1),d.m(u,null))},i(b){p||(A(d),p=!0)},o(b){P(d),p=!1},d(b){b&&w(e),b&&w(r),b&&w(a),_[f].d()}}}function X6(n){let e,t,i,s,l,o;e=new Fi({}),i=new Dn({props:{$$slots:{default:[G6]},$$scope:{ctx:n}}});let r={};return l=new Y6({props:r}),n[27](l),l.$on("submit",n[28]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(a,u){j(e,a,u),S(a,t,u),j(i,a,u),S(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const d={};l.$set(d)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){V(e,a),a&&w(t),V(i,a),a&&w(s),n[27](null),V(l,a)}}}function Q6(n,e,t){let i,s,l,o,r,a,u;Ke(n,Lt,X=>t(15,u=X)),tn(Lt,u="Import collections",u);let f,d,p="",m=!1,_=[],g=[],b=!0,k=[],$=!1;T();async function T(){t(5,$=!0);try{t(2,g=await he.collections.getFullList(200));for(let X of g)delete X.created,delete X.updated}catch(X){he.errorResponseHandler(X)}t(5,$=!1)}function C(){if(t(4,k=[]),!!i)for(let X of _){const fe=z.findByKey(g,"id",X.id);!(fe!=null&&fe.id)||!z.hasCollectionChanges(fe,X,b)||k.push({new:X,old:fe})}}function O(){t(1,_=[]);try{t(1,_=JSON.parse(p))}catch{}Array.isArray(_)?t(1,_=z.filterDuplicatesByKey(_)):t(1,_=[]);for(let X of _)delete X.created,delete X.updated,X.schema=z.filterDuplicatesByKey(X.schema)}function M(){var X,fe;for(let G of _){const ce=z.findByKey(g,"name",G.name)||z.findByKey(g,"id",G.id);if(!ce)continue;const ge=G.id,Me=ce.id;G.id=Me;const je=Array.isArray(ce.schema)?ce.schema:[],He=Array.isArray(G.schema)?G.schema:[];for(const we of He){const Ce=z.findByKey(je,"name",we.name);Ce&&Ce.id&&(we.id=Ce.id)}for(let we of _)if(Array.isArray(we.schema))for(let Ce of we.schema)(X=Ce.options)!=null&&X.collectionId&&((fe=Ce.options)==null?void 0:fe.collectionId)===ge&&(Ce.options.collectionId=Me)}t(0,p=JSON.stringify(_,null,4))}function D(X){t(12,m=!0);const fe=new FileReader;fe.onload=async G=>{t(12,m=!1),t(10,f.value="",f),t(0,p=G.target.result),await un(),_.length||(ml("Invalid collections configuration."),I())},fe.onerror=G=>{console.warn(G),ml("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},fe.readAsText(X)}function I(){t(0,p=""),t(10,f.value="",f),fn({})}function L(X){se[X?"unshift":"push"](()=>{f=X,t(10,f)})}const F=()=>{f.files.length&&D(f.files[0])},R=()=>{f.click()};function N(){p=this.value,t(0,p)}function q(){b=this.checked,t(3,b)}const Y=()=>M(),B=()=>I(),Z=()=>d==null?void 0:d.show(g,_,b);function ee(X){se[X?"unshift":"push"](()=>{d=X,t(11,d)})}const ie=()=>I();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof p<"u"&&O(),n.$$.dirty[0]&3&&t(6,i=!!p&&_.length&&_.length===_.filter(X=>!!X.id&&!!X.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(X=>i&&b&&!z.findByKey(_,"id",X.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(X=>i&&!z.findByKey(g,"id",X.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!p&&(s.length||l.length||k.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(X=>{let fe=z.findByKey(g,"name",X.name)||z.findByKey(g,"id",X.id);if(!fe)return!1;if(fe.id!=X.id)return!0;const G=Array.isArray(fe.schema)?fe.schema:[],ce=Array.isArray(X.schema)?X.schema:[];for(const ge of ce){if(z.findByKey(G,"id",ge.id))continue;const je=z.findByKey(G,"name",ge.name);if(je&&ge.id!=je.id)return!0}return!1}))},[p,_,g,b,k,$,i,o,l,s,f,d,m,a,r,u,M,D,I,L,F,R,N,q,Y,B,Z,ee,ie]}class x6 extends ve{constructor(e){super(),be(this,e,Q6,X6,_e,{},null,[-1,-1])}}const qt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ii("/"):!0}],eI={"/login":Ft({component:YE,conditions:qt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Ft({asyncComponent:()=>at(()=>import("./PageAdminRequestPasswordReset-eb8749ca.js"),[],import.meta.url),conditions:qt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Ft({asyncComponent:()=>at(()=>import("./PageAdminConfirmPasswordReset-e781f1e9.js"),[],import.meta.url),conditions:qt.concat([n=>!he.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Ft({component:_E,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Ft({component:u$,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Ft({component:nA,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Ft({component:VE,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Ft({component:VA,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Ft({component:n6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Ft({component:v6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Ft({component:O6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Ft({component:L6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Ft({component:x6,conditions:qt.concat([n=>he.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-2673d9d4.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-2673d9d4.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-b78a8244.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-b78a8244.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-255e6f31.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Ft({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-255e6f31.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":Ft({asyncComponent:()=>at(()=>import("./PageOAuth2Redirect-46a7b8da.js"),[],import.meta.url),conditions:qt,userData:{showAppSidebar:!1}}),"*":Ft({component:Ay,userData:{showAppSidebar:!1}})};function tI(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:d=m=>Math.sqrt(m)*120,easing:p=Yo}=i;return{delay:f,duration:zt(d)?d(Math.sqrt(a*a+u*u)):d,easing:p,css:(m,_)=>{const g=_*a,b=_*u,k=m+_*e.width/t.width,$=m+_*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${k}, ${$});`}}}function E_(n,e,t){const i=n.slice();return i[2]=e[t],i}function nI(n){let e;return{c(){e=y("i"),h(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function iI(n){let e;return{c(){e=y("i"),h(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function sI(n){let e;return{c(){e=y("i"),h(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function lI(n){let e;return{c(){e=y("i"),h(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function A_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,d,p,m=Q,_,g,b;function k(O,M){return O[2].type==="info"?lI:O[2].type==="success"?sI:O[2].type==="warning"?iI:nI}let $=k(e),T=$(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=y("div"),i=y("div"),T.c(),s=E(),l=y("div"),r=U(o),a=E(),u=y("button"),u.innerHTML='',f=E(),h(i,"class","icon"),h(l,"class","content"),h(u,"type","button"),h(u,"class","close"),h(t,"class","alert txt-break"),x(t,"alert-info",e[2].type=="info"),x(t,"alert-success",e[2].type=="success"),x(t,"alert-danger",e[2].type=="error"),x(t,"alert-warning",e[2].type=="warning"),this.first=t},m(O,M){S(O,t,M),v(t,i),T.m(i,null),v(t,s),v(t,l),v(l,r),v(t,a),v(t,u),v(t,f),_=!0,g||(b=J(u,"click",ct(C)),g=!0)},p(O,M){e=O,$!==($=k(e))&&(T.d(1),T=$(e),T&&(T.c(),T.m(i,null))),(!_||M&1)&&o!==(o=e[2].message+"")&&le(r,o),(!_||M&1)&&x(t,"alert-info",e[2].type=="info"),(!_||M&1)&&x(t,"alert-success",e[2].type=="success"),(!_||M&1)&&x(t,"alert-danger",e[2].type=="error"),(!_||M&1)&&x(t,"alert-warning",e[2].type=="warning")},r(){p=t.getBoundingClientRect()},f(){Eb(t),m(),H_(t,p)},a(){m(),m=Db(t,p,tI,{duration:150})},i(O){_||(tt(()=>{_&&(d||(d=Ve(t,yo,{duration:150},!0)),d.run(1))}),_=!0)},o(O){d||(d=Ve(t,yo,{duration:150},!1)),d.run(0),_=!1},d(O){O&&w(t),T.d(),O&&d&&d.end(),g=!1,b()}}}function oI(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>xg(l)]}class aI extends ve{constructor(e){super(),be(this,e,rI,oI,_e,{})}}function uI(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=y("h4"),i=U(t),h(e,"class","block center txt-break"),h(e,"slot","header")},m(l,o){S(l,e,o),v(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&w(e)}}}function fI(n){let e,t,i,s,l,o,r;return{c(){e=y("button"),t=y("span"),t.textContent="No",i=E(),s=y("button"),l=y("span"),l.textContent="Yes",h(t,"class","txt"),e.autofocus=!0,h(e,"type","button"),h(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],h(l,"class","txt"),h(s,"type","button"),h(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],x(s,"btn-loading",n[2])},m(a,u){S(a,e,u),v(e,t),S(a,i,u),S(a,s,u),v(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&x(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,De(r)}}}function cI(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[fI],header:[uI]},$$scope:{ctx:n}};return e=new cn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){H(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),V(e,s)}}}function dI(n,e,t){let i;Ke(n,su,d=>t(1,i=d));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(d){se[d?"unshift":"push"](()=>{s=d,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await un(),t(3,o=!1),nb()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class pI extends ve{constructor(e){super(),be(this,e,dI,cI,_e,{})}}function I_(n){let e,t,i,s,l,o,r,a,u,f,d,p,m,_,g,b,k,$;return g=new Hn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[mI]},$$scope:{ctx:n}}}),{c(){var T;e=y("aside"),t=y("a"),t.innerHTML='PocketBase logo',i=E(),s=y("nav"),l=y("a"),l.innerHTML='',o=E(),r=y("a"),r.innerHTML='',a=E(),u=y("a"),u.innerHTML='',f=E(),d=y("figure"),p=y("img"),_=E(),H(g.$$.fragment),h(t,"href","/"),h(t,"class","logo logo-sm"),h(l,"href","/collections"),h(l,"class","menu-item"),h(l,"aria-label","Collections"),h(r,"href","/logs"),h(r,"class","menu-item"),h(r,"aria-label","Logs"),h(u,"href","/settings"),h(u,"class","menu-item"),h(u,"aria-label","Settings"),h(s,"class","main-menu"),Cn(p.src,m="./images/avatars/avatar"+(((T=n[0])==null?void 0:T.avatar)||0)+".svg")||h(p,"src",m),h(p,"alt","Avatar"),h(d,"class","thumb thumb-circle link-hint closable"),h(e,"class","app-sidebar")},m(T,C){S(T,e,C),v(e,t),v(e,i),v(e,s),v(s,l),v(s,o),v(s,r),v(s,a),v(s,u),v(e,f),v(e,d),v(d,p),v(d,_),j(g,d,null),b=!0,k||($=[Ee(ln.call(null,t)),Ee(ln.call(null,l)),Ee(Un.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ee(Ue.call(null,l,{text:"Collections",position:"right"})),Ee(ln.call(null,r)),Ee(Un.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ee(Ue.call(null,r,{text:"Logs",position:"right"})),Ee(ln.call(null,u)),Ee(Un.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ee(Ue.call(null,u,{text:"Settings",position:"right"}))],k=!0)},p(T,C){var M;(!b||C&1&&!Cn(p.src,m="./images/avatars/avatar"+(((M=T[0])==null?void 0:M.avatar)||0)+".svg"))&&h(p,"src",m);const O={};C&4096&&(O.$$scope={dirty:C,ctx:T}),g.$set(O)},i(T){b||(A(g.$$.fragment,T),b=!0)},o(T){P(g.$$.fragment,T),b=!1},d(T){T&&w(e),V(g),k=!1,De($)}}}function mI(n){let e,t,i,s,l,o,r;return{c(){e=y("a"),e.innerHTML=` Manage admins`,t=E(),i=y("hr"),s=E(),l=y("button"),l.innerHTML=` Logout`,h(e,"href","/settings/admins"),h(e,"class","dropdown-item closable"),h(l,"type","button"),h(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ee(ln.call(null,e)),J(l,"click",n[7])],o=!0)},p:Q,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,De(r)}}}function P_(n){let e,t,i;return t=new uu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:z.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=y("div"),H(t.$$.fragment),h(e,"class","tinymce-preloader hidden")},m(s,l){S(s,e,l),j(t,e,null),i=!0},p:Q,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),V(t)}}}function hI(n){var b;let e,t,i,s,l,o,r,a,u,f,d,p,m;document.title=e=z.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((b=n[0])==null?void 0:b.id)&&n[1]&&I_(n);o=new Wb({props:{routes:eI}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new aI({}),f=new pI({});let g=n[1]&&!n[2]&&P_(n);return{c(){t=E(),i=y("div"),_&&_.c(),s=E(),l=y("div"),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),H(f.$$.fragment),d=E(),g&&g.c(),p=Se(),h(l,"class","app-body"),h(i,"class","app-layout")},m(k,$){S(k,t,$),S(k,i,$),_&&_.m(i,null),v(i,s),v(i,l),j(o,l,null),v(l,r),j(a,l,null),S(k,u,$),j(f,k,$),S(k,d,$),g&&g.m(k,$),S(k,p,$),m=!0},p(k,[$]){var T;(!m||$&24)&&e!==(e=z.joinNonEmpty([k[4],k[3],"PocketBase"]," - "))&&(document.title=e),(T=k[0])!=null&&T.id&&k[1]?_?(_.p(k,$),$&3&&A(_,1)):(_=I_(k),_.c(),A(_,1),_.m(i,s)):_&&(re(),P(_,1,1,()=>{_=null}),ae()),k[1]&&!k[2]?g?(g.p(k,$),$&6&&A(g,1)):(g=P_(k),g.c(),A(g,1),g.m(p.parentNode,p)):g&&(re(),P(g,1,1,()=>{g=null}),ae())},i(k){m||(A(_),A(o.$$.fragment,k),A(a.$$.fragment,k),A(f.$$.fragment,k),A(g),m=!0)},o(k){P(_),P(o.$$.fragment,k),P(a.$$.fragment,k),P(f.$$.fragment,k),P(g),m=!1},d(k){k&&w(t),k&&w(i),_&&_.d(),V(o),V(a),k&&w(u),V(f,k),k&&w(d),g&&g.d(k),k&&w(p)}}}function _I(n,e,t){let i,s,l,o;Ke(n,Ms,g=>t(10,i=g)),Ke(n,wo,g=>t(3,s=g)),Ke(n,Ia,g=>t(0,l=g)),Ke(n,Lt,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var b,k,$,T;((b=g==null?void 0:g.detail)==null?void 0:b.location)!==r&&(t(1,a=!!(($=(k=g==null?void 0:g.detail)==null?void 0:k.userData)!=null&&$.showAppSidebar)),r=(T=g==null?void 0:g.detail)==null?void 0:T.location,tn(Lt,o="",o),fn({}),nb())}function d(){Ii("/")}async function p(){var g,b;if(l!=null&&l.id)try{const k=await he.settings.getAll({$cancelKey:"initialAppSettings"});tn(wo,s=((g=k==null?void 0:k.meta)==null?void 0:g.appName)||"",s),tn(Ms,i=!!((b=k==null?void 0:k.meta)!=null&&b.hideControls),i)}catch(k){k!=null&&k.isAbort||console.warn("Failed to load app settings.",k)}}function m(){he.logout()}const _=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&p()},[l,a,u,s,o,f,d,m,_]}class gI extends ve{constructor(e){super(),be(this,e,_I,hI,_e,{})}}new gI({target:document.getElementById("app")});export{De as A,Yt as B,z as C,Ii as D,Se as E,e1 as F,X_ as G,Xt as H,Ke as I,ii as J,wt as K,se as L,x1 as M,kt as N,is as O,Kt as P,pt as Q,bn as R,ve as S,qr as T,Vo as _,P as a,E as b,H as c,V as d,y as e,h as f,S as g,v as h,be as i,Ee as j,re as k,ln as l,j as m,ae as n,w as o,he as p,de as q,x as r,_e as s,A as t,J as u,ct as v,U as w,le as x,Q as y,ue as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 7ab4042e..e7e121ee 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -44,7 +44,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/components/settings/AuthProviderCard.svelte b/ui/src/components/settings/AuthProviderCard.svelte index 7b21b7e7..ecceb4f4 100644 --- a/ui/src/components/settings/AuthProviderCard.svelte +++ b/ui/src/components/settings/AuthProviderCard.svelte @@ -10,7 +10,7 @@
    {provider.title}
    diff --git a/ui/src/providers.js b/ui/src/providers.js index fb2bd7a2..a7742a4f 100644 --- a/ui/src/providers.js +++ b/ui/src/providers.js @@ -8,6 +8,8 @@ import AppleOptions from "@/components/settings/providers/AppleOptions.svel // [ { key, title, logo, optionsComponent? }, ... ] // ``` // +// The logo images must be placed inside the /public/images/oauth2 directory. +// // If `optionsComponent` is provided it will receive 2 parameters: // - `key` - the provider settings key (eg. "gitlabAuth") // - `config` - the provider settings config that is currently being updated @@ -15,98 +17,98 @@ export default [ { key: "appleAuth", title: "Apple", - logo: "/images/oauth2/apple.svg", + logo: "apple.svg", optionsComponent: AppleOptions, }, { key: "googleAuth", title: "Google", - logo: "/images/oauth2/google.svg", + logo: "google.svg", }, { key: "facebookAuth", title: "Facebook", - logo: "/images/oauth2/facebook.svg", + logo: "facebook.svg", }, { key: "microsoftAuth", title: "Microsoft", - logo: "/images/oauth2/microsoft.svg", + logo: "microsoft.svg", optionsComponent: MicrosoftOptions, }, { key: "githubAuth", title: "GitHub", - logo: "/images/oauth2/github.svg", + logo: "github.svg", }, { key: "gitlabAuth", title: "GitLab", - logo: "/images/oauth2/gitlab.svg", + logo: "gitlab.svg", optionsComponent: SelfHostedOptions, }, { key: "giteeAuth", title: "Gitee", - logo: "/images/oauth2/gitee.svg", + logo: "gitee.svg", }, { key: "giteaAuth", title: "Gitea", - logo: "/images/oauth2/gitea.svg", + logo: "gitea.svg", optionsComponent: SelfHostedOptions, }, { key: "discordAuth", title: "Discord", - logo: "/images/oauth2/discord.svg", + logo: "discord.svg", }, { key: "twitterAuth", title: "Twitter", - logo: "/images/oauth2/twitter.svg", + logo: "twitter.svg", }, { key: "kakaoAuth", title: "Kakao", - logo: "/images/oauth2/kakao.svg", + logo: "kakao.svg", }, { key: "spotifyAuth", title: "Spotify", - logo: "/images/oauth2/spotify.svg", + logo: "spotify.svg", }, { key: "twitchAuth", title: "Twitch", - logo: "/images/oauth2/twitch.svg", + logo: "twitch.svg", }, { key: "stravaAuth", title: "Strava", - logo: "/images/oauth2/strava.svg", + logo: "strava.svg", }, { key: "livechatAuth", title: "LiveChat", - logo: "/images/oauth2/livechat.svg", + logo: "livechat.svg", }, { key: "oidcAuth", title: "OpenID Connect", - logo: "/images/oauth2/oidc.svg", + logo: "oidc.svg", optionsComponent: OIDCOptions, }, { key: "oidc2Auth", title: "(2) OpenID Connect", - logo: "/images/oauth2/oidc.svg", + logo: "oidc.svg", optionsComponent: OIDCOptions, }, { key: "oidc3Auth", title: "(3) OpenID Connect", - logo: "/images/oauth2/oidc.svg", + logo: "oidc.svg", optionsComponent: OIDCOptions, }, ];