pocketbase/ui/dist/assets/index.22d31011.js

377 lines
812 KiB
JavaScript
Raw Normal View History

2022-07-12 23:11:50 +08:00
const zb=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}};zb();function oe(){}const Wl=n=>n;function ct(n,e){for(const t in e)n[t]=e[t];return n}function qg(n){return n()}function bf(){return Object.create(null)}function lt(n){n.forEach(qg)}function Jn(n){return typeof n=="function"}function De(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let ar;function ei(n,e){return ar||(ar=document.createElement("a")),ar.href=e,n===ar.href}function Bb(n){return Object.keys(n).length===0}function Vg(n,...e){if(n==null)return oe;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function hn(n,e,t){n.$$.on_destroy.push(Vg(e,t))}function Dn(n,e,t,i){if(n){const s=zg(n,e,t,i);return n[0](s)}}function zg(n,e,t,i){return n[1]&&i?ct(t.ctx.slice(),n[1](i(e))):t.ctx}function An(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],r=Math.max(e.dirty.length,s.length);for(let o=0;o<r;o+=1)l[o]=e.dirty[o]|s[o];return l}return e.dirty|s}return e.dirty}function En(n,e,t,i,s,l){if(s){const r=zg(e,t,i,l);n.p(r,s)}}function Pn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function di(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Ut(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function yf(n){return n==null?"":n}function Bg(n,e,t){return n.set(t),e}function Xe(n){return n&&Jn(n.destroy)?n.destroy:oe}const Ug=typeof window!="undefined";let So=Ug?()=>window.performance.now():()=>Date.now(),yu=Ug?n=>requestAnimationFrame(n):oe;const Ns=new Set;function Wg(n){Ns.forEach(e=>{e.c(n)||(Ns.delete(e),e.f())}),Ns.size!==0&&yu(Wg)}function Co(n){let e;return Ns.size===0&&yu(Wg),{promise:new Promise(t=>{Ns.add(e={c:n,f:t})}),abort(){Ns.delete(e)}}}function m(n,e){n.appendChild(e)}function Yg(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function Ub(n){const e=b("style");return Wb(Yg(n),e),e.sheet}function Wb(n,e){m(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Bn(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function b(n){return document.createElement(n)}function q(n){return document.createTextNode(n)}function O(){return q(" ")}function st(){return q("")}function X(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Wt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Un(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Kg(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function ci(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function Ot(n){return n===""?null:+n}function Yb(n){return Array.from(n.childNodes)}function me(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function Ce(n,e){n.value=e==null?"":e}function vf(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ee(n,e,t){n.classList[t?"add":"remove"](e)}function Jg(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");ret
`;for(let _=0;_<=1;_+=a){const v=e+(t-e)*l(_);u+=_*100+`%{${r(v,1-v)}}
`}const f=u+`100% {${r(t,1-t)}}
2022-07-12 23:11:50 +08:00
}`,c=`__svelte_${Kb(f)}_${o}`,d=Yg(n),{stylesheet:h,rules:g}=Xr.get(d)||Jb(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const y=n.style.animation||"";return n.style.animation=`${y?`${y}, `:""}${c} ${i}ms linear ${s}ms 1 both`,Qr+=1,c}function Il(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),Qr-=s,Qr||Gb())}function Gb(){yu(()=>{Qr||(Xr.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),Xr.clear())})}function Zb(n,e,t,i){if(!e)return oe;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return oe;const{delay:l=0,duration:r=300,easing:o=Wl,start:a=So()+l,end:u=a+r,tick:f=oe,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function y(){c&&(g=Fl(n,0,1,r,l,o,c)),l||(h=!0)}function _(){c&&Il(n,g),d=!1}return Co(v=>{if(!h&&v>=a&&(h=!0),h&&v>=u&&(f(1,0),_()),!d)return!1;if(h){const C=v-a,S=0+1*o(C/r);f(S,1-S)}return!0}),y(),f(0,1),_}function xb(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,Gg(n,s)}}function Gg(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let Nl;function Cl(n){Nl=n}function $o(){if(!Nl)throw new Error("Function called outside component initialization");return Nl}function pi(n){$o().$$.on_mount.push(n)}function Xb(n){$o().$$.after_update.push(n)}function Qb(n){$o().$$.on_destroy.push(n)}function _n(){const n=$o();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Jg(e,t,{cancelable:i});return s.slice().forEach(r=>{r.call(n,l)}),!l.defaultPrevented}return!0}}function ft(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const bl=[],pe=[],qr=[],Pa=[],Zg=Promise.resolve();let La=!1;function xg(){La||(La=!0,Zg.then(Xg))}function Oi(){return xg(),Zg}function Mt(n){qr.push(n)}function je(n){Pa.push(n)}const Ho=new Set;let ur=0;function Xg(){const n=Nl;do{for(;ur<bl.length;){const e=bl[ur];ur++,Cl(e),e1(e.$$)}for(Cl(null),bl.length=0,ur=0;pe.length;)pe.pop()();for(let e=0;e<qr.length;e+=1){const t=qr[e];Ho.has(t)||(Ho.add(t),t())}qr.length=0}while(bl.length);for(;Pa.length;)Pa.pop()();La=!1,Ho.clear(),Cl(n)}function e1(n){if(n.fragment!==null){n.update(),lt(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Mt)}}let il;function vu(){return il||(il=Promise.resolve(),il.then(()=>{il=null})),il}function ds(n,e,t){n.dispatchEvent(Jg(`${e?"intro":"outro"}${t}`))}const Vr=new Set;let ai;function Me(){ai={r:0,c:[],p:ai}}function Oe(){ai.r||lt(ai.c),ai=ai.p}function E(n,e){n&&n.i&&(Vr.delete(n),n.i(e))}function F(n,e,t,i){if(n&&n.o){if(Vr.has(n))return;Vr.add(n),ai.c.push(()=>{Vr.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ku={duration:0};function wu(n,e,t){let i=e(n,t),s=!1,l,r,o=0;function a(){l&&Il(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=Wl,tick:g=oe,css:y}=i||ku;y&&(l=Fl(n,0,1,d,c,h,y,o++)),g(0,1);const _=So()+c,v=_+d;r&&r.abort(),s=!0,Mt(()=>ds(n,!0,"start")),r=Co(C=>{if(s){if(C>=v)return g(1,0),ds(n,!0,"end"),a(),s=!1;if(C>=_){const S=h((C-_)/d);g(S,1-S)}}return s})}let f=!1;return{start(){f||(f=!0,Il(n),Jn(i)?(i=i(),vu().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Qg(n,e,t){let i=e(n,t),s=!0,l;const r=ai;r.r+=1;function o(){const{delay:a=0,duration:u=300,easing:f=Wl,tick:c=oe,css:d}=i||ku;d&&(l=Fl(n,1,0,u,a,f,d));const h=So()+a,g=h+u;Mt(()=>ds(n,!1,"start")),Co(y=>{if(s){if(y>=g)return c(0,1),ds(n,!1,"end"),--r.r||lt(r.c),!1;if(y>=h){const _=f((y-h)/u);c(1-_,_)}}return s})}return Jn(i)?vu().then(()=>{i=i(),o()}):o(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&Il(n,l),s=!1)}}}function at(n,e,t,i){let s=e(n,t),l=i?0:1,r=nu
`),function(l){if(i=l.indexOf(":"),e=zo.trim(l.substr(0,i)).toLowerCase(),t=zo.trim(l.substr(i+1)),e){if(s[e]&&k1.indexOf(e)>=0)return;s[e]=e==="set-cookie"?(s[e]?s[e]:[]).concat([t]):s[e]?s[e]+", "+t:t}}),s},T1=w1,Bo=a_,D1=function(n){return new Promise(function(e,t){var i=n.data,s=n.headers,l=n.responseType;dr.isFormData(i)&&delete s["Content-Type"];var r=new XMLHttpRequest;if(n.auth){var o=n.auth.username||"",a=n.auth.password?unescape(encodeURIComponent(n.auth.password)):"";s.Authorization="Basic "+btoa(o+":"+a)}var u=M1(n.baseURL,n.url);function f(){if(r){var d="getAllResponseHeaders"in r?O1(r.getAllResponseHeaders()):null,h={data:l&&l!=="text"&&l!=="json"?r.response:r.responseText,status:r.status,statusText:r.statusText,headers:d,config:n,request:r};S1(e,t,h),r=null}}if(r.open(n.method.toUpperCase(),$1(u,n.params,n.paramsSerializer),!0),r.timeout=n.timeout,"onloadend"in r?r.onloadend=f:r.onreadystatechange=function(){r&&r.readyState===4&&(r.status!==0||r.responseURL&&r.responseURL.indexOf("file:")===0)&&setTimeout(f)},r.onabort=function(){r&&(t(Bo("Request aborted",n,"ECONNABORTED",r)),r=null)},r.onerror=function(){t(Bo("Network Error",n,null,r)),r=null},r.ontimeout=function(){var d="timeout of "+n.timeout+"ms exceeded";n.timeoutErrorMessage&&(d=n.timeoutErrorMessage),t(Bo(d,n,n.transitional&&n.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",r)),r=null},dr.isStandardBrowserEnv()){var c=(n.withCredentials||T1(u))&&n.xsrfCookieName?C1.read(n.xsrfCookieName):void 0;c&&(s[n.xsrfHeaderName]=c)}"setRequestHeader"in r&&dr.forEach(s,function(d,h){i===void 0&&h.toLowerCase()==="content-type"?delete s[h]:r.setRequestHeader(h,d)}),dr.isUndefined(n.withCredentials)||(r.withCredentials=!!n.withCredentials),l&&l!=="json"&&(r.responseType=n.responseType),typeof n.onDownloadProgress=="function"&&r.addEventListener("progress",n.onDownloadProgress),typeof n.onUploadProgress=="function"&&r.upload&&r.upload.addEventListener("progress",n.onUploadProgress),n.cancelToken&&n.cancelToken.promise.then(function(d){r&&(r.abort(),t(d),r=null)}),i||(i=null),r.send(i)})},tn=In,Ef=function(n,e){m1.forEach(n,function(t,i){i!==e&&i.toUpperCase()===e.toUpperCase()&&(n[e]=t,delete n[i])})},A1=o_,E1={"Content-Type":"application/x-www-form-urlencoded"};function Pf(n,e){!tn.isUndefined(n)&&tn.isUndefined(n["Content-Type"])&&(n["Content-Type"]=e)}var Lf,Ur={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:((typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(Lf=D1),Lf),transformRequest:[function(n,e){return Ef(e,"Accept"),Ef(e,"Content-Type"),tn.isFormData(n)||tn.isArrayBuffer(n)||tn.isBuffer(n)||tn.isStream(n)||tn.isFile(n)||tn.isBlob(n)?n:tn.isArrayBufferView(n)?n.buffer:tn.isURLSearchParams(n)?(Pf(e,"application/x-www-form-urlencoded;charset=utf-8"),n.toString()):tn.isObject(n)||e&&e["Content-Type"]==="application/json"?(Pf(e,"application/json"),function(t,i,s){if(tn.isString(t))try{return(i||JSON.parse)(t),tn.trim(t)}catch(l){if(l.name!=="SyntaxError")throw l}return(s||JSON.stringify)(t)}(n)):n}],transformResponse:[function(n){var e=this.transitional,t=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,s=!t&&this.responseType==="json";if(s||i&&tn.isString(n)&&n.length)try{return JSON.parse(n)}catch(l){if(s)throw l.name==="SyntaxError"?A1(l,this,"E_JSON_PARSE"):l}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(n){return n>=200&&n<300}};Ur.headers={common:{Accept:"application/json, text/plain, */*"}},tn.forEach(["delete","get","head"],function(n){Ur.headers[n]={}}),tn.forEach(["post","put","patch"],function(n){Ur.headers[n]=tn.merge(E1)});var Su=Ur,P1=In,L1=Su,u_=function(n){return!(!n||!n.__CANCEL__)},Ff=In,Uo=function(n,e,t){var i=this||L1;return P1.forEach(t,function(s){n=s.call(i,n,e)}),n},F1=u_,I1=Su;function Wo(n){n.cancelToken&&n.cancelToken.throwIfRequested()}var rn=In,f_=function(n,e){e=e||{};var t={},i=["url","method","data"],s=
`+e.prev+e.base;return t+ri.call(n,","+t)+`
2022-07-12 23:11:50 +08:00
`+e.prev}function gr(n,e){var t=Ha(n),i=[];if(t){i.length=n.length;for(var s=0;s<n.length;s++)i[s]=Ii(n,s)?e(n[s],n):""}var l,r=typeof Qo=="function"?Qo(n):[];if(Us){l={};for(var o=0;o<r.length;o++)l["$"+r[o]]=r[o]}for(var a in n)Ii(n,a)&&(t&&String(Number(a))===a&&a<n.length||Us&&l["$"+a]instanceof Symbol||(v_.call(/[^\w$]/,a)?i.push(e(a,n)+": "+e(n[a],n)):i.push(a+": "+e(n[a],n))));if(typeof Qo=="function")for(var u=0;u<r.length;u++)k_.call(n,r[u])&&i.push("["+e(r[u])+"]: "+e(n[r[u]],n));return i}var $_,Au=Mu,xs=function(n,e){var t=b_(n,!!e);return typeof t=="function"&&ly(n,".prototype.")>-1?y_(t):t},by=function n(e,t,i,s){var l=t||{};if(Ii(l,"quoteStyle")&&l.quoteStyle!=="single"&&l.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ii(l,"maxStringLength")&&(typeof l.maxStringLength=="number"?l.maxStringLength<0&&l.maxStringLength!==1/0:l.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var r=!Ii(l,"customInspect")||l.customInspect;if(typeof r!="boolean"&&r!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ii(l,"indent")&&l.indent!==null&&l.indent!==" "&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ii(l,"numericSeparator")&&typeof l.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=l.numericSeparator;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return C_(e,l);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var a=String(e);return o?Jf(e,a):a}if(typeof e=="bigint"){var u=String(e)+"n";return o?Jf(e,u):u}var f=l.depth===void 0?5:l.depth;if(i===void 0&&(i=0),i>=f&&f>0&&typeof e=="object")return Ha(e)?"[Array]":"[Object]";var c=function(j,G){var te;if(j.indent===" ")te=" ";else{if(!(typeof j.indent=="number"&&j.indent>0))return null;te=ri.call(Array(j.indent+1)," ")}return{base:te,prev:ri.call(Array(G+1),te)}}(l,i);if(s===void 0)s=[];else if(Xf(s,e)>=0)return"[Circular]";function d(j,G,te){if(G&&(s=hy.call(s)).push(G),te){var H={depth:l.depth};return Ii(l,"quoteStyle")&&(H.quoteStyle=l.quoteStyle),n(j,H,i+1,s)}return n(j,l,i+1,s)}if(typeof e=="function"&&!xf(e)){var h=function(j){if(j.name)return j.name;var G=dy.call(cy.call(j),/^function\s*([\w$]+)/);return G?G[1]:null}(e),g=gr(e,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(g.length>0?" { "+ri.call(g,", ")+" }":"")}if(S_(e)){var y=Us?qi.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ra.call(e);return typeof e!="object"||Us?y:rl(y)}if(function(j){return!j||typeof j!="object"?!1:typeof HTMLElement!="undefined"&&j instanceof HTMLElement?!0:typeof j.nodeName=="string"&&typeof j.getAttribute=="function"}(e)){for(var _="<"+Uf.call(String(e.nodeName)),v=e.attributes||[],C=0;C<v.length;C++)_+=" "+v[C].name+"="+w_(my(v[C].value),"double",l);return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+Uf.call(String(e.nodeName))+">"}if(Ha(e)){if(e.length===0)return"[]";var S=gr(e,d);return c&&!function(j){for(var G=0;G<j.length;G++)if(Xf(j[G],`
`)>=0)return!1;return!0}(S)?"["+qa(S,c)+"]":"[ "+ri.call(S,", ")+" ]"}if(function(j){return!(Ni(j)!=="[object Error]"||on&&typeof j=="object"&&on in j)}(e)){var $=gr(e,d);return"cause"in Error.prototype||!("cause"in e)||k_.call(e,"cause")?$.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+ri.call($,", ")+" }":"{ ["+String(e)+"] "+ri.call(Wf.call("[cause]: "+d(e.cause),$),", ")+" }"}if(typeof e=="object"&&r){if(Zf&&typeof e[Zf]=="function"&&ja)return ja(e,{depth:f-i});if(r!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(function(j){if(!hr||!j||typeof j!="object")return!1;try{hr.call(j);try{mr.call(j)}catch{return!0}return j instanceof Map}catch{}return!1}(e)){var M=[];return oy.call(e,function(j,G){M.push(d(G,e,!0)+" => "+d(j,e))}),Qf("Map",hr.call(e),M,c)}if(function(j){if(!mr||!j||typeof j!="object")return!1;try{mr.call(j);try{hr.call(j)}catch{return!0}return j instanceof Set}catch{}return!1}(e)){var T=[];return ay.call(e,function(j){T.push(d(j,e))}),Qf("Set",mr.call(e),T,c)}if(function(j){if(!sl||!j||typeof j!="object")return!1;try{sl.call(j,sl);try{ll.call(j,ll)}catch{return!0}return j instanceof WeakMap}catch{}return!1}(e))return ea("WeakMap");if(function(j){if(!ll||!j||typeof j!="object")return!1;try{ll.call(j,ll);try{sl.call(j,sl)}catch{return!0}return j instanceof WeakSet}catch{}return!1}(e))return ea("WeakSet");if(function(j){if(!Bf||!j||typeof j!="object")return!1;try{return Bf.call(j),!0}catch{}return!1}(e))return ea("WeakRef");if(function(j){return!(Ni(j)!=="[object Number]"||on&&typeof j=="object"&&on in j)}(e))return rl(d(Number(e)));if(function(j){if(!j||typeof j!="object"||!Xo)return!1;try{return Xo.call(j),!0}catch{}return!1}(e))return rl(d(Xo.call(e)));if(function(j){return!(Ni(j)!=="[object Boolean]"||on&&typeof j=="object"&&on in j)}(e))return rl(uy.call(e));if(function(j){return!(Ni(j)!=="[object String]"||on&&typeof j=="object"&&on in j)}(e))return rl(d(String(e)));if(!function(j){return!(Ni(j)!=="[object Date]"||on&&typeof j=="object"&&on in j)}(e)&&!xf(e)){var A=gr(e,d),D=Kf?Kf(e)===Object.prototype:e instanceof Object||e.constructor===Object,P=e instanceof Object?"":"null prototype",L=!D&&on&&Object(e)===e&&on in e?Du.call(Ni(e),8,-1):P?"Object":"",R=(D||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"")+(L||P?"["+ri.call(Wf.call([],L||[],P||[]),": ")+"] ":"");return A.length===0?R+"{}":c?R+"{"+qa(A,c)+"}":R+"{ "+ri.call(A,", ")+" }"}return String(e)},yy=Au("%TypeError%"),_r=Au("%WeakMap%",!0),br=Au("%Map%",!0),vy=xs("WeakMap.prototype.get",!0),ky=xs("WeakMap.prototype.set",!0),wy=xs("WeakMap.prototype.has",!0),Sy=xs("Map.prototype.get",!0),Cy=xs("Map.prototype.set",!0),$y=xs("Map.prototype.has",!0),ta=function(n,e){for(var t,i=n;(t=i.next)!==null;i=t)if(t.key===e)return i.next=t.next,t.next=n.next,n.next=t,t},My=String.prototype.replace,Oy=/%20/g,ec="RFC3986",Eu={default:ec,formatters:{RFC1738:function(n){return My.call(n,Oy,"+")},RFC3986:function(n){return String(n)}},RFC1738:"RFC1738",RFC3986:ec},Ty=Eu,na=Object.prototype.hasOwnProperty,Xi=Array.isArray,si=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),tc=function(n,e){for(var t=e&&e.plainObjects?Object.create(null):{},i=0;i<n.length;++i)n[i]!==void 0&&(t[i]=n[i]);return t},M_={arrayToObject:tc,assign:function(n,e){return Object.keys(e).reduce(function(t,i){return t[i]=e[i],t},n)},combine:function(n,e){return[].concat(n,e)},compact:function(n){for(var e=[{obj:{o:n},prop:"o"}],t=[],i=0;i<e.length;++i)for(var s=e[i],l=s.obj[s.prop],r=Object.keys(l),o=0;o<r.length;++o){var a=r[o],u=l[a];typeof u=="object"&&u!==null&&t.indexOf(u)===-1&&(e.push({obj:l,prop:a}),t.push(u))}return function(f){for(;f.length>1;){var c=f.pop(),d=c.obj[c.prop];if(Xi(d)){for(var h=[],g=0;g<d.length;++g)d[g]!==void 0&&h.push(d[g]);c.obj[c.prop]=h}}}(e),n},decode:function(n,e,t){var i=n.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},encode:function(n,e,t,i,s){if(n.length===0)return n;v
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=O(),i=b("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Kk(n){let e,t,i,s,l,r,o,a,u=!n[0]&&Tc();const f=n[2].default,c=Dn(f,n,n[1],null);return{c(){e=b("div"),t=b("div"),i=O(),s=b("div"),u&&u.c(),l=O(),c&&c.c(),r=O(),o=b("div"),p(t,"class","flex-fill"),p(s,"class","wrapper wrapper-sm m-b-xl svelte-1wbawr2"),p(o,"class","flex-fill"),p(e,"class","page-wrapper full-page-panel svelte-1wbawr2")},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),u&&u.m(s,null),m(s,l),c&&c.m(s,null),m(e,r),m(e,o),a=!0},p(d,[h]){d[0]?u&&(u.d(1),u=null):u||(u=Tc(),u.c(),u.m(s,l)),c&&c.p&&(!a||h&2)&&En(c,f,d,d[1],a?An(f,d[1],h,null):Pn(d[1]),null)},i(d){a||(E(c,d),a=!0)},o(d){F(c,d),a=!1},d(d){d&&k(e),u&&u.d(),c&&c.d(d)}}}function Jk(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=r=>{"nobranding"in r&&t(0,l=r.nobranding),"$$scope"in r&&t(1,s=r.$$scope)},[l,s,i]}class I0 extends Pe{constructor(e){super(),Ee(this,e,Jk,Kk,De,{nobranding:0})}}function Dc(n,e,t){const i=n.slice();return i[11]=e[t],i}const Gk=n=>({}),Ac=n=>({uniqueId:n[3]});function Zk(n){let e=(n[11]||oo)+"",t;return{c(){t=q(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||oo)+"")&&me(t,e)},d(i){i&&k(t)}}}function xk(n){var i,s;let e=(((i=n[11])==null?void 0:i.message)||((s=n[11])==null?void 0:s.code)||oo)+"",t;return{c(){t=q(e)},m(l,r){w(l,t,r)},p(l,r){var o,a;r&4&&e!==(e=(((o=l[11])==null?void 0:o.message)||((a=l[11])==null?void 0:a.code)||oo)+"")&&me(t,e)},d(l){l&&k(t)}}}function Ec(n){let e,t;function i(r,o){return typeof r[11]=="object"?xk:Zk}let s=i(n),l=s(n);return{c(){e=b("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(r,o){w(r,e,o),l.m(e,null),m(e,t)},p(r,o){s===(s=i(r))&&l?l.p(r,o):(l.d(1),l=s(r),l&&(l.c(),l.m(e,t)))},d(r){r&&k(e),l.d()}}}function Xk(n){let e,t,i,s,l;const r=n[7].default,o=Dn(r,n,n[6],Ac);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=Ec(Dc(n,a,f));return{c(){e=b("div"),o&&o.c(),t=O();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),ee(e,"error",n[2].length)},m(f,c){w(f,e,c),o&&o.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=X(e,"click",n[8]),s=!0)},p(f,[c]){if(o&&o.p&&(!i||c&64)&&En(o,r,f,f[6],i?An(r,f[6],c,Gk):Pn(f[6]),Ac),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const h=Dc(f,a,d);u[d]?u[d].p(h,c):(u[d]=Ec(h),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),c&5&&ee(e,"error",f[2].length)},i(f){i||(E(o,f),i=!0)},o(f){F(o,f),i=!1},d(f){f&&k(e),o&&o.d(f),Bn(u,f),n[9](null),s=!1,l()}}}const oo="Invalid value";function Qk(n,e,t){let i;hn(n,ys,g=>t(5,i=g));let{$$slots:s={},$$scope:l}=e;const r="field_"+W.randomString(7);let{name:o=""}=e,{class:a=void 0}=e,u,f=[];function c(){F0(o)}pi(()=>(u.addEventListener("change",c),()=>{u.removeEventListener("change",c)}));function d(g){ft.call(this,n,g)}function h(g){pe[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,o=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=W.toArray(W.getNestedVal(i,o)))},[a,u,f,r,o,i,l,s,d,h]}class Fe extends Pe{constructor(e){super(),Ee(this,e,Qk,Xk,De,{name:4,class:0})}}function e2(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Email"),s=O(),l=b("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",r=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0]),l.focus(),o||(a=X(l,"input",n[5]),o=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&r!==(r=u[9])&&p(l,"id",r),f&1&&l.value!==u[0]&&Ce(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function t2(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=b("label"),t=q("Password"),s=O(),l=b("input"),o=O(),a=b("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",r=n[9]),l.required=!0,p(a,"class","help-block")},m(
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ee(f,"btn-disabled",n[3]),ee(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,y){w(g,e,y),m(e,t),m(e,i),V(s,e,null),m(e,l),V(r,e,null),m(e,o),V(a,e,null),m(e,u),m(e,f),c=!0,d||(h=X(e,"submit",Wt(n[4])),d=!0)},p(g,[y]){const _={};y&1537&&(_.$$scope={dirty:y,ctx:g}),s.$set(_);const v={};y&1538&&(v.$$scope={dirty:y,ctx:g}),r.$set(v);const C={};y&1540&&(C.$$scope={dirty:y,ctx:g}),a.$set(C),y&8&&ee(f,"btn-disabled",g[3]),y&8&&ee(f,"btn-loading",g[3])},i(g){c||(E(s.$$.fragment,g),E(r.$$.fragment,g),E(a.$$.fragment,g),c=!0)},o(g){F(s.$$.fragment,g),F(r.$$.fragment,g),F(a.$$.fragment,g),c=!1},d(g){g&&k(e),z(s),z(r),z(a),d=!1,h()}}}function s2(n,e,t){const i=_n();let s="",l="",r="",o=!1;async function a(){if(!o){t(3,o=!0);try{await ke.Admins.create({email:s,password:l,passwordConfirm:r}),await ke.Admins.authViaEmail(s,l),i("submit")}catch(d){ke.errorResponseHandler(d)}t(3,o=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){r=this.value,t(2,r)}return[s,l,r,o,a,u,f,c]}class l2 extends Pe{constructor(e){super(),Ee(this,e,s2,i2,De,{})}}function Pc(n){let e,t;return e=new I0({props:{$$slots:{default:[r2]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function r2(n){let e,t;return e=new l2({}),e.$on("submit",n[1]),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:oe,i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function o2(n){let e,t,i=n[0]&&Pc(n);return{c(){i&&i.c(),e=st()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&E(i,1)):(i=Pc(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(Me(),F(i,1,1,()=>{i=null}),Oe())},i(s){t||(E(i),t=!0)},o(s){F(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function a2(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ke.logout(!1),t(0,i=!0);return}ke.AuthStore.isValid?Zs("/collections"):ke.logout()}return[i,async()=>{t(0,i=!1),await Oi(),window.location.search=""}]}class u2 extends Pe{constructor(e){super(),Ee(this,e,a2,o2,De,{})}}let Qa,ts;const eu="app-tooltip";function Lc(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Bi(){return ts=ts||document.querySelector("."+eu),ts||(ts=document.createElement("div"),ts.classList.add(eu),document.body.appendChild(ts)),ts}function N0(n,e){let t=Bi();if(!t.classList.contains("active")||!(e!=null&&e.text)){tu();return}t.textContent=e.text,t.className=eu+" active",e.class&&t.classList.add(e.class),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),r=0,o=0,a=5;e.position=="left"?(r=l.top+l.height/2-i/2,o=l.left-s-a):e.position=="right"?(r=l.top+l.height/2-i/2,o=l.right+a):e.position=="top"?(r=l.top-i-a,o=l.left+l.width/2-s/2):e.position=="top-left"?(r=l.top-i-a,o=l.left):e.position=="top-right"?(r=l.top-i-a,o=l.right-s):e.position=="bottom-left"?(r=l.top+l.height+a,o=l.left):e.position=="bottom-right"?(r=l.top+l.height+a,o=l.right-s):(r=l.top+l.height+a,o=l.left+l.width/2-s/2),o+s>document.documentElement.clientWidth&&(o=document.documentElement.clientWidth-s),o=o>=0?o:0,r+i>document.documentElement.clientHeight&&(r=document.documentElement.clientHeight-i),r=r>=0?r:0,t.style.top=r+"px",t.style.left=o+"px"}function tu(){clearTimeout(Qa),Bi().classList.remove("active"),Bi().activeNode=void 0}function f2(n,e){Bi().activeNode=n,clearTimeout(Qa),Qa=setTimeout(()=>{Bi().classList.add("active"),N0(n,e)},isNaN(e.delay)?250:e.delay)}function wt(n,e){let t=Lc(e);function i(){f2(n,t)}function s(){tu()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&W.isFocusable(n))&&n.addEventListener("click",s),Bi(),{update(l){var r,o;t=Lc(l),(o=(r=Bi())
transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px);
opacity: ${a-f*d}`}}function Xt(n,{delay:e=0,duration:t=400,easing:i=Eo}={}){const s=getComputedStyle(n),l=+s.opacity,r=parseFloat(s.height),o=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*r}px;padding-top: ${h*o}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function Wn(n,{delay:e=0,duration:t=400,easing:i=Eo,start:s=0,opacity:l=0}={}){const r=getComputedStyle(n),o=+r.opacity,a=r.transform==="none"?"":r.transform,u=1-s,f=o*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>`
transform: ${a} scale(${1-u*d});
opacity: ${o-f*d}
2022-07-12 23:11:50 +08:00
`}}function c2(n){let e,t,i,s;return{c(){e=b("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,r){w(l,e,r),n[13](e),Ce(e,n[7]),i||(s=X(e,"input",n[14]),i=!0)},p(l,r){r&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),r&128&&e.value!==l[7]&&Ce(e,l[7])},i:oe,o:oe,d(l){l&&k(e),n[13](null),i=!1,s()}}}function d2(n){let e,t,i,s;function l(a){n[12](a)}var r=n[4];function o(a){let u={singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return r&&(e=new r(o(n)),pe.push(()=>Ie(e,"value",l)),e.$on("submit",n[10])),{c(){e&&B(e.$$.fragment),i=st()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],je(()=>t=!1)),r!==(r=a[4])){if(e){Me();const c=e;F(c.$$.fragment,1,0,()=>{z(c,1)}),Oe()}r?(e=new r(o(a)),pe.push(()=>Ie(e,"value",l)),e.$on("submit",a[10]),B(e.$$.fragment),E(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else r&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&F(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function Fc(n){let e,t,i,s,l,r,o=n[7]!==n[0]&&Ic();return{c(){o&&o.c(),e=O(),t=b("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){o&&o.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(r=X(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?o?u&129&&E(o,1):(o=Ic(),o.c(),E(o,1),o.m(e.parentNode,e)):o&&(Me(),F(o,1,1,()=>{o=null}),Oe())},i(a){s||(E(o),Mt(()=>{i||(i=at(t,ni,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){F(o),i||(i=at(t,ni,{duration:150,x:5},!1)),i.run(0),s=!1},d(a){o&&o.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,r()}}}function Ic(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<span class="txt">Search</span>',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(Mt(()=>{t||(t=at(e,ni,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=at(e,ni,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function p2(n){let e,t,i,s,l,r,o,a,u,f,c;const d=[d2,c2],h=[];function g(_,v){return _[4]&&!_[5]?0:1}r=g(n),o=h[r]=d[r](n);let y=(n[0].length||n[7].length)&&Fc(n);return{c(){e=b("div"),t=b("form"),i=b("label"),s=b("i"),l=O(),o.c(),a=O(),y&&y.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(_,v){w(_,e,v),m(e,t),m(t,i),m(i,s),m(t,l),h[r].m(t,null),m(t,a),y&&y.m(t,null),u=!0,f||(c=[X(t,"submit",Wt(n[10])),X(e,"click",Un(n[11]))],f=!0)},p(_,[v]){let C=r;r=g(_),r===C?h[r].p(_,v):(Me(),F(h[C],1,1,()=>{h[C]=null}),Oe(),o=h[r],o?o.p(_,v):(o=h[r]=d[r](_),o.c()),E(o,1),o.m(t,a)),_[0].length||_[7].length?y?(y.p(_,v),v&129&&E(y,1)):(y=Fc(_),y.c(),E(y,1),y.m(t,null)):y&&(Me(),F(y,1,1,()=>{y=null}),Oe())},i(_){u||(E(o),E(y),u=!0)},o(_){F(o),F(y),u=!1},d(_){_&&k(e),h[r].d(),y&&y.d(),f=!1,lt(c)}}}function h2(n,e,t){const i=_n(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:r='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:o=new Fn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function y(){u||f||(t(5,f=!0),t(4,u=(await as(()=>import("./FilterAutocompleteInput.c0dd2de7.js"),[])).default),t(5,f=!1))}pi(()=>{y()});function _(M){ft.call(this,n,M)}function v(M){d=M,t(7,d),t(0,l)}function C(M){pe[M?"unshift":"push"](()=>{c=M,t(6,c)})}function S(){d=this.value,t(7,d),t(0,l)}const $=()=>{h(!1),g()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,r=M.placeholder),"autocompleteCollection"in M&&t(2,o=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,r,o,a,u,f,c,d,s,h,g,_,v,C,S,$]}class Po extends Pe{constructor(e){super(),Ee(this,e,h2,p2,De,{value:0
<span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function w2(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="url",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function S2(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="referer",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function C2(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="status",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function $2(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function Rc(n){let e;function t(l,r){return l[6]?O2:M2}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function M2(n){var o;let e,t,i,s,l,r=((o=n[0])==null?void 0:o.length)&&jc(n);return{c(){e=b("tr"),t=b("td"),i=b("h6"),i.textContent="No logs found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?r?r.p(a,u):(r=jc(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function O2(n){let e;return{c(){e=b("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function jc(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Hc(n){let e;return{c(){e=b("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function qc(n,e){var se,Z,Te;let t,i,s,l=((se=e[21].method)==null?void 0:se.toUpperCase())+"",r,o,a,u,f,c=e[21].url+"",d,h,g,y,_,v,C=(e[21].referer||"N/A")+"",S,$,M,T,A,D=e[21].status+"",P,L,R,j,G,te,H,K,J,Y,Q=(((Z=e[21].meta)==null?void 0:Z.errorMessage)||((Te=e[21].meta)==null?void 0:Te.errorData))&&Hc();j=new $i({props:{date:e[21].created}});function ce(){return e[16](e[21])}function be(...ne){return e[17](e[21],...ne)}return{key:n,first:null,c(){t=b("tr"),i=b("td"),s=b("span"),r=q(l),a=O(),u=b("td"),f=b("span"),d=q(c),g=O(),Q&&Q.c(),y=O(),_=b("td"),v=b("span"),S=q(C),M=O(),T=b("td"),A=b("span"),P=q(D),L=O(),R=b("td"),B(j.$$.fragment),G=O(),te=b("td"),te.innerHTML='<i class="ri-arrow-right-line"></i>',H=O(),p(s,"class",o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[21].url),p(u,"class","col-type-text col-field-url"),p(v,"class","txt txt-ellipsis"),p(v,"title",$=e[21].referer),ee(v,"txt-hint",!e[21].referer),p(_,"class","col-type-text col-field-referer"),p(A,"class","label"),ee(A,"label-danger",e[21].status>=400),p(T,"class","col-type-number col-field-status"),p(R,"class","col-type-date col-field-created"),p(te,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ne,_e){w(ne,t,_e),m(t,i),m(i,s),m(s,r),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),Q&&Q.m(u,null),m(t,y),m(t,_),m(_,v),m(v,S),m(t,M),m(t,T),m(T,A),m(A,P),m(t,L),m(t,R),V(j,R,null),m(t,G),m(t,te),m(t,H),K=!0,J||(Y=[X(t,"click",ce),X(t,"keydown",be)],J=!0)},p(ne,_e){var ie,ye,He;e=ne,(!K||_e&8)&&l!==(l=((ie=e[21].method)==null?void 0:ie.toUpperCase())+"")&&me(r,l),(!K||_e&8&&o!==(o="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",o),(!K||_e&8)&&c!==(c=e[21].url+"")&&me(d,c),(!K||_e&8&&h!==(h=e[21].url))&&p(f,"title",h),((ye=e[21].meta)==null?void 0:ye.errorMessage)||((He=e[21].meta)==null?void 0:He.errorData)?Q||(Q=Hc(),Q.c(),Q.m(u,null)):Q&&(Q.d(1),Q=null),(!K||_e&8)&&C!==(C=(e[21].referer||"N/A")+"")&&me(S,C),(!K||_e&8&&$!==($=e[21].referer))&&p(v,"title",$),_e&8&&ee(v,"txt-hint",!e[21].referer),(!K||_e&8)&&D!==(D=e[21].status+"")&&me(P,D),_e&8&&ee(A,"label-danger",e[21].status>=400);const fe={};_e&8&&(fe.date=e[21].created),j.$set(fe)},i(ne){K||(E(j.$$.fragment,ne),K=!0)},o(ne){F(j.$$.fragment,ne),K=!1},d(ne){ne&&k(t),Q&&Q.d(),z(j),J=!1,lt(Y)}}}function Vc(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=b("small"),t=q("Showing "),s=q(i),l=q(" of "),r=q(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a&8&&i!==(i=o[3].length+"")&&me(s,i),a&16&&me(r,o[4])},d(o){o&&k(e)}}}function zc(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=b("div"),t=b("button"),i=b("span"),s=q("Load more ("),r=q(l),o=q(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[6]),ee(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&me(r,l),c&64&&ee(t,"btn-loading",f[6]),c&64&&ee(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function T2(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S,$,M,T,A=[],D=new Map,P,L,R,j;function G(ie){n[11](ie)}let te={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[k2]},$$scope:{ctx:n}};n[1]!==void 0&&(te.sort=n[1]),l=new nn({props:te}),pe.push(()=>Ie(l,"sort",G));function H(ie){n[12](ie)}let K={disable:!0,class:"col-type-text col-field-url",name:"url",$
* Chart.js v3.8.0
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/const R0=function(){return typeof window=="undefined"?function(n){return n()}:window.requestAnimationFrame}();function j0(n,e,t){const i=t||(r=>Array.prototype.slice.call(r));let s=!1,l=[];return function(...r){l=i(r),s||(s=!0,R0.call(window,()=>{s=!1,n.apply(e,l)}))}}function E2(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const P2=n=>n==="start"?"left":n==="end"?"right":"center",Bc=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function _i(){}const L2=function(){let n=0;return function(){return n++}}();function $t(n){return n===null||typeof n=="undefined"}function Lt(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function pt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const qt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function jn(n,e){return qt(n)?n:e}function mt(n,e){return typeof n=="undefined"?e:n}const F2=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,H0=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Rt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function Ct(n,e,t,i){let s,l,r;if(Lt(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;s<l;s++)e.call(t,n[s],s);else if(pt(n))for(r=Object.keys(n),l=r.length,s=0;s<l;s++)e.call(t,n[r[s]],r[s])}function uo(n,e){let t,i,s,l;if(!n||!e||n.length!==e.length)return!1;for(t=0,i=n.length;t<i;++t)if(s=n[t],l=e[t],s.datasetIndex!==l.datasetIndex||s.index!==l.index)return!1;return!0}function fo(n){if(Lt(n))return n.map(fo);if(pt(n)){const e=Object.create(null),t=Object.keys(n),i=t.length;let s=0;for(;s<i;++s)e[t[s]]=fo(n[t[s]]);return e}return n}function q0(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function I2(n,e,t,i){if(!q0(n))return;const s=e[n],l=t[n];pt(s)&&pt(l)?Rl(s,l,i):e[n]=fo(l)}function Rl(n,e,t){const i=Lt(e)?e:[e],s=i.length;if(!pt(n))return n;t=t||{};const l=t.merger||I2;for(let r=0;r<s;++r){if(e=i[r],!pt(e))continue;const o=Object.keys(e);for(let a=0,u=o.length;a<u;++a)l(o[a],n,e,t)}return n}function Tl(n,e){return Rl(n,e,{merger:N2})}function N2(n,e,t){if(!q0(n))return;const i=e[n],s=t[n];pt(i)&&pt(s)?Tl(i,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=fo(s))}const R2="",j2=".";function Uc(n,e){const t=n.indexOf(j2,e);return t===-1?n.length:t}function Wi(n,e){if(e===R2)return n;let t=0,i=Uc(e,t);for(;n&&i>t;)n=n[e.slice(t,i)],t=i+1,i=Uc(e,t);return n}function Uu(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Yn=n=>typeof n!="undefined",Yi=n=>typeof n=="function",Wc=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function H2(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Ht=Math.PI,At=2*Ht,q2=At+Ht,co=Number.POSITIVE_INFINITY,V2=Ht/180,jt=Ht/2,cl=Ht/4,Yc=Ht*2/3,Vn=Math.log10,ui=Math.sign;function Kc(n){const e=Math.round(n);n=Dl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Vn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function z2(n){const e=[],t=Math.sqrt(n);let i;for(i=1;i<t;i++)n%i===0&&(e.push(i),e.push(n/i));return t===(t|0)&&e.push(t),e.sort((s,l)=>s-l).pop(),e}function jl(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Dl(n,e,t){return Math.abs(n-e)<t}function B2(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function V0(n,e,t){let i,s,l;for(i=0,s=n.length;i<s;i++)l=n[i][t],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Qn(n){return n*(Ht/180)}function Wu(n){return n*(180/Ht)}function Jc(n){if(!qt(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function z0(n,e){const t=e.x-n.x,i=e.y-n.y,s=Math.sqrt(t*t+i*i);let l=Math.atan2(i,t);return l<-.5*Ht&&(l+=At),{angle:l,distance:s}}function nu(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function U2(n,e){return(n-e+q2)%At-Ht}function Mn(n){return(n%At+At)%At}function Hl(n,e,t,i){const s=Mn(n),l=Mn(e),r=Mn(t),o=Mn(l-s),a=Mn(r-s),u=Mn(s-l),f=Mn(s-r);return s===l||s===r||i&&l===r||o
* @kurkle/color v0.2.1
* https://github.com/kurkle/color#readme
* (c) 2022 Jukka Kurkela
* Released under the MIT License
2022-07-12 23:11:50 +08:00
*/function Xl(n){return n+.5|0}const Vi=(n,e,t)=>Math.max(Math.min(n,t),e);function wl(n){return Vi(Xl(n*2.55),0,255)}function Ui(n){return Vi(Xl(n*255),0,255)}function ki(n){return Vi(Xl(n/2.55)/100,0,1)}function xc(n){return Vi(Xl(n*100),0,100)}const Rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},iu=[..."0123456789ABCDEF"],Y2=n=>iu[n&15],K2=n=>iu[(n&240)>>4]+iu[n&15],$r=n=>(n&240)>>4===(n&15),J2=n=>$r(n.r)&&$r(n.g)&&$r(n.b)&&$r(n.a);function G2(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Rn[n[1]]*17,g:255&Rn[n[2]]*17,b:255&Rn[n[3]]*17,a:e===5?Rn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Rn[n[1]]<<4|Rn[n[2]],g:Rn[n[3]]<<4|Rn[n[4]],b:Rn[n[5]]<<4|Rn[n[6]],a:e===9?Rn[n[7]]<<4|Rn[n[8]]:255})),t}const Z2=(n,e)=>n<255?e(n):"";function x2(n){var e=J2(n)?Y2:K2;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Z2(n.a,e):void 0}const X2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function B0(n,e,t){const i=e*Math.min(t,1-t),s=(l,r=(l+n/30)%12)=>t-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function Q2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function ew(n,e,t){const i=B0(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function tw(n,e,t,i,s){return n===s?(e-t)/i+(e<t?6:0):e===s?(t-n)/i+2:(n-e)/i+4}function Yu(n){const t=n.r/255,i=n.g/255,s=n.b/255,l=Math.max(t,i,s),r=Math.min(t,i,s),o=(l+r)/2;let a,u,f;return l!==r&&(f=l-r,u=o>.5?f/(2-l-r):f/(l+r),a=tw(t,i,s,f,l),a=a*60+.5),[a|0,u||0,o]}function Ku(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Ui)}function Ju(n,e,t){return Ku(B0,n,e,t)}function nw(n,e,t){return Ku(ew,n,e,t)}function iw(n,e,t){return Ku(Q2,n,e,t)}function U0(n){return(n%360+360)%360}function sw(n){const e=X2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?wl(+e[5]):Ui(+e[5]));const s=U0(+e[2]),l=+e[3]/100,r=+e[4]/100;return e[1]==="hwb"?i=nw(s,l,r):e[1]==="hsv"?i=iw(s,l,r):i=Ju(s,l,r),{r:i[0],g:i[1],b:i[2],a:t}}function lw(n,e){var t=Yu(n);t[0]=U0(t[0]+e),t=Ju(t),n.r=t[0],n.g=t[1],n.b=t[2]}function rw(n){if(!n)return;const e=Yu(n),t=e[0],i=xc(e[1]),s=xc(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ki(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Xc={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Qc={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"
* Chart.js v3.8.0
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
2022-07-12 23:11:50 +08:00
*/class cS{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],r=t.duration;l.forEach(o=>o({chart:e,initial:t.initial,numSteps:r,currentStep:Math.min(i-t.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=R0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let r=l.length-1,o=!1,a;for(;r>=0;--r)a=l[r],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(l[r]=l[l.length-1],l.pop());o&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var bi=new cS;const dd="transparent",dS={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=td(n||dd),s=i.valid&&td(e||dd);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class pS{constructor(e,t,i,s){const l=t[i];s=Tr([e.to,s,l,e.from]);const r=Tr([e.from,l,s]);this._active=!0,this._fn=e.fn||dS[e.type||typeof r],this._easing=Al[e.easing]||Al.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,r=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(r,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Tr([e.to,t,s,e.from]),this._from=Tr([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,r=this._loop,o=this._to;let a;if(this._active=l!==o&&(r||t<i),!this._active){this._target[s]=o,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=r&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,o,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][t]()}}const hS=["x","y","borderWidth","radius","tension"],mS=["color","borderColor","backgroundColor"];gt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const gS=Object.keys(gt.animation);gt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});gt.set("animations",{colors:{type:"color",properties:mS},numbers:{type:"number",properties:hS}});gt.describe("animations",{_fallback:"animation"});gt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class ob{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!pt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!pt(s))return;const l={};for(co
`)>-1?n.split(`
2022-07-12 23:11:50 +08:00
`):n}function FC(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:r,value:o}=l.getLabelAndValue(s);return{chart:n,label:r,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:o,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function zd(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:r,boxHeight:o}=e,a=Tn(e.bodyFont),u=Tn(e.titleFont),f=Tn(e.footerFont),c=l.length,d=s.length,h=i.length,g=Kn(e.padding);let y=g.height,_=0,v=i.reduce(($,M)=>$+M.before.length+M.lines.length+M.after.length,0);if(v+=n.beforeBody.length+n.afterBody.length,c&&(y+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),v){const $=e.displayColors?Math.max(o,a.lineHeight):a.lineHeight;y+=h*$+(v-h)*a.lineHeight+(v-1)*e.bodySpacing}d&&(y+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let C=0;const S=function($){_=Math.max(_,t.measureText($).width+C)};return t.save(),t.font=u.string,Ct(n.title,S),t.font=a.string,Ct(n.beforeBody.concat(n.afterBody),S),C=e.displayColors?r+2+e.boxPadding:0,Ct(i,$=>{Ct($.before,S),Ct($.lines,S),Ct($.after,S)}),C=0,t.font=f.string,Ct(n.footer,S),t.restore(),_+=g.width,{width:_,height:y}}function IC(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function NC(n,e,t,i){const{x:s,width:l}=i,r=t.caretSize+t.caretPadding;if(n==="left"&&s+l+r>e.width||n==="right"&&s-l-r<0)return!0}function RC(n,e,t,i){const{x:s,width:l}=t,{width:r,chartArea:{left:o,right:a}}=n;let u="center";return i==="center"?u=s<=(o+a)/2?"left":"right":s<=l/2?u="left":s>=r-l/2&&(u="right"),NC(u,n,e,t)&&(u="center"),u}function Bd(n,e,t){const i=t.yAlign||e.yAlign||IC(n,t);return{xAlign:t.xAlign||e.xAlign||RC(n,e,t,i),yAlign:i}}function jC(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function HC(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Ud(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:r}=n,{xAlign:o,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=qs(r);let g=jC(e,o);const y=HC(e,a,u);return a==="center"?o==="left"?g+=u:o==="right"&&(g-=u):o==="left"?g-=Math.max(f,d)+s:o==="right"&&(g+=Math.max(c,h)+s),{x:un(g,0,i.width-e.width),y:un(y,0,i.height-e.height)}}function Ir(n,e,t){const i=Kn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function Wd(n){return li([],yi(n))}function qC(n,e,t){return Ji(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Yd(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class du extends Di{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new ob(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=qC(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),r=i.afterTitle.apply(this,[e]);let o=[];return o=li(o,yi(s)),o=li(o,yi(l)),o=li(o,yi(r)),o}getBeforeBody(e,t){return Wd(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return Ct(e,l=>{const r={before:[],lines:[],after:[]},o=Yd(i,l);li(r.before,yi(o.beforeLabel.call(this,l))
* chartjs-adapter-luxon v1.1.0
* https://www.chartjs.org
* (c) 2021 chartjs-adapter-luxon Contributors
* Released under the MIT license
2022-07-12 23:11:50 +08:00
*/const o$={datetime:Qe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Qe.TIME_WITH_SECONDS,minute:Qe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};cb._date.override({_id:"luxon",_create:function(n){return Qe.fromMillis(n,this.options)},formats:function(){return o$},parse:function(n,e){const t=this.options;if(n===null||typeof n=="undefined")return null;const i=typeof n;return i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Qe.fromFormat(n,e,t):n=Qe.fromISO(n,t):n instanceof Date?n=Qe.fromJSDate(n,t):i==="object"&&!(n instanceof Qe)&&(n=Qe.fromObject(n)),n.isValid?n.valueOf():null},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e,this.options):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function ep(n){let e,t,i;return{c(){e=b("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(Mt(()=>{t||(t=at(e,Wn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){t||(t=at(e,Wn,{duration:150},!1)),t.run(0),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function a$(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=q(n[1]),t=O(),s=q(i)},m(l,r){w(l,e,r),w(l,t,r),w(l,s,r)},p(l,r){r&2&&me(e,l[1]),r&2&&i!==(i=l[1]===1?"log":"logs")&&me(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function u$(n){let e;return{c(){e=q("Loading...")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function f$(n){let e,t,i,s,l,r,o=n[2]&&ep();function a(c,d){return c[2]?u$:a$}let u=a(n),f=u(n);return{c(){e=b("div"),o&&o.c(),t=O(),i=b("canvas"),s=O(),l=b("div"),f.c(),p(i,"class","chart-canvas svelte-vh4sl8"),vf(i,"height","250px"),vf(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ee(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(c,d){w(c,e,d),o&&o.m(e,null),m(e,t),m(e,i),n[8](i),w(c,s,d),w(c,l,d),f.m(l,null),r=!0},p(c,[d]){c[2]?o?d&4&&E(o,1):(o=ep(),o.c(),E(o,1),o.m(e,t)):o&&(Me(),F(o,1,1,()=>{o=null}),Oe()),d&4&&ee(e,"loading",c[2]),u===(u=a(c))&&f?f.p(c,d):(f.d(1),f=u(c),f&&(f.c(),f.m(l,null)))},i(c){r||(E(o),r=!0)},o(c){F(o),r=!1},d(c){c&&k(e),o&&o.d(),n[8](null),c&&k(s),c&&k(l),f.d()}}}function c$(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,r,o=[],a=0,u=!1;async function f(){return t(2,u=!0),ke.Logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)o.push({x:W.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);o.push({x:new Date,y:void 0})}).catch(h=>{h!==null&&(c(),console.warn(h),ke.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,o=[])}pi(()=>(vo.register(Gi,Io,tr,df,ir,LC,VC),t(6,r=new vo(l,{type:"line",data:{datasets:[{label:"Total requests",data:o,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>r==null?void 0:r.destroy()));function d(h){pe[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i!="undefined"||typeof s!="undefined")&&f(),n.$$.dirty&192&&typeof o!="undefined"&&r&&(t(6,r.data.dataset
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
2022-07-12 23:11:50 +08:00
*/var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,r={},o={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function C(S){return S instanceof a?new a(S.type,C(S.content),S.alias):Array.isArray(S)?S.map(C):S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++l}),C.__id},clone:function C(S,$){$=$||{};var M,T;switch(o.util.type(S)){case"Object":if(T=o.util.objId(S),$[T])return $[T];M={},$[T]=M;for(var A in S)S.hasOwnProperty(A)&&(M[A]=C(S[A],$));return M;case"Array":return T=o.util.objId(S),$[T]?$[T]:(M=[],$[T]=M,S.forEach(function(D,P){M[P]=C(D,$)}),M);default:return S}},getLanguage:function(C){for(;C;){var S=s.exec(C.className);if(S)return S[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,S){C.className=C.className.replace(RegExp(s,"gi"),""),C.classList.add("language-"+S)},currentScript:function(){if(typeof document=="undefined")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var C=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(C){var S=document.getElementsByTagName("script");for(var $ in S)if(S[$].src==C)return S[$]}return null}},isActive:function(C,S,$){for(var M="no-"+S;C;){var T=C.classList;if(T.contains(S))return!0;if(T.contains(M))return!1;C=C.parentElement}return!!$}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(C,S){var $=o.util.clone(o.languages[C]);for(var M in S)$[M]=S[M];return $},insertBefore:function(C,S,$,M){M=M||o.languages;var T=M[C],A={};for(var D in T)if(T.hasOwnProperty(D)){if(D==S)for(var P in $)$.hasOwnProperty(P)&&(A[P]=$[P]);$.hasOwnProperty(D)||(A[D]=T[D])}var L=M[C];return M[C]=A,o.languages.DFS(o.languages,function(R,j){j===L&&R!=C&&(this[R]=A)}),A},DFS:function C(S,$,M,T){T=T||{};var A=o.util.objId;for(var D in S)if(S.hasOwnProperty(D)){$.call(S,D,S[D],M||D);var P=S[D],L=o.util.type(P);L==="Object"&&!T[A(P)]?(T[A(P)]=!0,C(P,$,null,T)):L==="Array"&&!T[A(P)]&&(T[A(P)]=!0,C(P,$,D,T))}}},plugins:{},highlightAll:function(C,S){o.highlightAllUnder(document,C,S)},highlightAllUnder:function(C,S,$){var M={callback:$,container:C,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),o.hooks.run("before-all-elements-highlight",M);for(var T=0,A;A=M.elements[T++];)o.highlightElement(A,S===!0,M.callback)},highlightElement:function(C,S,$){var M=o.util.getLanguage(C),T=o.languages[M];o.util.setLanguage(C,M);var A=C.parentElement;A&&A.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(A,M);var D=C.textContent,P={element:C,language:M,grammar:T,code:D};function L(j){P.highlightedCode=j,o.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,o.hooks.run("after-highlight",P),o.hooks.run("complete",P),$&&$.call(P.element)}if(o.hooks.run("before-sanity-check",P),A=P.element.parentElement,A&&A.nodeName.toLowerCase()==="pre"&&!A.hasAttribute("tabindex")&&A.setAttribute("tabindex","0"),!P.code){o.hooks.run("complete",P),$&&$.call(P.element);return}if(o.hooks.run("before-highlight",P),!P.grammar){L(o.util.encode(P.code));return}if(S&&i.Worker){var R=new Worker(o.filename);R.onmessage=function(j){L(j.data)},R.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else L(o.highlight(P.code,P.grammar,P.language))},highlight:function(C,S,$){var M={code:C,grammar:S,language:$};if(o.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=o.tokenize(M.code,M.grammar),o.hooks.run("after-tokenize",M),a.stringify(o.util.encode(M.tokens),M.language)},tokenize:function(C,S){var $=S.rest;if($){for(var M in $)S[M]=$[M];delete S.rest}var T=new c;return d(T,T.head,C),f(C,T,S,T.head,0),g(T)},hooks:{all:{},add
`),_.hasAttribute("data-start")||_.setAttribute("data-start",String(P+1))}v.textContent=T,t.highlightElement(v)},function(T){_.setAttribute(o,f),v.textContent=T})}}),t.plugins.fileHighlight={highlight:function(_){for(var v=(_||document).querySelectorAll(c),C=0,S;S=v[C++];)t.highlightElement(S)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(Pb);var _l=Pb.exports,p$={exports:{}};(function(n){(function(){if(typeof Prism=="undefined")return;var e=Object.assign||function(l,r){for(var o in r)r.hasOwnProperty(o)&&(l[o]=r[o]);return l};function t(l){this.defaults=e({},l)}function i(l){return l.replace(/-(\w)/g,function(r,o){return o.toUpperCase()})}function s(l){for(var r=0,o=0;o<l.length;++o)l.charCodeAt(o)==" ".charCodeAt(0)&&(r+=3);return l.length+r}t.prototype={setDefaults:function(l){this.defaults=e(this.defaults,l)},normalize:function(l,r){r=e(this.defaults,r);for(var o in r){var a=i(o);o!=="normalize"&&a!=="setDefaults"&&r[o]&&this[a]&&(l=this[a].call(this,l,r[o]))}return l},leftTrim:function(l){return l.replace(/^\s+/,"")},rightTrim:function(l){return l.replace(/\s+$/,"")},tabsToSpaces:function(l,r){return r=r|0||4,l.replace(/\t/g,new Array(++r).join(" "))},spacesToTabs:function(l,r){return r=r|0||4,l.replace(RegExp(" {"+r+"}","g")," ")},removeTrailing:function(l){return l.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(l){return l.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(l){var r=l.match(/^[^\S\n\r]*(?=\S)/gm);return!r||!r[0].length||(r.sort(function(o,a){return o.length-a.length}),!r[0].length)?l:l.replace(RegExp("^"+r[0],"gm"),"")},indent:function(l,r){return l.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++r).join(" ")+"$&")},breakLines:function(l,r){r=r===!0?80:r|0||80;for(var o=l.split(`
`),a=0;a<o.length;++a)if(!(s(o[a])<=r)){for(var u=o[a].split(/(\s+)/g),f=0,c=0;c<u.length;++c){var d=s(u[c]);f+=d,f>r&&(u[c]=`
`+u[c],f=d)}o[a]=u.join("")}return o.join(`
2022-07-12 23:11:50 +08:00
`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(l){var r=Prism.plugins.NormalizeWhitespace;if(!(l.settings&&l.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(l.element,"whitespace-normalization",!0)){if((!l.element||!l.element.parentNode)&&l.code){l.code=r.normalize(l.code,l.settings);return}var o=l.element.parentNode;if(!(!l.code||!o||o.nodeName.toLowerCase()!=="pre")){for(var a=o.childNodes,u="",f="",c=!1,d=0;d<a.length;++d){var h=a[d];h==l.element?c=!0:h.nodeName==="#text"&&(c?f+=h.nodeValue:u+=h.nodeValue,o.removeChild(h),--d)}if(!l.element.children.length||!Prism.plugins.KeepMarkup)l.code=u+l.code+f,l.code=r.normalize(l.code,l.settings);else{var g=u+l.element.innerHTML+f;l.element.innerHTML=r.normalize(g,l.settings),l.code=l.element.textContent}}}})})()})(p$);function h$(n){let e,t;return{c(){e=b("div"),t=b("code"),p(t,"class","svelte-tv7jme"),p(e,"class","code-wrapper prism-light svelte-tv7jme")},m(i,s){w(i,e,s),m(e,t),t.innerHTML=n[0]},p(i,[s]){s&1&&(t.innerHTML=i[0])},i:oe,o:oe,d(i){i&&k(e)}}}function m$(n,e,t){let{content:i=""}=e,{language:s="javascript"}=e,l="";function r(o){return o=typeof o=="string"?o:"",o=_l.plugins.NormalizeWhitespace.normalize(o,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),_l.highlight(o,_l.languages[s]||_l.languages.javascript,s)}return n.$$set=o=>{"content"in o&&t(1,i=o.content),"language"in o&&t(2,s=o.language)},n.$$.update=()=>{n.$$.dirty&2&&typeof _l!="undefined"&&i&&t(0,l=r(i))},[l,i,s]}class sn extends Pe{constructor(e){super(),Ee(this,e,m$,h$,De,{content:1,language:2})}}const g$=n=>({}),np=n=>({}),_$=n=>({}),ip=n=>({});function sp(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S=n[4]&&!n[2]&&lp(n);const $=n[18].header,M=Dn($,n,n[17],ip);let T=n[4]&&n[2]&&rp(n);const A=n[18].default,D=Dn(A,n,n[17],null),P=n[18].footer,L=Dn(P,n,n[17],np);return{c(){e=b("div"),t=b("div"),s=O(),l=b("div"),r=b("div"),S&&S.c(),o=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=b("div"),D&&D.c(),c=O(),d=b("div"),L&&L.c(),p(t,"class","overlay"),p(r,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),ee(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ee(e,"padded",n[2]),ee(e,"active",n[0])},m(R,j){w(R,e,j),m(e,t),m(e,s),m(e,l),m(l,r),S&&S.m(r,null),m(r,o),M&&M.m(r,null),m(r,a),T&&T.m(r,null),m(l,u),m(l,f),D&&D.m(f,null),n[20](f),m(l,c),m(l,d),L&&L.m(d,null),_=!0,v||(C=[X(t,"click",Wt(n[19])),X(f,"scroll",n[21])],v=!0)},p(R,j){n=R,n[4]&&!n[2]?S?S.p(n,j):(S=lp(n),S.c(),S.m(r,o)):S&&(S.d(1),S=null),M&&M.p&&(!_||j&131072)&&En(M,$,n,n[17],_?An($,n[17],j,_$):Pn(n[17]),ip),n[4]&&n[2]?T?T.p(n,j):(T=rp(n),T.c(),T.m(r,null)):T&&(T.d(1),T=null),D&&D.p&&(!_||j&131072)&&En(D,A,n,n[17],_?An(A,n[17],j,null):Pn(n[17]),null),L&&L.p&&(!_||j&131072)&&En(L,P,n,n[17],_?An(P,n[17],j,g$):Pn(n[17]),np),(!_||j&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),j&262&&ee(l,"popup",n[2]),j&4&&ee(e,"padded",n[2]),j&1&&ee(e,"active",n[0])},i(R){_||(Mt(()=>{i||(i=at(t,ao,{duration:Ls,opacity:0},!0)),i.run(1)}),E(M,R),E(D,R),E(L,R),Mt(()=>{y&&y.end(1),g=wu(l,ni,n[2]?{duration:Ls,y:-10}:{duration:Ls,x:50}),g.start()}),_=!0)},o(R){i||(i=at(t,ao,{duration:Ls,opacity:0},!1)),i.run(0),F(M,R),F(D,R),F(L,R),g&&g.invalidate(),y=Qg(l,ni,n[2]?{duration:Ls,y:10}:{duration:Ls,x:50}),_=!1},d(R){R&&k(e),R&&i&&i.end(),S&&S.d(),M&&M.d(R),T&&T.d(),D&&D.d(R),n[20](null),L&&L.d(R),R&&y&&y.end(),v=!1,lt(C)}}}function lp(n){let e,t,i;return{c(){e=b("div"),e.innerHTML='<i class="ri-close-line"></i>',p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=X(e,"click",Wt(n[5])),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function rp(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<i class="ri-close-line txt-lg"></i>',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=X(e,"click",Wt
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,v){(!c||v&16&&l!==(l=_[4]))&&p(e,"for",l);const C={};v&16&&(C.id=_[4]),v&1&&(C.disabled=!W.isEmpty(_[0].onlyDomains)),!a&&v&1&&(a=!0,C.value=_[0].exceptDomains,je(()=>a=!1)),o.$set(C)},i(_){c||(E(o.$$.fragment,_),c=!0)},o(_){F(o.$$.fragment,_),c=!1},d(_){_&&k(e),_&&k(r),z(o,_),_&&k(u),_&&k(f),d=!1,h()}}}function S4(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(_){n[3](_)}let y={id:n[4]+".options.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(y.value=n[0].onlyDomains),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=b("label"),t=b("span"),t.textContent="Only domains",i=O(),s=b("i"),r=O(),B(o.$$.fragment),u=O(),f=b("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(_,v){w(_,e,v),m(e,t),m(e,i),m(e,s),w(_,r,v),V(o,_,v),w(_,u,v),w(_,f,v),c=!0,d||(h=Xe(wt.call(null,s,{text:`Domains that are ONLY allowed as value.
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,v){(!c||v&16&&l!==(l=_[4]+".options.onlyDomains"))&&p(e,"for",l);const C={};v&16&&(C.id=_[4]+".options.onlyDomains"),v&1&&(C.disabled=!W.isEmpty(_[0].exceptDomains)),!a&&v&1&&(a=!0,C.value=_[0].onlyDomains,je(()=>a=!1)),o.$set(C)},i(_){c||(E(o.$$.fragment,_),c=!0)},o(_){F(o.$$.fragment,_),c=!1},d(_){_&&k(e),_&&k(r),z(o,_),_&&k(u),_&&k(f),d=!1,h()}}}function C4(n){let e,t,i,s,l,r,o;return i=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[w4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[S4,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),B(i.$$.fragment),s=O(),l=b("div"),B(r.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),o=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),r.$set(c)},i(a){o||(E(i.$$.fragment,a),E(r.$$.fragment,a),o=!0)},o(a){F(i.$$.fragment,a),F(r.$$.fragment,a),o=!1},d(a){a&&k(e),z(i),z(r)}}}function $4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){n.$$.not_equal(s.exceptDomains,o)&&(s.exceptDomains=o,t(0,s))}function r(o){n.$$.not_equal(s.onlyDomains,o)&&(s.onlyDomains=o,t(0,s))}return n.$$set=o=>{"key"in o&&t(1,i=o.key),"options"in o&&t(0,s=o.options)},[s,i,l,r]}class Nb extends Pe{constructor(e){super(),Ee(this,e,$4,C4,De,{key:1,options:0})}}function M4(n){let e,t,i,s;function l(a){n[2](a)}function r(a){n[3](a)}let o={};return n[0]!==void 0&&(o.key=n[0]),n[1]!==void 0&&(o.options=n[1]),e=new Nb({props:o}),pe.push(()=>Ie(e,"key",l)),pe.push(()=>Ie(e,"options",r)),{c(){B(e.$$.fragment)},m(a,u){V(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],je(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],je(()=>i=!1)),e.$set(f)},i(a){s||(E(e.$$.fragment,a),s=!0)},o(a){F(e.$$.fragment,a),s=!1},d(a){z(e,a)}}}function O4(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(o){i=o,t(0,i)}function r(o){s=o,t(1,s)}return n.$$set=o=>{"key"in o&&t(0,i=o.key),"options"in o&&t(1,s=o.options)},[i,s,l,r]}class T4 extends Pe{constructor(e){super(),Ee(this,e,O4,M4,De,{key:0,options:1})}}var Ma=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Vs={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console!="undefined"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.o
<span class='flatpickr-weekday'>
`+I.join("</span><span class='flatpickr-weekday'>")+`
</span>
2022-07-12 23:11:50 +08:00
`}}function ce(){t.calendarContainer.classList.add("hasWeeks");var N=kt("div","flatpickr-weekwrapper");N.appendChild(kt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var I=kt("div","flatpickr-weeks");return N.appendChild(I),{weekWrapper:N,weekNumbers:I}}function be(N,I){I===void 0&&(I=!0);var U=I?N:N-t.currentMonth;U<0&&t._hidePrevMonthArrow===!0||U>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=U,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,et("onYearChange"),G()),j(),et("onMonthChange"),Ze())}function se(N,I){if(N===void 0&&(N=!0),I===void 0&&(I=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,I===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var U=Aa(t.config),le=U.hours,Ne=U.minutes,Be=U.seconds;h(le,Ne,Be)}t.redraw(),N&&et("onChange")}function Z(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),et("onClose")}function Te(){t.config!==void 0&&et("onDestroy");for(var N=t._handlers.length;N--;)t._handlers[N].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var I=t.calendarContainer.parentNode;if(I.lastChild&&I.removeChild(I.lastChild),I.parentNode){for(;I.firstChild;)I.parentNode.insertBefore(I.firstChild,I);I.parentNode.removeChild(I)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(U){try{delete t[U]}catch{}})}function ne(N){return t.calendarContainer.contains(N)}function _e(N){if(t.isOpen&&!t.config.inline){var I=Cn(N),U=ne(I),le=I===t.input||I===t.altInput||t.element.contains(I)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),Ne=!le&&!U&&!ne(N.relatedTarget),Be=!t.config.ignoredFocusElements.some(function(tt){return tt.contains(I)});Ne&&Be&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function fe(N){if(!(!N||t.config.minDate&&N<t.config.minDate.getFullYear()||t.config.maxDate&&N>t.config.maxDate.getFullYear())){var I=N,U=t.currentYear!==I;t.currentYear=I||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),U&&(t.redraw(),et("onYearChange"),G())}}function ie(N,I){var U;I===void 0&&(I=!0);var le=t.parseDate(N,void 0,I);if(t.config.minDate&&le&&$n(le,t.config.minDate,I!==void 0?I:!t.minDateHasTime)<0||t.config.maxDate&&le&&$n(le,t.config.maxDate,I!==void 0?I:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(le===vo
`),d=b("span"),h=b("span"),h.textContent="Choose presets",g=O(),B(y.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[9]),p(h,"class","txt link-primary"),p(d,"class","inline-flex"),p(f,"class","help-block")},m(M,T){w(M,e,T),m(e,t),m(e,i),m(e,s),w(M,r,T),V(o,M,T),w(M,u,T),w(M,f,T),m(f,c),m(f,d),m(d,h),m(d,g),V(y,d,null),_=!0,v||(C=Xe(wt.call(null,s,{text:`Allow uploading files ONLY with the listed mime types.
Leave empty for no restriction.`,position:"top"})),v=!0)},p(M,T){(!_||T&512&&l!==(l=M[9]))&&p(e,"for",l);const A={};T&512&&(A.id=M[9]),!a&&T&1&&(a=!0,A.value=M[0].mimeTypes,je(()=>a=!1)),o.$set(A);const D={};T&1025&&(D.$$scope={dirty:T,ctx:M}),y.$set(D)},i(M){_||(E(o.$$.fragment,M),E(y.$$.fragment,M),_=!0)},o(M){F(o.$$.fragment,M),F(y.$$.fragment,M),_=!1},d(M){M&&k(e),M&&k(r),z(o,M),M&&k(u),M&&k(f),z(y),v=!1,C()}}}function tM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(_){n[8](_)}let y={id:n[9],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(y.value=n[0].thumbs),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=b("label"),t=b("span"),t.textContent="Thumb sizes",i=O(),s=b("i"),r=O(),B(o.$$.fragment),u=O(),f=b("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[9]),p(f,"class","help-block")},m(_,v){w(_,e,v),m(e,t),m(e,i),m(e,s),w(_,r,v),V(o,_,v),w(_,u,v),w(_,f,v),c=!0,d||(h=Xe(wt.call(null,s,{text:"List of thumb sizes for image files. The thumbs will be generated lazily on first access.",position:"top"})),d=!0)},p(_,v){(!c||v&512&&l!==(l=_[9]))&&p(e,"for",l);const C={};v&512&&(C.id=_[9]),!a&&v&1&&(a=!0,C.value=_[0].thumbs,je(()=>a=!1)),o.$set(C)},i(_){c||(E(o.$$.fragment,_),c=!0)},o(_){F(o.$$.fragment,_),c=!1},d(_){_&&k(e),_&&k(r),z(o,_),_&&k(u),_&&k(f),d=!1,h()}}}function nM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;return i=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[x4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[X4,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[eM,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[tM,({uniqueId:g})=>({9:g}),({uniqueId:g})=>g?512:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),B(i.$$.fragment),s=O(),l=b("div"),B(r.$$.fragment),o=O(),a=b("div"),B(u.$$.fragment),f=O(),c=b("div"),B(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(g,y){w(g,e,y),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),h=!0},p(g,[y]){const _={};y&2&&(_.name="schema."+g[1]+".options.maxSize"),y&1537&&(_.$$scope={dirty:y,ctx:g}),i.$set(_);const v={};y&2&&(v.name="schema."+g[1]+".options.maxSelect"),y&1537&&(v.$$scope={dirty:y,ctx:g}),r.$set(v);const C={};y&2&&(C.name="schema."+g[1]+".options.mimeTypes"),y&1537&&(C.$$scope={dirty:y,ctx:g}),u.$set(C);const S={};y&2&&(S.name="schema."+g[1]+".options.thumbs"),y&1537&&(S.$$scope={dirty:y,ctx:g}),d.$set(S)},i(g){h||(E(i.$$.fragment,g),E(r.$$.fragment,g),E(u.$$.fragment,g),E(d.$$.fragment,g),h=!0)},o(g){F(i.$$.fragment,g),F(r.$$.fragment,g),F(u.$$.fragment,g),F(d.$$.fragment,g),h=!1},d(g){g&&k(e),z(i),z(r),z(u),z(d)}}}function iM(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=Ot(this.value),t(0,s)}function r(){s.maxSelect=Ot(this.value),t(0,s)}function o(d){n.$$.not_equal(s.mimeTypes,d)&&(s.mimeTypes=d,t(0,s))}const a=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},u=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},f=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function c(d){n.$$.not_equal(s.thumbs,d)&&(s.thumbs=d,t(0,s))}return n.$$set=d=>{"key"in d&&t(1,i=d.key),"options"in d&&t(0,s=d.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,r,o,a,u,f,c]}class sM extends Pe{constructor
<code>@request.query.*</code>
<code>@request.data.*</code>
2022-07-12 23:11:50 +08:00
<code>@request.user.*</code>`,S=O(),$=b("hr"),M=O(),T=b("p"),T.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",A=O(),D=b("div"),D.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",P=O(),L=b("hr"),R=O(),j=b("p"),j.innerHTML=`Example rule:
<br/>
2022-07-12 23:11:50 +08:00
<code>@request.user.id!=null &amp;&amp; created&gt;&quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(r,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(_,"class","m-b-0"),p(C,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(D,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(J,Y){w(J,e,Y),m(e,t),m(t,i),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(r,d);for(let Q=0;Q<K.length;Q+=1)K[Q].m(r,null);m(i,h),m(i,g),m(i,y),m(i,_),m(i,v),m(i,C),m(i,S),m(i,$),m(i,M),m(i,T),m(i,A),m(i,D),m(i,P),m(i,L),m(i,R),m(i,j),te=!0},p(J,Y){if(Y&1){H=J[0].schema;let Q;for(Q=0;Q<H.length;Q+=1){const ce=Jp(J,H,Q);K[Q]?K[Q].p(ce,Y):(K[Q]=Zp(ce),K[Q].c(),K[Q].m(r,null))}for(;Q<K.length;Q+=1)K[Q].d(1);K.length=H.length}},i(J){te||(J&&Mt(()=>{G||(G=at(e,Xt,{duration:150},!0)),G.run(1)}),te=!0)},o(J){J&&(G||(G=at(e,Xt,{duration:150},!1)),G.run(0)),te=!1},d(J){J&&k(e),Bn(K,J),J&&G&&G.end()}}}function HM(n){let e,t=n[19].name+"",i;return{c(){e=b("code"),i=q(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[19].name+"")&&me(i,t)},d(s){s&&k(e)}}}function qM(n){let e,t=n[19].name+"",i,s;return{c(){e=b("code"),i=q(t),s=q(".*")},m(l,r){w(l,e,r),m(e,i),m(e,s)},p(l,r){r&1&&t!==(t=l[19].name+"")&&me(i,t)},d(l){l&&k(e)}}}function Zp(n){let e;function t(l,r){return l[19].type==="relation"||l[19].type==="user"?qM:HM}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function VM(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const r=o=>o[14];for(let o=0;o<l.length;o+=1){let a=Kp(n,l,o),u=r(a);t.set(u,e[o]=xp(u,a))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=st()},m(o,a){for(let u=0;u<e.length;u+=1)e[u].m(o,a);w(o,i,a),s=!0},p(o,a){a&262235&&(l=Object.entries(o[6]),Me(),e=rt(e,a,r,1,o,l,t,i.parentNode,Ft,xp,i,Kp),Oe())},i(o){if(!s){for(let a=0;a<l.length;a+=1)E(e[a]);s=!0}},o(o){for(let a=0;a<e.length;a+=1)F(e[a]);s=!1},d(o){for(let a=0;a<e.length;a+=1)e[a].d(o);o&&k(i)}}}function zM(n){let e;return{c(){e=b("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function BM(n){let e,t,i;function s(){return n[9](n[14])}return{c(){e=b("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(wt.call(null,e,"Lock and set to Admins only")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function UM(n){let e,t,i;function s(){return n[8](n[14])}return{c(){e=b("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,r){w(l,e,r),t||(i=[Xe(wt.call(null,e,"Unlock and set custom rule")),X(e,"click",s)],t=!0)},p(l,r){n=l},d(l){l&&k(e),t=!1,lt(i)}}}function WM(n){let e;return{c(){e=q("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function YM(n){let e;return{c(){e=q("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function KM(n){let e,t=n[15]+"",i,s,l=Hi(n[0][n[14]])?"Admins only":"Custom rule",r,o,a,u,f=n[14],c,d,h,g,y,_,v;function C(){return n[10](n[14])}const S=()=>n[11](u,f),$=()=>n[11](null,f);function M(R){n[12](R,n[14])}var T=n[4];function A(R){let j={baseCollection:R[0],disabled:Hi(R[0][R[14]])};return R[0][R[14]]!==void 0&&(j.value=R[0][R[14]]),{props:j}}T&&(u=new T(A(n)),S(),pe.push(()=>Ie(u,"value",M)));function D(R,j){return j&1&&(g=null),g==null&&(g=!!Hi(R[0][R[14]])),g?YM:WM}let P=D(n,-1),L=P(n);return{c(){e=b("label"),i=q(t),s=q(" - "),r=q(l),a=O(),u&&B(u.$$.fragment),d=O(),h=b("div"),L.c(),p(e,"for",o=n[18]),p(h,"class","help-block")},m(R,j){w(R,e,j),m(e,i),m(e,s),m(e,r),w(R,a,j),u&&V(u,R,j),w(R,d,j),w(R,h,j),L.m(h,null),y=!0,_||(v=X(e,"click",C),_=!0)},p(R,j){n=R,(!y||j&1)&&l!==(l=Hi(n[0][n[14]
<a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
2022-07-12 23:11:50 +08:00
</a>.`,s=O(),l=b("span"),o=q(r),a=O(),_&&_.c(),u=O(),c.c(),d=st(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m($,M){w($,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,a),_&&_.m(e,null),w($,u,M),C[f].m($,M),w($,d,M),h=!0,g||(y=X(l,"click",n[7]),g=!0)},p($,[M]){(!h||M&4)&&r!==(r=$[2]?"Hide available fields":"Show available fields")&&me(o,r),$[2]?_?(_.p($,M),M&4&&E(_,1)):(_=Gp($),_.c(),E(_,1),_.m(e,null)):_&&(Me(),F(_,1,1,()=>{_=null}),Oe());let T=f;f=S($),f===T?C[f].p($,M):(Me(),F(C[T],1,1,()=>{C[T]=null}),Oe(),c=C[f],c?c.p($,M):(c=C[f]=v[f]($),c.c()),E(c,1),c.m(d.parentNode,d))},i($){h||(E(_),E(c),h=!0)},o($){F(_),F(c),h=!1},d($){$&&k(e),_&&_.d(),$&&k(u),C[f].d($),$&&k(d),g=!1,y()}}}function Hi(n){return n===null}function GM(n,e,t){let{collection:i=new Fn}=e,s={},l=!1,r={},o,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,o=(await as(()=>import("./FilterAutocompleteInput.c0dd2de7.js"),[])).default)}catch(v){console.warn(v),t(4,o=null)}t(5,a=!1)}pi(()=>{f()});const c=()=>t(2,l=!l),d=async v=>{var C;t(0,i[v]=s[v]||"",i),await Oi(),(C=r[v])==null||C.focus()},h=v=>{t(1,s[v]=i[v],s),t(0,i[v]=null,i)},g=v=>{var C;return(C=r[v])==null?void 0:C.focus()};function y(v,C){pe[v?"unshift":"push"](()=>{r[C]=v,t(3,r)})}function _(v,C){n.$$.not_equal(i[C],v)&&(i[C]=v,t(0,i))}return n.$$set=v=>{"collection"in v&&t(0,i=v.collection)},[i,s,l,r,o,a,u,c,d,h,g,y,_]}class ZM extends Pe{constructor(e){super(),Ee(this,e,GM,JM,De,{collection:0})}}function Xp(n,e,t){const i=n.slice();return i[14]=e[t],i}function Qp(n,e,t){const i=n.slice();return i[14]=e[t],i}function eh(n){let e;return{c(){e=b("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function th(n){let e,t,i,s,l=n[1].originalName+"",r,o,a,u,f,c=n[1].name+"",d;return{c(){e=b("li"),t=b("div"),i=q(`Renamed collection
`),s=b("strong"),r=q(l),o=O(),a=b("i"),u=O(),f=b("strong"),d=q(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&2&&l!==(l=h[1].originalName+"")&&me(r,l),g&2&&c!==(c=h[1].name+"")&&me(d,c)},d(h){h&&k(e)}}}function nh(n){let e,t,i,s,l=n[14].originalName+"",r,o,a,u,f,c=n[14].name+"",d;return{c(){e=b("li"),t=b("div"),i=q(`Renamed field
`),s=b("strong"),r=q(l),o=O(),a=b("i"),u=O(),f=b("strong"),d=q(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,r),m(t,o),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&16&&l!==(l=h[14].originalName+"")&&me(r,l),g&16&&c!==(c=h[14].name+"")&&me(d,c)},d(h){h&&k(e)}}}function ih(n){let e,t,i,s=n[14].name+"",l,r;return{c(){e=b("li"),t=q("Removed field "),i=b("span"),l=q(s),r=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(o,a){w(o,e,a),m(e,t),m(e,i),m(i,l),m(e,r)},p(o,a){a&8&&s!==(s=o[14].name+"")&&me(l,s)},d(o){o&&k(e)}}}function xM(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[3].length&&eh(),g=n[5]&&th(n),y=n[4],_=[];for(let S=0;S<y.length;S+=1)_[S]=nh(Qp(n,y,S));let v=n[3],C=[];for(let S=0;S<v.length;S+=1)C[S]=ih(Xp(n,v,S));return{c(){e=b("div"),t=b("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=O(),s=b("div"),l=b("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to
update it manually!`,r=O(),h&&h.c(),o=O(),a=b("h6"),a.textContent="Changes:",u=O(),f=b("ul"),g&&g.c(),c=O();for(let S=0;S<_.length;S+=1)_[S].c();d=O();for(let S=0;S<C.length;S+=1)C[S].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m(S,$){w(S,e,$),m(e,t),m(e,i),m(e,s),m(s,l),m(s,r),h&&h.m(s,null),w(S,o,$),w(S,a,$),w(S,u,$),w(S,f,$),g&&g.m(f,null),m(f,c);for(let M=0;M<_.length;M+=1)_[M].m(f,null);m(f,d);for(let M=0;M<C.length;M+=1)C[M].m(f,null)},p(S,$){if(S[3].length?h||(h=eh(),h.c(),h.m(s,null)):h&&(h.d(1),h=null),S[5]?g?g.p(S,$):(g=th(S),g.c(),g.m(f,c)):g&&(g.d(1),g=null),$&16){y=S[4];let M;for(M=0;M<y.length;M+=1){const T=Qp(S,y,M);_[M]?_[M].p(T,$):(_[M]=nh(T),_[M].c(),_[M].m(f,d))}for(;M<_.length;M+=1)_[M].d(1);_.length=y.length}if($&8){v=S[3];let M;for(M=0;M<v.length;M+=1){const T=Xp(S,v,M);C[M]?C[M].p(T,$):(C[M]=ih(T),C[M].c(),C[M].m(f,null))}for(;M<C.length;M+=1)C[M].d(1);C.length=v.length}},d(S){S&&k(e),h&&h.d(),S&&k(o),S&&k(a),S&&k(u),S&&k(f),g&&g.d(),Bn(_,S),Bn(C,S)}}}function XM(n){let e;return{c(){e=b("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function QM(n){let e,t,i,s,l;return{c(){e=b("button"),e.innerHTML='<span class="txt">Cancel</span>',t=O(),i=b("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),e.focus(),s||(l=[X(e,"click",n[8]),X(i,"click",n[9])],s=!0)},p:oe,d(r){r&&k(e),r&&k(t),r&&k(i),s=!1,lt(l)}}}function eO(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[QM],header:[XM],default:[xM]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524346&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function tO(n,e,t){let i,s,l;const r=_n();let o,a;async function u(v){t(1,a=v),await Oi(),!i&&!s.length&&!l.length?c():o==null||o.show()}function f(){o==null||o.hide()}function c(){f(),r("confirm")}const d=()=>f(),h=()=>c();function g(v){pe[v?"unshift":"push"](()=>{o=v,t(2,o)})}function y(v){ft.call(this,n,v)}function _(v){ft.call(this,n,v)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(v=>v.id&&!v.toDelete&&v.originalName!=v.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(v=>v.id&&v.toDelete))||[])},[f,a,o,l,s,i,c,u,d,h,g,y,_]}class nO extends Pe{constructor(e){super(),Ee(this,e,tO,eO,De,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function sh(n){let e,t,i,s;function l(o){n[26](o)}let r={};return n[2]!==void 0&&(r.collection=n[2]),t=new ZM({props:r}),pe.push(()=>Ie(t,"collection",l)),{c(){e=b("div"),B(t.$$.fragment),p(e,"class","tab-item active")},m(o,a){w(o,e,a),V(t,e,null),s=!0},p(o,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=o[2],je(()=>i=!1)),t.$set(u)},i(o){s||(E(t.$$.fragment,o),s=!0)},o(o){F(t.$$.fragment,o),s=!1},d(o){o&&k(e),z(t)}}}function iO(n){let e,t,i,s,l,r;function o(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new jM({props:a}),pe.push(()=>Ie(i,"collection",o));let u=n[9]===Ul&&sh(n);return{c(){e=b("div"),t=b("div"),B(i.$$.fragment),l=O(),u&&u.c(),p(t,"class","tab-item"),ee(t,"active",n[9]===gs),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),V(i,t,null),m(e,l),u&&u.m(e,null),r=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],je(()=>s=!1)),i.$set(d),c[0]&512&&ee(t,"active",f[9]===gs),f[9]===Ul?u?(u.p(f,c),c[0]&512&&E(u,1)):(u=sh(f),u.c(),E(u,1),u.m(e,null)):u&&(Me(),F(u,1,1,()=>{u=null}),Oe())},i(f){r||(E(i.$$.fragment,f),E(u),r=!0)},o(f){F(i.$$.fragment,f),F(u),r=!1},d(f){f&&k(e),z(i),u&&u.d()}}}function lh(n){let e,t,i,s,l,r,o;return r=new ks({props:{class:"dropdown dropdown-right m
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[20]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function rh(n){let e;return{c(){e=b("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function lO(n){let e,t,i,s,l,r,o,a,u,f,c,d,h=n[2].system&&rh();return{c(){e=b("label"),t=q("Name"),s=O(),l=b("input"),u=O(),h&&h.c(),f=st(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",r=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=o=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,y){w(g,e,y),m(e,t),w(g,s,y),w(g,l,y),w(g,u,y),h&&h.m(g,y),w(g,f,y),n[2].isNew&&l.focus(),c||(d=X(l,"input",n[21]),c=!0)},p(g,y){y[1]&128&&i!==(i=g[38])&&p(e,"for",i),y[1]&128&&r!==(r=g[38])&&p(l,"id",r),y[0]&2048&&(l.disabled=g[11]),y[0]&4&&o!==(o=g[2].isNew)&&(l.autofocus=o),y[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?h||(h=rh(),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),h&&h.d(g),g&&k(f),c=!1,d()}}}function oh(n){let e,t,i,s,l,r;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=wt.call(null,e,n[12])),l=!0)},p(o,a){t&&Jn(t.update)&&a[0]&4096&&t.update.call(null,o[12])},i(o){s||(o&&Mt(()=>{i||(i=at(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){o&&(i||(i=at(e,Wn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function ah(n){let e,t,i,s,l;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,o){w(r,e,o),i=!0,s||(l=Xe(wt.call(null,e,"Has errors")),s=!0)},i(r){i||(r&&Mt(()=>{t||(t=at(e,Wn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(r){r&&(t||(t=at(e,Wn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(r){r&&k(e),r&&t&&t.end(),s=!1,l()}}}function rO(n){var R,j,G,te,H,K;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,r,o,a,u,f,c,d,h,g,y=!W.isEmpty((R=n[4])==null?void 0:R.schema),_,v,C,S,$=!W.isEmpty((j=n[4])==null?void 0:j.listRule)||!W.isEmpty((G=n[4])==null?void 0:G.viewRule)||!W.isEmpty((te=n[4])==null?void 0:te.createRule)||!W.isEmpty((H=n[4])==null?void 0:H.updateRule)||!W.isEmpty((K=n[4])==null?void 0:K.deleteRule),M,T,A,D=!n[2].isNew&&!n[2].system&&lh(n);o=new Fe({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[lO,({uniqueId:J})=>({38:J}),({uniqueId:J})=>[0,J?128:0]]},$$scope:{ctx:n}}});let P=y&&oh(n),L=$&&ah();return{c(){e=b("h4"),i=q(t),s=O(),D&&D.c(),l=O(),r=b("form"),B(o.$$.fragment),a=O(),u=b("input"),f=O(),c=b("div"),d=b("button"),h=b("span"),h.textContent="Fields",g=O(),P&&P.c(),_=O(),v=b("button"),C=b("span"),C.textContent="API Rules",S=O(),L&&L.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(r,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ee(d,"active",n[9]===gs),p(C,"class","txt"),p(v,"type","button"),p(v,"class","tab-item"),ee(v,"active",n[9]===Ul),p(c,"class","tabs-header stretched")},m(J,Y){w(J,e,Y),m(e,i),w(J,s,Y),D&&D.m(J,Y),w(J,l,Y),w(J,r,Y),V(o,r,null),m(r,a),m(r,u),w(J,f,Y),w(J,c,Y),m(c,d),m(d,h),m(d,g),P&&P.m(d,null),m(c,_),m(c,v),m(v,C),m(v,S),L&&L.m(v,null),M=!0,T||(A=[X(r,"submit",Wt(n[22])),X(d,"click",n[23]),X(v,"click",n[24])],T=!0)},p(J,Y){var ce,be,se,Z,Te,ne;(!M||Y[0]&4)&&t!==(t=J[2].isNew?"New collection":"Edit collection")&&me(i,t),!J[2].isNew&&!J[2].system?D?(D.p(J,Y),Y[0]&4&&E(D,1)):(D=lh(J),D.c(),E(D,1),D.m(l.parentNode,l)):D&&(Me(),F(D,1,1,()=>{D=null}),Oe());const Q={};Y[0]&2048&&(Q.class="form-field required m-b-0 "+(J[11]?"disabled":"")),Y[0]&2052|Y[1]&384&&(Q.$$scope={dirty:Y,ctx:J}),o.$set(Q),Y[0]&16&&(y=!W.isEmpty((ce=J[4])==null?void 0:ce.schema)),y?P?(P.p(J,Y),Y[0]&16&&E(P,1)):(P=oh(J),P.c(),E(P,1),P.m(d,null)):P&&(Me(),F(P,1,1,()=>{P=null}),Oe()),Y[0]&512&&ee(d,"active",J[9]===gs),Y[0]&16&&($=!W.isEmpty((be=J[4])==null?void 0:be.listRule)||!W.isEmpty((se=J[4])==null?void 0:se.viewRule)||!W.isEmpty((Z=J[4])==null?void 0:Z.createRule)||!
<span class="txt">New collection</span>`,v=O(),B(C.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),ee(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(o,"type","text"),p(o,"placeholder","Search collections..."),p(i,"class","form-field search"),ee(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(_,"type","button"),p(_,"class","btn btn-block btn-outline"),p(y,"class","sidebar-footer"),p(e,"class","page-sidebar collection-sidebar")},m(L,R){w(L,e,R),m(e,t),m(t,i),m(i,s),m(s,l),m(i,r),m(i,o),Ce(o,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let j=0;j<d.length;j+=1)d[j].m(c,null);D&&D.m(c,null),m(e,g),m(e,y),m(y,_),w(L,v,R),V(C,L,R),S=!0,$||(M=[X(l,"click",n[8]),X(o,"input",n[9]),X(_,"click",n[11])],$=!0)},p(L,[R]){R&16&&ee(l,"hidden",!L[4]),R&1&&o.value!==L[0]&&Ce(o,L[0]),R&16&&ee(i,"active",L[4]),R&106&&(T=L[3],d=rt(d,R,A,1,L,T,h,c,fn,dh,null,uh),!T.length&&D?D.p(L,R):T.length?D&&(D.d(1),D=null):(D=fh(L),D.c(),D.m(c,null)));const j={};C.$set(j)},i(L){S||(E(C.$$.fragment,L),S=!0)},o(L){F(C.$$.fragment,L),S=!1},d(L){L&&k(e);for(let R=0;R<d.length;R+=1)d[R].d();D&&D.d(),L&&k(v),n[12](null),z(C,L),$=!1,lt(M)}}}function pO(n,e,t){let i,s,l,r,o;hn(n,fi,_=>t(5,r=_)),hn(n,Gs,_=>t(7,o=_));let a,u="";function f(_){Bg(fi,r=_,r)}const c=()=>t(0,u="");function d(){u=this.value,t(0,u)}const h=_=>f(_),g=()=>a==null?void 0:a.show();function y(_){pe[_?"unshift":"push"](()=>{a=_,t(2,a)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=u.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=u!==""),n.$$.dirty&131&&t(3,l=o.filter(_=>_.name!="profiles"&&(_.id==u||_.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[u,i,a,l,s,r,f,o,c,d,h,g,y]}class hO extends Pe{constructor(e){super(),Ee(this,e,pO,dO,De,{})}}function mO(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S,$,M,T,A,D,P,L,R,j,G,te,H,K,J,Y,Q,ce,be,se,Z,Te,ne,_e,fe,ie,ye,He,Le,Re,ae,re,ve,qe;return{c(){e=b("p"),e.innerHTML=`The syntax basically follows the format
<code><span class="txt-success">OPERAND</span>
<span class="txt-danger">OPERATOR</span>
2022-07-12 23:11:50 +08:00
<span class="txt-success">OPERAND</span></code>, where:`,t=O(),i=b("ul"),s=b("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
quoted), number, null, true, false`,l=O(),r=b("li"),o=b("code"),o.textContent="OPERATOR",a=q(` - is one of:
`),u=b("br"),f=O(),c=b("ul"),d=b("li"),h=b("code"),h.textContent="=",g=O(),y=b("span"),y.textContent="Equal",_=O(),v=b("li"),C=b("code"),C.textContent="!=",S=O(),$=b("span"),$.textContent="NOT equal",M=O(),T=b("li"),A=b("code"),A.textContent=">",D=O(),P=b("span"),P.textContent="Greater than",L=O(),R=b("li"),j=b("code"),j.textContent=">=",G=O(),te=b("span"),te.textContent="Greater than or equal",H=O(),K=b("li"),J=b("code"),J.textContent="<",Y=O(),Q=b("span"),Q.textContent="Less than or equal",ce=O(),be=b("li"),se=b("code"),se.textContent="<=",Z=O(),Te=b("span"),Te.textContent="Less than or equal",ne=O(),_e=b("li"),fe=b("code"),fe.textContent="~",ie=O(),ye=b("span"),ye.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
match)`,He=O(),Le=b("li"),Re=b("code"),Re.textContent="!~",ae=O(),re=b("span"),re.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,ve=O(),qe=b("p"),qe.innerHTML=`To group and combine several expressions you could use brackets
<code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,p(o,"class","txt-danger"),p(h,"class","filter-op svelte-1w7s5nw"),p(y,"class","txt-hint"),p(C,"class","filter-op svelte-1w7s5nw"),p($,"class","txt-hint"),p(A,"class","filter-op svelte-1w7s5nw"),p(P,"class","txt-hint"),p(j,"class","filter-op svelte-1w7s5nw"),p(te,"class","txt-hint"),p(J,"class","filter-op svelte-1w7s5nw"),p(Q,"class","txt-hint"),p(se,"class","filter-op svelte-1w7s5nw"),p(Te,"class","txt-hint"),p(fe,"class","filter-op svelte-1w7s5nw"),p(ye,"class","txt-hint"),p(Re,"class","filter-op svelte-1w7s5nw"),p(re,"class","txt-hint")},m(Ve,Je){w(Ve,e,Je),w(Ve,t,Je),w(Ve,i,Je),m(i,s),m(i,l),m(i,r),m(r,o),m(r,a),m(r,u),m(r,f),m(r,c),m(c,d),m(d,h),m(d,g),m(d,y),m(c,_),m(c,v),m(v,C),m(v,S),m(v,$),m(c,M),m(c,T),m(T,A),m(T,D),m(T,P),m(c,L),m(c,R),m(R,j),m(R,G),m(R,te),m(c,H),m(c,K),m(K,J),m(K,Y),m(K,Q),m(c,ce),m(c,be),m(be,se),m(be,Z),m(be,Te),m(c,ne),m(c,_e),m(_e,fe),m(_e,ie),m(_e,ye),m(c,He),m(c,Le),m(Le,Re),m(Le,ae),m(Le,re),w(Ve,ve,Je),w(Ve,qe,Je)},p:oe,i:oe,o:oe,d(Ve){Ve&&k(e),Ve&&k(t),Ve&&k(i),Ve&&k(ve),Ve&&k(qe)}}}class gO extends Pe{constructor(e){super(),Ee(this,e,null,mO,De,{})}}function ph(n,e,t){const i=n.slice();return i[8]=e[t],i}function hh(n,e,t){const i=n.slice();return i[8]=e[t],i}function mh(n,e,t){const i=n.slice();return i[13]=e[t],i}function gh(n,e,t){const i=n.slice();return i[13]=e[t],i}function _h(n){let e;return{c(){e=b("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function bh(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&me(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function yh(n,e){let t,i,s,l;return i=new sn({props:{content:e[13].code}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&ee(t,"active",e[3]===e[13].lang)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function vh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=b("div"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function kh(n,e){let t,i,s,l;return i=new sn({props:{content:e[8].body}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&ee(t,"active",e[2]===e[8].code)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function _O(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,_,v=n[0].name+"",C,S,$,M,T,A,D,P=[],L=new Map,R,j,G=[],te=new Map,H,K,J,Y,Q,ce,be,se,Z,Te,ne,_e,fe,ie,ye,He,Le,Re,ae,re,ve,qe,Ve,Je,ge,Ae,x,ue,Ue,bt,it,yt,ut,dt,Tt,Pt,Jt,he,we,Ge,et,Et,de,Se,Ze,Gt,Vt,ii,ot,N,I,U,le,Ne,Be,tt,Ke,nt,Ye,xe=[],St=new Map,Sn,Yt,Zt=[],gi=new Map,Ei,Qt=n[1]&&_h(),Cs=n[4];const sr=$e=>$e[13].lang;for(let $e=0;$e<Cs.length;$e+=1){let We=gh(n,Cs,$e),Dt=sr(We);L.set(Dt,P[$e]=bh(Dt,We))}let Zi=n[4];const lr=$e=>$e[13].lang;for(let $e=0;$e<Zi.length;$e+=1){let We=mh(n,Zi,$e),Dt=lr(We);te.set(Dt,G[$e]=yh(Dt,We))}ge=new sn({props:{content:`
// DESC by created and ASC by id
?sort=-created,id
`}}),dt=new sn({props:{content:`
?filter=(id='abc' && created>'2022-01-01')
`}}),Pt=new gO({}),Ze=new sn({props:{content:`
?expand=rel1,rel2.subrel21.subrel22
2022-07-12 23:11:50 +08:00
`}});let $s=n[5];const rr=$e=>$e[8].code;for(let $e=0;$e<$s.length;$e+=1){let We=hh(n,$s,$e),Dt=rr(We);St.set(Dt,xe[$e]=vh(Dt,We))}let xi=n[5];const or=$e=>$e[8].code;for(let $e=0;$e<xi.length;$e+=1){let We=ph(n,xi,$e),Dt=or(We);gi.set(Dt,Zt[$e]=kh(Dt,We))}return{c(){e=b("div"),t=b("strong"),t.textContent="GET",i=O(),s=b("div"),l=b("p"),r=q("/api/collections/"),o=b("strong"),u=q(a),f=q("/records"),c=O(),Qt&&Qt.c(),d=O(),h=b("div"),g=b("p"),y=q("Fetch a paginated "),_=b("strong"),C=q(v),S=q(" records list."),$=O(),M=b("div"),M.textContent="Client SDKs example",T=O(),A=b("div"),D=b("div");for(let $e=0;$e<P.length;$e+=1)P[$e].c();R=O(),j=b("div");for(let $e=0;$e<G.length;$e+=1)G[$e].c();H=O(),K=b("div"),K.textContent="Query parameters",J=O(),Y=b("table"),Q=b("thead"),Q.innerHTML=`<tr><th>Param</th>
<th>Type</th>
2022-07-12 23:11:50 +08:00
<th width="60%">Description</th></tr>`,ce=O(),be=b("tbody"),se=b("tr"),se.innerHTML=`<td>page</td>
<td><span class="label">Number</span></td>
2022-07-12 23:11:50 +08:00
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,Z=O(),Te=b("tr"),Te.innerHTML=`<td>perPage</td>
<td><span class="label">Number</span></td>
2022-07-12 23:11:50 +08:00
<td>Specify the max returned records per page (default to 30).</td>`,ne=O(),_e=b("tr"),fe=b("td"),fe.textContent="sort",ie=O(),ye=b("td"),ye.innerHTML='<span class="label">String</span>',He=O(),Le=b("td"),Re=q("Specify the records order attribute(s). "),ae=b("br"),re=q(`
Add `),ve=b("code"),ve.textContent="-",qe=q(" / "),Ve=b("code"),Ve.textContent="+",Je=q(` (default) in front of the attribute for DESC / ASC order.
Ex.:
2022-07-12 23:11:50 +08:00
`),B(ge.$$.fragment),Ae=O(),x=b("tr"),ue=b("td"),ue.textContent="filter",Ue=O(),bt=b("td"),bt.innerHTML='<span class="label">String</span>',it=O(),yt=b("td"),ut=q(`Filter the returned records. Ex.:
`),B(dt.$$.fragment),Tt=O(),B(Pt.$$.fragment),Jt=O(),he=b("tr"),we=b("td"),we.textContent="expand",Ge=O(),et=b("td"),et.innerHTML='<span class="label">String</span>',Et=O(),de=b("td"),Se=q(`Auto expand nested record relations. Ex.:
`),B(Ze.$$.fragment),Gt=q(`
Supports up to 6-levels depth nested relations expansion. `),Vt=b("br"),ii=q(`
The expanded relations will be appended to each individual record under the
2022-07-12 23:11:50 +08:00
`),ot=b("code"),ot.textContent="@expand",N=q(" property (eg. "),I=b("code"),I.textContent='"@expand": {"rel1": {...}, ...}',U=q(`). Only the
relations that the user has permissions to `),le=b("strong"),le.textContent="view",Ne=q(" will be expanded."),Be=O(),tt=b("div"),tt.textContent="Responses",Ke=O(),nt=b("div"),Ye=b("div");for(let $e=0;$e<xe.length;$e+=1)xe[$e].c();Sn=O(),Yt=b("div");for(let $e=0;$e<Zt.length;$e+=1)Zt[$e].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(h,"class","content m-b-base"),p(M,"class","section-title"),p(D,"class","tabs-header compact left"),p(j,"class","tabs-content"),p(A,"class","tabs m-b-lg"),p(K,"class","section-title"),p(Y,"class","table-compact table-border m-b-lg"),p(tt,"class","section-title"),p(Ye,"class","tabs-header compact left"),p(Yt,"class","tabs-content"),p(nt,"class","tabs")},m($e,We){w($e,e,We),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(e,c),Qt&&Qt.m(e,null),w($e,d,We),w($e,h,We),m(h,g),m(g,y),m(g,_),m(_,C),m(g,S),w($e,$,We),w($e,M,We),w($e,T,We),w($e,A,We),m(A,D);for(let Dt=0;Dt<P.length;Dt+=1)P[Dt].m(D,null);m(A,R),m(A,j);for(let Dt=0;Dt<G.length;Dt+=1)G[Dt].m(j,null);w($e,H,We),w($e,K,We),w($e,J,We),w($e,Y,We),m(Y,Q),m(Y,ce),m(Y,be),m(be,se),m(be,Z),m(be,Te),m(be,ne),m(be,_e),m(_e,fe),m(_e,ie),m(_e,ye),m(_e,He),m(_e,Le),m(Le,Re),m(Le,ae),m(Le,re),m(Le,ve),m(Le,qe),m(Le,Ve),m(Le,Je),V(ge,Le,null),m(be,Ae),m(be,x),m(x,ue),m(x,Ue),m(x,bt),m(x,it),m(x,yt),m(yt,ut),V(dt,yt,null),m(yt,Tt),V(Pt,yt,null),m(be,Jt),m(be,he),m(he,we),m(he,Ge),m(he,et),m(he,Et),m(he,de),m(de,Se),V(Ze,de,null),m(de,Gt),m(de,Vt),m(de,ii),m(de,ot),m(de,N),m(de,I),m(de,U),m(de,le),m(de,Ne),w($e,Be,We),w($e,tt,We),w($e,Ke,We),w($e,nt,We),m(nt,Ye);for(let Dt=0;Dt<xe.length;Dt+=1)xe[Dt].m(Ye,null);m(nt,Sn),m(nt,Yt);for(let Dt=0;Dt<Zt.length;Dt+=1)Zt[Dt].m(Yt,null);Ei=!0},p($e,[We]){(!Ei||We&1)&&a!==(a=$e[0].name+"")&&me(u,a),$e[1]?Qt||(Qt=_h(),Qt.c(),Qt.m(e,null)):Qt&&(Qt.d(1),Qt=null),(!Ei||We&1)&&v!==(v=$e[0].name+"")&&me(C,v),We&24&&(Cs=$e[4],P=rt(P,We,sr,1,$e,Cs,L,D,fn,bh,null,gh)),We&24&&(Zi=$e[4],Me(),G=rt(G,We,lr,1,$e,Zi,te,j,Ft,yh,null,mh),Oe()),We&36&&($s=$e[5],xe=rt(xe,We,rr,1,$e,$s,St,Ye,fn,vh,null,hh)),We&36&&(xi=$e[5],Me(),Zt=rt(Zt,We,or,1,$e,xi,gi,Yt,Ft,kh,null,ph),Oe())},i($e){if(!Ei){for(let We=0;We<Zi.length;We+=1)E(G[We]);E(ge.$$.fragment,$e),E(dt.$$.fragment,$e),E(Pt.$$.fragment,$e),E(Ze.$$.fragment,$e);for(let We=0;We<xi.length;We+=1)E(Zt[We]);Ei=!0}},o($e){for(let We=0;We<G.length;We+=1)F(G[We]);F(ge.$$.fragment,$e),F(dt.$$.fragment,$e),F(Pt.$$.fragment,$e),F(Ze.$$.fragment,$e);for(let We=0;We<Zt.length;We+=1)F(Zt[We]);Ei=!1},d($e){$e&&k(e),Qt&&Qt.d(),$e&&k(d),$e&&k(h),$e&&k($),$e&&k(M),$e&&k(T),$e&&k(A);for(let We=0;We<P.length;We+=1)P[We].d();for(let We=0;We<G.length;We+=1)G[We].d();$e&&k(H),$e&&k(K),$e&&k(J),$e&&k(Y),z(ge),z(dt),z(Pt),z(Ze),$e&&k(Be),$e&&k(tt),$e&&k(Ke),$e&&k(nt);for(let We=0;We<xe.length;We+=1)xe[We].d();for(let We=0;We<Zt.length;We+=1)Zt[We].d()}}}function bO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.listRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[W.dummyCollectionRecord(s),W.dummyCollectionRecord(s)]},null,2)}),o.push({code:400,body:`
{
"code": 400,
"message": "Something went wrong while processing your request. Invalid filter.",
"data": {}
}
`}),i&&o.push({code:403,body:`
{
"code": 403,
"message": "Only admins can access this action.",
"data": {}
}
`}),o.push({code:404,body:`
{
"code": 404,
"message": "The requested resource wasn't found.",
"data": {}
}
`})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
import PocketBase from 'pocketbase';
const client = new PocketBase("${ke.baseUrl}");
client.Records.getList("${s==null?void 0:s.name}", { page: 2 })
.then(function (list) {
// success...
}).catch(function (error) {
// error...
});
// alternatively you can also fetch all records at once via getFullList:
client.Records.getFullList("${s==null?void 0:s.name}", 200 /* batch size */)
.then(function (records) {
// success...
}).catch(function (error) {
// error...
});
2022-07-12 23:11:50 +08:00
`}])},[s,i,l,r,a,o,u,f]}class yO extends Pe{constructor(e){super(),Ee(this,e,bO,_O,De,{collection:0})}}function wh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Sh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Ch(n,e,t){const i=n.slice();return i[13]=e[t],i}function $h(n,e,t){const i=n.slice();return i[13]=e[t],i}function Mh(n){let e;return{c(){e=b("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Oh(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&me(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function Th(n,e){let t,i,s,l;return i=new sn({props:{content:e[13].code}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&ee(t,"active",e[3]===e[13].lang)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function Dh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Ah(n,e){let t,i,s,l;return i=new sn({props:{content:e[8].body}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&ee(t,"active",e[2]===e[8].code)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function vO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,_,v,C=n[0].name+"",S,$,M,T,A,D,P,L=[],R=new Map,j,G,te=[],H=new Map,K,J,Y,Q,ce,be,se,Z,Te,ne,_e,fe,ie,ye,He,Le,Re,ae,re,ve,qe,Ve,Je,ge,Ae,x,ue,Ue,bt,it,yt,ut,dt,Tt=[],Pt=new Map,Jt,he,we=[],Ge=new Map,et,Et=n[1]&&Mh(),de=n[4];const Se=I=>I[13].lang;for(let I=0;I<de.length;I+=1){let U=$h(n,de,I),le=Se(U);R.set(le,L[I]=Oh(le,U))}let Ze=n[4];const Gt=I=>I[13].lang;for(let I=0;I<Ze.length;I+=1){let U=Ch(n,Ze,I),le=Gt(U);H.set(le,te[I]=Th(le,U))}re=new sn({props:{content:`
?expand=rel1,rel2.subrel21.subrel22
2022-07-12 23:11:50 +08:00
`}});let Vt=n[5];const ii=I=>I[8].code;for(let I=0;I<Vt.length;I+=1){let U=Sh(n,Vt,I),le=ii(U);Pt.set(le,Tt[I]=Dh(le,U))}let ot=n[5];const N=I=>I[8].code;for(let I=0;I<ot.length;I+=1){let U=wh(n,ot,I),le=N(U);Ge.set(le,we[I]=Ah(le,U))}return{c(){e=b("div"),t=b("strong"),t.textContent="GET",i=O(),s=b("div"),l=b("p"),r=q("/api/collections/"),o=b("strong"),u=q(a),f=q("/records/"),c=b("strong"),c.textContent=":id",d=O(),Et&&Et.c(),h=O(),g=b("div"),y=b("p"),_=q("Fetch a single "),v=b("strong"),S=q(C),$=q(" record."),M=O(),T=b("div"),T.textContent="Client SDKs example",A=O(),D=b("div"),P=b("div");for(let I=0;I<L.length;I+=1)L[I].c();j=O(),G=b("div");for(let I=0;I<te.length;I+=1)te[I].c();K=O(),J=b("div"),J.textContent="Path Parameters",Y=O(),Q=b("table"),Q.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
2022-07-12 23:11:50 +08:00
<td>ID of the record to view.</td></tr></tbody>`,ce=O(),be=b("div"),be.textContent="Query parameters",se=O(),Z=b("table"),Te=b("thead"),Te.innerHTML=`<tr><th>Param</th>
<th>Type</th>
2022-07-12 23:11:50 +08:00
<th width="60%">Description</th></tr>`,ne=O(),_e=b("tbody"),fe=b("tr"),ie=b("td"),ie.textContent="expand",ye=O(),He=b("td"),He.innerHTML='<span class="label">String</span>',Le=O(),Re=b("td"),ae=q(`Auto expand nested record relations. Ex.:
`),B(re.$$.fragment),ve=q(`
Supports up to 6-levels depth nested relations expansion. `),qe=b("br"),Ve=q(`
The expanded relations will be appended to the record under the
2022-07-12 23:11:50 +08:00
`),Je=b("code"),Je.textContent="@expand",ge=q(" property (eg. "),Ae=b("code"),Ae.textContent='"@expand": {"rel1": {...}, ...}',x=q(`). Only the
relations that the user has permissions to `),ue=b("strong"),ue.textContent="view",Ue=q(" will be expanded."),bt=O(),it=b("div"),it.textContent="Responses",yt=O(),ut=b("div"),dt=b("div");for(let I=0;I<Tt.length;I+=1)Tt[I].c();Jt=O(),he=b("div");for(let I=0;I<we.length;I+=1)we[I].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","tabs-header compact left"),p(G,"class","tabs-content"),p(D,"class","tabs m-b-lg"),p(J,"class","section-title"),p(Q,"class","table-compact table-border m-b-lg"),p(be,"class","section-title"),p(Z,"class","table-compact table-border m-b-lg"),p(it,"class","section-title"),p(dt,"class","tabs-header compact left"),p(he,"class","tabs-content"),p(ut,"class","tabs")},m(I,U){w(I,e,U),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),Et&&Et.m(e,null),w(I,h,U),w(I,g,U),m(g,y),m(y,_),m(y,v),m(v,S),m(y,$),w(I,M,U),w(I,T,U),w(I,A,U),w(I,D,U),m(D,P);for(let le=0;le<L.length;le+=1)L[le].m(P,null);m(D,j),m(D,G);for(let le=0;le<te.length;le+=1)te[le].m(G,null);w(I,K,U),w(I,J,U),w(I,Y,U),w(I,Q,U),w(I,ce,U),w(I,be,U),w(I,se,U),w(I,Z,U),m(Z,Te),m(Z,ne),m(Z,_e),m(_e,fe),m(fe,ie),m(fe,ye),m(fe,He),m(fe,Le),m(fe,Re),m(Re,ae),V(re,Re,null),m(Re,ve),m(Re,qe),m(Re,Ve),m(Re,Je),m(Re,ge),m(Re,Ae),m(Re,x),m(Re,ue),m(Re,Ue),w(I,bt,U),w(I,it,U),w(I,yt,U),w(I,ut,U),m(ut,dt);for(let le=0;le<Tt.length;le+=1)Tt[le].m(dt,null);m(ut,Jt),m(ut,he);for(let le=0;le<we.length;le+=1)we[le].m(he,null);et=!0},p(I,[U]){(!et||U&1)&&a!==(a=I[0].name+"")&&me(u,a),I[1]?Et||(Et=Mh(),Et.c(),Et.m(e,null)):Et&&(Et.d(1),Et=null),(!et||U&1)&&C!==(C=I[0].name+"")&&me(S,C),U&24&&(de=I[4],L=rt(L,U,Se,1,I,de,R,P,fn,Oh,null,$h)),U&24&&(Ze=I[4],Me(),te=rt(te,U,Gt,1,I,Ze,H,G,Ft,Th,null,Ch),Oe()),U&36&&(Vt=I[5],Tt=rt(Tt,U,ii,1,I,Vt,Pt,dt,fn,Dh,null,Sh)),U&36&&(ot=I[5],Me(),we=rt(we,U,N,1,I,ot,Ge,he,Ft,Ah,null,wh),Oe())},i(I){if(!et){for(let U=0;U<Ze.length;U+=1)E(te[U]);E(re.$$.fragment,I);for(let U=0;U<ot.length;U+=1)E(we[U]);et=!0}},o(I){for(let U=0;U<te.length;U+=1)F(te[U]);F(re.$$.fragment,I);for(let U=0;U<we.length;U+=1)F(we[U]);et=!1},d(I){I&&k(e),Et&&Et.d(),I&&k(h),I&&k(g),I&&k(M),I&&k(T),I&&k(A),I&&k(D);for(let U=0;U<L.length;U+=1)L[U].d();for(let U=0;U<te.length;U+=1)te[U].d();I&&k(K),I&&k(J),I&&k(Y),I&&k(Q),I&&k(ce),I&&k(be),I&&k(se),I&&k(Z),z(re),I&&k(bt),I&&k(it),I&&k(yt),I&&k(ut);for(let U=0;U<Tt.length;U+=1)Tt[U].d();for(let U=0;U<we.length;U+=1)we[U].d()}}}function kO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.viewRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:200,body:JSON.stringify(W.dummyCollectionRecord(s),null,2)}),i&&o.push({code:403,body:`
{
"code": 403,
"message": "Only admins can access this action.",
"data": {}
}
`}),o.push({code:404,body:`
{
"code": 404,
"message": "The requested resource wasn't found.",
"data": {}
}
`})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
import PocketBase from 'pocketbase';
const client = new PocketBase("${ke.baseUrl}");
client.Records.getOne("${s==null?void 0:s.name}", "RECORD_ID")
.then(function (record) {
// success...
}).catch(function (error) {
// error...
});
2022-07-12 23:11:50 +08:00
`}])},[s,i,l,r,a,o,u,f]}class wO extends Pe{constructor(e){super(),Ee(this,e,kO,vO,De,{collection:0})}}function Eh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Ph(n,e,t){const i=n.slice();return i[8]=e[t],i}function Lh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Fh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Ih(n,e,t){const i=n.slice();return i[16]=e[t],i}function Nh(n){let e;return{c(){e=b("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Rh(n,e){let t,i=e[16].lang+"",s,l,r,o;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&me(s,i),f&20&&ee(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),r=!1,o()}}}function jh(n,e){let t,i,s,l;return i=new sn({props:{content:e[16].code}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[16].code),i.$set(a),o&20&&ee(t,"active",e[2]===e[16].lang)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function SO(n){let e;return{c(){e=b("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function CO(n){let e;return{c(){e=b("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $O(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=q("User "),i=q(t),s=q(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function MO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=q("Relation record "),i=q(t),s=q(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function OO(n){let e,t,i,s,l;return{c(){e=q("FormData object."),t=b("br"),i=q(`
Set to `),s=b("code"),s.textContent="null",l=q(" to delete already uploaded file(s).")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),w(r,s,o),w(r,l,o)},p:oe,d(r){r&&k(e),r&&k(t),r&&k(i),r&&k(s),r&&k(l)}}}function TO(n){let e;return{c(){e=q("URL address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function DO(n){let e;return{c(){e=q("Email address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function AO(n){let e;return{c(){e=q("JSON array or object.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function EO(n){let e;return{c(){e=q("Number value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function PO(n){let e;return{c(){e=q("Plain text value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Hh(n,e){let t,i,s,l,r,o=e[13].name+"",a,u,f,c,d=W.getFieldValueType(e[13])+"",h,g,y,_;function v(A,D){return A[13].required?CO:SO}let C=v(e),S=C(e);function $(A,D){if(A[13].type==="text")return PO;if(A[13].type==="number")return EO;if(A[13].type==="json")return AO;if(A[13].type==="email")return DO;if(A[13].type==="url")return TO;if(A[13].type==="file")return OO;if(A[13].type==="relation")return MO;if(A[13].type==="user")return $O}let M=$(e),T=M&&M(e);return{key:n,first:null,c(){t=b("tr"),i=b("td"),s=b("div"),S.c(),l=O(),r=b("span"),a=q(o),u=O(),f=b("td"),c=b("span"),h=q(d),g=O(),y=b("td"),T&&T.c(),_=O(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(A,D){w(A,t,D),m(t,i),m(i,s),S.m(s,null),m(s,l),m(s,r),m(r,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,y),T&&T.m(y,null),m(t,_)},p(A,D){e=A,C!==(C=v(e))&&(S.d(1),S=C(e),S&&(S.c(),S.m(s,l))),D&1&&o!==(o=e[13].name+"")&&me(a,o),D&1&&d!==(d=W.getFieldValueType(e[13])+"")&&me(h,d),M===(M=$(e))&&T?T.p(e,D):(T&&T.d(1),T=M&&M(e),T&&(T.c(),T.m(y,null)))},d(A){A&&k(t),S.d(),T&&T.d()}}}function qh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&me(s,i),f&10&&ee(t,"active",e[1]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Vh(n,e){let t,i,s,l;return i=new sn({props:{content:e[8].body}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&8&&(a.content=e[8].body),i.$set(a),o&10&&ee(t,"active",e[1]===e[8].code)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function LO(n){var Jt;let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,_,v=n[0].name+"",C,S,$,M,T,A,D,P,L,R,j,G=[],te=new Map,H,K,J=[],Y=new Map,Q,ce,be,se,Z,Te,ne,_e=[],fe=new Map,ie,ye,He,Le,Re,ae=[],re=new Map,ve,qe,Ve=[],Je=new Map,ge,Ae=n[5]&&Nh(),x=n[4];const ue=he=>he[16].lang;for(let he=0;he<x.length;he+=1){let we=Ih(n,x,he),Ge=ue(we);te.set(Ge,G[he]=Rh(Ge,we))}let Ue=n[4];const bt=he=>he[16].lang;for(let he=0;he<Ue.length;he+=1){let we=Fh(n,Ue,he),Ge=bt(we);Y.set(Ge,J[he]=jh(Ge,we))}let it=(Jt=n[0])==null?void 0:Jt.schema;const yt=he=>he[13].name;for(let he=0;he<it.length;he+=1){let we=Lh(n,it,he),Ge=yt(we);fe.set(Ge,_e[he]=Hh(Ge,we))}let ut=n[3];const dt=he=>he[8].code;for(let he=0;he<ut.length;he+=1){let we=Ph(n,ut,he),Ge=dt(we);re.set(Ge,ae[he]=qh(Ge,we))}let Tt=n[3];const Pt=he=>he[8].code;for(let he=0;he<Tt.length;he+=1){let we=Eh(n,Tt,he),Ge=Pt(we);Je.set(Ge,Ve[he]=Vh(Ge,we))}return{c(){e=b("div"),t=b("strong"),t.textContent="POST",i=O(),s=b("div"),l=b("p"),r=q("/api/collections/"),o=b("strong"),u=q(a),f=q("/records"),c=O(),Ae&&Ae.c(),d=O(),h=b("div"),g=b("p"),y=q("Create a new "),_=b("strong"),C=q(v),S=q(" record."),$=O(),M=b("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,T=O(),A=b("p"),A.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",D=O(),P=b("div"),P.textContent="Client SDKs example",L=O(),R=b("div"),j=b("div");for(let he=0;he<G.length;he+=1)G[he].c();H=O(),K=b("div");for(let he=0;he<J.length;he+=1)J[he].c();Q=O(),ce=b("div"),ce.textContent="Body Parameters",be=O(),se=b("table"),Z=b("thead"),Z.innerHTML=`<tr><th>Param</th>
<th>Type</th>
2022-07-12 23:11:50 +08:00
<th width="50%">Description</th></tr>`,Te=O(),ne=b("tbody");for(let he=0;he<_e.length;he+=1)_e[he].c();ie=O(),ye=b("div"),ye.textContent="Responses",He=O(),Le=b("div"),Re=b("div");for(let he=0;he<ae.length;he+=1)ae[he].c();ve=O(),qe=b("div");for(let he=0;he<Ve.length;he+=1)Ve[he].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(h,"class","content m-b-base"),p(P,"class","section-title"),p(j,"class","tabs-header compact left"),p(K,"class","tabs-content"),p(R,"class","tabs m-b-lg"),p(ce,"class","section-title"),p(se,"class","table-compact table-border m-b-lg"),p(ye,"class","section-title"),p(Re,"class","tabs-header compact left"),p(qe,"class","tabs-content"),p(Le,"class","tabs")},m(he,we){w(he,e,we),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(e,c),Ae&&Ae.m(e,null),w(he,d,we),w(he,h,we),m(h,g),m(g,y),m(g,_),m(_,C),m(g,S),m(h,$),m(h,M),m(h,T),m(h,A),w(he,D,we),w(he,P,we),w(he,L,we),w(he,R,we),m(R,j);for(let Ge=0;Ge<G.length;Ge+=1)G[Ge].m(j,null);m(R,H),m(R,K);for(let Ge=0;Ge<J.length;Ge+=1)J[Ge].m(K,null);w(he,Q,we),w(he,ce,we),w(he,be,we),w(he,se,we),m(se,Z),m(se,Te),m(se,ne);for(let Ge=0;Ge<_e.length;Ge+=1)_e[Ge].m(ne,null);w(he,ie,we),w(he,ye,we),w(he,He,we),w(he,Le,we),m(Le,Re);for(let Ge=0;Ge<ae.length;Ge+=1)ae[Ge].m(Re,null);m(Le,ve),m(Le,qe);for(let Ge=0;Ge<Ve.length;Ge+=1)Ve[Ge].m(qe,null);ge=!0},p(he,[we]){var Ge;(!ge||we&1)&&a!==(a=he[0].name+"")&&me(u,a),he[5]?Ae||(Ae=Nh(),Ae.c(),Ae.m(e,null)):Ae&&(Ae.d(1),Ae=null),(!ge||we&1)&&v!==(v=he[0].name+"")&&me(C,v),we&20&&(x=he[4],G=rt(G,we,ue,1,he,x,te,j,fn,Rh,null,Ih)),we&20&&(Ue=he[4],Me(),J=rt(J,we,bt,1,he,Ue,Y,K,Ft,jh,null,Fh),Oe()),we&1&&(it=(Ge=he[0])==null?void 0:Ge.schema,_e=rt(_e,we,yt,1,he,it,fe,ne,fn,Hh,null,Lh)),we&10&&(ut=he[3],ae=rt(ae,we,dt,1,he,ut,re,Re,fn,qh,null,Ph)),we&10&&(Tt=he[3],Me(),Ve=rt(Ve,we,Pt,1,he,Tt,Je,qe,Ft,Vh,null,Eh),Oe())},i(he){if(!ge){for(let we=0;we<Ue.length;we+=1)E(J[we]);for(let we=0;we<Tt.length;we+=1)E(Ve[we]);ge=!0}},o(he){for(let we=0;we<J.length;we+=1)F(J[we]);for(let we=0;we<Ve.length;we+=1)F(Ve[we]);ge=!1},d(he){he&&k(e),Ae&&Ae.d(),he&&k(d),he&&k(h),he&&k(D),he&&k(P),he&&k(L),he&&k(R);for(let we=0;we<G.length;we+=1)G[we].d();for(let we=0;we<J.length;we+=1)J[we].d();he&&k(Q),he&&k(ce),he&&k(be),he&&k(se);for(let we=0;we<_e.length;we+=1)_e[we].d();he&&k(ie),he&&k(ye),he&&k(He),he&&k(Le);for(let we=0;we<ae.length;we+=1)ae[we].d();for(let we=0;we<Ve.length;we+=1)Ve[we].d()}}}function FO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(2,r=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.createRule)===null),n.$$.dirty&1&&t(3,o=[{code:200,body:JSON.stringify(W.dummyCollectionRecord(s),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to create record.",
"data": {
"${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
"code": "validation_required",
"message": "Missing required value."
}
}
}
`},{code:403,body:`
{
"code": 403,
"message": "You are not allowed to perform this request.",
"data": {}
}
`}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
import PocketBase from 'pocketbase';
const client = new PocketBase("${ke.baseUrl}");
const data = { ... };
client.Records.create("${s==null?void 0:s.name}", data)
.then(function (record) {
// success...
}).catch(function (error) {
// error...
});
2022-07-12 23:11:50 +08:00
`}])},[s,l,r,o,a,i,u,f]}class IO extends Pe{constructor(e){super(),Ee(this,e,FO,LO,De,{collection:0})}}function zh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Bh(n,e,t){const i=n.slice();return i[8]=e[t],i}function Uh(n,e,t){const i=n.slice();return i[13]=e[t],i}function Wh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Yh(n,e,t){const i=n.slice();return i[16]=e[t],i}function Kh(n){let e;return{c(){e=b("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Jh(n,e){let t,i=e[16].lang+"",s,l,r,o;function a(){return e[6](e[16])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[16].lang+"")&&me(s,i),f&20&&ee(t,"active",e[2]===e[16].lang)},d(u){u&&k(t),r=!1,o()}}}function Gh(n,e){let t,i,s,l;return i=new sn({props:{content:e[16].code}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[16].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[16].code),i.$set(a),o&20&&ee(t,"active",e[2]===e[16].lang)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function NO(n){let e;return{c(){e=b("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function RO(n){let e;return{c(){e=b("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=q("User "),i=q(t),s=q(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function HO(n){var l;let e,t=((l=n[13].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=q("Relation record "),i=q(t),s=q(".")},m(r,o){w(r,e,o),w(r,i,o),w(r,s,o)},p(r,o){var a;o&1&&t!==(t=((a=r[13].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&me(i,t)},d(r){r&&k(e),r&&k(i),r&&k(s)}}}function qO(n){let e,t,i,s,l;return{c(){e=q("FormData object."),t=b("br"),i=q(`
Set to `),s=b("code"),s.textContent="null",l=q(" to delete already uploaded file(s).")},m(r,o){w(r,e,o),w(r,t,o),w(r,i,o),w(r,s,o),w(r,l,o)},p:oe,d(r){r&&k(e),r&&k(t),r&&k(i),r&&k(s),r&&k(l)}}}function VO(n){let e;return{c(){e=q("URL address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function zO(n){let e;return{c(){e=q("Email address.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function BO(n){let e;return{c(){e=q("JSON array or object.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function UO(n){let e;return{c(){e=q("Number value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function WO(n){let e;return{c(){e=q("Plain text value.")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Zh(n,e){let t,i,s,l,r,o=e[13].name+"",a,u,f,c,d=W.getFieldValueType(e[13])+"",h,g,y,_;function v(A,D){return A[13].required?RO:NO}let C=v(e),S=C(e);function $(A,D){if(A[13].type==="text")return WO;if(A[13].type==="number")return UO;if(A[13].type==="json")return BO;if(A[13].type==="email")return zO;if(A[13].type==="url")return VO;if(A[13].type==="file")return qO;if(A[13].type==="relation")return HO;if(A[13].type==="user")return jO}let M=$(e),T=M&&M(e);return{key:n,first:null,c(){t=b("tr"),i=b("td"),s=b("div"),S.c(),l=O(),r=b("span"),a=q(o),u=O(),f=b("td"),c=b("span"),h=q(d),g=O(),y=b("td"),T&&T.c(),_=O(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(A,D){w(A,t,D),m(t,i),m(i,s),S.m(s,null),m(s,l),m(s,r),m(r,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,y),T&&T.m(y,null),m(t,_)},p(A,D){e=A,C!==(C=v(e))&&(S.d(1),S=C(e),S&&(S.c(),S.m(s,l))),D&1&&o!==(o=e[13].name+"")&&me(a,o),D&1&&d!==(d=W.getFieldValueType(e[13])+"")&&me(h,d),M===(M=$(e))&&T?T.p(e,D):(T&&T.d(1),T=M&&M(e),T&&(T.c(),T.m(y,null)))},d(A){A&&k(t),S.d(),T&&T.d()}}}function xh(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&8&&i!==(i=e[8].code+"")&&me(s,i),f&10&&ee(t,"active",e[1]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function Xh(n,e){let t,i,s,l;return i=new sn({props:{content:e[8].body}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&8&&(a.content=e[8].body),i.$set(a),o&10&&ee(t,"active",e[1]===e[8].code)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function YO(n){var Et;let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,_,v,C=n[0].name+"",S,$,M,T,A,D,P,L,R,j,G,te=[],H=new Map,K,J,Y=[],Q=new Map,ce,be,se,Z,Te,ne,_e,fe,ie,ye,He,Le=[],Re=new Map,ae,re,ve,qe,Ve,Je=[],ge=new Map,Ae,x,ue=[],Ue=new Map,bt,it=n[5]&&Kh(),yt=n[4];const ut=de=>de[16].lang;for(let de=0;de<yt.length;de+=1){let Se=Yh(n,yt,de),Ze=ut(Se);H.set(Ze,te[de]=Jh(Ze,Se))}let dt=n[4];const Tt=de=>de[16].lang;for(let de=0;de<dt.length;de+=1){let Se=Wh(n,dt,de),Ze=Tt(Se);Q.set(Ze,Y[de]=Gh(Ze,Se))}let Pt=(Et=n[0])==null?void 0:Et.schema;const Jt=de=>de[13].name;for(let de=0;de<Pt.length;de+=1){let Se=Uh(n,Pt,de),Ze=Jt(Se);Re.set(Ze,Le[de]=Zh(Ze,Se))}let he=n[3];const we=de=>de[8].code;for(let de=0;de<he.length;de+=1){let Se=Bh(n,he,de),Ze=we(Se);ge.set(Ze,Je[de]=xh(Ze,Se))}let Ge=n[3];const et=de=>de[8].code;for(let de=0;de<Ge.length;de+=1){let Se=zh(n,Ge,de),Ze=et(Se);Ue.set(Ze,ue[de]=Xh(Ze,Se))}return{c(){e=b("div"),t=b("strong"),t.textContent="PATCH",i=O(),s=b("div"),l=b("p"),r=q("/api/collections/"),o=b("strong"),u=q(a),f=q("/records/"),c=b("strong"),c.textContent=":id",d=O(),it&&it.c(),h=O(),g=b("div"),y=b("p"),_=q("Update a single "),v=b("strong"),S=q(C),$=q(" record."),M=O(),T=b("p"),T.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,A=O(),D=b("p"),D.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",P=O(),L=b("div"),L.textContent="Client SDKs example",R=O(),j=b("div"),G=b("div");for(let de=0;de<te.length;de+=1)te[de].c();K=O(),J=b("div");for(let de=0;de<Y.length;de+=1)Y[de].c();ce=O(),be=b("div"),be.textContent="Path parameters",se=O(),Z=b("table"),Z.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
2022-07-12 23:11:50 +08:00
<td>ID of the record to update.</td></tr></tbody>`,Te=O(),ne=b("div"),ne.textContent="Body Parameters",_e=O(),fe=b("table"),ie=b("thead"),ie.innerHTML=`<tr><th>Param</th>
<th width="60%">Type</th>
2022-07-12 23:11:50 +08:00
<th width="50%">Description</th></tr>`,ye=O(),He=b("tbody");for(let de=0;de<Le.length;de+=1)Le[de].c();ae=O(),re=b("div"),re.textContent="Responses",ve=O(),qe=b("div"),Ve=b("div");for(let de=0;de<Je.length;de+=1)Je[de].c();Ae=O(),x=b("div");for(let de=0;de<ue.length;de+=1)ue[de].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(L,"class","section-title"),p(G,"class","tabs-header compact left"),p(J,"class","tabs-content"),p(j,"class","tabs m-b-lg"),p(be,"class","section-title"),p(Z,"class","table-compact table-border m-b-lg"),p(ne,"class","section-title"),p(fe,"class","table-compact table-border m-b-lg"),p(re,"class","section-title"),p(Ve,"class","tabs-header compact left"),p(x,"class","tabs-content"),p(qe,"class","tabs")},m(de,Se){w(de,e,Se),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),it&&it.m(e,null),w(de,h,Se),w(de,g,Se),m(g,y),m(y,_),m(y,v),m(v,S),m(y,$),m(g,M),m(g,T),m(g,A),m(g,D),w(de,P,Se),w(de,L,Se),w(de,R,Se),w(de,j,Se),m(j,G);for(let Ze=0;Ze<te.length;Ze+=1)te[Ze].m(G,null);m(j,K),m(j,J);for(let Ze=0;Ze<Y.length;Ze+=1)Y[Ze].m(J,null);w(de,ce,Se),w(de,be,Se),w(de,se,Se),w(de,Z,Se),w(de,Te,Se),w(de,ne,Se),w(de,_e,Se),w(de,fe,Se),m(fe,ie),m(fe,ye),m(fe,He);for(let Ze=0;Ze<Le.length;Ze+=1)Le[Ze].m(He,null);w(de,ae,Se),w(de,re,Se),w(de,ve,Se),w(de,qe,Se),m(qe,Ve);for(let Ze=0;Ze<Je.length;Ze+=1)Je[Ze].m(Ve,null);m(qe,Ae),m(qe,x);for(let Ze=0;Ze<ue.length;Ze+=1)ue[Ze].m(x,null);bt=!0},p(de,[Se]){var Ze;(!bt||Se&1)&&a!==(a=de[0].name+"")&&me(u,a),de[5]?it||(it=Kh(),it.c(),it.m(e,null)):it&&(it.d(1),it=null),(!bt||Se&1)&&C!==(C=de[0].name+"")&&me(S,C),Se&20&&(yt=de[4],te=rt(te,Se,ut,1,de,yt,H,G,fn,Jh,null,Yh)),Se&20&&(dt=de[4],Me(),Y=rt(Y,Se,Tt,1,de,dt,Q,J,Ft,Gh,null,Wh),Oe()),Se&1&&(Pt=(Ze=de[0])==null?void 0:Ze.schema,Le=rt(Le,Se,Jt,1,de,Pt,Re,He,fn,Zh,null,Uh)),Se&10&&(he=de[3],Je=rt(Je,Se,we,1,de,he,ge,Ve,fn,xh,null,Bh)),Se&10&&(Ge=de[3],Me(),ue=rt(ue,Se,et,1,de,Ge,Ue,x,Ft,Xh,null,zh),Oe())},i(de){if(!bt){for(let Se=0;Se<dt.length;Se+=1)E(Y[Se]);for(let Se=0;Se<Ge.length;Se+=1)E(ue[Se]);bt=!0}},o(de){for(let Se=0;Se<Y.length;Se+=1)F(Y[Se]);for(let Se=0;Se<ue.length;Se+=1)F(ue[Se]);bt=!1},d(de){de&&k(e),it&&it.d(),de&&k(h),de&&k(g),de&&k(P),de&&k(L),de&&k(R),de&&k(j);for(let Se=0;Se<te.length;Se+=1)te[Se].d();for(let Se=0;Se<Y.length;Se+=1)Y[Se].d();de&&k(ce),de&&k(be),de&&k(se),de&&k(Z),de&&k(Te),de&&k(ne),de&&k(_e),de&&k(fe);for(let Se=0;Se<Le.length;Se+=1)Le[Se].d();de&&k(ae),de&&k(re),de&&k(ve),de&&k(qe);for(let Se=0;Se<Je.length;Se+=1)Je[Se].d();for(let Se=0;Se<ue.length;Se+=1)ue[Se].d()}}}function KO(n,e,t){let i,{collection:s=new Fn}=e,l=200,r="JavaScript",o=[],a=[];const u=c=>t(2,r=c.lang),f=c=>t(1,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{var c,d;n.$$.dirty&1&&t(5,i=(s==null?void 0:s.updateRule)===null),n.$$.dirty&1&&t(3,o=[{code:200,body:JSON.stringify(W.dummyCollectionRecord(s),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to update record.",
"data": {
"${(d=(c=s==null?void 0:s.schema)==null?void 0:c[0])==null?void 0:d.name}": {
"code": "validation_required",
"message": "Missing required value."
}
}
}
`},{code:403,body:`
{
"code": 403,
"message": "You are not allowed to perform this request.",
"data": {}
}
`},{code:404,body:`
{
"code": 404,
"message": "The requested resource wasn't found.",
"data": {}
}
`}]),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
import PocketBase from 'pocketbase';
const client = new PocketBase("${ke.baseUrl}");
const data = { ... };
client.Records.update("${s==null?void 0:s.name}", "RECORD_ID", data)
.then(function (record) {
// success...
}).catch(function (error) {
// error...
});
2022-07-12 23:11:50 +08:00
`}])},[s,l,r,o,a,i,u,f]}class JO extends Pe{constructor(e){super(),Ee(this,e,KO,YO,De,{collection:0})}}function Qh(n,e,t){const i=n.slice();return i[8]=e[t],i}function em(n,e,t){const i=n.slice();return i[8]=e[t],i}function tm(n,e,t){const i=n.slice();return i[13]=e[t],i}function nm(n,e,t){const i=n.slice();return i[13]=e[t],i}function im(n){let e;return{c(){e=b("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sm(n,e){let t,i=e[13].lang+"",s,l,r,o;function a(){return e[6](e[13])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&16&&i!==(i=e[13].lang+"")&&me(s,i),f&24&&ee(t,"active",e[3]===e[13].lang)},d(u){u&&k(t),r=!1,o()}}}function lm(n,e){let t,i,s,l;return i=new sn({props:{content:e[13].code}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[3]===e[13].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&16&&(a.content=e[13].code),i.$set(a),o&24&&ee(t,"active",e[3]===e[13].lang)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function rm(n,e){let t,i=e[8].code+"",s,l,r,o;function a(){return e[7](e[8])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&36&&ee(t,"active",e[2]===e[8].code)},d(u){u&&k(t),r=!1,o()}}}function om(n,e){let t,i,s,l;return i=new sn({props:{content:e[8].body}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[2]===e[8].code),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r,o&36&&ee(t,"active",e[2]===e[8].code)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function GO(n){let e,t,i,s,l,r,o,a=n[0].name+"",u,f,c,d,h,g,y,_,v,C=n[0].name+"",S,$,M,T,A,D,P,L=[],R=new Map,j,G,te=[],H=new Map,K,J,Y,Q,ce,be,se,Z,Te,ne=[],_e=new Map,fe,ie,ye=[],He=new Map,Le,Re=n[1]&&im(),ae=n[4];const re=x=>x[13].lang;for(let x=0;x<ae.length;x+=1){let ue=nm(n,ae,x),Ue=re(ue);R.set(Ue,L[x]=sm(Ue,ue))}let ve=n[4];const qe=x=>x[13].lang;for(let x=0;x<ve.length;x+=1){let ue=tm(n,ve,x),Ue=qe(ue);H.set(Ue,te[x]=lm(Ue,ue))}let Ve=n[5];const Je=x=>x[8].code;for(let x=0;x<Ve.length;x+=1){let ue=em(n,Ve,x),Ue=Je(ue);_e.set(Ue,ne[x]=rm(Ue,ue))}let ge=n[5];const Ae=x=>x[8].code;for(let x=0;x<ge.length;x+=1){let ue=Qh(n,ge,x),Ue=Ae(ue);He.set(Ue,ye[x]=om(Ue,ue))}return{c(){e=b("div"),t=b("strong"),t.textContent="DELETE",i=O(),s=b("div"),l=b("p"),r=q("/api/collections/"),o=b("strong"),u=q(a),f=q("/records/"),c=b("strong"),c.textContent=":id",d=O(),Re&&Re.c(),h=O(),g=b("div"),y=b("p"),_=q("Delete a single "),v=b("strong"),S=q(C),$=q(" record."),M=O(),T=b("div"),T.textContent="Client SDKs example",A=O(),D=b("div"),P=b("div");for(let x=0;x<L.length;x+=1)L[x].c();j=O(),G=b("div");for(let x=0;x<te.length;x+=1)te[x].c();K=O(),J=b("div"),J.textContent="Path parameters",Y=O(),Q=b("table"),Q.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
2022-07-12 23:11:50 +08:00
<td>ID of the record to delete.</td></tr></tbody>`,ce=O(),be=b("div"),be.textContent="Responses",se=O(),Z=b("div"),Te=b("div");for(let x=0;x<ne.length;x+=1)ne[x].c();fe=O(),ie=b("div");for(let x=0;x<ye.length;x+=1)ye[x].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","tabs-header compact left"),p(G,"class","tabs-content"),p(D,"class","tabs m-b-lg"),p(J,"class","section-title"),p(Q,"class","table-compact table-border m-b-lg"),p(be,"class","section-title"),p(Te,"class","tabs-header compact left"),p(ie,"class","tabs-content"),p(Z,"class","tabs")},m(x,ue){w(x,e,ue),m(e,t),m(e,i),m(e,s),m(s,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(e,d),Re&&Re.m(e,null),w(x,h,ue),w(x,g,ue),m(g,y),m(y,_),m(y,v),m(v,S),m(y,$),w(x,M,ue),w(x,T,ue),w(x,A,ue),w(x,D,ue),m(D,P);for(let Ue=0;Ue<L.length;Ue+=1)L[Ue].m(P,null);m(D,j),m(D,G);for(let Ue=0;Ue<te.length;Ue+=1)te[Ue].m(G,null);w(x,K,ue),w(x,J,ue),w(x,Y,ue),w(x,Q,ue),w(x,ce,ue),w(x,be,ue),w(x,se,ue),w(x,Z,ue),m(Z,Te);for(let Ue=0;Ue<ne.length;Ue+=1)ne[Ue].m(Te,null);m(Z,fe),m(Z,ie);for(let Ue=0;Ue<ye.length;Ue+=1)ye[Ue].m(ie,null);Le=!0},p(x,[ue]){(!Le||ue&1)&&a!==(a=x[0].name+"")&&me(u,a),x[1]?Re||(Re=im(),Re.c(),Re.m(e,null)):Re&&(Re.d(1),Re=null),(!Le||ue&1)&&C!==(C=x[0].name+"")&&me(S,C),ue&24&&(ae=x[4],L=rt(L,ue,re,1,x,ae,R,P,fn,sm,null,nm)),ue&24&&(ve=x[4],Me(),te=rt(te,ue,qe,1,x,ve,H,G,Ft,lm,null,tm),Oe()),ue&36&&(Ve=x[5],ne=rt(ne,ue,Je,1,x,Ve,_e,Te,fn,rm,null,em)),ue&36&&(ge=x[5],Me(),ye=rt(ye,ue,Ae,1,x,ge,He,ie,Ft,om,null,Qh),Oe())},i(x){if(!Le){for(let ue=0;ue<ve.length;ue+=1)E(te[ue]);for(let ue=0;ue<ge.length;ue+=1)E(ye[ue]);Le=!0}},o(x){for(let ue=0;ue<te.length;ue+=1)F(te[ue]);for(let ue=0;ue<ye.length;ue+=1)F(ye[ue]);Le=!1},d(x){x&&k(e),Re&&Re.d(),x&&k(h),x&&k(g),x&&k(M),x&&k(T),x&&k(A),x&&k(D);for(let ue=0;ue<L.length;ue+=1)L[ue].d();for(let ue=0;ue<te.length;ue+=1)te[ue].d();x&&k(K),x&&k(J),x&&k(Y),x&&k(Q),x&&k(ce),x&&k(be),x&&k(se),x&&k(Z);for(let ue=0;ue<ne.length;ue+=1)ne[ue].d();for(let ue=0;ue<ye.length;ue+=1)ye[ue].d()}}}function ZO(n,e,t){let i,{collection:s=new Fn}=e,l=204,r="JavaScript",o=[],a=[];const u=c=>t(3,r=c.lang),f=c=>t(2,l=c.code);return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(s==null?void 0:s.deleteRule)===null),n.$$.dirty&3&&s!=null&&s.id&&(o.push({code:204,body:`
null
`}),o.push({code:400,body:`
{
"code": 400,
"message": "Failed to delete record. Make sure that the record is not part of a required relation reference.",
"data": {}
}
`}),i&&o.push({code:403,body:`
{
"code": 403,
"message": "Only admins can access this action.",
"data": {}
}
`}),o.push({code:404,body:`
{
"code": 404,
"message": "The requested resource wasn't found.",
"data": {}
}
`})),n.$$.dirty&1&&t(4,a=[{lang:"JavaScript",code:`
import PocketBase from 'pocketbase';
const client = new PocketBase("${ke.baseUrl}");
client.Records.delete("${s==null?void 0:s.name}", "RECORD_ID")
.then(function () {
// success...
}).catch(function (error) {
// error...
});
2022-07-12 23:11:50 +08:00
`}])},[s,i,l,r,a,o,u,f]}class xO extends Pe{constructor(e){super(),Ee(this,e,ZO,GO,De,{collection:0})}}function am(n,e,t){const i=n.slice();return i[4]=e[t],i}function um(n,e,t){const i=n.slice();return i[4]=e[t],i}function fm(n,e){let t,i=e[4].lang+"",s,l,r,o;function a(){return e[3](e[4])}return{key:n,first:null,c(){t=b("button"),s=q(i),l=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[4].lang),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),r||(o=X(t,"click",a),r=!0)},p(u,f){e=u,f&4&&i!==(i=e[4].lang+"")&&me(s,i),f&6&&ee(t,"active",e[1]===e[4].lang)},d(u){u&&k(t),r=!1,o()}}}function cm(n,e){let t,i,s,l;return i=new sn({props:{content:e[4].code}}),{key:n,first:null,c(){t=b("div"),B(i.$$.fragment),s=O(),p(t,"class","tab-item"),ee(t,"active",e[1]===e[4].lang),this.first=t},m(r,o){w(r,t,o),V(i,t,null),m(t,s),l=!0},p(r,o){e=r;const a={};o&4&&(a.content=e[4].code),i.$set(a),o&6&&ee(t,"active",e[1]===e[4].lang)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){F(i.$$.fragment,r),l=!1},d(r){r&&k(t),z(i)}}}function XO(n){let e,t,i,s,l,r,o,a,u=[],f=new Map,c,d,h=[],g=new Map,y,_,v,C,S,$=n[2];const M=D=>D[4].lang;for(let D=0;D<$.length;D+=1){let P=um(n,$,D),L=M(P);f.set(L,u[D]=fm(L,P))}let T=n[2];const A=D=>D[4].lang;for(let D=0;D<T.length;D+=1){let P=am(n,T,D),L=A(P);g.set(L,h[D]=cm(L,P))}return C=new sn({props:{content:JSON.stringify({action:"create",record:W.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=b("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong>
<div class="content"><p>/api/realtime</p></div>`,t=O(),i=b("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
<p>Events are send for <strong>create</strong>, <strong>update</strong>
and <strong>delete</strong> record operations (see &quot;Event data format&quot; section below).</p>
<div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div>
<div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p>
<p>When you subscribe to a <strong>single record</strong>, the collection&#39;s
<strong>ViewRule</strong> will be used to determine whether the subscriber has access to receive
the event message.</p>
<p>When you subscribe to an <strong>entire collection</strong>, the collection&#39;s
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
2022-07-12 23:11:50 +08:00
the event message.</p></div></div>`,s=O(),l=b("div"),l.textContent="Client SDKs example",r=O(),o=b("div"),a=b("div");for(let D=0;D<u.length;D+=1)u[D].c();c=O(),d=b("div");for(let D=0;D<h.length;D+=1)h[D].c();y=O(),_=b("div"),_.textContent="Event data format",v=O(),B(C.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(a,"class","tabs-header compact left"),p(d,"class","tabs-content"),p(o,"class","tabs m-b-base"),p(_,"class","section-title")},m(D,P){w(D,e,P),w(D,t,P),w(D,i,P),w(D,s,P),w(D,l,P),w(D,r,P),w(D,o,P),m(o,a);for(let L=0;L<u.length;L+=1)u[L].m(a,null);m(o,c),m(o,d);for(let L=0;L<h.length;L+=1)h[L].m(d,null);w(D,y,P),w(D,_,P),w(D,v,P),V(C,D,P),S=!0},p(D,[P]){P&6&&($=D[2],u=rt(u,P,M,1,D,$,f,a,fn,fm,null,um)),P&6&&(T=D[2],Me(),h=rt(h,P,A,1,D,T,g,d,Ft,cm,null,am),Oe());const L={};P&1&&(L.content=JSON.stringify({action:"create",record:W.dummyCollectionRecord(D[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),C.$set(L)},i(D){if(!S){for(let P=0;P<T.length;P+=1)E(h[P]);E(C.$$.fragment,D),S=!0}},o(D){for(let P=0;P<h.length;P+=1)F(h[P]);F(C.$$.fragment,D),S=!1},d(D){D&&k(e),D&&k(t),D&&k(i),D&&k(s),D&&k(l),D&&k(r),D&&k(o);for(let P=0;P<u.length;P+=1)u[P].d();for(let P=0;P<h.length;P+=1)h[P].d();D&&k(y),D&&k(_),D&&k(v),z(C,D)}}}function QO(n,e,t){let{collection:i=new Fn}=e,s="JavaScript",l=[];const r=o=>t(1,s=o.lang);return n.$$set=o=>{"collection"in o&&t(0,i=o.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=[{lang:"JavaScript",code:`
import PocketBase from 'pocketbase';
const client = new PocketBase("${ke.baseUrl}");
// (Optionally) authenticate
client.Users.authViaEmail("test@example.com", "123456");
// Subscribe to changes in any record from the collection
client.Realtime.subscribe("${i==null?void 0:i.name}", function (e) {
console.log(e.record);
});
// Subscribe to changes in a single record
client.Realtime.subscribe("${i==null?void 0:i.name}/RECORD_ID", function (e) {
console.log(e.record);
});
// Unsubscribe
client.Realtime.unsubscribe() // remove all subscriptions
client.Realtime.unsubscribe("${i==null?void 0:i.name}") // remove the collection subscription
client.Realtime.unsubscribe("${i==null?void 0:i.name}/RECORD_ID") // remove the record subscription
2022-07-12 23:11:50 +08:00
`}])},[i,s,l,r]}class eT extends Pe{constructor(e){super(),Ee(this,e,QO,XO,De,{collection:0})}}function dm(n,e,t){const i=n.slice();return i[14]=e[t],i}function pm(n,e,t){const i=n.slice();return i[14]=e[t],i}function hm(n){let e,t,i,s;var l=n[14].component;function r(o){return{props:{collection:o[3]}}}return l&&(t=new l(r(n))),{c(){e=b("div"),t&&B(t.$$.fragment),i=O(),p(e,"class","tab-item active")},m(o,a){w(o,e,a),t&&V(t,e,null),m(e,i),s=!0},p(o,a){const u={};if(a&8&&(u.collection=o[3]),l!==(l=o[14].component)){if(t){Me();const f=t;F(f.$$.fragment,1,0,()=>{z(f,1)}),Oe()}l?(t=new l(r(o)),B(t.$$.fragment),E(t.$$.fragment,1),V(t,e,i)):t=null}else l&&t.$set(u)},i(o){s||(t&&E(t.$$.fragment,o),s=!0)},o(o){t&&F(t.$$.fragment,o),s=!1},d(o){o&&k(e),t&&z(t)}}}function mm(n,e){let t,i,s,l=e[4]===e[14].id&&hm(e);return{key:n,first:null,c(){t=st(),l&&l.c(),i=st(),this.first=t},m(r,o){w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){e=r,e[4]===e[14].id?l?(l.p(e,o),o&16&&E(l,1)):(l=hm(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){s||(E(l),s=!0)},o(r){F(l),s=!1},d(r){r&&k(t),l&&l.d(r),r&&k(i)}}}function tT(n){let e,t=[],i=new Map,s,l=n[5];const r=o=>o[14].id;for(let o=0;o<l.length;o+=1){let a=dm(n,l,o),u=r(a);i.set(u,t[o]=mm(u,a))}return{c(){e=b("div");for(let o=0;o<t.length;o+=1)t[o].c();p(e,"class","tabs-content")},m(o,a){w(o,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(o,a){a&56&&(l=o[5],Me(),t=rt(t,a,r,1,o,l,i,e,Ft,mm,null,dm),Oe())},i(o){if(!s){for(let a=0;a<l.length;a+=1)E(t[a]);s=!0}},o(o){for(let a=0;a<t.length;a+=1)F(t[a]);s=!1},d(o){o&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function gm(n,e){let t,i,s=e[14].label+"",l,r,o,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=b("button"),i=b("span"),l=q(s),r=O(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),ee(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),m(t,i),m(i,l),m(t,r),o||(a=[X(t,"click",u),X(t,"keydown",Kg(f))],o=!0)},p(c,d){e=c,d&48&&ee(t,"active",e[4]===e[14].id)},d(c){c&&k(t),o=!1,lt(a)}}}function nT(n){let e,t,i=n[3].name+"",s,l,r,o,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let h=pm(n,f,d),g=c(h);u.set(g,a[d]=gm(g,h))}return{c(){e=b("h4"),t=b("strong"),s=q(i),l=q(" records API"),r=O(),o=b("div");for(let d=0;d<a.length;d+=1)a[d].c();p(o,"class","tabs-header stretched")},m(d,h){w(d,e,h),m(e,t),m(t,s),m(e,l),w(d,r,h),w(d,o,h);for(let g=0;g<a.length;g+=1)a[g].m(o,null)},p(d,h){h&8&&i!==(i=d[3].name+"")&&me(s,i),h&114&&(f=d[5],a=rt(a,h,c,1,d,f,u,o,fn,gm,null,pm))},d(d){d&&k(e),d&&k(r),d&&k(o);for(let h=0;h<a.length;h+=1)a[h].d()}}}function iT(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[8]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function sT(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[iT],header:[nT],default:[tT]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const r={};l&524312&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function lT(n,e,t){const i=[{id:"list",label:"List",component:yO},{id:"view",label:"View",component:wO},{id:"create",label:"Create",component:IO},{id:"update",label:"Update",component:JO},{id:"delete",label:"Delete",component:xO},{id:"realtime",label:"Realtime",component:eT}];let s,l=new Fn,r=i[0].id;function o(v){return t(3,l=v),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(v){t(4,r=v)}function f(v,C){(v.code==="Enter"||v.code==="Space")&&(v.preventDefault(),u(C))}const c=()=>a(),d=v=>u(v.id),h=(v,C)=>f(C,v.id);function g(v){pe[v?"unshift":"push"](()=>{s=v,t(2,s)})}function y(v){ft.call(this,n,v)}function _(v){ft.call(this,n,v)}return[a,u,s,l,r,i,f,o,c,d,h,g,y,_]}class rT extends Pe{constructor
<span class="txt">Upload new file</span>`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(o,a){w(o,e,a),m(e,t),n[18](t),m(e,i),m(e,s),l||(r=[X(t,"change",n[19]),X(s,"click",n[20])],l=!0)},p(o,a){a&32&&(t.multiple=o[5])},d(o){o&&k(e),n[18](null),l=!1,lt(r)}}}function sD(n){let e,t,i,s,l,r=n[3].name+"",o,a,u,f,c=[],d=new Map,h,g,y,_=n[4];const v=T=>T[28];for(let T=0;T<_.length;T+=1){let A=ym(n,_,T),D=v(A);d.set(D,c[T]=vm(D,A))}let C=n[0],S=[];for(let T=0;T<C.length;T+=1)S[T]=km(bm(n,C,T));const $=T=>F(S[T],1,1,()=>{S[T]=null});let M=!n[9]&&wm(n);return{c(){e=b("label"),t=b("i"),s=O(),l=b("span"),o=q(r),u=O(),f=b("div");for(let T=0;T<c.length;T+=1)c[T].c();h=O();for(let T=0;T<S.length;T+=1)S[T].c();g=O(),M&&M.c(),p(t,"class",i=W.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[24]),p(f,"class","files-list")},m(T,A){w(T,e,A),m(e,t),m(e,s),m(e,l),m(l,o),w(T,u,A),w(T,f,A);for(let D=0;D<c.length;D+=1)c[D].m(f,null);m(f,h);for(let D=0;D<S.length;D+=1)S[D].m(f,null);m(f,g),M&&M.m(f,null),n[21](f),y=!0},p(T,A){if((!y||A&8&&i!==(i=W.getFieldTypeIcon(T[3].type)))&&p(t,"class",i),(!y||A&8)&&r!==(r=T[3].name+"")&&me(o,r),(!y||A&16777216&&a!==(a=T[24]))&&p(e,"for",a),A&3222&&(_=T[4],Me(),c=rt(c,A,v,1,T,_,d,f,Ft,vm,h,ym),Oe()),A&4097){C=T[0];let D;for(D=0;D<C.length;D+=1){const P=bm(T,C,D);S[D]?(S[D].p(P,A),E(S[D],1)):(S[D]=km(P),S[D].c(),E(S[D],1),S[D].m(f,g))}for(Me(),D=C.length;D<S.length;D+=1)$(D);Oe()}T[9]?M&&(M.d(1),M=null):M?M.p(T,A):(M=wm(T),M.c(),M.m(f,null))},i(T){if(!y){for(let A=0;A<_.length;A+=1)E(c[A]);for(let A=0;A<C.length;A+=1)E(S[A]);y=!0}},o(T){for(let A=0;A<c.length;A+=1)F(c[A]);S=S.filter(Boolean);for(let A=0;A<S.length;A+=1)F(S[A]);y=!1},d(T){T&&k(e),T&&k(u),T&&k(f);for(let A=0;A<c.length;A+=1)c[A].d();Bn(S,T),M&&M.d(),n[21](null)}}}function lD(n){let e,t,i,s;e=new Fe({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[sD,({uniqueId:r})=>({24:r}),({uniqueId:r})=>r?16777216:0]},$$scope:{ctx:n}}});let l={};return i=new xT({props:l}),n[22](i),{c(){B(e.$$.fragment),t=O(),B(i.$$.fragment)},m(r,o){V(e,r,o),w(r,t,o),V(i,r,o),s=!0},p(r,[o]){const a={};o&8&&(a.class="form-field form-field-file "+(r[3].required?"required":"")),o&8&&(a.name=r[3].name),o&1090520063&&(a.$$scope={dirty:o,ctx:r}),e.$set(a);const u={};i.$set(u)},i(r){s||(E(e.$$.fragment,r),E(i.$$.fragment,r),s=!0)},o(r){F(e.$$.fragment,r),F(i.$$.fragment,r),s=!1},d(r){z(e,r),r&&k(t),n[22](null),z(i,r)}}}function rD(n,e,t){let i,s,l,{record:r}=e,{value:o=null}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new wn}=e,c,d,h;function g(R){W.removeByValue(u,R),t(1,u)}function y(R){W.pushUnique(u,R),t(1,u)}function _(R){W.isEmpty(a[R])||a.splice(R,1),t(0,a)}function v(){h==null||h.dispatchEvent(new CustomEvent("change",{detail:{value:o,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const C=R=>W.hasImageExtension(R)?d==null?void 0:d.show(ke.Records.getFileUrl(r,R)):!1,S=R=>g(R),$=R=>y(R),M=R=>_(R);function T(R){pe[R?"unshift":"push"](()=>{c=R,t(6,c)})}const A=()=>{for(let R of c.files)a.push(R);t(0,a),t(6,c.value=null,c)},D=()=>c==null?void 0:c.click();function P(R){pe[R?"unshift":"push"](()=>{h=R,t(8,h)})}function L(R){pe[R?"unshift":"push"](()=>{d=R,t(7,d)})}return n.$$set=R=>{"record"in R&&t(2,r=R.record),"value"in R&&t(13,o=R.value),"uploadedFiles"in R&&t(0,a=R.uploadedFiles),"deletedFileIndexes"in R&&t(1,u=R.deletedFileIndexes),"field"in R&&t(3,f=R.field)},n.$$.update=()=>{var R,j;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=W.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=W.toArray(u))),n.$$.dirty&8&&t(5,i=((R=f.options)==null?void 0:R.maxSelect)>1),n.$$.dirty&8224&&(typeof o=="undefined"||o===null)&&t(13,o=i?[]:null),n.$$.dirty&8192&&t(4,s=W.toArray(o)),n.$$.dirty&27&&t(9,l=(s.length||a.length)&&((j=f.options)==null?void 0:j.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&v()},[a,u,r,f,s,i,c,d,h,l,g,y,_,o,C,S,$,M,T
`,p(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function AD(n){let e,t,i;function s(r){n[31](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new TD({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ED(n){let e,t,i;function s(r){n[30](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new bD({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function PD(n){let e,t,i,s,l;function r(f){n[27](f,n[40])}function o(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new oD({props:u}),pe.push(()=>Ie(e,"value",r)),pe.push(()=>Ie(e,"uploadedFiles",o)),pe.push(()=>Ie(e,"deletedFileIndexes",a)),{c(){B(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],je(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],je(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],je(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){F(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function LD(n){let e,t,i;function s(r){n[26](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new VT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function FD(n){let e,t,i;function s(r){n[25](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new RT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ID(n){let e,t,i;function s(r){n[24](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new LT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ND(n){let e,t,i;function s(r){n[23](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new DT({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function RD(n){let e,t,i;function s(r){n[22](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new $T({props:l}),pe.push(()=>Ie(e,"value",s)),{c(){B(e.$$.fragment)},m(r,o){V(e,r,o),i=!0},p(r,o){n=r;const a={};o[0]&1&&(a.field=n[40]),!t&&o[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){F(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function jD(n){let e,t,i;function s(r){n[21](r,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new kT({props:l}),pe.push(()=>Ie(e,"value",
<span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[18]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function BD(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",r,o,a,u,f,c=!n[2].isNew&&n[9]&&Pm(n);return{c(){e=b("h4"),i=q(t),s=O(),r=q(l),o=q(" record"),a=O(),c&&c.c(),u=st()},m(d,h){w(d,e,h),m(e,i),m(e,s),m(e,r),m(e,o),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&me(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&me(r,l),!d[2].isNew&&d[9]?c?(c.p(d,h),h[0]&516&&E(c,1)):(c=Pm(d),c.c(),E(c,1),c.m(u.parentNode,u)):c&&(Me(),F(c,1,1,()=>{c=null}),Oe())},i(d){f||(E(c),f=!0)},o(d){F(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function UD(n){let e,t,i,s,l,r=n[2].isNew?"Create":"Save changes",o,a,u,f;return{c(){e=b("button"),t=b("span"),t.textContent="Cancel",i=O(),s=b("button"),l=b("span"),o=q(r),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[11]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ee(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,o),u||(f=X(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&r!==(r=c[2].isNew?"Create":"Save changes")&&me(o,r),d[0]&1152&&a!==(a=!c[10]||c[7])&&(s.disabled=a),d[0]&128&&ee(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function WD(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[UD],header:[BD],default:[VD]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&288&&(r.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[33](null),z(e,s)}}}function Lm(n){return JSON.stringify(n)}function YD(n,e,t){let i,s,l,r;const o=_n(),a="record_"+W.randomString(5);let{collection:u}=e,f,c=null,d=new no,h=!1,g=!1,y={},_={},v="";function C(fe){return $(fe),t(8,g=!0),f==null?void 0:f.show()}function S(){return f==null?void 0:f.hide()}function $(fe){Ki({}),c=fe||{},t(2,d=fe!=null&&fe.clone?fe.clone():new no),t(3,y={}),t(4,_={}),t(15,v=Lm(d))}function M(){if(h||!s)return;t(7,h=!0);const fe=A();let ie;d.isNew?ie=ke.Records.create(u==null?void 0:u.id,fe):ie=ke.Records.update(u==null?void 0:u.id,d.id,fe),ie.then(async ye=>{mn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),S(),o("save",ye)}).catch(ye=>{ke.errorResponseHandler(ye)}).finally(()=>{t(7,h=!1)})}function T(){!(c!=null&&c.id)||Mi("Do you really want to delete the selected record?",()=>ke.Records.delete(c["@collectionId"],c.id).then(()=>{S(),mn("Successfully deleted record."),o("delete",c)}).catch(fe=>{ke.errorResponseHandler(fe)}))}function A(){const fe=(d==null?void 0:d.export())||{},ie=new FormData,ye={};for(const He of(u==null?void 0:u.schema)||[])ye[He.name]=He;for(const He in fe)!ye[He]||(typeof fe[He]=="undefined"&&(fe[He]=null),W.addValueToFormData(ie,He,fe[He]));for(const He in y){const Le=W.toArray(y[He]);for(const Re of Le)ie.append(He,Re)}for(const He in _){const Le=W.toArray(_[He]);for(const Re of Le)ie.append(He+"."+Re,"")}return ie}const D=()=>S(),P=()=>T();function L(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function R(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function j(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function G(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function te(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function H(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function K(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function J(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function Y(fe,ie){n.$$.not_equal(d[ie.name],fe)&&(d[ie.name]=fe,t(2,d))}function Q(fe,ie){n.$$.not_equal(y[ie.name],fe)&&(y[ie.name]=fe,t(3,
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function Wm(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[28]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Ym(n,e){let t,i,s;return i=new Vb({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r[0]&8&&(o.record=e[35]),r[0]&2048&&(o.field=e[38]),i.$set(o)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Km(n,e){let t,i,s,l,r,o,a,u,f,c,d,h,g,y=[],_=new Map,v,C,S,$,M,T,A,D,P,L,R,j;function G(){return e[25](e[35])}h=new jo({props:{id:e[35].id}});let te=e[11];const H=Y=>Y[38].name;for(let Y=0;Y<te.length;Y+=1){let Q=Vm(e,te,Y),ce=H(Q);_.set(ce,y[Y]=Ym(ce,Q))}S=new $i({props:{date:e[35].created}}),T=new $i({props:{date:e[35].updated}});function K(){return e[26](e[35])}function J(...Y){return e[27](e[35],...Y)}return{key:n,first:null,c(){t=b("tr"),i=b("td"),s=b("div"),l=b("input"),a=O(),u=b("label"),c=O(),d=b("td"),B(h.$$.fragment),g=O();for(let Y=0;Y<y.length;Y+=1)y[Y].c();v=O(),C=b("td"),B(S.$$.fragment),$=O(),M=b("td"),B(T.$$.fragment),A=O(),D=b("td"),D.innerHTML='<i class="ri-arrow-right-line"></i>',P=O(),p(l,"type","checkbox"),p(l,"id",r="checkbox_"+e[35].id),l.checked=o=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p(C,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(D,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,Q){w(Y,t,Q),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),V(h,d,null),m(t,g);for(let ce=0;ce<y.length;ce+=1)y[ce].m(t,null);m(t,v),m(t,C),V(S,C,null),m(t,$),m(t,M),V(T,M,null),m(t,A),m(t,D),m(t,P),L=!0,R||(j=[X(l,"change",G),X(s,"click",Un(e[19])),X(t,"click",K),X(t,"keydown",J)],R=!0)},p(Y,Q){e=Y,(!L||Q[0]&8&&r!==(r="checkbox_"+e[35].id))&&p(l,"id",r),(!L||Q[0]&40&&o!==(o=e[5][e[35].id]))&&(l.checked=o),(!L||Q[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const ce={};Q[0]&8&&(ce.id=e[35].id),h.$set(ce),Q[0]&2056&&(te=e[11],Me(),y=rt(y,Q,H,1,e,te,_,t,Ft,Ym,v,Vm),Oe());const be={};Q[0]&8&&(be.date=e[35].created),S.$set(be);const se={};Q[0]&8&&(se.date=e[35].updated),T.$set(se)},i(Y){if(!L){E(h.$$.fragment,Y);for(let Q=0;Q<te.length;Q+=1)E(y[Q]);E(S.$$.fragment,Y),E(T.$$.fragment,Y),L=!0}},o(Y){F(h.$$.fragment,Y);for(let Q=0;Q<y.length;Q+=1)F(y[Q]);F(S.$$.fragment,Y),F(T.$$.fragment,Y),L=!1},d(Y){Y&&k(t),z(h);for(let Q=0;Q<y.length;Q+=1)y[Q].d();z(S),z(T),R=!1,lt(j)}}}function Jm(n){let e,t,i=n[3].length+"",s,l,r;return{c(){e=b("small"),t=q("Showing "),s=q(i),l=q(" of "),r=q(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a[0]&8&&i!==(i=o[3].length+"")&&me(s,i),a[0]&16&&me(r,o[4])},d(o){o&&k(e)}}}function Gm(n){let e,t,i,s,l=n[4]-n[3].length+"",r,o,a,u;return{c(){e=b("div"),t=b("button"),i=b("span"),s=q("Load more ("),r=q(l),o=q(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[8]),ee(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&me(r,l),c[0]&256&&ee(t,"btn-loading",f[8]),c[0]&256&&ee(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Zm(n){let e,t,i,s,l,r,o=n[6]===1?"record":"records",a,u,f,c,d,h,g,y,_,v,C;return{c(){e=b("div"),t=b("div"),i=q("Selected "),s=b("strong"),l=q(n[6]),r=O(),a=q(o),u=O(),f=b("button"),f.innerHTML='<span class="txt">Reset</span>',c=O(),d=b("div"),h=O(),g=b("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ee(f,"btn-disabled",n[9]),p(d
<span class="txt">API Preview</span>`,C=O(),S=b("button"),S.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New record</span>`,$=O(),B(M.$$.fragment),T=O(),B(A.$$.fragment),p(r,"class","breadcrumb-item"),p(a,"class","breadcrumb-item"),p(l,"class","breadcrumbs"),p(d,"type","button"),p(d,"class","btn btn-secondary btn-circle"),p(g,"type","button"),p(g,"class","btn btn-secondary btn-circle"),p(v,"type","button"),p(v,"class","btn btn-outline"),p(S,"type","button"),p(S,"class","btn btn-expanded"),p(_,"class","btns-group"),p(s,"class","page-header"),p(i,"class","page-wrapper")},m(K,J){V(e,K,J),w(K,t,J),w(K,i,J),m(i,s),m(s,l),m(l,r),m(l,o),m(l,a),m(a,f),m(s,c),m(s,d),m(s,h),m(s,g),m(s,y),m(s,_),m(_,v),m(_,C),m(_,S),m(i,$),V(M,i,null),m(i,T),V(A,i,null),L=!0,R||(j=[Xe(wt.call(null,d,{text:"Edit collection",position:"right"})),X(d,"click",n[12]),Xe(wt.call(null,g,{text:"Refresh collection",position:"right"})),X(g,"click",n[13]),X(v,"click",n[14]),X(S,"click",n[15])],R=!0)},p(K,J){(!L||J&4)&&u!==(u=K[2].name+"")&&me(f,u);const Y={};J&1&&(Y.value=K[0]),J&4&&(Y.autocompleteCollection=K[2]),M.$set(Y);const Q={};J&4&&(Q.collection=K[2]),!D&&J&1&&(D=!0,Q.filter=K[0],je(()=>D=!1)),!P&&J&2&&(P=!0,Q.sort=K[1],je(()=>P=!1)),A.$set(Q)},i(K){L||(E(e.$$.fragment,K),E(M.$$.fragment,K),E(A.$$.fragment,K),L=!0)},o(K){F(e.$$.fragment,K),F(M.$$.fragment,K),F(A.$$.fragment,K),L=!1},d(K){z(e,K),K&&k(t),K&&k(i),z(M),n[17](null),z(A),R=!1,lt(j)}}}function bA(n){let e,t,i,s,l,r,o,a;return{c(){e=b("div"),t=b("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=O(),s=b("h1"),s.textContent="Create your first collection to add records!",l=O(),r=b("button"),r.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">Create new collection</span>`,p(t,"class","icon"),p(s,"class","m-b-10"),p(r,"type","button"),p(r,"class","btn btn-expanded-lg btn-lg"),p(e,"class","placeholder-section m-b-base")},m(u,f){w(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,r),o||(a=X(r,"click",n[11]),o=!0)},p:oe,i:oe,o:oe,d(u){u&&k(e),o=!1,a()}}}function yA(n){let e;return{c(){e=b("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function vA(n){let e,t,i,s,l,r,o,a,u;const f=[yA,bA,_A],c=[];function d(_,v){return _[8]?0:_[7].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new gf({props:h}),n[21](s);let g={};r=new rT({props:g}),n[22](r);let y={collection:n[2]};return a=new qb({props:y}),n[23](a),a.$on("save",n[24]),a.$on("delete",n[25]),{c(){t.c(),i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment)},m(_,v){c[e].m(_,v),w(_,i,v),V(s,_,v),w(_,l,v),V(r,_,v),w(_,o,v),V(a,_,v),u=!0},p(_,[v]){let C=e;e=d(_),e===C?c[e].p(_,v):(Me(),F(c[C],1,1,()=>{c[C]=null}),Oe(),t=c[e],t?t.p(_,v):(t=c[e]=f[e](_),t.c()),E(t,1),t.m(i.parentNode,i));const S={};s.$set(S);const $={};r.$set($);const M={};v&4&&(M.collection=_[2]),a.$set(M)},i(_){u||(E(t),E(s.$$.fragment,_),E(r.$$.fragment,_),E(a.$$.fragment,_),u=!0)},o(_){F(t),F(s.$$.fragment,_),F(r.$$.fragment,_),F(a.$$.fragment,_),u=!1},d(_){c[e].d(_),_&&k(i),n[21](null),z(s,_),_&&k(l),n[22](null),z(r,_),_&&k(o),n[23](null),z(a,_)}}}function kA(n,e,t){var te;let i,s,l,r;hn(n,fi,H=>t(2,s=H)),hn(n,Gs,H=>t(10,l=H)),hn(n,mu,H=>t(8,r=H));const o=W.getQueryParams((te=window.location)==null?void 0:te.href);let a,u,f,c,d=o.filter||"",h=o.sort||"-created",g=o.collectionId;W.setDocumentTitle("Collections"),N$(g);const y=()=>a==null?void 0:a.show(),_=()=>a==null?void 0:a.show(s),v=()=>c==null?void 0:c.load(),C=()=>u==null?void 0:u.show(s),S=()=>f==null?void 0:f.show(),$=H=>t(0,d=H.detail);function M(H){pe[H?"unshift":"push"](()=>{c=H,t(6,c)})}function T(H){d=H,t(0,d),t(2,s),t(9,g)}function A(H){h=H,t(1,h),t(2,s),t(9,g)}const D=H=>f==null?void 0:f.show(H==null?void 0:H.detail);function P(H){pe[H?"unshift":"push"](()=>{a=H,t(3,a)})}function L(H){pe[H?"unshift":"push"](()=>{u=H,t(4,u)})}function R(H){pe[H?"unshift":"push"](()=>{f=H,t(5,f)})}const j=()=>c==null?void 0:c.load(),G=()=>c==null?void 0:c.load();return n.$$.update=()=>{n.$$.dirty&1024&&t(7,i=l.filter(H=>H.name!="profiles")),n.$$.dirty&516&&(s==null?void 0:s.id)&&g!=s.id&&(t(9,g=s.id),t(1,h="-created"),t(0,d="")),n.$$.dirty&7&&(h||d||(s==null?void 0:s.id))&&W.replaceClientQueryParams({collectionId:s==null?void 0:s.id,filter:d,sort:h})},[d,h,s,a,u,f,c,i,r,g,l,y,_,v,C,S,$,M,T,A,D,P,L,R,j,G]}class wA extends Pe{constructor(e){super(),Ee(this,e,kA,vA,De,{})}}function xm(n){let e,t;return e=new Fe({props:{class:"form-field disabled",name:"id",$$slots:{default:[SA,({uniqueId:i})=>({31:i}),({uniqueId:i})=>[0,i?1:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&2|s[1]&3&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function SA(n){let e,t,i,s,l,r,o,a,u;return{c(){e=b("label"),t=b("i"),i=O(),s=b("span"),s.textContent="ID",r=O(),o=b("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[31]),p(o,"type","text"),p(o,"id",a=n[31]),o.value=u=n[1].id,o.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,r,c),w(f,o,c)},p(f,c){c[1]&1&&l!==(l=f[31])&&p(e,"for",l),c[1]&1&&a!==(a=f[31])&&p(o,"id",a),c[0]&2&&u!==(u=f[1].id)&&o.value!==u&&(o.value=u)},d(f){f&&k(e),f&&k(r),f&&k(o)}}}function Xm(n){let e,t,i,s;return{c(){e=b("div"),e.innerHTML='<i class="ri-shield-check-line"></i>',p(e,"class","form-field-addon txt-success")},m(l,r){w(l,e,r),i||(s=Xe(t=wt.call(null,e,"Verified")),i=!0)},d(l){l&&k(e),i=!1,s()}}}function CA(n){let e,t,i,s,l,r,o,a,u,f,c,d=n[1].verified&&Xm();return{c(){e=b("label"),t=b("i"),i=O(),s=b("span"),s.textContent="Email",r=O(),d&&d.c(),o=O(),a=b("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[31]),p(a,"type","email"),p(a,"autocomplete","off"),p(a,"id",u=n[31]),a.required=!0},m(h,g){w(h,e,g),m(e,t),m(e,i),m(e,s),w(h,r,g),d&&d.m(h,g),w(h,o,g),w(h,a,g),Ce(a,n[2]),f||(c=X(a,"input",n[19]),f=!0)},p(h,g){g[1]&1&&l!==(l=h[31])&&p(e,"for",l),h[1].verified?d||(d=Xm(),d.c(),d.m(o.parentNode,o)):d&&(d.d(1),d=null),g[1]&1&&u!==(u=h[31])&&p(a,"id",u),g[0]&4&&a.value!==h[2
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[16]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function EA(n){let e,t,i,s,l=!n[1].verified&&ig(n);return{c(){l&&l.c(),e=O(),t=b("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i>
<span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(r,o){l&&l.m(r,o),w(r,e,o),w(r,t,o),i||(s=X(t,"click",n[17]),i=!0)},p(r,o){r[1].verified?l&&(l.d(1),l=null):l?l.p(r,o):(l=ig(r),l.c(),l.m(e.parentNode,e))},d(r){l&&l.d(r),r&&k(e),r&&k(t),i=!1,s()}}}function PA(n){let e,t,i,s,l,r,o=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&ng(n);return{c(){h&&h.c(),e=O(),t=b("button"),i=b("span"),i.textContent="Cancel",s=O(),l=b("button"),r=b("span"),a=q(o),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[5],p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[5],ee(l,"btn-loading",n[5])},m(g,y){h&&h.m(g,y),w(g,e,y),w(g,t,y),m(t,i),w(g,s,y),w(g,l,y),m(l,r),m(r,a),f=!0,c||(d=X(t,"click",n[18]),c=!0)},p(g,y){g[1].isNew?h&&(Me(),F(h,1,1,()=>{h=null}),Oe()):h?(h.p(g,y),y[0]&2&&E(h,1)):(h=ng(g),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||y[0]&32)&&(t.disabled=g[5]),(!f||y[0]&2)&&o!==(o=g[1].isNew?"Create":"Save changes")&&me(a,o),(!f||y[0]&1056&&u!==(u=!g[10]||g[5]))&&(l.disabled=u),y[0]&32&&ee(l,"btn-loading",g[5])},i(g){f||(E(h),f=!0)},o(g){F(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function LA(n){let e,t,i={popup:!0,class:"user-panel",beforeHide:n[24],$$slots:{footer:[PA],header:[AA],default:[DA]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[25](e),e.$on("hide",n[26]),e.$on("show",n[27]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&1088&&(r.beforeHide=s[24]),l[0]&1966|l[1]&2&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[25](null),z(e,s)}}}function FA(n,e,t){let i;const s=_n(),l="user_"+W.randomString(5);let r,o=new io,a=!1,u=!1,f="",c="",d="",h=!1,g=!0;function y(Y){return v(Y),t(6,u=!0),r==null?void 0:r.show()}function _(){return r==null?void 0:r.hide()}function v(Y){Ki({}),t(1,o=Y!=null&&Y.clone?Y.clone():new io),C()}function C(){t(3,h=!1),t(9,g=!0),t(2,f=(o==null?void 0:o.email)||""),t(7,c=""),t(8,d="")}function S(){if(a||!i)return;t(5,a=!0);const Y={email:f};(o.isNew||h)&&(Y.password=c,Y.passwordConfirm=d);let Q;o.isNew?Q=ke.Users.create(Y):Q=ke.Users.update(o.id,Y),Q.then(async ce=>{g&&M(!1),t(6,u=!1),_(),mn(o.isNew?"Successfully created user.":"Successfully updated user."),s("save",ce)}).catch(ce=>{ke.errorResponseHandler(ce)}).finally(()=>{t(5,a=!1)})}function $(){!(o!=null&&o.id)||Mi("Do you really want to delete the selected user?",()=>ke.Users.delete(o.id).then(()=>{t(6,u=!1),_(),mn("Successfully deleted user."),s("delete",o)}).catch(Y=>{ke.errorResponseHandler(Y)}))}function M(Y=!0){return ke.Users.requestVerification(o.isNew?f:o.email).then(()=>{t(6,u=!1),_(),Y&&mn(`Successfully sent verification email to ${o.email}.`)}).catch(Q=>{ke.errorResponseHandler(Q)})}const T=()=>M(),A=()=>$(),D=()=>_();function P(){f=this.value,t(2,f)}function L(){h=this.checked,t(3,h)}function R(){c=this.value,t(7,c)}function j(){d=this.value,t(8,d)}function G(){g=this.checked,t(9,g)}const te=()=>i&&u?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),_()}),!1):!0;function H(Y){pe[Y?"unshift":"push"](()=>{r=Y,t(4,r)})}function K(Y){ft.call(this,n,Y)}function J(Y){ft.call(this,n,Y)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(10,i=o.isNew&&f!=""||h||f!==o.email)},[_,o,f,h,r,a,u,c,d,g,i,l,S,$,M,y,T,A,D,P,L,R,j,G,te,H,K,J]}class IA extends Pe{constructor(e){super(),Ee(this,e,FA,LA,De,{show:15,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[0]}}function sg(n,e,t){const i=n.slice();return i[37]=e[t],i}function lg(n,e,t){const i=n.slice();return i[40]=e[t],i}function rg(n,e,t){const i=n.slice();return i[40]=e[t],i}function NA(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S,$,M,T,A=[],D=new Map,P,L,R,j,G,te,H,K,J,Y,Q=[],ce=new Map,be,se,Z,Te,ne;c=new Po({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),c.$on("submit",n[17]);function _e(x){n[18](x)}let fe
<span class="txt">New user</span>`,f=O(),B(c.$$.fragment),d=O(),h=b("div"),g=b("table"),y=b("thead"),_=b("tr"),B(v.$$.fragment),S=O(),B($.$$.fragment),T=O();for(let x=0;x<A.length;x+=1)A[x].c();P=O(),B(L.$$.fragment),j=O(),B(G.$$.fragment),H=O(),K=b("th"),J=O(),Y=b("tbody");for(let x=0;x<Q.length;x+=1)Q[x].c();Je&&Je.c(),be=O(),ge&&ge.c(),se=O(),Ae&&Ae.c(),p(i,"class","breadcrumbs"),p(l,"type","button"),p(l,"class","btn btn-secondary btn-circle"),p(o,"class","flex-fill"),p(u,"type","button"),p(u,"class","btn btn-expanded"),p(t,"class","page-header"),p(K,"class","col-type-action min-width"),p(g,"class","table"),ee(g,"table-loading",n[10]),p(h,"class","table-wrapper"),p(e,"class","page-wrapper")},m(x,ue){w(x,e,ue),m(e,t),m(t,i),m(t,s),m(t,l),m(t,r),m(t,o),m(t,a),m(t,u),m(e,f),V(c,e,null),m(e,d),m(e,h),m(h,g),m(g,y),m(y,_),V(v,_,null),m(_,S),V($,_,null),m(_,T);for(let Ue=0;Ue<A.length;Ue+=1)A[Ue].m(_,null);m(_,P),V(L,_,null),m(_,j),V(G,_,null),m(_,H),m(_,K),m(g,J),m(g,Y);for(let Ue=0;Ue<Q.length;Ue+=1)Q[Ue].m(Y,null);Je&&Je.m(Y,null),m(e,be),ge&&ge.m(e,null),m(e,se),Ae&&Ae.m(e,null),Z=!0,Te||(ne=[Xe(wt.call(null,l,{text:"Edit profile collection",position:"right"})),X(l,"click",n[15]),X(u,"click",n[16])],Te=!0)},p(x,ue){const Ue={};ue[0]&8&&(Ue.value=x[3]),c.$set(Ue);const bt={};ue[1]&16384&&(bt.$$scope={dirty:ue,ctx:x}),!C&&ue[0]&16&&(C=!0,bt.sort=x[4],je(()=>C=!1)),v.$set(bt);const it={};ue[1]&16384&&(it.$$scope={dirty:ue,ctx:x}),!M&&ue[0]&16&&(M=!0,it.sort=x[4],je(()=>M=!1)),$.$set(it),ue[0]&4096&&(He=x[12],A=rt(A,ue,Le,1,x,He,D,_,fn,og,P,rg));const yt={};ue[1]&16384&&(yt.$$scope={dirty:ue,ctx:x}),!R&&ue[0]&16&&(R=!0,yt.sort=x[4],je(()=>R=!1)),L.$set(yt);const ut={};ue[1]&16384&&(ut.$$scope={dirty:ue,ctx:x}),!te&&ue[0]&16&&(te=!0,ut.sort=x[4],je(()=>te=!1)),G.$set(ut),ue[0]&5450&&(qe=x[1],Me(),Q=rt(Q,ue,Ve,1,x,qe,ce,Y,Ft,cg,null,sg),Oe(),!qe.length&&Je?Je.p(x,ue):qe.length?Je&&(Je.d(1),Je=null):(Je=ag(x),Je.c(),Je.m(Y,null))),ue[0]&1024&&ee(g,"table-loading",x[10]),x[1].length?ge?ge.p(x,ue):(ge=dg(x),ge.c(),ge.m(e,se)):ge&&(ge.d(1),ge=null),x[1].length&&x[13]?Ae?Ae.p(x,ue):(Ae=pg(x),Ae.c(),Ae.m(e,null)):Ae&&(Ae.d(1),Ae=null)},i(x){if(!Z){E(c.$$.fragment,x),E(v.$$.fragment,x),E($.$$.fragment,x),E(L.$$.fragment,x),E(G.$$.fragment,x);for(let ue=0;ue<qe.length;ue+=1)E(Q[ue]);Z=!0}},o(x){F(c.$$.fragment,x),F(v.$$.fragment,x),F($.$$.fragment,x),F(L.$$.fragment,x),F(G.$$.fragment,x);for(let ue=0;ue<Q.length;ue+=1)F(Q[ue]);Z=!1},d(x){x&&k(e),z(c),z(v),z($);for(let ue=0;ue<A.length;ue+=1)A[ue].d();z(L),z(G);for(let ue=0;ue<Q.length;ue+=1)Q[ue].d();Je&&Je.d(),ge&&ge.d(),Ae&&Ae.d(),Te=!1,lt(ne)}}}function RA(n){let e;return{c(){e=b("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<h1>Loading users...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function jA(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function HA(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function og(n,e){let t,i,s,l,r,o,a,u=e[40].name+"",f,c,d;return{key:n,first:null,c(){t=b("th"),i=b("div"),s=b("i"),r=O(),o=b("span"),a=q("profile."),f=q(u),p(s,"class",l=W.getFieldTypeIcon(e[40].type)),p(o,"class","txt"),p(i,"class","col-header-content"),p(t,"class",c="col-type-"+e[40].type+" col-field-"+e[40].name),p(t,"name",d=e[40].name),this.first=t},m(h,g){w(h,t,g),m(t,i),m(i,s),m(i,r),m(i,o),m(o,a),m(o,f)},p(h,g){e=h,g[0]&4096&&l!==(l=W.getFieldTypeIcon(e[40].type))&&p(s,"class",l),g[0]&4096&&u!==(u=e[40].name+"")&&me(f,u),g[0]&4096&&c!==(c="col-type-"+e[40].type+" col-field-"+e[40].name)&&p(t,"class",c),g[0]&4096&&d!==(d=e[40].name)&&p(t,"name",d)},d(h){h&&k(t)}}}function qA(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function VA(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function ag(n){let e;function t(l,r){return l[10]?BA:zA}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,r){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function zA(n){var o;let e,t,i,s,l,r=((o=n[3])==null?void 0:o.length)&&ug(n);return{c(){e=b("tr"),t=b("td"),i=b("h6"),i.textContent="No users found.",s=O(),r&&r.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),r&&r.m(t,null),m(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?r?r.p(a,u):(r=ug(a),r.c(),r.m(t,null)):r&&(r.d(1),r=null)},d(a){a&&k(e),r&&r.d()}}}function BA(n){let e;return{c(){e=b("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function ug(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[24]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function fg(n,e){let t,i,s;return i=new Vb({props:{field:e[40],record:e[37].profile||{}}}),{key:n,first:null,c(){t=st(),B(i.$$.fragment),this.first=t},m(l,r){w(l,t,r),V(i,l,r),s=!0},p(l,r){e=l;const o={};r[0]&4096&&(o.field=e[40]),r[0]&2&&(o.record=e[37].profile||{}),i.$set(o)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){F(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function cg(n,e){let t,i,s,l,r,o,a,u=e[37].email+"",f,c,d,h,g=e[37].verified?"Verified":"Unverified",y,_,v=[],C=new Map,S,$,M,T,A,D,P,L,R,j,G,te,H,K,J;s=new jo({props:{id:e[37].id}});let Y=e[12];const Q=se=>se[40].name;for(let se=0;se<Y.length;se+=1){let Z=lg(e,Y,se),Te=Q(Z);C.set(Te,v[se]=fg(Te,Z))}M=new $i({props:{date:e[37].created}}),D=new $i({props:{date:e[37].updated}});function ce(){return e[22](e[37])}function be(){return e[23](e[37])}return{key:n,first:null,c(){t=b("tr"),i=b("td"),B(s.$$.fragment),l=O(),r=b("td"),o=b("div"),a=b("span"),f=q(u),d=O(),h=b("span"),y=q(g),_=O();for(let se=0;se<v.length;se+=1)v[se].c();S=O(),$=b("td"),B(M.$$.fragment),T=O(),A=b("td"),B(D.$$.fragment),P=O(),L=b("td"),R=b("button"),R.innerHTML=`<i class="ri-user-settings-line"></i>
<span class="txt">Edit user</span>`,j=O(),G=b("button"),G.innerHTML=`<i class="ri-profile-line"></i>
<span class="txt">Edit profile</span>`,te=O(),p(i,"class","col-type-text col-field-id"),p(a,"class","txt"),p(a,"title",c=e[37].email),p(h,"class","label"),ee(h,"label-success",e[37].verified),ee(h,"label-warning",!e[37].verified),p(o,"class","inline-flex"),p(r,"class","col-type-email col-field-email"),p($,"class","col-type-date col-field-created"),p(A,"class","col-type-date col-field-updated"),p(R,"type","button"),p(R,"class","btn btn-sm btn-outline"),p(G,"type","button"),p(G,"class","btn btn-sm m-l-10"),p(L,"class","col-type-action min-width"),this.first=t},m(se,Z){w(se,t,Z),m(t,i),V(s,i,null),m(t,l),m(t,r),m(r,o),m(o,a),m(a,f),m(o,d),m(o,h),m(h,y),m(t,_);for(let Te=0;Te<v.length;Te+=1)v[Te].m(t,null);m(t,S),m(t,$),V(M,$,null),m(t,T),m(t,A),V(D,A,null),m(t,P),m(t,L),m(L,R),m(L,j),m(L,G),m(t,te),H=!0,K||(J=[X(R,"click",Un(ce)),X(G,"click",Un(be))],K=!0)},p(se,Z){e=se;const Te={};Z[0]&2&&(Te.id=e[37].id),s.$set(Te),(!H||Z[0]&2)&&u!==(u=e[37].email+"")&&me(f,u),(!H||Z[0]&2&&c!==(c=e[37].email))&&p(a,"title",c),(!H||Z[0]&2)&&g!==(g=e[37].verified?"Verified":"Unverified")&&me(y,g),Z[0]&2&&ee(h,"label-success",e[37].verified),Z[0]&2&&ee(h,"label-warning",!e[37].verified),Z[0]&4098&&(Y=e[12],Me(),v=rt(v,Z,Q,1,e,Y,C,t,Ft,fg,S,lg),Oe());const ne={};Z[0]&2&&(ne.date=e[37].created),M.$set(ne);const _e={};Z[0]&2&&(_e.date=e[37].updated),D.$set(_e)},i(se){if(!H){E(s.$$.fragment,se);for(let Z=0;Z<Y.length;Z+=1)E(v[Z]);E(M.$$.fragment,se),E(D.$$.fragment,se),H=!0}},o(se){F(s.$$.fragment,se);for(let Z=0;Z<v.length;Z+=1)F(v[Z]);F(M.$$.fragment,se),F(D.$$.fragment,se),H=!1},d(se){se&&k(t),z(s);for(let Z=0;Z<v.length;Z+=1)v[Z].d();z(M),z(D),K=!1,lt(J)}}}function dg(n){let e,t,i=n[1].length+"",s,l,r;return{c(){e=b("small"),t=q("Showing "),s=q(i),l=q(" of "),r=q(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(o,a){w(o,e,a),m(e,t),m(e,s),m(e,l),m(e,r)},p(o,a){a[0]&2&&i!==(i=o[1].length+"")&&me(s,i),a[0]&4&&me(r,o[2])},d(o){o&&k(e)}}}function pg(n){let e,t,i,s,l=n[2]-n[1].length+"",r,o,a,u;return{c(){e=b("div"),t=b("button"),i=b("span"),s=q("Load more ("),r=q(l),o=q(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ee(t,"btn-loading",n[10]),ee(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,r),m(i,o),a||(u=X(t,"click",n[25]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&me(r,l),c[0]&1024&&ee(t,"btn-loading",f[10]),c[0]&1024&&ee(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function UA(n){let e,t,i,s,l,r,o,a,u;const f=[RA,NA],c=[];function d(_,v){return _[11]?0:1}e=d(n),t=c[e]=f[e](n);let h={};s=new IA({props:h}),n[26](s),s.$on("save",n[27]),s.$on("delete",n[28]);let g={};r=new gf({props:g}),n[29](r),r.$on("save",n[30]);let y={collection:n[5]};return a=new qb({props:y}),n[31](a),a.$on("save",n[32]),{c(){t.c(),i=O(),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment)},m(_,v){c[e].m(_,v),w(_,i,v),V(s,_,v),w(_,l,v),V(r,_,v),w(_,o,v),V(a,_,v),u=!0},p(_,v){let C=e;e=d(_),e===C?c[e].p(_,v):(Me(),F(c[C],1,1,()=>{c[C]=null}),Oe(),t=c[e],t?t.p(_,v):(t=c[e]=f[e](_),t.c()),E(t,1),t.m(i.parentNode,i));const S={};s.$set(S);const $={};r.$set($);const M={};v[0]&32&&(M.collection=_[5]),a.$set(M)},i(_){u||(E(t),E(s.$$.fragment,_),E(r.$$.fragment,_),E(a.$$.fragment,_),u=!0)},o(_){F(t),F(s.$$.fragment,_),F(r.$$.fragment,_),F(a.$$.fragment,_),u=!1},d(_){c[e].d(_),_&&k(i),n[26](null),z(s,_),_&&k(l),n[29](null),z(r,_),_&&k(o),n[31](null),z(a,_)}}}function WA(n,e,t){var Te;let i,s;const l=W.getQueryParams((Te=window.location)==null?void 0:Te.href),r=["id","userId","created","updated"];let o,a,u,f=[],c=1,d=0,h=!1,g=l.filter||"",y=l.sort||"-created",_=new Fn,v=!1;W.setDocumentTitle("Users"),M();async function C(ne=1){return t(10,h=!0),ke.Users.getList(ne,50,{sort:y||"-created",filter:g}).then(_e=>{ne<=1&&S(),t(10,h=!1),t(1,f=f.concat(_e.items)),t(9,c=_e.page),t(2,d=_e.totalItems)}).catch(_e=>{_e!==null&&(t(10,h=!1),console.warn(_e),S(),ke.errorResponseHandler(_e,!1))})}function S(){t(1,f=[]),t(9,c=1),t
<span class="txt">Application</span>`,r=O(),o=b("a"),o.innerHTML=`<i class="ri-send-plane-2-line"></i>
<span class="txt">Mail settings</span>`,a=O(),u=b("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
<span class="txt">Files storage</span>`,f=O(),c=b("div"),c.textContent="Authentication",d=O(),h=b("a"),h.innerHTML=`<i class="ri-lock-password-line"></i>
<span class="txt">Auth providers</span>`,g=O(),y=b("a"),y.innerHTML=`<i class="ri-key-line"></i>
<span class="txt">Token options</span>`,_=O(),v=b("a"),v.innerHTML=`<i class="ri-shield-user-line"></i>
<span class="txt">Admins</span>`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(o,"href","/settings/mail"),p(o,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/auth-providers"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/tokens"),p(y,"class","sidebar-list-item"),p(v,"href","/settings/admins"),p(v,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m($,M){w($,e,M),m(e,t),m(t,i),m(t,s),m(t,l),m(t,r),m(t,o),m(t,a),m(t,u),m(t,f),m(t,c),m(t,d),m(t,h),m(t,g),m(t,y),m(t,_),m(t,v),C||(S=[Xe(oi.call(null,l,{path:"/settings"})),Xe(On.call(null,l)),Xe(oi.call(null,o,{path:"/settings/mail/?.*"})),Xe(On.call(null,o)),Xe(oi.call(null,u,{path:"/settings/storage/?.*"})),Xe(On.call(null,u)),Xe(oi.call(null,h,{path:"/settings/auth-providers/?.*"})),Xe(On.call(null,h)),Xe(oi.call(null,y,{path:"/settings/tokens/?.*"})),Xe(On.call(null,y)),Xe(oi.call(null,v,{path:"/settings/admins/?.*"})),Xe(On.call(null,v))],C=!0)},p:oe,i:oe,o:oe,d($){$&&k(e),C=!1,lt(S)}}}class nl extends Pe{constructor(e){super(),Ee(this,e,null,KA,De,{})}}function hg(n,e,t){const i=n.slice();return i[31]=e[t],i}function mg(n){let e,t;return e=new Fe({props:{class:"form-field disabled",name:"id",$$slots:{default:[JA,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function JA(n){let e,t,i,s,l,r,o,a,u;return{c(){e=b("label"),t=b("i"),i=O(),s=b("span"),s.textContent="ID",r=O(),o=b("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","text"),p(o,"id",a=n[30]),o.value=u=n[1].id,o.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,r,c),w(f,o,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&p(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&p(o,"id",a),c[0]&2&&u!==(u=f[1].id)&&o.value!==u&&(o.value=u)},d(f){f&&k(e),f&&k(r),f&&k(o)}}}function gg(n){let e,t,i,s,l,r,o,a;function u(){return n[17](n[31])}function f(...c){return n[18](n[31],...c)}return{c(){e=b("figure"),t=b("img"),l=O(),ei(t.src,i="/_/images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt",s="Avatar "+n[31]),p(e,"tabindex","0"),p(e,"class",r="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(c,d){w(c,e,d),m(e,t),m(e,l),o||(a=[X(e,"click",u),X(e,"keydown",f)],o=!0)},p(c,d){n=c,d[0]&4&&r!==(r="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",r)},d(c){c&&k(e),o=!1,lt(a)}}}function GA(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=b("label"),t=b("i"),i=O(),s=b("span"),s.textContent="Email",r=O(),o=b("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(o,"type","email"),p(o,"autocomplete","off"),p(o,"id",a=n[30]),o.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,r,d),w(c,o,d),Ce(o,n[3]),u||(f=X(o,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(o,"id",a),d[0]&8&&o.value!==c[3]&&Ce(o,c[3])},d(c){c&&k(e),c&&k(r),c&&k(o),u=!1,f()}}}function _g(n){let e,t;return e=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[ZA,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function ZA(n){let e,t,i,s,l,r,o,a;return{c(){e=b("input"),i=O(),s=b("label"),l=q("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",r=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[20]),o=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&r!==(r=u[30])&&p(s,"for",r)},d(u){u&&
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[15]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function nE(n){let e,t,i,s,l,r,o=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&yg(n);return{c(){h&&h.c(),e=O(),t=b("button"),i=b("span"),i.textContent="Cancel",s=O(),l=b("button"),r=b("span"),a=q(o),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(r,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ee(l,"btn-loading",n[6])},m(g,y){h&&h.m(g,y),w(g,e,y),w(g,t,y),m(t,i),w(g,s,y),w(g,l,y),m(l,r),m(r,a),f=!0,c||(d=X(t,"click",n[16]),c=!0)},p(g,y){g[1].isNew?h&&(Me(),F(h,1,1,()=>{h=null}),Oe()):h?(h.p(g,y),y[0]&2&&E(h,1)):(h=yg(g),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||y[0]&64)&&(t.disabled=g[6]),(!f||y[0]&2)&&o!==(o=g[1].isNew?"Create":"Save changes")&&me(a,o),(!f||y[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),y[0]&64&&ee(l,"btn-loading",g[6])},i(g){f||(E(h),f=!0)},o(g){F(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function iE(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[nE],header:[eE],default:[QA]},$$scope:{ctx:n}};return e=new Ai({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){B(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const r={};l[0]&1152&&(r.beforeHide=s[23]),l[0]&1886|l[1]&8&&(r.$$scope={dirty:l,ctx:s}),e.$set(r)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){F(e.$$.fragment,s),t=!1},d(s){n[24](null),z(e,s)}}}function sE(n,e,t){let i;const s=_n(),l="admin_"+W.randomString(5);let r,o=new Ws,a=!1,u=!1,f=0,c="",d="",h="",g=!1;function y(J){return v(J),t(7,u=!0),r==null?void 0:r.show()}function _(){return r==null?void 0:r.hide()}function v(J){Ki({}),t(1,o=J!=null&&J.clone?J.clone():new Ws),C()}function C(){t(4,g=!1),t(3,c=(o==null?void 0:o.email)||""),t(2,f=(o==null?void 0:o.avatar)||0),t(8,d=""),t(9,h="")}function S(){if(a||!i)return;t(6,a=!0);const J={email:c,avatar:f};(o.isNew||g)&&(J.password=d,J.passwordConfirm=h);let Y;o.isNew?Y=ke.Admins.create(J):Y=ke.Admins.update(o.id,J),Y.then(async Q=>{var ce;t(7,u=!1),_(),mn(o.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",Q),((ce=ke.AuthStore.model)==null?void 0:ce.id)===Q.id&&ke.AuthStore.save(ke.AuthStore.token,Q)}).catch(Q=>{ke.errorResponseHandler(Q)}).finally(()=>{t(6,a=!1)})}function $(){!(o!=null&&o.id)||Mi("Do you really want to delete the selected admin?",()=>ke.Admins.delete(o.id).then(()=>{t(7,u=!1),_(),mn("Successfully deleted admin."),s("delete",o)}).catch(J=>{ke.errorResponseHandler(J)}))}const M=()=>$(),T=()=>_(),A=J=>t(2,f=J),D=(J,Y)=>{(Y.code==="Enter"||Y.code==="Space")&&(Y.preventDefault(),t(2,f=J))};function P(){c=this.value,t(3,c)}function L(){g=this.checked,t(4,g)}function R(){d=this.value,t(8,d)}function j(){h=this.value,t(9,h)}const G=()=>i&&u?(Mi("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),_()}),!1):!0;function te(J){pe[J?"unshift":"push"](()=>{r=J,t(5,r)})}function H(J){ft.call(this,n,J)}function K(J){ft.call(this,n,J)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=o.isNew&&c!=""||g||c!==o.email||f!==o.avatar)},[_,o,f,c,g,r,a,u,d,h,i,l,S,$,y,M,T,A,D,P,L,R,j,G,te,H,K]}class lE extends Pe{constructor(e){super(),Ee(this,e,sE,iE,De,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function vg(n,e,t){const i=n.slice();return i[21]=e[t],i}function rE(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function oE(n){let e,t,i,s;return{c(){e=b("div"),t=b("i"),i=O(),s=b("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,r){w(l,e,r),m(e,t),m(e,i),m(e,s)},p:oe,d(l){l&&k(e)}}}function aE(n){let e,t,i,s;return{c(){e=b(
`},m(t,i){w(t,e,i)},p:oe,d(t){t&&k(e)}}}function wg(n){let e,t,i;return{c(){e=b("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=X(e,"click",n[15]),t=!0)},p:oe,d(s){s&&k(e),t=!1,i()}}}function Sg(n){let e;return{c(){e=b("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Cg(n,e){let t,i,s,l,r,o,a,u,f,c,d,h,g=e[21].email+"",y,_,v,C,S,$,M,T,A,D,P,L,R,j;u=new jo({props:{id:e[21].id}});let G=e[21].id===e[6].id&&Sg();S=new $i({props:{date:e[21].created}}),T=new $i({props:{date:e[21].updated}});function te(){return e[13](e[21])}function H(...K){return e[14](e[21],...K)}return{key:n,first:null,c(){t=b("tr"),i=b("td"),s=b("figure"),l=b("img"),o=O(),a=b("td"),B(u.$$.fragment),f=O(),G&&G.c(),c=O(),d=b("td"),h=b("span"),y=q(g),v=O(),C=b("td"),B(S.$$.fragment),$=O(),M=b("td"),B(T.$$.fragment),A=O(),D=b("td"),D.innerHTML='<i class="ri-arrow-right-line"></i>',P=O(),ei(l.src,r="/_/images/avatars/avatar"+(e[21].avatar||0)+".svg")||p(l,"src",r),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",_=e[21].email),p(d,"class","col-type-email col-field-email"),p(C,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(D,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(K,J){w(K,t,J),m(t,i),m(i,s),m(s,l),m(t,o),m(t,a),V(u,a,null),m(a,f),G&&G.m(a,null),m(t,c),m(t,d),m(d,h),m(h,y),m(t,v),m(t,C),V(S,C,null),m(t,$),m(t,M),V(T,M,null),m(t,A),m(t,D),m(t,P),L=!0,R||(j=[X(t,"click",te),X(t,"keydown",H)],R=!0)},p(K,J){e=K,(!L||J&16&&!ei(l.src,r="/_/images/avatars/avatar"+(e[21].avatar||0)+".svg"))&&p(l,"src",r);const Y={};J&16&&(Y.id=e[21].id),u.$set(Y),e[21].id===e[6].id?G||(G=Sg(),G.c(),G.m(a,null)):G&&(G.d(1),G=null),(!L||J&16)&&g!==(g=e[21].email+"")&&me(y,g),(!L||J&16&&_!==(_=e[21].email))&&p(h,"title",_);const Q={};J&16&&(Q.date=e[21].created),S.$set(Q);const ce={};J&16&&(ce.date=e[21].updated),T.$set(ce)},i(K){L||(E(u.$$.fragment,K),E(S.$$.fragment,K),E(T.$$.fragment,K),L=!0)},o(K){F(u.$$.fragment,K),F(S.$$.fragment,K),F(T.$$.fragment,K),L=!1},d(K){K&&k(t),z(u),G&&G.d(),z(S),z(T),R=!1,lt(j)}}}function $g(n){let e,t,i=n[4].length+"",s,l,r=n[4].length+"",o;return{c(){e=b("small"),t=q("Showing "),s=q(i),l=q(" of "),o=q(r),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(e,o)},p(a,u){u&16&&i!==(i=a[4].length+"")&&me(s,i),u&16&&r!==(r=a[4].length+"")&&me(o,r)},d(a){a&&k(e)}}}function dE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S,$,M,T,A,D,P,L,R,j,G,te,H,K,J,Y=[],Q=new Map,ce,be,se,Z,Te,ne;e=new nl({}),c=new Po({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),c.$on("submit",n[8]);function _e(ge){n[9](ge)}let fe={class:"col-type-text",name:"id",$$slots:{default:[rE]},$$scope:{ctx:n}};n[2]!==void 0&&(fe.sort=n[2]),S=new nn({props:fe}),pe.push(()=>Ie(S,"sort",_e));function ie(ge){n[10](ge)}let ye={class:"col-type-email col-field-email",name:"email",$$slots:{default:[oE]},$$scope:{ctx:n}};n[2]!==void 0&&(ye.sort=n[2]),T=new nn({props:ye}),pe.push(()=>Ie(T,"sort",ie));function He(ge){n[11](ge)}let Le={class:"col-type-date col-field-created",name:"created",$$slots:{default:[aE]},$$scope:{ctx:n}};n[2]!==void 0&&(Le.sort=n[2]),P=new nn({props:Le}),pe.push(()=>Ie(P,"sort",He));function Re(ge){n[12](ge)}let ae={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[uE]},$$scope:{ctx:n}};n[2]!==void 0&&(ae.sort=n[2]),j=new nn({props:ae}),pe.push(()=>Ie(j,"sort",Re));let re=n[4];const ve=ge=>ge[21].id;for(let ge=0;ge<re.length;ge+=1){let Ae=vg(n,re,ge),x=ve(Ae);Q.set(x,Y[ge]=Cg(x,Ae))}let qe=null;re.length||(qe=kg(n));let Ve=n[4].length&&$g(n),Je={};return se=new lE({props:Je}),n[16](se),se.$on("save",n[17]),se.$on("delete",n[18]),{c(){B(e.$$.fragm
<div class="breadcrumb-item">Admins</div>`,r=O(),o=b("div"),a=O(),u=b("button"),u.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New admin</span>`,f=O(),B(c.$$.fragment),d=O(),h=b("div"),g=b("table"),y=b("thead"),_=b("tr"),v=b("th"),C=O(),B(S.$$.fragment),M=O(),B(T.$$.fragment),D=O(),B(P.$$.fragment),R=O(),B(j.$$.fragment),te=O(),H=b("th"),K=O(),J=b("tbody");for(let ge=0;ge<Y.length;ge+=1)Y[ge].c();qe&&qe.c(),ce=O(),Ve&&Ve.c(),be=O(),B(se.$$.fragment),p(l,"class","breadcrumbs"),p(o,"class","flex-fill"),p(u,"type","button"),p(u,"class","btn btn-expanded"),p(s,"class","page-header"),p(v,"class","min-width"),p(H,"class","col-type-action min-width"),p(g,"class","table"),ee(g,"table-loading",n[5]),p(h,"class","table-wrapper"),p(i,"class","page-wrapper")},m(ge,Ae){V(e,ge,Ae),w(ge,t,Ae),w(ge,i,Ae),m(i,s),m(s,l),m(s,r),m(s,o),m(s,a),m(s,u),m(i,f),V(c,i,null),m(i,d),m(i,h),m(h,g),m(g,y),m(y,_),m(_,v),m(_,C),V(S,_,null),m(_,M),V(T,_,null),m(_,D),V(P,_,null),m(_,R),V(j,_,null),m(_,te),m(_,H),m(g,K),m(g,J);for(let x=0;x<Y.length;x+=1)Y[x].m(J,null);qe&&qe.m(J,null),m(i,ce),Ve&&Ve.m(i,null),w(ge,be,Ae),V(se,ge,Ae),Z=!0,Te||(ne=X(u,"click",n[7]),Te=!0)},p(ge,[Ae]){const x={};Ae&2&&(x.value=ge[1]),c.$set(x);const ue={};Ae&16777216&&(ue.$$scope={dirty:Ae,ctx:ge}),!$&&Ae&4&&($=!0,ue.sort=ge[2],je(()=>$=!1)),S.$set(ue);const Ue={};Ae&16777216&&(Ue.$$scope={dirty:Ae,ctx:ge}),!A&&Ae&4&&(A=!0,Ue.sort=ge[2],je(()=>A=!1)),T.$set(Ue);const bt={};Ae&16777216&&(bt.$$scope={dirty:Ae,ctx:ge}),!L&&Ae&4&&(L=!0,bt.sort=ge[2],je(()=>L=!1)),P.$set(bt);const it={};Ae&16777216&&(it.$$scope={dirty:Ae,ctx:ge}),!G&&Ae&4&&(G=!0,it.sort=ge[2],je(()=>G=!1)),j.$set(it),Ae&122&&(re=ge[4],Me(),Y=rt(Y,Ae,ve,1,ge,re,Q,J,Ft,Cg,null,vg),Oe(),!re.length&&qe?qe.p(ge,Ae):re.length?qe&&(qe.d(1),qe=null):(qe=kg(ge),qe.c(),qe.m(J,null))),Ae&32&&ee(g,"table-loading",ge[5]),ge[4].length?Ve?Ve.p(ge,Ae):(Ve=$g(ge),Ve.c(),Ve.m(i,null)):Ve&&(Ve.d(1),Ve=null);const yt={};se.$set(yt)},i(ge){if(!Z){E(e.$$.fragment,ge),E(c.$$.fragment,ge),E(S.$$.fragment,ge),E(T.$$.fragment,ge),E(P.$$.fragment,ge),E(j.$$.fragment,ge);for(let Ae=0;Ae<re.length;Ae+=1)E(Y[Ae]);E(se.$$.fragment,ge),Z=!0}},o(ge){F(e.$$.fragment,ge),F(c.$$.fragment,ge),F(S.$$.fragment,ge),F(T.$$.fragment,ge),F(P.$$.fragment,ge),F(j.$$.fragment,ge);for(let Ae=0;Ae<Y.length;Ae+=1)F(Y[Ae]);F(se.$$.fragment,ge),Z=!1},d(ge){z(e,ge),ge&&k(t),ge&&k(i),z(c),z(S),z(T),z(P),z(j);for(let Ae=0;Ae<Y.length;Ae+=1)Y[Ae].d();qe&&qe.d(),Ve&&Ve.d(),ge&&k(be),n[16](null),z(se,ge),Te=!1,ne()}}}function pE(n,e,t){var D;let i;hn(n,Bu,P=>t(6,i=P));const s=W.getQueryParams((D=window.location)==null?void 0:D.href);let l,r=[],o=!1,a=s.filter||"",u=s.sort||"-created";W.setDocumentTitle("Admins");function f(){return t(5,o=!0),t(4,r=[]),ke.Admins.getFullList(100,{sort:u||"-created",filter:a}).then(P=>{t(4,r=P),t(5,o=!1)}).catch(P=>{P!==null&&(t(5,o=!1),console.warn(P),c(),ke.errorResponseHandler(P,!1))})}function c(){t(4,r=[])}const d=()=>l==null?void 0:l.show(),h=P=>t(1,a=P.detail);function g(P){u=P,t(2,u)}function y(P){u=P,t(2,u)}function _(P){u=P,t(2,u)}function v(P){u=P,t(2,u)}const C=P=>l==null?void 0:l.show(P),S=(P,L)=>{(L.code==="Enter"||L.code==="Space")&&(L.preventDefault(),l==null||l.show(P))},$=()=>t(1,a="");function M(P){pe[P?"unshift":"push"](()=>{l=P,t(3,l)})}const T=()=>f(),A=()=>f();return n.$$.update=()=>{n.$$.dirty&6&&u!==-1&&a!==-1&&(W.replaceClientQueryParams({filter:a,sort:u}),f())},[f,a,u,l,r,o,i,d,h,g,y,_,v,C,S,$,M,T,A]}class hE extends Pe{constructor(e){super(),Ee(this,e,pE,dE,De,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function mE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Email"),s=O(),l=b("input"),p(e,"for",i=n[7]),p(l,"type","email"),p(l,"id",r=n[7]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0]),l.focus(),o||(a=X(l,"input",n[4]),o=!0)},p(u,f){f&128&&i!==(i=u[7])&&p(e,"for",i),f&128&&r!==(r=u[7])&&p(l,"id",r),f&1&&l.value!==u[0]&&Ce(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function gE(n){let e,t,i,s,l,r,o,a,u,f,c;return{c(){e=b("label"),t=q("Password"),s=O(),l=b("input"),o=O(),a=b("div"),u=b("a"),u.textContent="Forgotten password?",p(e,"for",i=n[7]),p(l,
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ee(a,"btn-disabled",n[2]),ee(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){w(d,e,h),m(e,t),m(e,i),V(s,e,null),m(e,l),V(r,e,null),m(e,o),m(e,a),u=!0,f||(c=X(e,"submit",Wt(n[3])),f=!0)},p(d,h){const g={};h&385&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const y={};h&386&&(y.$$scope={dirty:h,ctx:d}),r.$set(y),h&4&&ee(a,"btn-disabled",d[2]),h&4&&ee(a,"btn-loading",d[2])},i(d){u||(E(s.$$.fragment,d),E(r.$$.fragment,d),u=!0)},o(d){F(s.$$.fragment,d),F(r.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(r),f=!1,c()}}}function bE(n){let e,t;return e=new I0({props:{$$slots:{default:[_E]},$$scope:{ctx:n}}}),{c(){B(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&263&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){F(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function yE(n,e,t){var f;const i=W.getQueryParams((f=window.location)==null?void 0:f.href);let s=i.demoEmail||"",l=i.demoPassword||"",r=!1;function o(){if(!r)return t(2,r=!0),ke.Admins.authViaEmail(s,l).then(()=>{Zs("/")}).catch(()=>{A0("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function a(){s=this.value,t(0,s)}function u(){l=this.value,t(1,l)}return[s,l,r,o,a,u]}class vE extends Pe{constructor(e){super(),Ee(this,e,yE,bE,De,{})}}function kE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C;return i=new Fe({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[SE,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[CE,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[$E,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),B(i.$$.fragment),s=O(),l=b("div"),B(r.$$.fragment),o=O(),B(a.$$.fragment),u=O(),f=b("div"),c=b("div"),d=O(),h=b("button"),g=b("span"),g.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(c,"class","flex-fill"),p(g,"class","txt"),p(h,"type","submit"),p(h,"class","btn btn-expanded"),h.disabled=y=!n[3]||n[2],ee(h,"btn-loading",n[2]),p(f,"class","col-lg-12 flex"),p(e,"class","grid")},m(S,$){w(S,e,$),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),V(a,e,null),m(e,u),m(e,f),m(f,c),m(f,d),m(f,h),m(h,g),_=!0,v||(C=X(h,"click",n[9]),v=!0)},p(S,$){const M={};$&12289&&(M.$$scope={dirty:$,ctx:S}),i.$set(M);const T={};$&12289&&(T.$$scope={dirty:$,ctx:S}),r.$set(T);const A={};$&12289&&(A.$$scope={dirty:$,ctx:S}),a.$set(A),(!_||$&12&&y!==(y=!S[3]||S[2]))&&(h.disabled=y),$&4&&ee(h,"btn-loading",S[2])},i(S){_||(E(i.$$.fragment,S),E(r.$$.fragment,S),E(a.$$.fragment,S),_=!0)},o(S){F(i.$$.fragment,S),F(r.$$.fragment,S),F(a.$$.fragment,S),_=!1},d(S){S&&k(e),z(i),z(r),z(a),v=!1,C()}}}function wE(n){let e;return{c(){e=b("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function SE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Application name"),s=O(),l=b("input"),p(e,"for",i=n[12]),p(l,"type","text"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.appName),o||(a=X(l,"input",n[6]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&l.value!==u[0].meta.appName&&Ce(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function CE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Application url"),s=O(),l=b("input"),p(e,"for",i=n[12]),p(l,"type","text"),p(l,"id",r=n[12]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.appUrl),o||(a=X(l,"input",n[7]),o=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&r!==(r=u[12])&&p(l,"id",r),f&1&&l.value!==u[0].meta.appUrl&&Ce(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function $E(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Logs max days retention"),s=O(),l=b("input"),p(e,"for",i=n[12]),p(l,"type
<div class="breadcrumb-item">Application</div></nav>`,l=O(),r=b("div"),o=b("form"),u.c(),p(s,"class","page-header"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(_,v){V(e,_,v),w(_,t,v),w(_,i,v),m(i,s),m(i,l),m(i,r),m(r,o),g[a].m(o,null),f=!0,c||(d=X(o,"submit",Wt(n[4])),c=!0)},p(_,[v]){let C=a;a=y(_),a===C?g[a].p(_,v):(Me(),F(g[C],1,1,()=>{g[C]=null}),Oe(),u=g[a],u?u.p(_,v):(u=g[a]=h[a](_),u.c()),E(u,1),u.m(o,null))},i(_){f||(E(e.$$.fragment,_),E(u),f=!0)},o(_){F(e.$$.fragment,_),F(u),f=!1},d(_){z(e,_),_&&k(t),_&&k(i),g[a].d(),c=!1,d()}}}function OE(n,e,t){let i,s={},l=!1,r=!1,o="";W.setDocumentTitle("Application settings"),a();async function a(){t(1,l=!0);try{const y=await ke.Settings.getAll()||{};f(y)}catch(y){ke.errorResponseHandler(y)}t(1,l=!1)}async function u(){if(!(r||!i)){t(2,r=!0);try{const y=await ke.Settings.update(W.filterRedactedProps(s));f(y),mn("Successfully saved application settings.")}catch(y){ke.errorResponseHandler(y)}t(2,r=!1)}}function f(y={}){t(0,s={meta:(y==null?void 0:y.meta)||{},logs:(y==null?void 0:y.logs)||{}}),t(5,o=JSON.stringify(s))}function c(){s.meta.appName=this.value,t(0,s)}function d(){s.meta.appUrl=this.value,t(0,s)}function h(){s.logs.maxDays=Ot(this.value),t(0,s)}const g=()=>u();return n.$$.update=()=>{n.$$.dirty&33&&t(3,i=o!=JSON.stringify(s))},[s,l,r,i,u,o,c,d,h,g]}class TE extends Pe{constructor(e){super(),Ee(this,e,OE,ME,De,{})}}function DE(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let r=0;r<s.length;r+=1)l=ct(l,s[r]);return{c(){e=b("input"),ci(e,l)},m(r,o){w(r,e,o),e.autofocus&&e.focus(),n[7](e),Ce(e,n[0]),t||(i=X(e,"input",n[8]),t=!0)},p(r,o){ci(e,l=bn(s,[{type:"password"},{autocomplete:"new-password"},o&32&&r[5]])),o&1&&e.value!==r[0]&&Ce(e,r[0])},d(r){r&&k(e),n[7](null),t=!1,i()}}}function AE(n){let e,t,i,s,l,r,o=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<o.length;u+=1)a=ct(a,o[u]);return{c(){e=b("div"),t=b("button"),t.innerHTML='<i class="ri-key-line"></i>',i=O(),s=b("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),ci(s,a)},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(r=[Xe(wt.call(null,t,{position:"left",text:"Set new value"})),X(t,"click",n[6])],l=!0)},p(u,f){ci(s,a=bn(o,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,lt(r)}}}function EE(n){let e;function t(l,r){return l[3]?AE:DE}let i=t(n),s=i(n);return{c(){s.c(),e=st()},m(l,r){s.m(l,r),w(l,e,r)},p(l,[r]){i===(i=t(l))&&s?s.p(l,r):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:oe,o:oe,d(l){s.d(l),l&&k(e)}}}function PE(n,e,t){const i=["value","mask"];let s=Ut(e,i),{value:l=""}=e,{mask:r="******"}=e,o,a=!1;async function u(){t(0,l=""),t(3,a=!1),await Oi(),o==null||o.focus()}const f=()=>u();function c(h){pe[h?"unshift":"push"](()=>{o=h,t(2,o)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ct(ct({},e),di(h)),t(5,s=Ut(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,r=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===r&&t(3,a=!0)},[l,r,o,a,u,s,f,c,d]}class _f extends Pe{constructor(e){super(),Ee(this,e,PE,EE,De,{value:0,mask:1})}}function LE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S,$,M,T,A,D,P,L,R,j,G;i=new Fe({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[IE,({uniqueId:H})=>({22:H}),({uniqueId:H})=>H?4194304:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[NE,({uniqueId:H})=>({22:H}),({uniqueId:H})=>H?4194304:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:"meta.userVerificationUrl",$$slots:{default:[RE,({uniqueId:H})=>({22:H}),({uniqueId:H})=>H?4194304:0]},$$scope:{ctx:n}}}),f=new Fe({props:{class:"form-field required",name:"meta.userResetPasswordUrl",$$slots:{default:[jE,({uniqueId:H})=>({22:H}),({uniqueId:H})=>H?4194304:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field required",name:"meta.userConfirmEmailChangeUrl",$$slots:
<br/>
<strong class="txt-bold">For better emails deliverability it is recommended to enable the SMTP settings
2022-07-12 23:11:50 +08:00
below.</strong></p>`,v=O(),B(C.$$.fragment),S=O(),te&&te.c(),$=O(),M=b("div"),T=b("div"),A=O(),D=b("button"),P=b("span"),P.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid"),p(_,"class","content m-b-sm"),p(T,"class","flex-fill"),p(P,"class","txt"),p(D,"type","submit"),p(D,"class","btn btn-expanded"),D.disabled=L=!n[3]||n[2],ee(D,"btn-loading",n[2]),p(M,"class","flex")},m(H,K){w(H,e,K),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),V(a,e,null),m(e,u),V(f,e,null),m(e,c),V(d,e,null),w(H,h,K),w(H,g,K),w(H,y,K),w(H,_,K),w(H,v,K),V(C,H,K),w(H,S,K),te&&te.m(H,K),w(H,$,K),w(H,M,K),m(M,T),m(M,A),m(M,D),m(D,P),R=!0,j||(G=X(D,"click",n[18]),j=!0)},p(H,K){const J={};K&12582913&&(J.$$scope={dirty:K,ctx:H}),i.$set(J);const Y={};K&12582913&&(Y.$$scope={dirty:K,ctx:H}),r.$set(Y);const Q={};K&12582913&&(Q.$$scope={dirty:K,ctx:H}),a.$set(Q);const ce={};K&12582913&&(ce.$$scope={dirty:K,ctx:H}),f.$set(ce);const be={};K&12582913&&(be.$$scope={dirty:K,ctx:H}),d.$set(be);const se={};K&12582913&&(se.$$scope={dirty:K,ctx:H}),C.$set(se),H[0].smtp.enabled?te?(te.p(H,K),K&1&&E(te,1)):(te=Mg(H),te.c(),E(te,1),te.m($.parentNode,$)):te&&(Me(),F(te,1,1,()=>{te=null}),Oe()),(!R||K&12&&L!==(L=!H[3]||H[2]))&&(D.disabled=L),K&4&&ee(D,"btn-loading",H[2])},i(H){R||(E(i.$$.fragment,H),E(r.$$.fragment,H),E(a.$$.fragment,H),E(f.$$.fragment,H),E(d.$$.fragment,H),E(C.$$.fragment,H),E(te),R=!0)},o(H){F(i.$$.fragment,H),F(r.$$.fragment,H),F(a.$$.fragment,H),F(f.$$.fragment,H),F(d.$$.fragment,H),F(C.$$.fragment,H),F(te),R=!1},d(H){H&&k(e),z(i),z(r),z(a),z(f),z(d),H&&k(h),H&&k(g),H&&k(y),H&&k(_),H&&k(v),z(C,H),H&&k(S),te&&te.d(H),H&&k($),H&&k(M),j=!1,G()}}}function FE(n){let e;return{c(){e=b("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function IE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Sender name"),s=O(),l=b("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.senderName),o||(a=X(l,"input",n[7]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].meta.senderName&&Ce(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function NE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Sender address"),s=O(),l=b("input"),p(e,"for",i=n[22]),p(l,"type","email"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].meta.senderAddress),o||(a=X(l,"input",n[8]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].meta.senderAddress&&Ce(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function RE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=b("label"),t=q("User verification page url"),s=O(),l=b("input"),o=O(),a=b("div"),a.innerHTML=`Used in the user verification email. Available placeholder parameters:
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Ce(l,n[0].meta.userVerificationUrl),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[9]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userVerificationUrl&&Ce(l,c[0].meta.userVerificationUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function jE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=b("label"),t=q("User reset password page url"),s=O(),l=b("input"),o=O(),a=b("div"),a.innerHTML=`Used in the user password reset email. Available placeholder parameters:
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Ce(l,n[0].meta.userResetPasswordUrl),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[10]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userResetPasswordUrl&&Ce(l,c[0].meta.userResetPasswordUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function HE(n){let e,t,i,s,l,r,o,a,u,f;return{c(){e=b("label"),t=q("User confirm email change page url"),s=O(),l=b("input"),o=O(),a=b("div"),a.innerHTML=`Used in the user email change confirmation email. Available placeholder
parameters:
2022-07-12 23:11:50 +08:00
<code>%APP_URL%</code>, <code>%TOKEN%</code>.`,p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Ce(l,n[0].meta.userConfirmEmailChangeUrl),w(c,o,d),w(c,a,d),u||(f=X(l,"input",n[11]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&r!==(r=c[22])&&p(l,"id",r),d&1&&l.value!==c[0].meta.userConfirmEmailChangeUrl&&Ce(l,c[0].meta.userConfirmEmailChangeUrl)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(o),c&&k(a),u=!1,f()}}}function qE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("input"),i=O(),s=b("label"),l=q("Use SMTP mail server"),p(e,"type","checkbox"),p(e,"id",t=n[22]),e.required=!0,p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].smtp.enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[12]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].smtp.enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Mg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S;return i=new Fe({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[VE,({uniqueId:$})=>({22:$}),({uniqueId:$})=>$?4194304:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[zE,({uniqueId:$})=>({22:$}),({uniqueId:$})=>$?4194304:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[BE,({uniqueId:$})=>({22:$}),({uniqueId:$})=>$?4194304:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field",name:"smtp.username",$$slots:{default:[UE,({uniqueId:$})=>({22:$}),({uniqueId:$})=>$?4194304:0]},$$scope:{ctx:n}}}),y=new Fe({props:{class:"form-field",name:"smtp.password",$$slots:{default:[WE,({uniqueId:$})=>({22:$}),({uniqueId:$})=>$?4194304:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),B(i.$$.fragment),s=O(),l=b("div"),B(r.$$.fragment),o=O(),a=b("div"),B(u.$$.fragment),f=O(),c=b("div"),B(d.$$.fragment),h=O(),g=b("div"),B(y.$$.fragment),_=O(),v=b("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(v,"class","col-lg-12"),p(e,"class","grid")},m($,M){w($,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,h),m(e,g),V(y,g,null),m(e,_),m(e,v),S=!0},p($,M){const T={};M&12582913&&(T.$$scope={dirty:M,ctx:$}),i.$set(T);const A={};M&12582913&&(A.$$scope={dirty:M,ctx:$}),r.$set(A);const D={};M&12582913&&(D.$$scope={dirty:M,ctx:$}),u.$set(D);const P={};M&12582913&&(P.$$scope={dirty:M,ctx:$}),d.$set(P);const L={};M&12582913&&(L.$$scope={dirty:M,ctx:$}),y.$set(L)},i($){S||(E(i.$$.fragment,$),E(r.$$.fragment,$),E(u.$$.fragment,$),E(d.$$.fragment,$),E(y.$$.fragment,$),$&&Mt(()=>{C||(C=at(e,Xt,{duration:150},!0)),C.run(1)}),S=!0)},o($){F(i.$$.fragment,$),F(r.$$.fragment,$),F(u.$$.fragment,$),F(d.$$.fragment,$),F(y.$$.fragment,$),$&&(C||(C=at(e,Xt,{duration:150},!1)),C.run(0)),S=!1},d($){$&&k(e),z(i),z(r),z(u),z(d),z(y),$&&C&&C.end()}}}function VE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("SMTP server host"),s=O(),l=b("input"),p(e,"for",i=n[22]),p(l,"type","text"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].smtp.host),o||(a=X(l,"input",n[13]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&l.value!==u[0].smtp.host&&Ce(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function zE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Port"),s=O(),l=b("input"),p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",r=n[22]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].smtp.port),o||(a=X(l,"input",n[14]),o=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&r!==(r=u[22])&&p(l,"id",r),f&1&&Ot(l.value)!==u[0].smtp.port&&Ce(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function BE(n){let e,t,i,s,l,r,o;function a(f){n[15](f)}let u={id:n[22],items:n[4]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new ws({props:u}),pe.push(()=>Ie(
<div class="breadcrumb-item">Mail settings</div></nav>`,l=O(),r=b("div"),o=b("form"),a=b("div"),a.innerHTML="<p>Configure common settings for sending emails.</p>",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content txt-xl m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(C,S){V(e,C,S),w(C,t,S),w(C,i,S),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),_[f].m(o,null),d=!0,h||(g=X(o,"submit",Wt(n[19])),h=!0)},p(C,[S]){let $=f;f=v(C),f===$?_[f].p(C,S):(Me(),F(_[$],1,1,()=>{_[$]=null}),Oe(),c=_[f],c?c.p(C,S):(c=_[f]=y[f](C),c.c()),E(c,1),c.m(o,null))},i(C){d||(E(e.$$.fragment,C),E(c),d=!0)},o(C){F(e.$$.fragment,C),F(c),d=!1},d(C){z(e,C),C&&k(t),C&&k(i),_[f].d(),h=!1,g()}}}function KE(n,e,t){let i;const s=[{label:"Optional (StartTLS)",value:!1},{label:"Always",value:!0}];let l={},r=!1,o=!1,a="";W.setDocumentTitle("Mail settings"),u();async function u(){t(1,r=!0);try{const P=await ke.Settings.getAll()||{};c(P)}catch(P){ke.errorResponseHandler(P)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const P=await ke.Settings.update(W.filterRedactedProps(l));c(P),mn("Successfully saved mail settings.")}catch(P){ke.errorResponseHandler(P)}t(2,o=!1)}}function c(P={}){t(0,l={meta:(P==null?void 0:P.meta)||{},smtp:(P==null?void 0:P.smtp)||{}}),t(6,a=JSON.stringify(l))}function d(){l.meta.senderName=this.value,t(0,l)}function h(){l.meta.senderAddress=this.value,t(0,l)}function g(){l.meta.userVerificationUrl=this.value,t(0,l)}function y(){l.meta.userResetPasswordUrl=this.value,t(0,l)}function _(){l.meta.userConfirmEmailChangeUrl=this.value,t(0,l)}function v(){l.smtp.enabled=this.checked,t(0,l)}function C(){l.smtp.host=this.value,t(0,l)}function S(){l.smtp.port=Ot(this.value),t(0,l)}function $(P){n.$$.not_equal(l.smtp.tls,P)&&(l.smtp.tls=P,t(0,l))}function M(){l.smtp.username=this.value,t(0,l)}function T(P){n.$$.not_equal(l.smtp.password,P)&&(l.smtp.password=P,t(0,l))}const A=()=>f(),D=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g,y,_,v,C,S,$,M,T,A,D]}class JE extends Pe{constructor(e){super(),Ee(this,e,KE,YE,De,{})}}function GE(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;e=new Fe({props:{class:"form-field form-field-toggle",$$slots:{default:[xE,({uniqueId:_})=>({17:_}),({uniqueId:_})=>_?131072:0]},$$scope:{ctx:n}}});let g=n[3]!=n[0].enabled&&Og(n),y=n[0].enabled&&Tg(n);return{c(){B(e.$$.fragment),t=O(),g&&g.c(),i=O(),y&&y.c(),s=O(),l=b("div"),r=b("div"),o=O(),a=b("button"),u=b("span"),u.textContent="Save changes",p(r,"class","flex-fill"),p(u,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-expanded"),a.disabled=f=!n[4]||n[2],ee(a,"btn-loading",n[2]),p(l,"class","flex")},m(_,v){V(e,_,v),w(_,t,v),g&&g.m(_,v),w(_,i,v),y&&y.m(_,v),w(_,s,v),w(_,l,v),m(l,r),m(l,o),m(l,a),m(a,u),c=!0,d||(h=X(a,"click",n[13]),d=!0)},p(_,v){const C={};v&393217&&(C.$$scope={dirty:v,ctx:_}),e.$set(C),_[3]!=_[0].enabled?g?(g.p(_,v),v&9&&E(g,1)):(g=Og(_),g.c(),E(g,1),g.m(i.parentNode,i)):g&&(Me(),F(g,1,1,()=>{g=null}),Oe()),_[0].enabled?y?(y.p(_,v),v&1&&E(y,1)):(y=Tg(_),y.c(),E(y,1),y.m(s.parentNode,s)):y&&(Me(),F(y,1,1,()=>{y=null}),Oe()),(!c||v&20&&f!==(f=!_[4]||_[2]))&&(a.disabled=f),v&4&&ee(a,"btn-loading",_[2])},i(_){c||(E(e.$$.fragment,_),E(g),E(y),c=!0)},o(_){F(e.$$.fragment,_),F(g),F(y),c=!1},d(_){z(e,_),_&&k(t),g&&g.d(_),_&&k(i),y&&y.d(_),_&&k(s),_&&k(l),d=!1,h()}}}function ZE(n){let e;return{c(){e=b("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function xE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("input"),i=O(),s=b("label"),l=q("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[17]),e.required=!0,p(s,"for",r=n[17])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[7]),o=!0)},p(u,f){f&131072&&t!==(t=u[17])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&131072&&r!==(r=u[17])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Og(n){let e,t,i,s,l,r,o,a=n[3]?"S3 storage":"local file system",u,f,c,d=n[0].enabled?"S3 storage":"local file system",h,g,y,_,v,C,S,$,M
the
2022-07-12 23:11:50 +08:00
`),o=b("strong"),u=q(a),f=q(`
to the
2022-07-12 23:11:50 +08:00
`),c=b("strong"),h=q(d),g=q(`.
`),y=b("br"),_=q(`
There are numerous command line tools that can help you, such as:
2022-07-12 23:11:50 +08:00
`),v=b("a"),v.textContent=`rclone
`,C=q(`,
`),S=b("a"),S.textContent=`s5cmd
`,$=q(", etc."),M=O(),T=b("div"),p(i,"class","icon"),p(v,"href","https://github.com/rclone/rclone"),p(v,"target","_blank"),p(v,"rel","noopener"),p(v,"class","txt-bold"),p(S,"href","https://github.com/peak/s5cmd"),p(S,"target","_blank"),p(S,"rel","noopener"),p(S,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(T,"class","clearfix m-t-base")},m(P,L){w(P,e,L),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(l,o),m(o,u),m(l,f),m(l,c),m(c,h),m(l,g),m(l,y),m(l,_),m(l,v),m(l,C),m(l,S),m(l,$),m(e,M),m(e,T),D=!0},p(P,L){(!D||L&8)&&a!==(a=P[3]?"S3 storage":"local file system")&&me(u,a),(!D||L&1)&&d!==(d=P[0].enabled?"S3 storage":"local file system")&&me(h,d)},i(P){D||(Mt(()=>{A||(A=at(e,Xt,{duration:150},!0)),A.run(1)}),D=!0)},o(P){A||(A=at(e,Xt,{duration:150},!1)),A.run(0),D=!1},d(P){P&&k(e),P&&A&&A.end()}}}function Tg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g,y,_,v,C,S;return i=new Fe({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[XE,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[QE,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field required",name:"s3.region",$$slots:{default:[eP,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),d=new Fe({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[tP,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),y=new Fe({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[nP,({uniqueId:$})=>({17:$}),({uniqueId:$})=>$?131072:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),B(i.$$.fragment),s=O(),l=b("div"),B(r.$$.fragment),o=O(),a=b("div"),B(u.$$.fragment),f=O(),c=b("div"),B(d.$$.fragment),h=O(),g=b("div"),B(y.$$.fragment),_=O(),v=b("div"),p(t,"class","col-lg-12"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(c,"class","col-lg-6"),p(g,"class","col-lg-6"),p(v,"class","col-lg-12"),p(e,"class","grid")},m($,M){w($,e,M),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),m(e,f),m(e,c),V(d,c,null),m(e,h),m(e,g),V(y,g,null),m(e,_),m(e,v),S=!0},p($,M){const T={};M&393217&&(T.$$scope={dirty:M,ctx:$}),i.$set(T);const A={};M&393217&&(A.$$scope={dirty:M,ctx:$}),r.$set(A);const D={};M&393217&&(D.$$scope={dirty:M,ctx:$}),u.$set(D);const P={};M&393217&&(P.$$scope={dirty:M,ctx:$}),d.$set(P);const L={};M&393217&&(L.$$scope={dirty:M,ctx:$}),y.$set(L)},i($){S||(E(i.$$.fragment,$),E(r.$$.fragment,$),E(u.$$.fragment,$),E(d.$$.fragment,$),E(y.$$.fragment,$),$&&Mt(()=>{C||(C=at(e,Xt,{duration:150},!0)),C.run(1)}),S=!0)},o($){F(i.$$.fragment,$),F(r.$$.fragment,$),F(u.$$.fragment,$),F(d.$$.fragment,$),F(y.$$.fragment,$),$&&(C||(C=at(e,Xt,{duration:150},!1)),C.run(0)),S=!1},d($){$&&k(e),z(i),z(r),z(u),z(d),z(y),$&&C&&C.end()}}}function XE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Endpoint"),s=O(),l=b("input"),p(e,"for",i=n[17]),p(l,"type","text"),p(l,"id",r=n[17]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].endpoint),o||(a=X(l,"input",n[8]),o=!0)},p(u,f){f&131072&&i!==(i=u[17])&&p(e,"for",i),f&131072&&r!==(r=u[17])&&p(l,"id",r),f&1&&l.value!==u[0].endpoint&&Ce(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function QE(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Bucket"),s=O(),l=b("input"),p(e,"for",i=n[17]),p(l,"type","text"),p(l,"id",r=n[17]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].bucket),o||(a=X(l,"input",n[9]),o=!0)},p(u,f){f&131072&&i!==(i=u[17])&&p(e,"for",i),f&131072&&r!==(r=u[17])&&p(l,"id",r),f&1&&l.value!==u[0].bucket&&Ce(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),o=!1,a()}}}function eP(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Region"),s=O(),l=b("input"),p(e,"for",i=n[17]),p(l,"type","text"),p(l,"id",r=n[17]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].region),o||(a=X(l,"input",n[10]),o=!0)},p(u,f){f&131072&&i!==(i=u[17])&&p(e,"for",i),f&131072&&r!==(r=u[17])&&p(l,
<div class="breadcrumb-item">Files storage</div></nav>`,l=O(),r=b("div"),o=b("form"),a=b("div"),a.innerHTML=`<p>By default PocketBase uses the local file system to store uploaded files.</p>
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content txt-xl m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(C,S){V(e,C,S),w(C,t,S),w(C,i,S),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),_[f].m(o,null),d=!0,h||(g=X(o,"submit",Wt(n[14])),h=!0)},p(C,[S]){let $=f;f=v(C),f===$?_[f].p(C,S):(Me(),F(_[$],1,1,()=>{_[$]=null}),Oe(),c=_[f],c?c.p(C,S):(c=_[f]=y[f](C),c.c()),E(c,1),c.m(o,null))},i(C){d||(E(e.$$.fragment,C),E(c),d=!0)},o(C){F(e.$$.fragment,C),F(c),d=!1},d(C){z(e,C),C&&k(t),C&&k(i),_[f].d(),h=!1,g()}}}function sP(n,e,t){let i,s={},l=!1,r=!1,o="",a=!1;W.setDocumentTitle("Files storage"),u();async function u(){t(1,l=!0);try{const $=await ke.Settings.getAll()||{};c($)}catch($){ke.errorResponseHandler($)}t(1,l=!1)}async function f(){if(!(r||!i)){t(2,r=!0);try{const $=await ke.Settings.update(W.filterRedactedProps({s3:s}));c($),Ki({}),mn("Successfully saved Files storage settings.")}catch($){ke.errorResponseHandler($)}t(2,r=!1)}}function c($={}){t(0,s=($==null?void 0:$.s3)||{}),t(3,a=s.enabled),t(6,o=JSON.stringify(s))}function d(){s.enabled=this.checked,t(0,s)}function h(){s.endpoint=this.value,t(0,s)}function g(){s.bucket=this.value,t(0,s)}function y(){s.region=this.value,t(0,s)}function _(){s.accessKey=this.value,t(0,s)}function v($){n.$$.not_equal(s.secret,$)&&(s.secret=$,t(0,s))}const C=()=>f(),S=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(4,i=o!=JSON.stringify(s))},[s,l,r,a,i,f,o,d,h,g,y,_,v,C,S]}class lP extends Pe{constructor(e){super(),Ee(this,e,sP,iP,De,{})}}function rP(n){let e,t,i,s,l,r,o,a;return{c(){e=b("input"),i=O(),s=b("label"),l=q("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",r=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[8]),o=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&r!==(r=u[16])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Dg(n){let e,t,i,s,l,r,o,a,u,f,c;return i=new Fe({props:{class:"form-field required",name:"emailPassword.minPasswordLength",$$slots:{default:[oP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),r=new Fe({props:{class:"form-field "+(W.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailPassword.exceptDomains",$$slots:{default:[aP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Fe({props:{class:"form-field "+(W.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailPassword.onlyDomains",$$slots:{default:[uP,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=b("div"),t=b("div"),B(i.$$.fragment),s=O(),l=b("div"),B(r.$$.fragment),o=O(),a=b("div"),B(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,h){w(d,e,h),m(e,t),V(i,t,null),m(e,s),m(e,l),V(r,l,null),m(e,o),m(e,a),V(u,a,null),c=!0},p(d,h){const g={};h&196609&&(g.$$scope={dirty:h,ctx:d}),i.$set(g);const y={};h&1&&(y.class="form-field "+(W.isEmpty(d[0].onlyDomains)?"":"disabled")),h&196609&&(y.$$scope={dirty:h,ctx:d}),r.$set(y);const _={};h&1&&(_.class="form-field "+(W.isEmpty(d[0].exceptDomains)?"":"disabled")),h&196609&&(_.$$scope={dirty:h,ctx:d}),u.$set(_)},i(d){c||(E(i.$$.fragment,d),E(r.$$.fragment,d),E(u.$$.fragment,d),d&&Mt(()=>{f||(f=at(e,Xt,{duration:150},!0)),f.run(1)}),c=!0)},o(d){F(i.$$.fragment,d),F(r.$$.fragment,d),F(u.$$.fragment,d),d&&(f||(f=at(e,Xt,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),z(i),z(r),z(u),d&&f&&f.end()}}}function oP(n){let e,t,i,s,l,r,o,a;return{c(){e=b("label"),t=q("Minimum password length"),s=O(),l=b("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",r=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Ce(l,n[0].minPasswordLength),o||(a=X(l,"input",n[9]),o=!0)},p(u,f){f&65536&&i!==(i=u[16])&&p(e,"for",i),f&65536&&r!==(r=u[16])&&p(l,"id",r),f&1&&Ot(l.value)!==u[0].minPasswordLength&&Ce(l,u[0].m
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,v){(!c||v&65536&&l!==(l=_[16]))&&p(e,"for",l);const C={};v&65536&&(C.id=_[16]),v&1&&(C.disabled=!W.isEmpty(_[0].onlyDomains)),!a&&v&1&&(a=!0,C.value=_[0].exceptDomains,je(()=>a=!1)),o.$set(C)},i(_){c||(E(o.$$.fragment,_),c=!0)},o(_){F(o.$$.fragment,_),c=!1},d(_){_&&k(e),_&&k(r),z(o,_),_&&k(u),_&&k(f),d=!1,h()}}}function uP(n){let e,t,i,s,l,r,o,a,u,f,c,d,h;function g(_){n[11](_)}let y={id:n[16]+".config.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(y.value=n[0].onlyDomains),o=new Ss({props:y}),pe.push(()=>Ie(o,"value",g)),{c(){e=b("label"),t=b("span"),t.textContent="Only domains",i=O(),s=b("i"),r=O(),B(o.$$.fragment),u=O(),f=b("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]+".config.onlyDomains"),p(f,"class","help-block")},m(_,v){w(_,e,v),m(e,t),m(e,i),m(e,s),w(_,r,v),V(o,_,v),w(_,u,v),w(_,f,v),c=!0,d||(h=Xe(wt.call(null,s,{text:`Email domains that are ONLY allowed to sign up.
This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,v){(!c||v&65536&&l!==(l=_[16]+".config.onlyDomains"))&&p(e,"for",l);const C={};v&65536&&(C.id=_[16]+".config.onlyDomains"),v&1&&(C.disabled=!W.isEmpty(_[0].exceptDomains)),!a&&v&1&&(a=!0,C.value=_[0].onlyDomains,je(()=>a=!1)),o.$set(C)},i(_){c||(E(o.$$.fragment,_),c=!0)},o(_){F(o.$$.fragment,_),c=!1},d(_){_&&k(e),_&&k(r),z(o,_),_&&k(u),_&&k(f),d=!1,h()}}}function fP(n){let e,t,i,s;e=new Fe({props:{class:"form-field form-field-toggle m-b-0",name:"emailPassword.enabled",$$slots:{default:[rP,({uniqueId:r})=>({16:r}),({uniqueId:r})=>r?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Dg(n);return{c(){B(e.$$.fragment),t=O(),l&&l.c(),i=st()},m(r,o){V(e,r,o),w(r,t,o),l&&l.m(r,o),w(r,i,o),s=!0},p(r,o){const a={};o&196609&&(a.$$scope={dirty:o,ctx:r}),e.$set(a),r[0].enabled?l?(l.p(r,o),o&1&&E(l,1)):(l=Dg(r),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(Me(),F(l,1,1,()=>{l=null}),Oe())},i(r){s||(E(e.$$.fragment,r),E(l),s=!0)},o(r){F(e.$$.fragment,r),F(l),s=!1},d(r){z(e,r),r&&k(t),l&&l.d(r),r&&k(i)}}}function cP(n){let e;return{c(){e=b("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dP(n){let e;return{c(){e=b("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ag(n){let e,t,i,s,l,r;return{c(){e=b("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,a){w(o,e,a),s=!0,l||(r=Xe(t=wt.call(null,e,{text:"Has errors",position:"left"})),l=!0)},i(o){s||(Mt(()=>{i||(i=at(e,Wn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(o){i||(i=at(e,Wn,{duration:150,start:.7},!1)),i.run(0),s=!1},d(o){o&&k(e),o&&i&&i.end(),l=!1,r()}}}function pP(n){let e,t,i,s,l,r,o;function a(d,h){return d[0].enabled?dP:cP}let u=a(n),f=u(n),c=n[2]&&Ag();return{c(){e=b("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
<span class="txt">Email/Password</span>`,t=O(),f.c(),i=O(),s=b("div"),l=O(),c&&c.c(),r=st(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){w(d,e,h),w(d,t,h),f.m(d,h),w(d,i,h),w(d,s,h),w(d,l,h),c&&c.m(d,h),w(d,r,h),o=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?h&4&&E(c,1):(c=Ag(),c.c(),E(c,1),c.m(r.parentNode,r)):c&&(Me(),F(c,1,1,()=>{c=null}),Oe())},i(d){o||(E(c),o=!0)},o(d){F(c),o=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(r)}}}function hP(n){let e,t;const i=[n[3]];let s={$$slots:{header:[pP],default:[fP]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ct(s,i[l]);return e=new hf({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){B(e.$$.fragment)},m(l,r){V(e,l,r),t=!0},p(l,[r]){const o=r&8?bn(i,[hi(l[3])]):{};r&131077&&(o.$$scope={dirty:r,ctx:l}),e.$set(o)},i(l){t||(E(e.$$.fragment,l),t=!0)},o(l){F(e.$$.fragment,l),t=!1},d(l){n[12](null),z(e,l)}}}function mP(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Ut(e,s),r;hn(n,ys,$=>t(7,r=$));let{config:o={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){o.enabled=this.checked,t(0,o)}function h(){o.minPasswordLength=Ot(this.value),t(0,o)}function g($){n.$$.not_equal(o.exceptDomains,$)&&(o.exceptDomains=$,t(0,o))}function y($){n.$$.not_equal(o.onlyDomains,$)&&(o.onlyDomains=$,t(0,o))}function _($){pe[$?"unshift":"push"](()=>{a=$,t(1,a)})}function v($){ft.call(this,n,$)}function C($){ft.call(this,n,$)}function S($){ft.call(this,n,$)}return n.$$set=$=>{e=ct(ct({},e),di($)),t(3,l=Ut(e,s)),"config"in $&&t(0,o=$.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!W.isEmpty(r==null?void 0:r.emailPassword))},[o,a,i,l,u,f,c,r,d,h,g,y,_,v,C,S]}class gP extends Pe{constructor(e){super(),Ee(this,e,mP,hP,De,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function _P(n){let e,t,i,s,l,r,o,a;return{c(){e=b("input"),i=O(),s=b("label"),l=q("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[22]),p(s,"for",r=n[22])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),o||(a=X(e,"change",n[11]),o=!0)},p(u,f){f&4194304&&t!==(t=u[22])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&4194304&&r!==(r=u[22])&&p(s,"for",r)},d(u){u&&k(e),u&&k(i),u&&k(s),o=!1,a()}}}function Eg(n){let e,t,i,s,l,r,o,a,u,f,c,d,h,g;l=new Fe({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[bP,({uniqueId:_})=>({22:_}),({uniqueId:_})=>_?4194304:0]},$$scope:{ctx:n}}}),a=new Fe({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[yP,({uniqueId:_})=>({22:_}),({uniqueId:_})=>_?4194304:0]},$$scope:{ctx:n}}}),c=new Fe({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[vP,({uniqueId:_})=>({22:_}),({uniqueId:_})=>_?4194304:0]},$$scope:{ctx:n}}});let y=n[4]&&Pg(n);return{c(){e=b("div"),t=b("div"),i=O(),s=b("div"),B(l.$$.fragment),r=O(),o=b("div"),B(a.$$.fragment),u=O(),f=b("div"),B(c.$$.fragment),d=O(),y&&y.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(o,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(_,v){w(_,e,v),m(e,t),m(e,i),m(e,s),V(l,s,null),m(e,r),m(e,o),V(a,o,null),m(e,u),m(e,f),V(c,f,null),m(e,d),y&&y.m(e,null),g=!0},p(_,v){const C={};v&2&&(C.name=_[1]+".clientId"),v&12582913&&(C.$$scope={dirty:v,ctx:_}),l.$set(C);const S={};v&2&&(S.name=_[1]+".clientSecret"),v&12582913&&(S.$$scope={dirty:v,ctx:_}),a.$set(S);const $={};v&2&&($.name=_[1]+".allowRegistrations"),v&12582913&&($.$$scope={dirty:v,ctx:_}),c.$set($),_[4]?y?(y.p(_,v),v&16&&E(y,1)):(y=Pg(_),y.c(),E(y,1),y.m(e,null)):y&&(Me(),F(y,1,1,()=>{y=null}),Oe())},i(_){g||(E(l.$$.fragment,_),E(a.$$.fragment,_),E(c.$$.fragment,_),E(y),_&&Mt(()=>{h||(h=at(e,Xt,{duration:200},!0)),h.run(1)}),g=!0)},o(_){F(l.$$.fragment,_),F(a.$$.fragment,_),F(c.$$.fragment,_),F(y),_&&(h||(h=at(e,Xt,{duration:200},!1)),h.run(0)),g=!1},d(
<div class="breadcrumb-item">Auth providers</div></nav>`,l=O(),r=b("div"),o=b("form"),a=b("h6"),a.textContent="Manage the allowed users sign-in/sign-up methods.",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","m-b-base"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(C,S){V(e,C,S),w(C,t,S),w(C,i,S),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),_[f].m(o,null),d=!0,h||(g=X(o,"submit",Wt(n[5])),h=!0)},p(C,[S]){let $=f;f=v(C),f===$?_[f].p(C,S):(Me(),F(_[$],1,1,()=>{_[$]=null}),Oe(),c=_[f],c?c.p(C,S):(c=_[f]=y[f](C),c.c()),E(c,1),c.m(o,null))},i(C){d||(E(e.$$.fragment,C),E(c),d=!0)},o(C){F(e.$$.fragment,C),F(c),d=!1},d(C){z(e,C),C&&k(t),C&&k(i),_[f].d(),h=!1,g()}}}function LP(n,e,t){let i,s,l={},r=!1,o=!1,a="";W.setDocumentTitle("Auth providers"),u();async function u(){t(2,r=!0);try{const S=await ke.Settings.getAll()||{};c(S)}catch(S){ke.errorResponseHandler(S)}t(2,r=!1)}async function f(){if(!(o||!i)){t(3,o=!0);try{const S=await ke.Settings.update(W.filterRedactedProps(l));c(S),Ki({}),s==null||s.collapseSiblings(),mn("Successfully updated auth providers.")}catch(S){ke.errorResponseHandler(S)}t(3,o=!1)}}function c(S){S=S||{},t(0,l={}),t(0,l.emailAuth=Object.assign({enabled:!0},S.emailAuth),l);const $=["googleAuth","facebookAuth","githubAuth","gitlabAuth"];for(const M of $)t(0,l[M]=Object.assign({enabled:!1,allowRegistrations:!0},S[M]),l);t(6,a=JSON.stringify(l))}function d(S){pe[S?"unshift":"push"](()=>{s=S,t(1,s)})}function h(S){n.$$.not_equal(l.emailAuth,S)&&(l.emailAuth=S,t(0,l))}function g(S){n.$$.not_equal(l.googleAuth,S)&&(l.googleAuth=S,t(0,l))}function y(S){n.$$.not_equal(l.facebookAuth,S)&&(l.facebookAuth=S,t(0,l))}function _(S){n.$$.not_equal(l.githubAuth,S)&&(l.githubAuth=S,t(0,l))}function v(S){n.$$.not_equal(l.gitlabAuth,S)&&(l.gitlabAuth=S,t(0,l))}const C=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(4,i=a!=JSON.stringify(l))},[l,s,r,o,i,f,a,d,h,g,y,_,v,C]}class FP extends Pe{constructor(e){super(),Ee(this,e,LP,PP,De,{})}}function Ig(n,e,t){const i=n.slice();return i[12]=e[t],i[13]=e,i[14]=t,i}function IP(n){let e=[],t=new Map,i,s,l,r,o,a,u,f,c,d,h=n[4];const g=y=>y[12].key;for(let y=0;y<h.length;y+=1){let _=Ig(n,h,y),v=g(_);t.set(v,e[y]=Ng(v,_))}return{c(){for(let y=0;y<e.length;y+=1)e[y].c();i=O(),s=b("div"),l=b("div"),r=O(),o=b("button"),a=b("span"),a.textContent="Save changes",p(l,"class","flex-fill"),p(a,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-expanded"),o.disabled=u=!n[3]||n[2],ee(o,"btn-loading",n[2]),p(s,"class","flex")},m(y,_){for(let v=0;v<e.length;v+=1)e[v].m(y,_);w(y,i,_),w(y,s,_),m(s,l),m(s,r),m(s,o),m(o,a),f=!0,c||(d=X(o,"click",n[9]),c=!0)},p(y,_){_&32785&&(h=y[4],Me(),e=rt(e,_,g,1,y,h,t,i.parentNode,Ft,Ng,i,Ig),Oe()),(!f||_&12&&u!==(u=!y[3]||y[2]))&&(o.disabled=u),_&4&&ee(o,"btn-loading",y[2])},i(y){if(!f){for(let _=0;_<h.length;_+=1)E(e[_]);f=!0}},o(y){for(let _=0;_<e.length;_+=1)F(e[_]);f=!1},d(y){for(let _=0;_<e.length;_+=1)e[_].d(y);y&&k(i),y&&k(s),c=!1,d()}}}function NP(n){let e;return{c(){e=b("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:oe,i:oe,o:oe,d(t){t&&k(e)}}}function RP(n){let e,t=n[12].label+"",i,s,l,r,o,a,u,f,c,d,h;function g(){n[7].call(o,n[12])}function y(){return n[8](n[12])}return{c(){e=b("label"),i=q(t),s=q(" duration (in seconds)"),r=O(),o=b("input"),u=O(),f=b("div"),c=b("span"),c.textContent="Invalidate all previously issued tokens",p(e,"for",l=n[15]),p(o,"type","number"),p(o,"id",a=n[15]),o.required=!0,p(c,"class","link-primary"),ee(c,"txt-success",n[0][n[12].key].secret),p(f,"class","help-block")},m(_,v){w(_,e,v),m(e,i),m(e,s),w(_,r,v),w(_,o,v),Ce(o,n[0][n[12].key].duration),w(_,u,v),w(_,f,v),m(f,c),d||(h=[X(o,"input",g),X(c,"click",y)],d=!0)},p(_,v){n=_,v&32768&&l!==(l=n[15])&&p(e,"for",l),v&32768&&a!==(a=n[15])&&p(o,"id",a),v&17&&Ot(o.value)!==n[0][n[12].key].duration&&Ce(o,n[0][n[12].key].duration),v&17&&ee(c,"txt-success",n[0][n[12].key].secret)},d(_){_&&k(e),_&&k(r),_&&k(o),_&&k(u),_&&k(f),d=!1,lt(h)}}}function Ng(n,e){let t,i,s;return i=new Fe({props:{class:"form-field required"
<div class="breadcrumb-item">Token options</div></nav>`,l=O(),r=b("div"),o=b("form"),a=b("div"),a.innerHTML="<p>Adjust common token options.</p>",u=O(),c.c(),p(s,"class","page-header"),p(a,"class","content m-b-sm txt-xl"),p(o,"class","panel"),p(o,"autocomplete","off"),p(r,"class","wrapper"),p(i,"class","page-wrapper")},m(C,S){V(e,C,S),w(C,t,S),w(C,i,S),m(i,s),m(i,l),m(i,r),m(r,o),m(o,a),m(o,u),_[f].m(o,null),d=!0,h||(g=X(o,"submit",Wt(n[5])),h=!0)},p(C,[S]){let $=f;f=v(C),f===$?_[f].p(C,S):(Me(),F(_[$],1,1,()=>{_[$]=null}),Oe(),c=_[f],c?c.p(C,S):(c=_[f]=y[f](C),c.c()),E(c,1),c.m(o,null))},i(C){d||(E(e.$$.fragment,C),E(c),d=!0)},o(C){F(e.$$.fragment,C),F(c),d=!1},d(C){z(e,C),C&&k(t),C&&k(i),_[f].d(),h=!1,g()}}}function HP(n,e,t){let i;const s=[{key:"userAuthToken",label:"Users auth token"},{key:"userVerificationToken",label:"Users email verification token"},{key:"userPasswordResetToken",label:"Users password reset token"},{key:"userEmailChangeToken",label:"Users email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];let l={},r=!1,o=!1,a="";W.setDocumentTitle("Token options"),u();async function u(){t(1,r=!0);try{const y=await ke.Settings.getAll()||{};c(y)}catch(y){ke.errorResponseHandler(y)}t(1,r=!1)}async function f(){if(!(o||!i)){t(2,o=!0);try{const y=await ke.Settings.update(W.filterRedactedProps(l));c(y),mn("Successfully saved tokens options.")}catch(y){ke.errorResponseHandler(y)}t(2,o=!1)}}function c(y){var _;y=y||{},t(0,l={});for(const v of s)t(0,l[v.key]={duration:((_=y[v.key])==null?void 0:_.duration)||0},l);t(6,a=JSON.stringify(l))}function d(y){l[y.key].duration=Ot(this.value),t(0,l)}const h=y=>{l[y.key].secret?(delete l[y.key].secret,t(0,l)):t(0,l[y.key].secret=W.randomString(50),l)},g=()=>f();return n.$$.update=()=>{n.$$.dirty&65&&t(3,i=a!=JSON.stringify(l))},[l,r,o,i,s,f,a,d,h,g]}class qP extends Pe{constructor(e){super(),Ee(this,e,HP,jP,De,{})}}const dn=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Zs("/"):!0}],VP={"/login":ln({component:vE,conditions:dn.concat([n=>!ke.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":ln({asyncComponent:()=>as(()=>import("./PageAdminRequestPasswordReset.5fcb0fc5.js"),[]),conditions:dn.concat([n=>!ke.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":ln({asyncComponent:()=>as(()=>import("./PageAdminConfirmPasswordReset.c21eda58.js"),[]),conditions:dn.concat([n=>!ke.AuthStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":ln({component:wA,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":ln({component:L$,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/users":ln({component:YA,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":ln({asyncComponent:()=>as(()=>import("./PageUserConfirmPasswordReset.b102eb68.js"),[]),conditions:dn.concat([()=>(ke.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":ln({asyncComponent:()=>as(()=>import("./PageUserConfirmVerification.cfe07929.js"),[]),conditions:dn.concat([()=>(ke.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":ln({asyncComponent:()=>as(()=>import("./PageUserConfirmEmailChange.935f26c8.js"),[]),conditions:dn.concat([()=>(ke.logout(!1),!0)]),userData:{showAppSidebar:!1}}),"/settings":ln({component:TE,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":ln({component:hE,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":ln({component:JE,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":ln({component:lP,conditions:dn.concat([n=>ke.AuthStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":ln({component:FP,conditions:dn.concat([n=>ke.AuthStore.isValid]),userDat
<span class="txt">Manage admins</span>`,t=O(),i=b("hr"),s=O(),l=b("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i>
<span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),r||(o=[Xe(On.call(null,e)),X(l,"click",n[4])],r=!0)},p:oe,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),r=!1,lt(o)}}}function tL(n){var c;let e,t,i,s,l,r,o,a,u,f=((c=n[1])==null?void 0:c.id)&&n[0]&&Hg(n);return s=new a1({props:{routes:VP}}),s.$on("routeLoading",n[2]),s.$on("conditionsFailed",n[3]),r=new JP({}),a=new QP({}),{c(){e=b("div"),f&&f.c(),t=O(),i=b("div"),B(s.$$.fragment),l=O(),B(r.$$.fragment),o=O(),B(a.$$.fragment),p(i,"class","app-body"),p(e,"class","app-layout")},m(d,h){w(d,e,h),f&&f.m(e,null),m(e,t),m(e,i),V(s,i,null),w(d,l,h),V(r,d,h),w(d,o,h),V(a,d,h),u=!0},p(d,[h]){var g;((g=d[1])==null?void 0:g.id)&&d[0]?f?(f.p(d,h),h&3&&E(f,1)):(f=Hg(d),f.c(),E(f,1),f.m(e,t)):f&&(Me(),F(f,1,1,()=>{f=null}),Oe())},i(d){u||(E(f),E(s.$$.fragment,d),E(r.$$.fragment,d),E(a.$$.fragment,d),u=!0)},o(d){F(f),F(s.$$.fragment,d),F(r.$$.fragment,d),F(a.$$.fragment,d),u=!1},d(d){d&&k(e),f&&f.d(),z(s),d&&k(l),z(r,d),d&&k(o),z(a,d)}}}function nL(n,e,t){let i;hn(n,Bu,u=>t(1,i=u));let s,l=!1;function r(u){var f,c,d,h;((f=u==null?void 0:u.detail)==null?void 0:f.location)!==s&&(t(0,l=!!((d=(c=u==null?void 0:u.detail)==null?void 0:c.userData)!=null&&d.showAppSidebar)),s=(h=u==null?void 0:u.detail)==null?void 0:h.location,W.setDocumentTitle(""),Ki({}),Fb())}function o(){Zs("/")}function a(){ke.logout()}return[l,i,r,o,a]}class iL extends Pe{constructor(e){super(),Ee(this,e,nL,tL,De,{})}}new iL({target:document.getElementById("app")});export{lt as A,mn as B,W as C,Zs as D,st as E,I0 as F,hn as G,Gs as H,_n as I,pi as J,pe as K,Fn as P,Pe as S,F as a,O as b,B as c,z as d,b as e,p as f,w as g,m as h,Ee as i,Xe as j,Me as k,On as l,V as m,Oe as n,k as o,ke as p,Fe as q,ee as r,De as s,E as t,X as u,Wt as v,q as w,me as x,oe as y,Ce as z};