* `);returnc.length=0,n===!1?(Fe(u),s):u}}returns}functionnt(e,t){varn=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){returnthis.required=!0,this}},def:{value:function(s){returns!==void0||this.default?Xn(s)||An(this,s,!0)===!0?(this.default=Qn(s)?function(){return[].concat(s)}:xn(s)?function(){returnObject.assign({},s)}:s,this):(Fe(this._vueTypes_name+' - invalid default value: "'+s+'"'),this):this}}}),r=n.validator;returnXn(r)&&(n.validator=Ia(r,n)),n}functionTt(e,t){varn=nt(e,t);returnObject.defineProperty(n,"validate",{value:function(r){returnXn(this.validator)&&Fe(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
`+JSON.stringify(this)),this.validator=Ia(r,this),this}})}functionsc(e,t,n){varr,s,i=(r=t,s={},Object.getOwnPropertyNames(r).forEach(function(f){s[f]=Object.getOwnPropertyDescriptor(r,f)}),Object.defineProperties({},s));if(i._vueTypes_name=e,!xn(n))returni;varo,a,l=n.validator,c=Gf(n,["validator"]);if(Xn(l)){varu=i.validator;u&&(u=(a=(o=u).__original)!==null&&a!==void0?a:o),i.validator=Ia(u?function(f){returnu.call(this,f)&&l.call(this,f)}:l,i)}returnObject.assign(i,c)}functionvi(e){returne.replace(/^(?!\s*$)/gm," ")}varvv=function(){returnTt("any",{})},yv=function(){returnTt("function",{type:Function})},bv=function(){returnTt("boolean",{type:Boolean})},_v=function(){returnTt("string",{type:String})},wv=function(){returnTt("number",{type:Number})},Ev=function(){returnTt("array",{type:Array})},Sv=function(){returnTt("object",{type:Object})},Cv=function(){returnnt("integer",{type:Number,validator:function(e){returngv(e)}})},Ov=function(){returnnt("symbol",{validator:function(e){returntypeofe=="symbol"}})};functionTv(e,t){if(t===void0&&(t="custom validation failed"),typeofe!="function")thrownewTypeError("[VueTypes error]: You must provide a function as argument");returnnt(e.name||"<<anonymous function>>",{validator:function(n){varr=e(n);returnr||Fe(this._vueTypes_name+" - "+t),r}})}functionxv(e){if(!Qn(e))thrownewTypeError("[VueTypes error]: You must provide an array as argument.");vart='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(r,s){if(s!=null){vari=s.constructor;r.indexOf(i)===-1&&r.push(i)}returnr},[]);returnnt("oneOf",{type:n.length>0?n:void0,validator:function(r){vars=e.indexOf(r)!==-1;returns||Fe(t),s}})}functionPv(e){if(!Qn(e))thrownewTypeError("[VueTypes error]: You must provide an array as argument");for(vart=!1,n=[],r=0;r<e.length;r+=1){vars=e[r];if(Xf(s)){if(Ks(s)&&s._vueTypes_name==="oneOf"){n=n.concat(s.type);continue}if(Xn(s.validator)&&(t=!0),s.type!==!0&&s.type){n=n.concat(s.type);continue}}n.push(s)}returnn=n.filter(function(i,o){returnn.indexOf(i)===o}),nt("oneOfType",t?{type:n,validator:function(i){varo=[],a=e.some(function(l){varc=An(Ks(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,i,!0);returntypeofc=="string"&&o.push(c),c===!0});returna||Fe("oneOfType - provided value does not match any of the "+o.length+` passed-in validators:
`+vi(o.join(`
`))),a}}:{type:n})}functionAv(e){returnnt("arrayOf",{type:Array,validator:function(t){varn,r=t.every(function(s){return(n=An(e,s,!0))===!0});returnr||Fe(`arrayOf - value validation error:
`+vi(n)),r}})}functionkv(e){returnnt("instanceOf",{type:e})}functionRv(e){returnnt("objectOf",{type:Object,validator:function(t){varn,r=Object.keys(t).every(function(s){return(n=An(e,t[s],!0))===!0});returnr||Fe(`objectOf - value validation error:
`+vi(n)),r}})}functionjv(e){vart=Object.keys(e),n=t.filter(function(s){vari;return!!(!((i=e[s])===null||i===void0)&&i.required)}),r=nt("shape",{type:Object,validator:function(s){vari=this;if(!xn(s))return!1;varo=Object.keys(s);if(n.length>0&&n.some(function(l){returno.indexOf(l)===-1})){vara=n.filter(function(l){returno.indexOf(l)===-1});returnFe(a.length===1?'shape - required property "'+a[0]+'" is not defined.':'shape - required properties "'+a.join('", "')+'" are not defined.'),!1}returno.every(function(l){if(t.indexOf(l)===-1)returni._vueTypes_isLoose===!0||(Fe('shape - shape definition does not include a "'+l+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);varc=An(e[l],s[l],!0);returntypeofc=="string"&&Fe('shape - "'+l+`" property validation error:
`+vi(c)),c===!0})}});returnObject.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){returnthis._vueTypes_isLoose=!0,this}}),r}varyt=function(){functione(){}returne.extend=function(t){varn=this;if(Qn(t))returnt.forEach(function(f){returnn.extend(f)}),this;varr=t.name,s=t.validate,i=s!==void0&&s,o=t.getter,a=o!==void0&&o,l=Gf(t,["name","validate","getter"]);if(Qr(this,r))thrownewTypeError('[VueTypes error]: Type "'+r+'" already defined');varc,u=l.type;returnKs(u)?(deletel.type,Object.defineProperty(this,r,a?{get:function(){returnsc(r,u,l)}}:{value:function(){varf,d=sc(r,u,l);returnd.validator&&(d.validator=(f=d.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d}})):(c=a?{get:function(){varf=Object.assign({},l);returni?Tt(r,f):nt(r,f)},enumerable:!0}:{value:function(){varf,d,h=Object.assign({},l);returnf=i?Tt(r,h):nt(r,h),h.validator&&(f.validator=(d=h.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f},enumerable:!0},Object.defineProperty(this,r,c))},Kf(e,null,[{key:"any",get:function(){returnvv()}},{key:"func",get:function(){returnyv().def(this.defaults.func)}},{key:"bool",get:function(){returnbv().def(this.defaults.bool)}},{key:"string",get:function(){return_v().def(this.defaults.string)}},{key:"number",get:function(){returnwv().def(this.defaults.number)}},{key:"array",get:function(){returnEv().def(this.defaults.array)}},{key:"object",get:function(){returnSv().def(this.defaults.object)}},{key:"integer",get:function(){returnCv().def(this.defaults.integer)}},{key:"symbol",get:function(){returnOv()}}]),e}();functionZf(e){vart;returne===void0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){functionr(){returnn.apply(this,arguments)||this}returnzf(r,n),Kf(r,null,[{key:"sensibleDefaults",get:function(){returnAs({},this.defaults)},set:function(s){this.defaults=s!==!1?As({},s!==!0?s:e):{}}}]),r}(yt)).defaults=As({},e),t}yt.defaults={},yt.custom=Tv,yt.oneOf=xv,yt.instanceOf=kv,yt.oneOfType=Pv,yt.arrayOf=Av,yt.objectOf=Rv,yt.shape=jv,yt.utils={validate:function(e,t){returnAn(t,e,!0)===!0},toType:function(e,t,n){returnn===void0&&(n=!1),n?Tt(e,t):nt(e,t)}};(function(e){functiont(){returne.apply(this,arguments)||this}returnzf(t,e),t})(Zf());vared=Zf({func:void0,bool:void0,string:void0,number:void0,array:void0,object:void0,integer:void0});ed.extend([{name:"looseBool",getter:!0,type:Boolean,default:void0},{name:"style",getter:!0,type:[String,Object],default:void0},{name:"VueNode",getter:!0,type:null}]);functionKC(e){returne.default=void0,e}constic=ed;var$v=["image","description","imageStyle","class"],td=M(dv,null,null),nd=M(hv,null,null),lr=function(t,n){varr,s=n.slots,i=s===void0?{}:s,o=n.attrs,a=yi("empty",t),l=a.direction,c=a.prefixCls,u=c.value,f=te(te({},t),o),d=f.image,h=d===void0?td:d,p=f.description,v=p===void0?((r=i.description)===null||r===void0?void0:r.call(i))||void0:p,b=f.imageStyle,w=f.class,y=w===void0?"":w,E=Bf(f,$v);returnM(qf,{componentName:"Empty",children:function(N){varD,U=typeofv<"u"?v:N.description,k=typeofU=="string"?U:"empty",$=null;returntypeofh=="string"?$=M("img",{alt:k,src:h},null):$=h,M("div",te({class:ar(u,y,(D={},Ft(D,"".concat(u,"-normal"),h===nd),Ft(D,"".concat(u,"-rtl"),l.value==="rtl"),D))},E),[M("div",{class:"".concat(u,"-image"),style:b},[$]),U&&M("p",{class:"".concat(u,"-description")},[U]),i.default&&M("div",{class:"".concat(u,"-footer")},[$a(i.default())])])}},null)};lr.displayName="AEmpty";lr.PRESENTED_IMAGE_DEFAULT=td;lr.PRESENTED_IMAGE_SIMPLE=nd;lr.inheritAttrs=!1;lr.props={prefixCls:String,image:ic.any,description:ic.any,imageStyle:{type:Object,default:void0}};constvr=Uf(lr);varIv=function(t){varn=yi("empty",t),r=n.prefixCls,s=function(o){switch(o){case"Table":case"List":returnM(vr,{image:vr.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":returnM(vr,{image:vr.PRESENTED_IMAGE_SIMPLE,class
`),"".concat(Bb,"-dynamic-theme")):Ub(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}varjd=Symbol("GlobalFormContextKey"),qb=function(t){Sn(jd,t)},XC=function(){returnNe(jd,{validateMessages:ie(function(){})})},Vb=function(){return{getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:{type:Object,default:void0},input:{type:Object},autoInsertSpaceInButton:{type:Boolean,default:void0},locale:{type:Object,default:void0},pageHeader:{type:Object},componentSize:{type:String},direction:{type:String},space:{type:Object},virtual:{type:Boolean,default:void0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:{type:Object,default:void0},notUpdateGlobalConfig:Boolean}},Wb="ant";functionzn(){returnet.prefixCls||Wb}var$o=Ke({}),$d=Ke({}),et=Ke({});fi(function(){Tn(et,$o,$d),et.prefixCls=zn(),et.getPrefixCls=function(e,t){returnt||(e?"".concat(et.prefixCls,"-").concat(e):et.prefixCls)},et.getRootPrefixCls=function(e,t){returne||(et.prefixCls?et.prefixCls:t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):zn())}});varzi,Kb=function(t){zi&&zi(),zi=fi(function(){Tn($d,Ke(t)),Tn(et,Ke(t))}),t.theme&&Hb(zn(),t.theme)},zb=function(){return{getPrefixCls:function(n,r){returnr||(n?"".concat(zn(),"-").concat(n):zn())},getRootPrefixCls:function(n,r){returnn||(et.prefixCls?et.prefixCls:r&&r.includes("-")?r.replace(/^(.*)-[^-]*$/,"$1"):zn())}}},$r=Ut({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:Vb(),setup:function(t,n){varr=n.slots,s=function(f,d){varh=t.prefixCls,p=h===void0?"ant":h;returnd||(f?"".concat(p,"-").concat(f):p)},i=function(f){vard=t.renderEmpty||r.renderEmpty||rd;returnd(f)},o=function(f,d){varh=t.prefixCls;if(d)returnd;varp=h||s("");returnf?"".concat(p,"-").concat(f):p},a=Ke(te(te({},t),{},{getPrefixCls:o,renderEmpty:i}));Object.keys(t).forEach(function(u){Mt(function(){returnt[u]},function(){a[u]=t[u]})}),t.notUpdateGlobalConfig||(Tn($o,a),Mt(a,function(){Tn($o,a)}));varl=ie(function(){varu={};if(t.locale){varf,d;u=((f=t.locale.Form)===null||f===void0?void0:f.defaultValidateMessages)||((d=Ws.Form)===null||d===void0?void0:d.defaultValidateMessages)||{}}returnt.form&&t.form.validateMessages&&(u=te(te({},u),t.form.validateMessages)),u});qb({validateMessages:l}),Sn("configProvider",a);varc=function(f){vard;returnM(Dv,{locale:t.locale||f,ANT_MARK__:So},{default:function(){return[(d=r.default)===null||d===void0?void0:d.call(r)]}})};returnfi(function(){t.direction&&(js.config({rtl:t.direction==="rtl"}),Lb.config({rtl:t.direction==="rtl"}))}),function(){returnM(qf,{children:function(f,d,h){returnc(h)}},null)}}}),Gb=Ke({getPrefixCls:function(t,n){returnn||(t?"ant-".concat(t):"ant")},renderEmpty:rd,direction:"ltr"});$r.config=Kb;$r.install=function(e){e.component($r.name,$r)};constId=$r,yi=function(e,t){varn=Ne("configProvider",Gb),r=ie(function(){returnn.getPrefixCls(e,t.prefixCls)}),s=ie(function(){vary;return(y=t.direction)!==null&&y!==void0?y:n.direction}),i=ie(function(){returnn.getPrefixCls()}),o=ie(function(){returnn.autoInsertSpaceInButton}),a=ie(function(){returnn.renderEmpty}),l=ie(function(){returnn.space}),c=ie(function(){returnn.pageHeader}),u=ie(function(){returnn.form}),f=ie(function(){returnt.getTargetContainer||n.getTargetContainer}),d=ie(function(){returnt.getPopupContainer||n.getPopupContainer}),h=ie(function(){vary;return(y=t.dropdownMatchSelectWidth)!==null&&y!==void0?y:n.dropdownMatchSelectWidth}),p=ie(function(){return(t.virtual===void0?n.virtual!==!1:t.virtual!==!1)&&h.value!==!1}),v=ie(function(){returnt.size||n.componentSize}),b=ie(function(){vary;returnt.autocomplete||((y=n.input)===null||y===void0?void0:y.autocomplete)}),w=ie(function(){returnn.csp});return{configProvider:n,prefixCls:r,direction:s,size:v,getTargetContainer:f,getPopupContainer:d,space:l,pageHeader:c,form:u,autoInsertSpaceInButton:o,renderEmpty:a,virtual:p,dropdownMatchSelectWidth:h,rootPrefixC
*vue-routerv4.2.2
*(c)2023EduardoSanMartinMorote
*@licenseMIT
*/const Un=typeof window<"u";function n_(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ge=Object.assign;function Gi(e,t){const n={};for(const r in t){const s=t[r];n[r]=pt(s)?s.map(e):e(s)}return n}const Ir=()=>{},pt=Array.isArray,r_=/\/$/,s_=e=>e.replace(r_,"");functionJi(e,t,n="/"){letr,s={},i="",o="";consta=t.indexOf("#");letl=t.indexOf("?");returna<l&&a>=0&&(l=-1),l>-1&&(r=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),s=e(i)),a>-1&&(r=r||t.slice(0,a),o=t.slice(a,t.length)),r=l_(r??t,n),{fullPath:r+(i&&"?")+i+o,path:r,query:s,hash:o}}functioni_(e,t){constn=t.query?e(t.query):"";returnt.path+(n&&"?")+n+(t.hash||"")}functionMc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}functiono_(e,t,n){constr=t.matched.length-1,s=n.matched.length-1;returnr>-1&&r===s&&Zn(t.matched[r],n.matched[s])&&Ld(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}functionZn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}functionLd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(constnine)if(!a_(e[n],t[n]))return!1;return!0}functiona_(e,t){returnpt(e)?Lc(e,t):pt(t)?Lc(t,e):e===t}functionLc(e,t){returnpt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}functionl_(e,t){if(e.startsWith("/"))returne;if(!e)returnt;constn=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");leti=n.length-1,o,a;for(o=0;o<r.length;o++)if(a=r[o],a!==".")if(a==="..")i>1&&i--;elsebreak;returnn.slice(0,i).join("/")+"/"+r.slice(o-(o===r.length?1:0)).join("/")}vares;(function(e){e.pop="pop",e.push="push"})(es||(es={}));varMr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Mr||(Mr={}));functionc_(e){if(!e)if(Un){constt=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}elsee="/";returne[0]!=="/"&&e[0]!=="#"&&(e="/"+e),s_(e)}constu_=/^[^#]+#/;functionf_(e,t){returne.replace(u_,"#")+t}functiond_(e,t){constn=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}constbi=()=>({left:window.pageXOffset,top:window.pageYOffset});functionh_(e){lett;if("el"ine){constn=e.el,r=typeofn=="string"&&n.startsWith("#"),s=typeofn=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=d_(s,e)}elset=e;"scrollBehavior"indocument.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}functionNc(e,t){return(history.state?history.state.position-t:-1)+e}constIo=newMap;functionp_(e,t){Io.set(e,t)}functionm_(e){constt=Io.get(e);returnIo.delete(e),t}letg_=()=>location.protocol+"//"+location.host;functionNd(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){leta=s.includes(e.slice(i))?e.slice(i).length:1,l=s.slice(a);returnl[0]!=="/"&&(l="/"+l),Mc(l,"")}returnMc(n,e)+r+s}functionv_(e,t,n,r){lets=[],i=[],o=null;consta=({state:d})=>{consth=Nd(e,location),p=n.value,v=t.value;letb=0;if(d){if(n.value=h,t.value=d,o&&o===p){o=null;return}b=v?d.position-v.position:0}elser(h);s.forEach(w=>{w(n.value,p,{delta:b,type:es.pop,direction:b?b>0?Mr.forward:Mr.back:Mr.unknown})})};functionl(){o=n.value}functionc(d){s.push(d);consth=()=>{constp=s.indexOf(d);p>-1&&s.splice(p,1)};returni.push(h),h}functionu(){const{history:d}=window;d.state&&d.replaceState(ge({},d.state,{scroll:bi()}),"")}functionf(){for(constdofi)d();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}returnwindow.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}functionDc(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?bi():null}}functiony_(e){const{history:t,location:n}=window,r={value:Nd(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replace
new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"UnknownJavaScriptruntimewithoutWebSocketsupport.",workaround:"Ensureyou're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
});`;class bS{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Ko,this.transport=null,this.heartbeatIntervalMs=ws.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=no,this.ref=0,this.reconnectTimer=null,this.logger=no,this.conn=null,this.sendBuffer=[],this.serializer=new cS,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>z(()=>Promise.resolve().then(()=>dr),void 0).then(({default:a})=>a(...o)).catch(a=>{throw new Error(`Failed to load @supabase/node-fetch: ${a.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${zo.websocket}`,this.httpEndpoint=Rh(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=rS.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
To use Realtime in Node.js, you need to provide a WebSocket implementation:
Option 1: Use Node.js 22+ which has native WebSocket support
\r=`.split(""),o1=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<bu.length;t+=1)e[bu[t].charCodeAt(0)]=-2;for(let t=0;t<Qs.length;t+=1)e[Qs[t].charCodeAt(0)]=t;return e})();function _u(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Qs[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Qs[r]),t.queuedBits-=6}}function Nh(e,t,n){const r=o1[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function wu(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{c1(o,r,n)};for(let o=0;o<e.length;o+=1)Nh(e.charCodeAt(o),s,i);return t.join("")}function a1(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function l1(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}a1(r,t)}}function c1(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function u1(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Nh(e.charCodeAt(s),n,r);return new Uint8Array(t)}function f1(e){const t=[];return l1(e,n=>t.push(n)),new Uint8Array(t)}function d1(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>_u(s,n,r)),_u(null,n,r),t.join("")}function h1(e){return Math.round(Date.now()/1e3)+e}function p1(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const st=()=>typeof window<"u"&&typeof document<"u",dn={tested:!1,writable:!1},Dh=()=>{if(!st())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(dn.tested)return dn.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),dn.tested=!0,dn.writable=!0}catch{dn.tested=!0,dn.writable=!1}return dn.writable};function m1(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const Fh=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>z(()=>Promise.resolve().then(()=>dr),void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},g1=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Hn=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},hn=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Kt=async(e,t)=>{await e.removeItem(t)};class ji{constructor(){this.promise=new ji.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}ji.promiseConstructor=Promise;function oo(e){const t=e.split(".");if(t.length!==3)throw new ta("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!e1.test(t[r]))throw new ta("JWT not in base64url format");return{header:JSON.parse(wu(t[0])),payload:JSON.parse(wu(t[1])),signature:u1(t[2]),raw:{header:t[0],payload:t[1]}}}async function v1(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function y1(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)
`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'.Providedvalue:${e.statement}`)}const h=Bh(e.address),p=u?`${u}://${r}`:r,v=e.statement?`${e.statement}
Resources:`;for(const E of c){if(!E||typeof E!="string")throw new Error(`@supabase/auth-js:InvalidSIWEmessagefield"resources".Everyresourcemustbeavalidstring.Providedvalue:${E}`);y+=`
-${E}`}w+=y}return`${b}
${w}`}D1();const V1={url:QS,storageKey:XS,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ZS,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Tu(e,t,n){return await n()}const Dn={};class ns{constructor(t){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=ns.nextInstanceID,ns.nextInstanceID+=1,this.instanceID>0&&st()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},V1),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new N1({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=Fh(s.fetch),this.lock=s.lock||Tu,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:st()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=U1:this.lock=Tu,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:Dh()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Ou(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Ou(this.memoryStorage)),st()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=Dn[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Dn[this.storageKey]=Object.assign(Object.assign({},Dn[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Dn[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Dn[this.storageKey]=Object.assign(Object.assign({},Dn[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID}(${Ih})${newDate().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=m1(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),st()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),i1(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{e
`);constD=awaitC.signMessage(newTextEncoder().encode(p),"utf8");if(!D||!(DinstanceofUint8Array))thrownewError("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=D}}try{const{data:b,error:w}=awaitle(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:d1(v)},!((d=t.options)===null||d===void0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void0?void0:h.captchaToken}}:null),xform:bt});if(w)throww;return!b||!b.session||!b.user?{data:{user:null,session:null},error:newSr}:(b.session&&(awaitthis._saveSession(b.session),awaitthis._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:w})}catch(b){if(re(b))return{data:{user:null,session:null},error:b};throwb}}async_exchangeCodeForSession(t){constn=awaithn(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:i,error:o}=awaitle(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:bt});if(awaitKt(this.storage,`${this.storageKey}-code-verifier`),o)throwo;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:newSr}:(i.session&&(awaitthis._saveSession(i.session),awaitthis._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(re(i))return{data:{user:null,session:null,redirectType:null},error:i};throwi}}asyncsignInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,a=awaitle(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void0:n.captchaToken}},xform:bt}),{data:l,error:c}=a;returnc?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:newSr}:(l.session&&(awaitthis._saveSession(l.session),awaitthis._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(re(n))return{data:{user:null,session:null},error:n};thrown}}asyncsignInWithOtp(t){varn,r,s,i,o;try{if("email"int){const{email:a,options:l}=t;letc=null,u=null;this.flowType==="pkce"&&([c,u]=awaitMn(this.storage,this.storageKey));const{error:f}=awaitle(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void0:l.data)!==null&&n!==void0?n:{},create_user:(r=l==null?void0:l.shouldCreateUser)!==null&&r!==void0?r:!0,gotrue_meta_security:{captcha_token:l==null?void0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"int){const{phone:a,options:l}=t,{data:c,error:u}=awaitle(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void0:l.data)!==null&&s!==void0?s:{},create_user:(i=l==null?void0:l.shouldCreateUser)!==null&&i!==void0?i:!0,gotrue_meta_security:{captcha_token:l==null?void0:l.captchaToken},channel:(o=l==null?void0:l.channel)!==null&&o!==void0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void0:c.message_id},error:u}}thrownewEs("You must provide either an email or phone number.")}catch(a){if(re(a))return{data:{user:null,session:null},error:a};throwa}}asyncverifyOtp(t){varn,r;try{lets,i;"options"int&&(s=(n=t.options)===null||n===void0?void0:n.redirectTo,i=(r=t.options)===null||r===void0?void0:r.captchaToken);const{data:o,error:a}=awaitle(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:bt});if(a)throwa;if(!o)thrownewError("An error occurred on token verification.");constl=o.session,c=o.user;returnl!=null&&l.access_token&&(awaitthis._saveSession(l),awaitthis._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(re(s