import{g as bt,p as wt,a1 as Et,aJ as gt,r as Rt,aZ as St,bb as Ot,a3 as Oe,a8 as Tt,j as At,al as Te,S as ne,k as Ae,Z as xt,av as Pt,aP as Ct,bf as Dt,Q as Nt}from"./index-C608Qty9.js";import{i as Bt}from"./VTextField-B6W38itG.js";const Lt=wt({fullscreen:Boolean,retainFocus:{type:Boolean,default:!0},scrollable:Boolean,...Ct({origin:"center center",scrollStrategy:"block",transition:{component:Bt},zIndex:2400})},"VDialog"),Tr=bt()({name:"VDialog",props:Lt(),emits:{"update:modelValue":e=>!0,afterEnter:()=>!0,afterLeave:()=>!0},setup(e,t){let{emit:n,slots:r}=t;const s=Et(e,"modelValue"),{scopeId:i}=gt(),o=Rt();function c(u){var w,h;const d=u.relatedTarget,b=u.target;if(d!==b&&((w=o.value)!=null&&w.contentEl)&&((h=o.value)!=null&&h.globalTop)&&![document,o.value.contentEl].includes(b)&&!o.value.contentEl.contains(b)){const m=Dt(o.value.contentEl);if(!m.length)return;const p=m[0],E=m[m.length-1];d===p?E.focus():p.focus()}}St(()=>{document.removeEventListener("focusin",c)}),Ot&&Oe(()=>s.value&&e.retainFocus,u=>{u?document.addEventListener("focusin",c):document.removeEventListener("focusin",c)},{immediate:!0});function f(){var u;n("afterEnter"),(e.scrim||e.retainFocus)&&((u=o.value)!=null&&u.contentEl)&&!o.value.contentEl.contains(document.activeElement)&&o.value.contentEl.focus({preventScroll:!0})}function l(){n("afterLeave")}return Oe(s,async u=>{var d;u||(await Tt(),(d=o.value.activatorEl)==null||d.focus({preventScroll:!0}))}),At(()=>{const u=Te.filterProps(e),d=ne({"aria-haspopup":"dialog"},e.activatorProps),b=ne({tabindex:-1},e.contentProps);return Ae(Te,ne({ref:o,class:["v-dialog",{"v-dialog--fullscreen":e.fullscreen,"v-dialog--scrollable":e.scrollable},e.class],style:e.style},u,{modelValue:s.value,"onUpdate:modelValue":w=>s.value=w,"aria-modal":"true",activatorProps:d,contentProps:b,height:e.fullscreen?void 0:e.height,width:e.fullscreen?void 0:e.width,maxHeight:e.fullscreen?void 0:e.maxHeight,maxWidth:e.fullscreen?void 0:e.maxWidth,role:"dialog",onAfterEnter:f,onAfterLeave:l},i),{activator:r.activator,default:function(){for(var w=arguments.length,h=new Array(w),m=0;m{var p;return[(p=r.default)==null?void 0:p.call(r,...h)]}})}})}),Pt({},o)}});function ze(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ft}=Object.prototype,{getPrototypeOf:Ee}=Object,{iterator:K,toStringTag:$e}=Symbol,X=(e=>t=>{const n=Ft.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>X(t)===e),G=e=>t=>typeof t===e,{isArray:k}=Array,v=G("undefined");function Ut(e){return e!==null&&!v(e)&&e.constructor!==null&&!v(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Je=P("ArrayBuffer");function _t(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Je(e.buffer),t}const kt=G("string"),A=G("function"),We=G("number"),Z=e=>e!==null&&typeof e=="object",It=e=>e===!0||e===!1,V=e=>{if(X(e)!=="object")return!1;const t=Ee(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!($e in e)&&!(K in e)},jt=P("Date"),vt=P("File"),Mt=P("Blob"),qt=P("FileList"),Ht=e=>Z(e)&&A(e.pipe),Vt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=X(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},zt=P("URLSearchParams"),[$t,Jt,Wt,Kt]=["ReadableStream","Request","Response","Headers"].map(P),Xt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function M(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),k(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xe=e=>!v(e)&&e!==L;function ce(){const{caseless:e}=Xe(this)&&this||{},t={},n=(r,s)=>{const i=e&&Ke(t,s)||s;V(t[i])&&V(r)?t[i]=ce(t[i],r):V(r)?t[i]=ce({},r):k(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r(M(t,(s,i)=>{n&&A(s)?e[i]=ze(s,n):e[i]=s},{allOwnKeys:r}),e),Zt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Qt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Yt=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ee(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},en=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},tn=e=>{if(!e)return null;if(k(e))return e;let t=e.length;if(!We(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ee(Uint8Array)),rn=(e,t)=>{const r=(e&&e[K]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},sn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},on=P("HTMLFormElement"),an=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),xe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cn=P("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};M(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},un=e=>{Ge(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ln=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return k(e)?r(e):r(String(e).split(t)),n},fn=()=>{},dn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function hn(e){return!!(e&&A(e.append)&&e[$e]==="FormData"&&e[K])}const pn=e=>{const t=new Array(10),n=(r,s)=>{if(Z(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=k(r)?[]:{};return M(r,(o,c)=>{const f=n(o,s+1);!v(f)&&(i[c]=f)}),t[s]=void 0,i}}return r};return n(e,0)},mn=P("AsyncFunction"),yn=e=>e&&(Z(e)||A(e))&&A(e.then)&&A(e.catch),Ze=((e,t)=>e?setImmediate:t?((n,r)=>(L.addEventListener("message",({source:s,data:i})=>{s===L&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(L.postMessage)),bn=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Ze,wn=e=>e!=null&&A(e[K]),a={isArray:k,isArrayBuffer:Je,isBuffer:Ut,isFormData:Vt,isArrayBufferView:_t,isString:kt,isNumber:We,isBoolean:It,isObject:Z,isPlainObject:V,isReadableStream:$t,isRequest:Jt,isResponse:Wt,isHeaders:Kt,isUndefined:v,isDate:jt,isFile:vt,isBlob:Mt,isRegExp:cn,isFunction:A,isStream:Ht,isURLSearchParams:zt,isTypedArray:nn,isFileList:qt,forEach:M,merge:ce,extend:Gt,trim:Xt,stripBOM:Zt,inherits:Qt,toFlatObject:Yt,kindOf:X,kindOfTest:P,endsWith:en,toArray:tn,forEachEntry:rn,matchAll:sn,isHTMLForm:on,hasOwnProperty:xe,hasOwnProp:xe,reduceDescriptors:Ge,freezeMethods:un,toObjectSet:ln,toCamelCase:an,noop:fn,toFiniteNumber:dn,findKey:Ke,global:L,isContextDefined:Xe,isSpecCompliantForm:hn,toJSONObject:pn,isAsyncFn:mn,isThenable:yn,setImmediate:Ze,asap:bn,isIterable:wn};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Qe=y.prototype,Ye={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ye[e]={value:e}});Object.defineProperties(y,Ye);Object.defineProperty(Qe,"isAxiosError",{value:!0});y.from=(e,t,n,r,s,i)=>{const o=Object.create(Qe);return a.toFlatObject(e,o,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),y.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const En=null;function ue(e){return a.isPlainObject(e)||a.isArray(e)}function et(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,n){return e?e.concat(t).map(function(s,i){return s=et(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function gn(e){return a.isArray(e)&&!e.some(ue)}const Rn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function Q(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,p){return!a.isUndefined(p[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(!f&&a.isBlob(h))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?f&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,p){let E=h;if(h&&!p&&typeof h=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&gn(h)||(a.isFileList(h)||a.endsWith(m,"[]"))&&(E=a.toArray(h)))return m=et(m),E.forEach(function(S,D){!(a.isUndefined(S)||S===null)&&t.append(o===!0?Pe([m],D,i):o===null?m:m+"[]",l(S))}),!1}return ue(h)?!0:(t.append(Pe(p,m,i),l(h)),!1)}const d=[],b=Object.assign(Rn,{defaultVisitor:u,convertValue:l,isVisitable:ue});function w(h,m){if(!a.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),a.forEach(h,function(E,R){(!(a.isUndefined(E)||E===null)&&s.call(t,E,a.isString(R)?R.trim():R,m,b))===!0&&w(E,m?m.concat(R):[R])}),d.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Ce(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ge(e,t){this._pairs=[],e&&Q(e,this,t)}const tt=ge.prototype;tt.append=function(t,n){this._pairs.push([t,n])};tt.toString=function(t){const n=t?function(r){return t.call(this,r,Ce)}:Ce;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Sn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||Sn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new ge(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class De{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const rt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},On=typeof URLSearchParams<"u"?URLSearchParams:ge,Tn=typeof FormData<"u"?FormData:null,An=typeof Blob<"u"?Blob:null,xn={isBrowser:!0,classes:{URLSearchParams:On,FormData:Tn,Blob:An},protocols:["http","https","file","blob","url","data"]},Re=typeof window<"u"&&typeof document<"u",le=typeof navigator=="object"&&navigator||void 0,Pn=Re&&(!le||["ReactNative","NativeScript","NS"].indexOf(le.product)<0),Cn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Dn=Re&&window.location.href||"http://localhost",Nn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Re,hasStandardBrowserEnv:Pn,hasStandardBrowserWebWorkerEnv:Cn,navigator:le,origin:Dn},Symbol.toStringTag,{value:"Module"})),O={...Nn,...xn};function Bn(e,t){return Q(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Ln(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Fn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&a.isArray(s)?s.length:o,f?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Fn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Ln(r),s,n,0)}),n}return null}function Un(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const q={transitional:rt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(st(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Q(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Un(t)):t}],transformResponse:[function(t){const n=this.transitional||q.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{q.headers[e]={}});const _n=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kn=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&_n[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ne=Symbol("internals");function j(e){return e&&String(e).trim().toLowerCase()}function z(e){return e===!1||e==null?e:a.isArray(e)?e.map(z):String(e)}function In(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const jn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function re(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function vn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let x=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,f,l){const u=j(f);if(!u)throw new Error("header name must be a non-empty string");const d=a.findKey(s,u);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||f]=z(c))}const o=(c,f)=>a.forEach(c,(l,u)=>i(l,u,f));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!jn(t))o(kn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},f,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(f=c[l])?a.isArray(f)?[...f,u[1]]:[f,u[1]]:u[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=j(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return In(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=j(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||re(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=j(o),o){const c=a.findKey(r,o);c&&(!n||re(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||re(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=z(s),delete n[i];return}const c=t?vn(i):String(i).trim();c!==i&&delete n[i],n[c]=z(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ne]=this[Ne]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=j(o);r[c]||(Mn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(x.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(x);function se(e,t){const n=this||q,r=t||n,s=x.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function ot(e){return!!(e&&e.__CANCEL__)}function I(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(I,y,{__CANCEL__:!0});function it(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const l=Date.now(),u=r[i];o||(o=l),n[s]=f,r[s]=l;let d=i,b=0;for(;d!==s;)b+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o{n=u,s=null,i&&(clearTimeout(i),i=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const J=(e,t,n=3)=>{let r=0;const s=Hn(50,250);return Vn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,f=o-r,l=s(f),u=o<=c;r=o;const d={loaded:o,total:c,progress:c?o/c:void 0,bytes:f,rate:l||void 0,estimated:l&&c&&u?(c-o)/l:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(d)},n)},Be=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Le=e=>(...t)=>a.asap(()=>e(...t)),zn=O.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,O.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,$n=O.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Jn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function at(e,t,n){let r=!Jn(t);return e&&(r||n==!1)?Wn(e,t):t}const Fe=e=>e instanceof x?{...e}:e;function _(e,t){t=t||{};const n={};function r(l,u,d,b){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:b},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,d,b){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,d,b)}else return r(l,u,d,b)}function i(l,u){if(!a.isUndefined(u))return r(void 0,u)}function o(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(l,u,d)=>s(Fe(l),Fe(u),d,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=f[u]||s,b=d(e[u],t[u],u);a.isUndefined(b)&&d!==c||(n[u]=b)}),n}const ct=e=>{const t=_({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;t.headers=o=x.from(o),t.url=nt(at(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((f=o.getContentType())!==!1){const[l,...u]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(O.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&zn(t.url))){const l=s&&i&&$n.read(i);l&&o.set(s,l)}return t},Kn=typeof XMLHttpRequest<"u",Xn=Kn&&function(e){return new Promise(function(n,r){const s=ct(e);let i=s.data;const o=x.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:l}=s,u,d,b,w,h;function m(){w&&w(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let p=new XMLHttpRequest;p.open(s.method.toUpperCase(),s.url,!0),p.timeout=s.timeout;function E(){if(!p)return;const S=x.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:S,config:e,request:p};it(function(B){n(B),m()},function(B){r(B),m()},T),p=null}"onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(r(new y("Request aborted",y.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||rt;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new y(D,T.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&a.forEach(o.toJSON(),function(D,T){p.setRequestHeader(T,D)}),a.isUndefined(s.withCredentials)||(p.withCredentials=!!s.withCredentials),c&&c!=="json"&&(p.responseType=s.responseType),l&&([b,h]=J(l,!0),p.addEventListener("progress",b)),f&&p.upload&&([d,w]=J(f),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(u=S=>{p&&(r(!S||S.type?new I(null,e,p):S),p.abort(),p=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const R=qn(s.url);if(R&&O.protocols.indexOf(R)===-1){r(new y("Unsupported protocol "+R+":",y.ERR_BAD_REQUEST,e));return}p.send(i||null)})},Gn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof y?u:new I(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},Zn=function*(e,t){let n=e.byteLength;if(n{const s=Qn(e,t);let i=0,o,c=f=>{o||(o=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:l,value:u}=await s.next();if(l){c(),f.close();return}let d=u.byteLength;if(n){let b=i+=d;n(b)}f.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Y=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ut=Y&&typeof ReadableStream=="function",er=Y&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},tr=ut&<(()=>{let e=!1;const t=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),_e=64*1024,fe=ut&<(()=>a.isReadableStream(new Response("").body)),W={stream:fe&&(e=>e.body)};Y&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!W[t]&&(W[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,r)})})})(new Response);const nr=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(O.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await er(e)).byteLength},rr=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??nr(t)},sr=Y&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:f,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:b}=ct(e);l=l?(l+"").toLowerCase():"text";let w=Gn([s,i&&i.toAbortSignal()],o),h;const m=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let p;try{if(f&&tr&&n!=="get"&&n!=="head"&&(p=await rr(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),N;if(a.isFormData(r)&&(N=T.headers.get("content-type"))&&u.setContentType(N),T.body){const[B,H]=Be(p,J(Le(f)));r=Ue(T.body,_e,B,H)}}a.isString(d)||(d=d?"include":"omit");const E="credentials"in Request.prototype;h=new Request(t,{...b,signal:w,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:E?d:void 0});let R=await fetch(h);const S=fe&&(l==="stream"||l==="response");if(fe&&(c||S&&m)){const T={};["status","statusText","headers"].forEach(Se=>{T[Se]=R[Se]});const N=a.toFiniteNumber(R.headers.get("content-length")),[B,H]=c&&Be(N,J(Le(c),!0))||[];R=new Response(Ue(R.body,_e,B,()=>{H&&H(),m&&m()}),T)}l=l||"text";let D=await W[a.findKey(W,l)||"text"](R,e);return!S&&m&&m(),await new Promise((T,N)=>{it(T,N,{data:D,headers:x.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:h})})}catch(E){throw m&&m(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,h),{cause:E.cause||E}):y.from(E,E&&E.code,e,h)}}),de={http:En,xhr:Xn,fetch:sr};a.forEach(de,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ke=e=>`- ${e}`,or=e=>a.isFunction(e)||e===null||e===!1,ft={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : `+i.map(ke).join(` `):" "+ke(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:de};function oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new I(null,e)}function Ie(e){return oe(e),e.headers=x.from(e.headers),e.data=se.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ft.getAdapter(e.adapter||q.adapter)(e).then(function(r){return oe(e),r.data=se.call(e,e.transformResponse,r),r.headers=x.from(r.headers),r},function(r){return ot(r)||(oe(e),r&&r.response&&(r.response.data=se.call(e,e.transformResponse,r.response),r.response.headers=x.from(r.response.headers))),Promise.reject(r)})}const dt="1.9.0",ee={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ee[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const je={};ee.transitional=function(t,n,r){function s(i,o){return"[Axios v"+dt+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,c)=>{if(t===!1)throw new y(s(o," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!je[o]&&(je[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};ee.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ir(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const c=e[i],f=c===void 0||o(c,i,e);if(f!==!0)throw new y("option "+i+" must be "+f,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+i,y.ERR_BAD_OPTION)}}const $={assertOptions:ir,validators:ee},C=$.validators;let F=class{constructor(t){this.defaults=t||{},this.interceptors={request:new De,response:new De}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&$.assertOptions(r,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:$.assertOptions(s,{encode:C.function,serialize:C.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),$.assertOptions(n,{baseUrl:C.spelling("baseURL"),withXsrfToken:C.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&a.merge(i.common,i[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=x.concat(o,i);const c=[];let f=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(f=f&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,d=0,b;if(!f){const h=[Ie.bind(this),void 0];for(h.unshift.apply(h,c),h.push.apply(h,l),b=h.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(c=>{r.subscribe(c),i=c}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,c){r.reason||(r.reason=new I(i,o,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ht(function(s){t=s}),cancel:t}}};function cr(e){return function(n){return e.apply(null,n)}}function ur(e){return a.isObject(e)&&e.isAxiosError===!0}const he={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(he).forEach(([e,t])=>{he[t]=e});function pt(e){const t=new F(e),n=ze(F.prototype.request,t);return a.extend(n,F.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return pt(_(e,s))},n}const g=pt(q);g.Axios=F;g.CanceledError=I;g.CancelToken=ar;g.isCancel=ot;g.VERSION=dt;g.toFormData=Q;g.AxiosError=y;g.Cancel=g.CanceledError;g.all=function(t){return Promise.all(t)};g.spread=cr;g.isAxiosError=ur;g.mergeConfig=_;g.AxiosHeaders=x;g.formToJSON=e=>st(a.isHTMLForm(e)?new FormData(e):e);g.getAdapter=ft.getAdapter;g.HttpStatusCode=he;g.default=g;const{Axios:Pr,AxiosError:Cr,CanceledError:Dr,isCancel:Nr,CancelToken:Br,VERSION:Lr,all:Fr,Cancel:Ur,isAxiosError:_r,spread:kr,toFormData:Ir,AxiosHeaders:jr,HttpStatusCode:vr,formToJSON:Mr,getAdapter:qr,mergeConfig:Hr}=g,lr=g.create({timeout:1e4});lr.interceptors.request.use(e=>{const t=Nt("server.siteKey");return t&&(e.headers["x-site-key"]=t),e},e=>(console.log(e),Promise.reject(e)));const pe=(e,t)=>t.some(n=>e instanceof n);let ve,Me;function fr(){return ve||(ve=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function dr(){return Me||(Me=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const me=new WeakMap,ie=new WeakMap,te=new WeakMap;function hr(e){const t=new Promise((n,r)=>{const s=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{n(U(e.result)),s()},o=()=>{r(e.error),s()};e.addEventListener("success",i),e.addEventListener("error",o)});return te.set(t,e),t}function pr(e){if(me.has(e))return;const t=new Promise((n,r)=>{const s=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{n(),s()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),s()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});me.set(e,t)}let ye={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return me.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return U(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function mt(e){ye=e(ye)}function mr(e){return dr().includes(e)?function(...t){return e.apply(be(this),t),U(this.request)}:function(...t){return U(e.apply(be(this),t))}}function yr(e){return typeof e=="function"?mr(e):(e instanceof IDBTransaction&&pr(e),pe(e,fr())?new Proxy(e,ye):e)}function U(e){if(e instanceof IDBRequest)return hr(e);if(ie.has(e))return ie.get(e);const t=yr(e);return t!==e&&(ie.set(e,t),te.set(t,e)),t}const be=e=>te.get(e);function Vr(e,t,{blocked:n,upgrade:r,blocking:s,terminated:i}={}){const o=indexedDB.open(e,t),c=U(o);return r&&o.addEventListener("upgradeneeded",f=>{r(U(o.result),f.oldVersion,f.newVersion,U(o.transaction),f)}),n&&o.addEventListener("blocked",f=>n(f.oldVersion,f.newVersion,f)),c.then(f=>{i&&f.addEventListener("close",()=>i()),s&&f.addEventListener("versionchange",l=>s(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}const br=["get","getKey","getAll","getAllKeys","count"],wr=["put","add","delete","clear"],ae=new Map;function qe(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ae.get(t))return ae.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,s=wr.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(s||br.includes(n)))return;const i=async function(o,...c){const f=this.transaction(o,s?"readwrite":"readonly");let l=f.store;return r&&(l=l.index(c.shift())),(await Promise.all([l[n](...c),s&&f.done]))[0]};return ae.set(t,i),i}mt(e=>({...e,get:(t,n,r)=>qe(t,n)||e.get(t,n,r),has:(t,n)=>!!qe(t,n)||e.has(t,n)}));const Er=["continue","continuePrimaryKey","advance"],He={},we=new WeakMap,yt=new WeakMap,gr={get(e,t){if(!Er.includes(t))return e[t];let n=He[t];return n||(n=He[t]=function(...r){we.set(this,yt.get(this)[t](...r))}),n}};async function*Rr(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,gr);for(yt.set(n,t),te.set(n,be(t));t;)yield n,t=await(we.get(n)||t.continue()),we.delete(n)}function Ve(e,t){return t===Symbol.asyncIterator&&pe(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&pe(e,[IDBIndex,IDBObjectStore])}mt(e=>({...e,get(t,n,r){return Ve(t,n)?Rr:e.get(t,n,r)},has(t,n){return Ve(t,n)||e.has(t,n)}}));export{Tr as V,lr as a,g as b,Vr as o};