PageSourceSearch

https://otislabs.ai/assets/index-hGXIjiF4.js

js otislabs.ai collected 2026-10-05 13:35:09 UTC 781,948 bytes, 66 lines download raw bytes

vendor: 22,721 bytes, lines 1-9
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/updates-iPw8rPeI.js","assets/jsx-runtime-DGeXAQPT.js","assets/link-tAOR9bbX.js","assets/react-vt4WmSOl.js","assets/newsletter-signup-D8I9yNrh.js","assets/section-BwFJa1yf.js","assets/terms-DQzMY5dz.js","assets/security-CIr-GTKZ.js","assets/privacy-yl6cSoQg.js","assets/positionpaper-CjBu1eV2.js","assets/events-BGELb6Pt.js","assets/design-partners-B7iXflw4.js","assets/agents-lJDhKjY0.js","assets/about-CNYvNXVu.js","assets/routes-Cd3E6YJF.js","assets/research.index-BWHfSoMS.js","assets/category-badge-sXgcRlru.js","assets/work.runtime-mandate-check-VMt0ezSA.js","assets/research._slug-BzlMLbiZ.js","assets/research._slug-CgWUoWb5.js","assets/article-body-bZCCG_vr.js","assets/positionpaper_.full-CNLcAPFr.js","assets/newsletter.confirm-pjtoWsWw.js"])))=>i.map(i=>d[i]);
2import{n as e,r as t,t as n}from"./jsx-runtime-DGeXAQPT.js";import{t as r}from"./react-vt4WmSOl.js";import{A as i,B as a,C as o,D as s,E as c,F as l,I as u,L as d,M as f,N as p,O as m,P as h,R as g,S as _,T as v,V as y,_ as b,a as x,b as S,c as ee,d as C,f as te,g as ne,h as re,i as ie,j as ae,k as oe,l as se,m as ce,n as le,o as ue,p as w,r as E,s as de,t as fe,u as pe,v as me,w as D,x as O,y as he,z as ge}from"./link-tAOR9bbX.js";var _e=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}var S=!1,ee=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){if(g=!1,S){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){ee=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ee),ee=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ve=e(((e,t)=>{t.exports=_e()})),ye=e((e=>{var t=ve(),n=r(),i=y();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.iterator;function se(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var ce=Symbol.for(`react.client.reference`);function le(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case b:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case te:return`SuspenseList`;case ie:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ue=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},fe=[],pe=-1;function me(e){return{current:e}}function D(e){0>pe||(e.current=fe[pe],fe[pe]=null,pe--)}function O(e,t){pe++,fe[pe]=e.current,e.current=t}var he=me(null),ge=me(null),_e=me(null),ye=me(null);function be(e,t){switch(O(_e,t),O(ge,e),O(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}D(he),O(he,e)}function xe(){D(he),D(ge),D(_e)}function Se(e){e.memoizedState!==null&&O(ye,e);var t=he.current,n=tf(t,e.type);t!==n&&(O(ge,e),O(he,n))}function Ce(e){ge.current===e&&(D(he),D(ge)),ye.current===e&&(D(ye),up._currentValue=de)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1<e.stack.indexOf(`
3    at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4`+we+e+Te}var De=!1;function Oe(e,t){if(!e||De)return``;De=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5`),l=s.split(`
6`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{De=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ee(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee(`Lazy`);case 13:return e.child!==t&&t!==null?Ee(`Suspense Fallback`):Ee(`Suspense`);case 19:return Ee(`SuspenseList`);case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return Ee(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8Error generating stack: `+e.message+`
9`+e.stack}}var je=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function at(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&lt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function lt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function dt(e,t){var n=t&-t;return n=n&42?1:ft(n),(n&(e.suspendedLanes|t))===0?n:0}function ft(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function pt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function mt(){var e=E.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function ht(e,t){var n=E.p;try{return E.p=e,t()}finally{E.p=n}}var gt=Math.random().toString(36).slice(2),_t=`__reactFiber$`+gt,vt=`__reactProps$`+gt,yt=`__reactContainer$`+gt,bt=`__reactEvents$`+gt,xt=`__reactListeners$`+gt,St=`__reactHandles$`+gt,Ct=`__reactResources$`+gt,wt=`__reactMarker$`+gt;function Tt(e){delete e[_t],delete e[vt],delete e[bt],delete e[xt],delete e[St]}function Et(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Cf(e);e!==null;){if(n=e[_t])return n;e=Cf(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[_t]||e[yt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function kt(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function At(e){e[wt]=!0}var jt=new Set,Mt={};function Nt(e,t){Pt(e,t),Pt(e+`Capture`,t)}function Pt(e,t){for(Mt[e]=t,e=0;e<t.length;e++)jt.add(t[e])}var Ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),It={},Lt={};function Rt(e){return je.call(Lt,e)?!0:je.call(It,e)?!1:Ft.test(e)?Lt[e]=!0:(It[e]=!0,!1)}function zt(e,t,n){if(Rt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ht(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ut(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Wt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gt(e){if(!e._valueTracker){var t=Ut(e)?`checked`:`value`;e._valueTracker=Wt(e,t,``+e[t])}}function Kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ut(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function qt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Jt=/[\n"\\]/g;function Yt(e){return e.replace(Jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Xt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ht(t)):e.value!==``+Ht(t)&&(e.value=``+Ht(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Qt(e,o,Ht(n)):Qt(e,o,Ht(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ht(s):e.removeAttribute(`name`)}function Zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Gt(e);return}n=n==null?``:``+Ht(n),t=t==null?n:``+Ht(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Gt(e)}function Qt(e,t,n){t===`number`&&qt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function $t(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function en(e,t,n){if(t!=null&&(t=``+Ht(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ht(n)}function tn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(ue(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Ht(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Gt(e)}function nn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function an(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||rn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function on(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&an(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&an(e,o,t[o])}function sn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var cn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`
9clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function un(e){return ln.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function dn(){}var fn=null;function pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mn=null,hn=null;function gn(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Xt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Yt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[vt]||null;if(!i)throw Error(a(90));Xt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Kt(r)}break a;case`textarea`:en(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}}}var _n=!1;
vendor: 81,509 bytes, line 9
9function vn(e,t,n){if(_n)return e(t,n);_n=!0;try{return e(t)}finally{if(_n=!1,(mn!==null||hn!==null)&&(Mu(),mn&&(t=mn,e=hn,hn=mn=null,gn(t),e)))for(t=0;t<e.length;t++)gn(e[t])}}function yn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[vt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var bn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),xn=!1;if(bn)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){xn=!0}}),window.addEventListener(`test`,Sn,Sn),window.removeEventListener(`test`,Sn,Sn)}catch{xn=!1}var Cn=null,wn=null,Tn=null;function En(){if(Tn)return Tn;var e,t=wn,n=t.length,r,i=`value`in Cn?Cn.value:Cn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Tn=i.slice(e,1<r?1-r:void 0)}function k(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Dn(){return!0}function On(){return!1}function kn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Dn:On,this.isPropagationStopped=On,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Dn)},persist:function(){},isPersistent:Dn}),t}var A={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=kn(A),jn=p({},A,{view:0,detail:0}),Mn=kn(jn),Nn,Pn,Fn,In=p({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Ln=kn(In),Rn=kn(p({},In,{dataTransfer:0})),zn=kn(p({},jn,{relatedTarget:0})),Bn=kn(p({},A,{animationName:0,elapsedTime:0,pseudoElement:0})),Vn=kn(p({},A,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Hn=kn(p({},A,{data:0})),Un={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Wn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Gn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gn[e])?!!t[e]:!1}function qn(){return Kn}var Jn=kn(p({},jn,{key:function(e){if(e.key){var t=Un[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=k(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Wn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qn,charCode:function(e){return e.type===`keypress`?k(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?k(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Yn=kn(p({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xn=kn(p({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qn})),Zn=kn(p({},A,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qn=kn(p({},In,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),$n=kn(p({},A,{newState:0,oldState:0})),er=[9,13,27,32],tr=bn&&`CompositionEvent`in window,nr=null;bn&&`documentMode`in document&&(nr=document.documentMode);var rr=bn&&`TextEvent`in window&&!nr,ir=bn&&(!tr||nr&&8<nr&&11>=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=En(),Tn=wn=Cn=null,lr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ir&&t.locale!==`ko`?null:t.data;default:return null}}var fr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!fr[e.type]:t===`textarea`}function mr(e,t,n,r){mn?hn?hn.push(r):hn=[r]:mn=r,t=Rd(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){jd(e,0)}function vr(e){if(Kt(Ot(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(bn){var xr;if(bn){var Sr=`oninput`in document;if(!Sr){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),Sr=typeof Cr.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function wr(){hr&&(hr.detachEvent(`onpropertychange`,Tr),gr=hr=null)}function Tr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,pn(e)),vn(_r,t)}}function Er(e,t,n){e===`focusin`?(wr(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Or(e,t){if(e===`click`)return vr(t)}function kr(e,t){if(e===`input`||e===`change`)return vr(t)}function Ar(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var jr=typeof Object.is==`function`?Object.is:Ar;function Mr(e,t){if(jr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!je.call(t,i)||!jr(e[i],t[i]))return!1}return!0}function Nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pr(e,t){var n=Nr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=qt(e.document)}return t}function Lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Rr=bn&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==qt(r)||(r=zr,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&Mr(Vr,r)||(Vr=r,r=Rd(Br,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=zr)))}function Wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Gr={animationend:Wr(`Animation`,`AnimationEnd`),animationiteration:Wr(`Animation`,`AnimationIteration`),animationstart:Wr(`Animation`,`AnimationStart`),transitionrun:Wr(`Transition`,`TransitionRun`),transitionstart:Wr(`Transition`,`TransitionStart`),transitioncancel:Wr(`Transition`,`TransitionCancel`),transitionend:Wr(`Transition`,`TransitionEnd`)},Kr={},qr={};bn&&(qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),`TransitionEvent`in window||delete Gr.transitionend.transition);function Jr(e){if(Kr[e])return Kr[e];if(!Gr[e])return e;var t=Gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qr)return Kr[e]=t[n];return e}var Yr=Jr(`animationend`),Xr=Jr(`animationiteration`),Zr=Jr(`animationstart`),Qr=Jr(`transitionrun`),$r=Jr(`transitionstart`),ei=Jr(`transitioncancel`),ti=Jr(`transitionend`),ni=new Map,ri=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ri.push(`scrollEnd`);function ii(e,t){ni.set(e,t),Nt(t,[e])}var ai=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},oi=[],si=0,ci=0;function li(){for(var e=si,t=ci=si=0;t<e;){var n=oi[t];oi[t++]=null;var r=oi[t];oi[t++]=null;var i=oi[t];oi[t++]=null;var a=oi[t];if(oi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&pi(n,i,a)}}function ui(e,t,n,r){oi[si++]=e,oi[si++]=t,oi[si++]=n,oi[si++]=r,ci|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function di(e,t,n,r){return ui(e,t,n,r),mi(e)}function fi(e,t){return ui(e,null,null,t),mi(e)}function pi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function mi(e){if(50<Cu)throw Cu=0,wu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hi={};function gi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _i(e,t,n,r){return new gi(e,t,n,r)}function vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yi(e,t){var n=e.alternate;return n===null?(n=_i(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function bi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)vi(e)&&(s=1);else if(typeof e==`string`)s=tp(e,n,he.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ie:return e=_i(31,n,t,i),e.elementType=ie,e.lanes=o,e;case _:return Si(n.children,i,o,t);case v:s=8,i|=24;break;case b:return e=_i(12,n,t,i|2),e.elementType=b,e.lanes=o,e;case C:return e=_i(13,n,t,i),e.elementType=C,e.lanes=o,e;case te:return e=_i(19,n,t,i),e.elementType=te,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case ee:s=11;break a;case ne:s=14;break a;case re:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=_i(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Si(e,t,n,r){return e=_i(7,e,r,t),e.lanes=n,e}function Ci(e,t,n){return e=_i(6,e,null,t),e.lanes=n,e}function wi(e){var t=_i(18,null,null,0);return t.stateNode=e,t}function Ti(e,t,n){return t=_i(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ei=new WeakMap;function Di(e,t){if(typeof e==`object`&&e){var n=Ei.get(e);return n===void 0?(t={value:e,source:t,stack:Ae(t)},Ei.set(e,t),t):n}return{value:e,source:t,stack:Ae(t)}}var Oi=[],ki=0,Ai=null,ji=0,Mi=[],Ni=0,Pi=null,Fi=1,Ii=``;function Li(e,t){Oi[ki++]=ji,Oi[ki++]=Ai,Ai=e,ji=t}function Ri(e,t,n){Mi[Ni++]=Fi,Mi[Ni++]=Ii,Mi[Ni++]=Pi,Pi=e;var r=Fi;e=Ii;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Fi=1<<32-Je(t)+i|n<<i|r,Ii=a+e}else Fi=1<<a|n<<i|r,Ii=e}function zi(e){e.return!==null&&(Li(e,1),Ri(e,1,0))}function Bi(e){for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,ji=Oi[--ki],Oi[ki]=null;for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Ii=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null}function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Ii,Mi[Ni++]=Pi,Fi=t.id,Ii=t.overflow,Pi=e}var Hi=null,Ui=null,j=!1,Wi=null,Gi=!1,Ki=Error(a(519));function qi(e){throw $i(Di(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ki}function Ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_t]=e,t[vt]=r,n){case`dialog`:V(`cancel`,t),V(`close`,t);break;case`iframe`:case`object`:case`embed`:V(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)V(kd[n],t);break;case`source`:V(`error`,t);break;case`img`:case`image`:case`link`:V(`error`,t),V(`load`,t);break;case`details`:V(`toggle`,t);break;case`input`:V(`invalid`,t),Zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:V(`invalid`,t);break;case`textarea`:V(`invalid`,t),tn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Wd(t.textContent,n)?(r.popover!=null&&(V(`beforetoggle`,t),V(`toggle`,t)),r.onScroll!=null&&V(`scroll`,t),r.onScrollEnd!=null&&V(`scrollend`,t),r.onClick!=null&&(t.onclick=dn),t=!0):t=!1,t||qi(e,!0)}function Yi(e){for(Hi=e.return;Hi;)switch(Hi.tag){case 5:case 31:case 13:Gi=!1;return;case 27:case 3:Gi=!0;return;default:Hi=Hi.return}}function Xi(e){if(e!==Hi)return!1;if(!j)return Yi(e),j=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||nf(e.type,e.memoizedProps)),n=!n),n&&Ui&&qi(e),Yi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ui=Sf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ui=Sf(e)}else t===27?(t=Ui,df(e.type)?(e=xf,xf=null,Ui=e):Ui=t):Ui=Hi?bf(e.stateNode.nextSibling):null;return!0}function Zi(){Ui=Hi=null,j=!1}function Qi(){var e=Wi;return e!==null&&(lu===null?lu=e:lu.push.apply(lu,e),Wi=null),e}function $i(e){Wi===null?Wi=[e]:Wi.push(e)}var ea=me(null),ta=null,na=null;function ra(e,t,n){O(ea,t._currentValue),t._currentValue=n}function ia(e){e._currentValue=ea.current,D(ea)}function aa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function oa(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),aa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),aa(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function sa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;jr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ye.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}i=i.return}e!==null&&oa(t,e,n,r),t.flags|=262144}function ca(e){for(e=e.firstContext;e!==null;){if(!jr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){ta=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ua(e){return fa(ta,e)}function da(e,t){return ta===null&&la(e),fa(e,t)}function fa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},na===null){if(e===null)throw Error(a(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return n}var pa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ma=t.unstable_scheduleCallback,ha=t.unstable_NormalPriority,ga={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _a(){return{controller:new pa,data:new Map,refCount:0}}function va(e){e.refCount--,e.refCount===0&&ma(ha,function(){e.controller.abort()})}var ya=null,ba=0,xa=0,Sa=null;function Ca(e,t){if(ya===null){var n=ya=[];ba=0,xa=Cd(),Sa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ba++,t.then(wa,wa),t}function wa(){if(--ba===0&&ya!==null){Sa!==null&&(Sa.status=`fulfilled`);var e=ya;ya=null,xa=0,Sa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ta(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ea=w.S;w.S=function(e,t){fu=Ie(),typeof t==`object`&&t&&typeof t.then==`function`&&Ca(e,t),Ea!==null&&Ea(e,t)};var Da=me(null);function Oa(){var e=Da.current;return e===null?Xl.pooledCache:e}function ka(e,t){t===null?O(Da,Da.current):O(Da,t.pool)}function Aa(){var e=Oa();return e===null?null:{parent:ga._currentValue,pool:e}}var ja=Error(a(460)),Ma=Error(a(474)),Na=Error(a(542)),Pa={then:function(){}};function Fa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ia(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(dn,dn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ba(e),e;default:if(typeof t.status==`string`)t.then(dn,dn);else{if(e=Xl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ba(e),e}throw Ra=t,ja}}function La(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ra=e,ja):e}}var Ra=null;function za(){if(Ra===null)throw Error(a(459));var e=Ra;return Ra=null,e}function Ba(e){if(e===ja||e===Na)throw Error(a(483))}var Va=null,Ha=0;function Ua(e){var t=Ha;return Ha+=1,Va===null&&(Va=[]),Ia(Va,e,t)}function Wa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ga(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=yi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ci(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===re&&La(a)===t.type)?(t=i(t,n.props),Wa(t,n),t.return=e,t):(t=xi(n.type,n.key,n.props,null,e.mode,r),Wa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ti(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Si(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=xi(t.type,t.key,t.props,null,e.mode,n),Wa(n,t),n.return=e,n;case g:return t=Ti(t,e.mode,n),t.return=e,t;case re:return t=La(t),f(e,t,n)}if(ue(t)||se(t))return t=Si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ua(t),n);if(t.$$typeof===S)return f(e,da(e,t),n);Ga(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case re:return n=La(n),p(e,t,n,r)}if(ue(n)||se(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ua(n),r);if(n.$$typeof===S)return p(e,t,da(e,n),r);Ga(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case re:return r=La(r),m(e,t,n,r,i)}if(ue(r)||se(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ua(r),i);if(r.$$typeof===S)return m(e,t,n,da(t,r),i);Ga(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),j&&Li(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return j&&Li(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),j&&Li(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),j&&Li(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return j&&Li(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),j&&Li(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&La(l)===r.type){n(e,r.sibling),c=i(r,o.props),Wa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=xi(o.type,o.key,o.props,null,e.mode,c),Wa(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ti(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=La(o),b(e,r,o,c)}if(ue(o))return v(e,r,o,c);if(se(o)){if(l=se(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ua(o),c);if(o.$$typeof===S)return b(e,r,da(e,o),c);Ga(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ha=0;var i=b(e,t,n,r);return Va=null,i}catch(t){if(t===ja||t===Na)throw t;var a=_i(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var qa=Ka(!0),Ja=Ka(!1),Ya=!1;function Xa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $a(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,I&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=mi(e),pi(e,null,n),t}return ui(e,r,t,n),mi(e)}function eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}function to(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var no=!1;function ro(){if(no){var e=Sa;if(e!==null)throw e}}function io(e,t,n,r){no=!1;var i=e.updateQueue;Ya=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(R&f)===f:(r&f)===f){f!==0&&f===xa&&(no=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ya=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),iu|=o,e.lanes=o,e.memoizedState=d}}function ao(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function oo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ao(n[e],t)}var so=me(null),co=me(0);function lo(e,t){e=nu,O(co,e),O(so,t),nu=e|t.baseLanes}function uo(){O(co,nu),O(so,so.current)}function fo(){nu=co.current,D(so),D(co)}var po=me(null),mo=null;function ho(e){var t=e.alternate;O(bo,bo.current&1),O(po,e),mo===null&&(t===null||so.current!==null||t.memoizedState!==null)&&(mo=e)}function go(e){O(bo,bo.current),O(po,e),mo===null&&(mo=e)}function _o(e){e.tag===22?(O(bo,bo.current),O(po,e),mo===null&&(mo=e)):vo(e)}function vo(){O(bo,bo.current),O(po,po.current)}function yo(e){D(po),mo===e&&(mo=null),D(bo)}var bo=me(0);function xo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||_f(n)||vf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var So=0,M=null,Co=null,wo=null,To=!1,Eo=!1,Do=!1,Oo=0,ko=0,Ao=null,jo=0;function Mo(){throw Error(a(321))}function No(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Po(e,t,n,r,i,a){return So=a,M=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?Ys:Xs,Do=!1,a=n(r,i),Do=!1,Eo&&(a=Io(t,n,r,i)),Fo(e),a}function Fo(e){w.H=Js;var t=Co!==null&&Co.next!==null;if(So=0,wo=Co=M=null,To=!1,ko=0,Ao=null,t)throw Error(a(300));e===null||pc||(e=e.dependencies,e!==null&&ca(e)&&(pc=!0))}function Io(e,t,n,r){M=e;var i=0;do{if(Eo&&(Ao=null),ko=0,Eo=!1,25<=i)throw Error(a(301));if(i+=1,wo=Co=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}w.H=Zs,o=t(n,r)}while(Eo);return o}function Lo(){var e=w.H,t=e.useState()[0];return t=typeof t.then==`function`?Ho(t):t,e=e.useState()[0],(Co===null?null:Co.memoizedState)!==e&&(M.flags|=1024),t}function N(){var e=Oo!==0;return Oo=0,e}function P(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ro(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}So=0,wo=Co=M=null,Eo=!1,ko=Oo=0,Ao=null}function zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wo===null?M.memoizedState=wo=e:wo=wo.next=e,wo}function Bo(){if(Co===null){var e=M.alternate;e=e===null?null:e.memoizedState}else e=Co.next;var t=wo===null?M.memoizedState:wo.next;if(t!==null)wo=t,Co=e;else{if(e===null)throw M.alternate===null?Error(a(467)):Error(a(310));Co=e,e={memoizedState:Co.memoizedState,baseState:Co.baseState,baseQueue:Co.baseQueue,queue:Co.queue,next:null},wo===null?M.memoizedState=wo=e:wo=wo.next=e}return wo}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ho(e){var t=ko;return ko+=1,Ao===null&&(Ao=[]),e=Ia(Ao,e,t),t=M,(wo===null?t.memoizedState:wo.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?Ys:Xs),e}function Uo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ho(e);if(e.$$typeof===S)return ua(e)}throw Error(a(438,String(e)))}function Wo(e){var t=null,n=M.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=M.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Vo(),M.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function Go(e,t){return typeof t==`function`?t(e):t}function Ko(e){return qo(Bo(),Co,e)}function qo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(So&f)===f:(R&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===xa&&(d=!0);else if((So&p)===p){u=u.next,p===xa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,M.lanes|=p,iu|=p;f=u.action,Do&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,M.lanes|=f,iu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!jr(o,e.memoizedState)&&(pc=!0,d&&(n=Sa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Jo(e){var t=Bo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);jr(o,t.memoizedState)||(pc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Yo(e,t,n){var r=M,i=Bo(),o=j;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!jr((Co||i).memoizedState,n);if(s&&(i.memoizedState=n,pc=!0),i=i.queue,bs(Qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||wo!==null&&wo.memoizedState.tag&1){if(r.flags|=2048,hs(9,{destroy:void 0},Zo.bind(null,r,i,n,t),null),Xl===null)throw Error(a(349));o||So&127||Xo(r,t,n)}return n}function Xo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=M.updateQueue,t===null?(t=Vo(),M.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zo(e,t,n,r){t.value=n,t.getSnapshot=r,$o(t)&&es(e)}function Qo(e,t,n){return n(function(){$o(t)&&es(e)})}function $o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function es(e){var t=fi(e,2);t!==null&&Du(t,e,2)}function ts(e){var t=zo();if(typeof e==`function`){var n=e;if(e=n(),Do){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t}function ns(e,t,n,r){return e.baseState=n,qo(e,Co,typeof r==`function`?r:Go)}function rs(e,t,n,r,i){if(Gs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};w.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,is(t,o)):(o.next=n.next,t.pending=n.next=o)}}function is(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=w.T,o={};w.T=o;try{var s=n(i,r),c=w.S;c!==null&&c(o,s),as(e,t,s)}catch(n){ss(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),w.T=a}}else try{a=n(i,r),as(e,t,a)}catch(n){ss(e,t,n)}}function as(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){os(e,t,n)},function(n){return ss(e,t,n)}):os(e,t,n)}function os(e,t,n){t.status=`fulfilled`,t.value=n,cs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,is(e,n)))}function ss(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,cs(t),t=t.next;while(t!==r)}e.action=null}function cs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ls(e,t){return t}function us(e,t){if(j){var n=Xl.formState;if(n!==null){a:{var r=M;if(j){if(Ui){b:{for(var i=Ui,a=Gi;i.nodeType!==8;){if(!a){i=null;break b}if(i=bf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ui=bf(i.nextSibling),r=i.data===`F!`;break a}}qi(r)}r=!1}r&&(t=n[0])}}return n=zo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:t},n.queue=r,n=Hs.bind(null,M,r),r.dispatch=n,r=ts(!1),a=Ws.bind(null,M,!1,r.queue),r=zo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=rs.bind(null,M,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ds(e){return fs(Bo(),Co,e)}function fs(e,t,n){if(t=qo(e,t,ls)[0],e=Ko(Go)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ho(t)}catch(e){throw e===ja?Na:e}else r=t;t=Bo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(M.flags|=2048,hs(9,{destroy:void 0},ps.bind(null,i,n),null)),[r,a,e]}function ps(e,t){e.action=t}function ms(e){var t=Bo(),n=Co;if(n!==null)return fs(t,n,e);Bo(),t=t.memoizedState,n=Bo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function hs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=M.updateQueue,t===null&&(t=Vo(),M.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function gs(){return Bo().memoizedState}function _s(e,t,n,r){var i=zo();M.flags|=e,i.memoizedState=hs(1|t,{destroy:void 0},n,r===void 0?null:r)}function vs(e,t,n,r){var i=Bo();r=r===void 0?null:r;var a=i.memoizedState.inst;Co!==null&&r!==null&&No(r,Co.memoizedState.deps)?i.memoizedState=hs(t,a,n,r):(M.flags|=e,i.memoizedState=hs(1|t,a,n,r))}function ys(e,t){_s(8390656,8,e,t)}function bs(e,t){vs(2048,8,e,t)}function xs(e){M.flags|=4;var t=M.updateQueue;if(t===null)t=Vo(),M.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ss(e){var t=Bo().memoizedState;return xs({ref:t,nextImpl:e}),function(){if(I&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function Cs(e,t){return vs(4,2,e,t)}function ws(e,t){return vs(4,4,e,t)}function Ts(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Es(e,t,n){n=n==null?null:n.concat([e]),vs(4,4,Ts.bind(null,t,e),n)}function Ds(){}function Os(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&No(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ks(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&No(t,r[1]))return r[0];if(r=e(),Do){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function As(e,t,n){return n===void 0||So&1073741824&&!(R&261930)?e.memoizedState=t:(e.memoizedState=n,e=Eu(),M.lanes|=e,iu|=e,n)}function js(e,t,n,r){return jr(n,t)?n:so.current===null?!(So&42)||So&1073741824&&!(R&261930)?(pc=!0,e.memoizedState=n):(e=Eu(),M.lanes|=e,iu|=e,t):(e=As(e,n,r),jr(e,t)||(pc=!0),e)}function Ms(e,t,n,r,i){var a=E.p;E.p=a!==0&&8>a?a:8;var o=w.T,s={};w.T=s,Ws(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Us(e,t,Ta(c,r),Tu(e)):Us(e,t,r,Tu(e))}catch(n){Us(e,t,{then:function(){},status:`rejected`,reason:n},Tu())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function Ns(){}function Ps(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Fs(e).queue;Ms(e,i,t,de,n===null?Ns:function(){return Is(e),n(r)})}function Fs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:de},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Is(e){var t=Fs(e);t.next===null&&(t=e.alternate.memoizedState),Us(e,t.next.queue,{},Tu())}function Ls(){return ua(up)}function Rs(){return Bo().memoizedState}function zs(){return Bo().memoizedState}function Bs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tu();e=Qa(n);var r=$a(t,e,n);r!==null&&(Du(r,t,n),eo(r,t,n)),t={cache:_a()},e.payload=t;return}t=t.return}}function Vs(e,t,n){var r=Tu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Gs(e)?Ks(t,n):(n=di(e,t,n,r),n!==null&&(Du(n,e,r),qs(n,t,r)))}function Hs(e,t,n){Us(e,t,n,Tu())}function Us(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gs(e))Ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o))return ui(e,t,i,0),Xl===null&&li(),!1}catch{}if(n=di(e,t,i,r),n!==null)return Du(n,e,r),qs(n,t,r),!0}return!1}function Ws(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Gs(e)){if(t)throw Error(a(479))}else t=di(e,n,r,2),t!==null&&Du(t,e,2)}function Gs(e){var t=e.alternate;return e===M||t!==null&&t===M}function Ks(e,t){Eo=To=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var Js={readContext:ua,use:Uo,useCallback:Mo,useContext:Mo,useEffect:Mo,useImperativeHandle:Mo,useLayoutEffect:Mo,useInsertionEffect:Mo,useMemo:Mo,useReducer:Mo,useRef:Mo,useState:Mo,useDebugValue:Mo,useDeferredValue:Mo,useTransition:Mo,useSyncExternalStore:Mo,useId:Mo,useHostTransitionStatus:Mo,useFormState:Mo,useActionState:Mo,useOptimistic:Mo,useMemoCache:Mo,useCacheRefresh:Mo};Js.useEffectEvent=Mo;var Ys={readContext:ua,use:Uo,useCallback:function(e,t){return zo().memoizedState=[e,t===void 0?null:t],e},useContext:ua,useEffect:ys,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),_s(4194308,4,Ts.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var n=zo();t=t===void 0?null:t;var r=e();if(Do){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=zo();if(n!==void 0){var i=n(t);if(Do){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Vs.bind(null,M,e),[r.memoizedState,e]},useRef:function(e){var t=zo();return e={current:e},t.memoizedState=e},useState:function(e){e=ts(e);var t=e.queue,n=Hs.bind(null,M,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ds,useDeferredValue:function(e,t){return As(zo(),e,t)},useTransition:function(){var e=ts(!1);return e=Ms.bind(null,M,e.queue,!0,!1),zo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=M,i=zo();if(j){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Xl===null)throw Error(a(349));R&127||Xo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ys(Qo.bind(null,r,o,e),[e]),r.flags|=2048,hs(9,{destroy:void 0},Zo.bind(null,r,o,n,t),null),n},useId:function(){var e=zo(),t=Xl.identifierPrefix;if(j){var n=Ii,r=Fi;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Oo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=jo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ls,useFormState:us,useActionState:us,useOptimistic:function(e){var t=zo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ws.bind(null,M,!0,n),n.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return zo().memoizedState=Bs.bind(null,M)},useEffectEvent:function(e){var t=zo(),n={impl:e};return t.memoizedState=n,function(){if(I&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Xs={readContext:ua,use:Uo,useCallback:Os,useContext:ua,useEffect:bs,useImperativeHandle:Es,useInsertionEffect:Cs,useLayoutEffect:ws,useMemo:ks,useReducer:Ko,useRef:gs,useState:function(){return Ko(Go)},useDebugValue:Ds,useDeferredValue:function(e,t){return js(Bo(),Co.memoizedState,e,t)},useTransition:function(){var e=Ko(Go)[0],t=Bo().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Yo,useId:Rs,useHostTransitionStatus:Ls,useFormState:ds,useActionState:ds,useOptimistic:function(e,t){return ns(Bo(),Co,e,t)},useMemoCache:Wo,useCacheRefresh:zs};Xs.useEffectEvent=Ss;var Zs={readContext:ua,use:Uo,useCallback:Os,useContext:ua,useEffect:bs,useImperativeHandle:Es,useInsertionEffect:Cs,useLayoutEffect:ws,useMemo:ks,useReducer:Jo,useRef:gs,useState:function(){return Jo(Go)},useDebugValue:Ds,useDeferredValue:function(e,t){var n=Bo();return Co===null?As(n,e,t):js(n,Co.memoizedState,e,t)},useTransition:function(){var e=Jo(Go)[0],t=Bo().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Yo,useId:Rs,useHostTransitionStatus:Ls,useFormState:ms,useActionState:ms,useOptimistic:function(e,t){var n=Bo();return Co===null?(n.baseState=e,[e,n.queue.dispatch]):ns(n,Co,e,t)},useMemoCache:Wo,useCacheRefresh:zs};Zs.useEffectEvent=Ss;function Qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $s={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tu(),i=Qa(r);i.payload=t,n!=null&&(i.callback=n),t=$a(e,i,r),t!==null&&(Du(t,e,r),eo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tu(),i=Qa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=$a(e,i,r),t!==null&&(Du(t,e,r),eo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tu(),r=Qa(n);r.tag=2,t!=null&&(r.callback=t),t=$a(e,r,n),t!==null&&(Du(t,e,n),eo(t,e,n))}};function ec(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,a):!0}function tc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$s.enqueueReplaceState(t,t.state,null)}function nc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function rc(e){ai(e)}function ic(e){console.error(e)}function ac(e){ai(e)}function oc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function sc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function cc(e,t,n){return n=Qa(n),n.tag=3,n.payload={element:null},n.callback=function(){oc(e,t)},n}function lc(e){return e=Qa(e),e.tag=3,e}function uc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){sc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){sc(t,n,r),typeof i!=`function`&&(hu===null?hu=new Set([this]):hu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function dc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&sa(t,n,i,!0),n=po.current,n!==null){switch(n.tag){case 31:case 13:return mo===null?zu():n.alternate===null&&ru===0&&(ru=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Pa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,i)),!1;case 22:return n.flags|=65536,r===Pa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,i)),!1}throw Error(a(435,n.tag))}return rd(e,r,i),zu(),!1}if(j)return t=po.current,t===null?(r!==Ki&&(t=Error(a(423),{cause:r}),$i(Di(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Di(r,n),i=cc(e.stateNode,r,i),to(e,i),ru!==4&&(ru=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ki&&(e=Error(a(422),{cause:r}),$i(Di(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Di(o,n),cu===null?cu=[o]:cu.push(o),ru!==4&&(ru=2),t===null)return!0;r=Di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=cc(n.stateNode,r,e),to(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(hu===null||!hu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=lc(i),uc(i,e,n,r),to(n,i),!1}n=n.return}while(n!==null);return!1}var fc=Error(a(461)),pc=!1;function mc(e,t,n,r){t.child=e===null?Ja(t,null,n,r):qa(t,e.child,n,r)}function hc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return la(t),r=Po(e,t,n,o,a,i),s=N(),e!==null&&!pc?(P(e,t,i),zc(e,t,i)):(j&&s&&zi(t),t.flags|=1,mc(e,t,r,i),t.child)}function gc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!vi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,_c(e,t,a,r,i)):(e=xi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Bc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Mr:n,n(o,r)&&e.ref===t.ref)return zc(e,t,i)}return t.flags|=1,e=yi(a,r),e.ref=t.ref,e.return=t,t.child=e}function _c(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Mr(a,r)&&e.ref===t.ref)if(pc=!1,t.pendingProps=r=a,Bc(e,i))e.flags&131072&&(pc=!0);else return t.lanes=e.lanes,zc(e,t,i)}return Tc(e,t,n,r,i)}function vc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ka(t,a===null?null:a.cachePool),a===null?uo():lo(t,a),_o(t);else return r=t.lanes=536870912,bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ka(t,null),uo(),vo(t)):(ka(t,a.cachePool),lo(t,a),vo(t),t.memoizedState=null);return mc(e,t,i,n),t.child}function yc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function bc(e,t,n,r,i){var a=Oa();return a=a===null?null:{parent:ga._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ka(t,null),uo(),_o(t),e!==null&&sa(e,t,r,!0),t.childLanes=i,null}function xc(e,t){return t=Pc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sc(e,t,n){return qa(t,e.child,null,n),e=xc(t,t.pendingProps),e.flags|=2,yo(t),t.memoizedState=null,e}function Cc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(j){if(r.mode===`hidden`)return e=xc(t,r),t.lanes=536870912,yc(null,e);if(go(t),(e=Ui)?(e=gf(e,Gi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi===null?null:{id:Fi,overflow:Ii},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,Hi=t,Ui=null)):e=null,e===null)throw qi(t);return t.lanes=536870912,null}return xc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(go(t),i)if(t.flags&256)t.flags&=-257,t=Sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(pc||sa(e,t,n,!1),i=(n&e.childLanes)!==0,pc||i){if(r=Xl,r!==null&&(s=dt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,fi(e,s),Du(r,e,s),fc;zu(),t=Sc(e,t,n)}else e=o.treeContext,Ui=bf(s.nextSibling),Hi=t,j=!0,Wi=null,Gi=!1,e!==null&&Vi(t,e),t=xc(t,r),t.flags|=4096;return t}return e=yi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function wc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Tc(e,t,n,r,i){return la(t),n=Po(e,t,n,r,void 0,i),r=N(),e!==null&&!pc?(P(e,t,i),zc(e,t,i)):(j&&r&&zi(t),t.flags|=1,mc(e,t,n,i),t.child)}function Ec(e,t,n,r,i,a){return la(t),t.updateQueue=null,n=Io(t,r,n,i),Fo(e),r=N(),e!==null&&!pc?(P(e,t,a),zc(e,t,a)):(j&&r&&zi(t),t.flags|=1,mc(e,t,n,a),t.child)}function Dc(e,t,n,r,i){if(la(t),t.stateNode===null){var a=hi,o=n.contextType;typeof o==`object`&&o&&(a=ua(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=$s,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Xa(t),o=n.contextType,a.context=typeof o==`object`&&o?ua(o):hi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&$s.enqueueReplaceState(a,a.state,null),io(t,r,a,i),ro(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=nc(n,s);a.props=c;var l=a.context,u=n.contextType;o=hi,typeof u==`object`&&u&&(o=ua(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&tc(t,a,r,o),Ya=!1;var f=t.memoizedState;a.state=f,io(t,r,a,i),ro(),l=t.memoizedState,s||f!==l||Ya?(typeof d==`function`&&(Qs(t,n,d,r),l=t.memoizedState),(c=Ya||ec(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Za(e,t),o=t.memoizedProps,u=nc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=hi,typeof l==`object`&&l&&(c=ua(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&tc(t,a,r,c),Ya=!1,f=t.memoizedState,a.state=f,io(t,r,a,i),ro();var p=t.memoizedState;o!==d||f!==p||Ya||e!==null&&e.dependencies!==null&&ca(e.dependencies)?(typeof s==`function`&&(Qs(t,n,s,r),p=t.memoizedState),(u=Ya||ec(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ca(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,wc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=qa(t,e.child,null,i),t.child=qa(t,null,n,i)):mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=zc(e,t,i),e}function Oc(e,t,n,r){return Zi(),t.flags|=256,mc(e,t,n,r),t.child}var kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ac(e){return{baseLanes:e,cachePool:Aa()}}function jc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=z),e}function Mc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(bo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(j){if(i?ho(t):vo(t),(e=Ui)?(e=gf(e,Gi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi===null?null:{id:Fi,overflow:Ii},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,Hi=t,Ui=null)):e=null,e===null)throw qi(t);return vf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(vo(t),i=t.mode,c=Pc({mode:`hidden`,children:c},i),r=Si(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Ac(n),r.childLanes=jc(e,s,n),t.memoizedState=kc,yc(null,r)):(ho(t),Nc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ho(t),t.flags&=-257,t=Fc(e,t,n)):t.memoizedState===null?(vo(t),c=r.fallback,i=t.mode,r=Pc({mode:`visible`,children:r.children},i),c=Si(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,qa(t,e.child,null,n),r=t.child,r.memoizedState=Ac(n),r.childLanes=jc(e,s,n),t.memoizedState=kc,t=yc(null,r)):(vo(t),t.child=e.child,t.flags|=128,t=null);else if(ho(t),vf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,$i({value:r,source:null,stack:null}),t=Fc(e,t,n)}else if(pc||sa(e,t,n,!1),s=(n&e.childLanes)!==0,pc||s){if(s=Xl,s!==null&&(r=dt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,fi(e,r),Du(s,e,r),fc;_f(c)||zu(),t=Fc(e,t,n)}else _f(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ui=bf(c.nextSibling),Hi=t,j=!0,Wi=null,Gi=!1,e!==null&&Vi(t,e),t=Nc(t,r.children),t.flags|=4096);return t}return i?(vo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=yi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Si(c,i,n,null),c.flags|=2):c=yi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,yc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Ac(n):(i=c.cachePool,i===null?i=Aa():(l=ga._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=jc(e,s,n),t.memoizedState=kc,yc(e.child,r)):(ho(t),n=e.child,e=n.sibling,n=yi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Nc(e,t){return t=Pc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Pc(e,t){return e=_i(22,e,null,t),e.lanes=0,e}function Fc(e,t,n){return qa(t,e.child,null,n),e=Nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ic(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),aa(e.return,t,n)}function Lc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Rc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=bo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,O(bo,o),mc(e,t,r,n),r=j?ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ic(e,n,t);else if(e.tag===19)Ic(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&xo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Lc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&xo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Lc(t,!0,n,null,a,r);break;case`together`:Lc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function zc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),iu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(sa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=yi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Bc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ca(e))):!0}function Vc(e,t,n){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),ra(t,ga,e.memoizedState.cache),Zi();break;case 27:case 5:Se(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,go(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ho(t),e=zc(e,t,n),e===null?null:e.sibling):Mc(e,t,n):(ho(t),t.flags|=128,null);ho(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(sa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Rc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),O(bo,bo.current),r)break;return null;case 22:return t.lanes=0,vc(e,t,n,t.pendingProps);case 24:ra(t,ga,e.memoizedState.cache)}return zc(e,t,n)}function Hc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pc=!0;else{if(!Bc(e,n)&&!(t.flags&128))return pc=!1,Vc(e,t,n);pc=!!(e.flags&131072)}else pc=!1,j&&t.flags&1048576&&Ri(t,ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=La(t.elementType),t.type=e,typeof e==`function`)vi(e)?(r=nc(e,r),t.tag=1,t=Dc(null,t,e,r,n)):(t.tag=0,t=Tc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=hc(null,t,e,r,n);break a}else if(i===ne){t.tag=14,t=gc(null,t,e,r,n);break a}}throw t=le(e)||e,Error(a(306,t,``))}}return t;case 0:return Tc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=nc(r,t.pendingProps),Dc(e,t,r,i,n);case 3:a:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Za(e,t),io(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ra(t,ga,r),r!==o.cache&&oa(t,[ga],n,!0),ro(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Oc(e,t,r,n);break a}else if(r!==i){i=Di(Error(a(424)),t),$i(i),t=Oc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ui=bf(e.firstChild),Hi=t,j=!0,Wi=null,Gi=!0,n=Ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Zi(),r===i){t=zc(e,t,n);break a}mc(e,t,r,n)}t=t.child}return t;case 26:return wc(e,t),e===null?(n=Vf(t.type,null,t.pendingProps,null))?t.memoizedState=n:j||(n=t.type,e=t.pendingProps,r=$d(_e.current).createElement(n),r[_t]=t,r[vt]=e,qd(r,n,e),At(r),t.stateNode=r):t.memoizedState=Vf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Se(t),e===null&&j&&(r=t.stateNode=wf(t.type,t.pendingProps,_e.current),Hi=t,Gi=!0,i=Ui,df(t.type)?(xf=i,Ui=bf(r.firstChild)):Ui=i),mc(e,t,t.pendingProps.children,n),wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&j&&((i=r=Ui)&&(r=mf(r,t.type,t.pendingProps,Gi),r===null?i=!1:(t.stateNode=r,Hi=t,Ui=bf(r.firstChild),Gi=!1,i=!0)),i||qi(t)),Se(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,nf(i,o)?r=null:s!==null&&nf(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Po(e,t,Lo,null,null,n),up._currentValue=i),wc(e,t),mc(e,t,r,n),t.child;case 6:return e===null&&j&&((e=n=Ui)&&(n=hf(n,t.pendingProps,Gi),n===null?e=!1:(t.stateNode=n,Hi=t,Ui=null,e=!0)),e||qi(t)),null;case 13:return Mc(e,t,n);case 4:return be(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=qa(t,null,r,n):mc(e,t,r,n),t.child;case 11:return hc(e,t,t.type,t.pendingProps,n);case 7:return mc(e,t,t.pendingProps,n),t.child;case 8:return mc(e,t,t.pendingProps.children,n),t.child;case 12:return mc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ra(t,t.type,r.value),mc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,la(t),i=ua(i),r=r(i),t.flags|=1,mc(e,t,r,n),t.child;case 14:return gc(e,t,t.type,t.pendingProps,n);case 15:return _c(e,t,t.type,t.pendingProps,n);case 19:return Rc(e,t,n);case 31:return Cc(e,t,n);case 22:return vc(e,t,n,t.pendingProps);case 24:return la(t),r=ua(ga),e===null?(i=Oa(),i===null&&(i=Xl,o=_a(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Xa(t),ra(t,ga,i)):((e.lanes&n)!==0&&(Za(e,t),io(t,null,null,n),ro()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,ra(t,ga,r),r!==i.cache&&oa(t,[ga],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ra(t,ga,r))),mc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function F(e){e.flags|=4}function Uc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Iu())e.flags|=8192;else throw Ra=Pa,Ma}else e.flags&=-16777217}function Wc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!np(t))if(Iu())e.flags|=8192;else throw Ra=Pa,Ma}function Gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:at(),e.lanes|=t,su|=t)}function Kc(e,t){if(!j)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Jc(e,t,n){var r=t.pendingProps;switch(Bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:return qc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ia(ga),xe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xi(t)?F(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qi())),qc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(F(t),o===null?(qc(t),Uc(t,i,null,r,n)):(qc(t),Wc(t,o))):o?o===e.memoizedState?(qc(t),t.flags&=-16777217):(F(t),qc(t),Wc(t,o)):(e=e.memoizedProps,e!==r&&F(t),qc(t),Uc(t,i,e,r,n)),null;case 27:if(Ce(t),n=_e.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&F(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return qc(t),null}e=he.current,Xi(t)?Ji(t,e):(e=wf(i,r,n),t.stateNode=e,F(t))}return qc(t),null;case 5:if(Ce(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&F(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return qc(t),null}if(o=he.current,Xi(t))Ji(t,o);else{var s=$d(_e.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[_t]=t,o[vt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(qd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&F(t)}}return qc(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&F(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=_e.current,Xi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Hi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||qi(t,!0)}else e=$d(e).createTextNode(r),e[_t]=t,t.stateNode=e}return qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Xi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),e=!1}else n=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(yo(t),t):(yo(t),null);if(t.flags&128)throw Error(a(558))}return qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),i=!1}else i=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(yo(t),t):(yo(t),null)}return yo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gc(t,t.updateQueue),qc(t),null);case 4:return xe(),e===null&&Pd(t.stateNode.containerInfo),qc(t),null;case 10:return ia(t.type),qc(t),null;case 19:if(D(bo),r=t.memoizedState,r===null)return qc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Kc(r,!1);else{if(ru!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=xo(e),o!==null){for(t.flags|=128,Kc(r,!1),e=o.updateQueue,t.updateQueue=e,Gc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bi(n,e),n=n.sibling;return O(bo,bo.current&1|2),j&&Li(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>pu&&(t.flags|=128,i=!0,Kc(r,!1),t.lanes=4194304)}else{if(!i)if(e=xo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Gc(t,e),Kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!j)return qc(t),null}else 2*Ie()-r.renderingStartTime>pu&&n!==536870912&&(t.flags|=128,i=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,n=bo.current,O(bo,i?n&1|2:n&1),j&&Li(t,r.treeForkCount),e);case 22:case 23:return yo(t),fo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(qc(t),t.subtreeFlags&6&&(t.flags|=8192)):qc(t),n=t.updateQueue,n!==null&&Gc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&D(Da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ia(ga),qc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Yc(e,t){switch(Bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(ga),xe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ce(t),null;case 31:if(t.memoizedState!==null){if(yo(t),t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return D(bo),null;case 4:return xe(),null;case 10:return ia(t.type),null;case 22:case 23:return yo(t),fo(),e!==null&&D(Da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(ga),null;case 25:return null;default:return null}}function Xc(e,t){switch(Bi(t),t.tag){case 3:ia(ga),xe();break;case 26:case 27:case 5:Ce(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&yo(t);break;case 13:yo(t);break;case 19:D(bo);break;case 10:ia(t.type);break;case 22:case 23:yo(t),fo(),e!==null&&D(Da);break;case 24:ia(ga)}}function Zc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){B(t,t.return,e)}}function Qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){B(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){B(t,t.return,e)}}function $c(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{oo(t,n)}catch(t){B(e,e.return,t)}}}function el(e,t,n){n.props=nc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){B(e,t,n)}}function tl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){B(e,t,n)}}function nl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){B(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){B(e,t,n)}else n.current=null}function rl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){B(e,e.return,t)}}function il(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[vt]=t}catch(t){B(e,e.return,t)}}function al(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function ol(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&df(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dn));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function cl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(cl(e,t,n),e=e.sibling;e!==null;)cl(e,t,n),e=e.sibling}function ll(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[_t]=e,t[vt]=n}catch(t){B(e,e.return,t)}}var ul=!1,dl=!1,fl=!1,pl=typeof WeakSet==`function`?WeakSet:Set,ml=null;function hl(e,t){if(e=e.containerInfo,Zd=yp,e=Ir(e),Lr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Qd={focusedElem:e,selectionRange:n},yp=!1,ml=t;ml!==null;)if(t=ml,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ml=e;else for(;ml!==null;){switch(t=ml,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=nc(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){B(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)pf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:pf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,ml=e;break}ml=t.return}}function gl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:jl(e,n),r&4&&Zc(5,n);break;case 1:if(jl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){B(n,n.return,e)}else{var i=nc(n.type,t.memoizedProps);t=t.memoizedState;
vendor: 5,406 bytes, line 9
9try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){B(n,n.return,e)}}r&64&&$c(n),r&512&&tl(n,n.return);break;case 3:if(jl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{oo(e,t)}catch(e){B(n,n.return,e)}}break;case 27:t===null&&r&4&&ll(n);case 26:case 5:jl(e,n),t===null&&r&4&&rl(n),r&512&&tl(n,n.return);break;case 12:jl(e,n);break;case 31:jl(e,n),r&4&&Sl(e,n);break;case 13:jl(e,n),r&4&&Cl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),yf(e,n))));break;case 22:if(r=n.memoizedState!==null||ul,!r){t=t!==null&&t.memoizedState!==null||dl,i=ul;var a=dl;ul=r,(dl=t)&&!a?Nl(e,n,(n.subtreeFlags&8772)!=0):jl(e,n),ul=i,dl=a}break;case 30:break;default:jl(e,n)}}function _l(e){var t=e.alternate;t!==null&&(e.alternate=null,_l(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vl=null,yl=!1;function bl(e,t,n){for(n=n.child;n!==null;)xl(e,t,n),n=n.sibling}function xl(e,t,n){if(Ke&&typeof Ke.onCommitFiberUnmount==`function`)try{Ke.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:dl||nl(n,t),bl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:dl||nl(n,t);var r=vl,i=yl;df(n.type)&&(vl=n.stateNode,yl=!1),bl(e,t,n),Tf(n.stateNode),vl=r,yl=i;break;case 5:dl||nl(n,t);case 6:if(r=vl,i=yl,vl=null,bl(e,t,n),vl=r,yl=i,vl!==null)if(yl)try{(vl.nodeType===9?vl.body:vl.nodeName===`HTML`?vl.ownerDocument.body:vl).removeChild(n.stateNode)}catch(e){B(n,t,e)}else try{vl.removeChild(n.stateNode)}catch(e){B(n,t,e)}break;case 18:vl!==null&&(yl?(e=vl,ff(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):ff(vl,n.stateNode));break;case 4:r=vl,i=yl,vl=n.stateNode.containerInfo,yl=!0,bl(e,t,n),vl=r,yl=i;break;case 0:case 11:case 14:case 15:Qc(2,n,t),dl||Qc(4,n,t),bl(e,t,n);break;case 1:dl||(nl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&el(n,t,r)),bl(e,t,n);break;case 21:bl(e,t,n);break;case 22:dl=(r=dl)||n.memoizedState!==null,bl(e,t,n),dl=r;break;default:bl(e,t,n)}}function Sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){B(t,t.return,e)}}}function Cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){B(t,t.return,e)}}function wl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pl),t;default:throw Error(a(435,e.tag))}}function Tl(e,t){var n=wl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function El(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(df(c.type)){vl=c.stateNode,yl=!1;break a}break;case 5:vl=c.stateNode,yl=!1;break a;case 3:case 4:vl=c.stateNode.containerInfo,yl=!0;break a}c=c.return}if(vl===null)throw Error(a(160));xl(o,s,i),vl=null,yl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ol(t,e),t=t.sibling}var Dl=null;function Ol(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:El(t,e),kl(e),r&4&&(Qc(3,e,e.return),Zc(3,e),Qc(5,e,e.return));break;case 1:El(t,e),kl(e),r&512&&(dl||n===null||nl(n,n.return)),r&64&&ul&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=Dl;if(El(t,e),kl(e),r&512&&(dl||n===null||nl(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[wt]||o[_t]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),qd(o,r,n),o[_t]=e,At(o),r=o;break a;case`link`:var s=$f(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),qd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=$f(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),qd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[_t]=e,At(o),r=o}e.stateNode=r}else ep(i,e.type,e.stateNode);else e.stateNode=Jf(i,r,e.memoizedProps);
vendor: 23,093 bytes, line 9
9else o===r?r===null&&e.stateNode!==null&&il(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?ep(i,e.type,e.stateNode):Jf(i,r,e.memoizedProps))}break;case 27:El(t,e),kl(e),r&512&&(dl||n===null||nl(n,n.return)),n!==null&&r&4&&il(e,e.memoizedProps,n.memoizedProps);break;case 5:if(El(t,e),kl(e),r&512&&(dl||n===null||nl(n,n.return)),e.flags&32){i=e.stateNode;try{nn(i,``)}catch(t){B(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,il(e,i,n===null?i:n.memoizedProps)),r&1024&&(fl=!0);break;case 6:if(El(t,e),kl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){B(e,e.return,t)}}break;case 3:if(Qf=null,i=Dl,Dl=Of(t.containerInfo),El(t,e),Dl=i,kl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){B(e,e.return,t)}fl&&(fl=!1,Al(e));break;case 4:r=Dl,Dl=Of(e.stateNode.containerInfo),El(t,e),kl(e),Dl=r;break;case 12:El(t,e),kl(e);break;case 31:El(t,e),kl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Tl(e,r)));break;case 13:El(t,e),kl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(du=Ie()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Tl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ul,d=dl;if(ul=u||i,dl=d||l,El(t,e),dl=d,ul=u,kl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||ul||dl||Ml(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){B(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){B(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?H(m,!0):H(l.stateNode,!1)}catch(e){B(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Tl(e,n))));break;case 19:El(t,e),kl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Tl(e,r)));break;case 30:break;case 21:break;default:El(t,e),kl(e)}}function kl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(al(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;cl(e,ol(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(nn(o,``),n.flags&=-33),cl(e,ol(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;sl(e,ol(e),s);break;default:throw Error(a(161))}}catch(t){B(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Al(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Al(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function jl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gl(e,t.alternate,t),t=t.sibling}function Ml(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qc(4,t,t.return),Ml(t);break;case 1:nl(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&el(t,t.return,n),Ml(t);break;case 27:Tf(t.stateNode);case 26:case 5:nl(t,t.return),Ml(t);break;case 22:t.memoizedState===null&&Ml(t);break;case 30:Ml(t);break;default:Ml(t)}e=e.sibling}}function Nl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Nl(i,a,n),Zc(4,a);break;case 1:if(Nl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){B(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)ao(c[i],s)}catch(e){B(r,r.return,e)}}n&&o&64&&$c(a),tl(a,a.return);break;case 27:ll(a);case 26:case 5:Nl(i,a,n),n&&r===null&&o&4&&rl(a),tl(a,a.return);break;case 12:Nl(i,a,n);break;case 31:Nl(i,a,n),n&&o&4&&Sl(i,a);break;case 13:Nl(i,a,n),n&&o&4&&Cl(i,a);break;case 22:a.memoizedState===null&&Nl(i,a,n),tl(a,a.return);break;case 30:break;default:Nl(i,a,n)}t=t.sibling}}function Pl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&va(n))}function Fl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&va(e))}function Il(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ll(e,t,n,r),t=t.sibling}function Ll(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Il(e,t,n,r),i&2048&&Zc(9,t);break;case 1:Il(e,t,n,r);break;case 3:Il(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&va(e)));break;case 12:if(i&2048){Il(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){B(t,t.return,e)}}else Il(e,t,n,r);break;case 31:Il(e,t,n,r);break;case 13:Il(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Il(e,t,n,r):(a._visibility|=2,Rl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Il(e,t,n,r):zl(e,t),i&2048&&Pl(o,t);break;case 24:Il(e,t,n,r),i&2048&&Fl(t.alternate,t);break;default:Il(e,t,n,r)}}function Rl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Rl(a,o,s,c,i),Zc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Rl(a,o,s,c,i)):u._visibility&2?Rl(a,o,s,c,i):zl(a,o),i&&l&2048&&Pl(o.alternate,o);break;case 24:Rl(a,o,s,c,i),i&&l&2048&&Fl(o.alternate,o);break;default:Rl(a,o,s,c,i)}t=t.sibling}}function zl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:zl(n,r),i&2048&&Pl(r.alternate,r);break;case 24:zl(n,r),i&2048&&Fl(r.alternate,r);break;default:zl(n,r)}t=t.sibling}}var Bl=8192;function Vl(e,t,n){if(e.subtreeFlags&Bl)for(e=e.child;e!==null;)Hl(e,t,n),e=e.sibling}function Hl(e,t,n){switch(e.tag){case 26:Vl(e,t,n),e.flags&Bl&&e.memoizedState!==null&&rp(n,Dl,e.memoizedState,e.memoizedProps);break;case 5:Vl(e,t,n);break;case 3:case 4:var r=Dl;Dl=Of(e.stateNode.containerInfo),Vl(e,t,n),Dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bl,Bl=16777216,Vl(e,t,n),Bl=r):Vl(e,t,n));break;default:Vl(e,t,n)}}function Ul(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Wl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ml=r,ql(r,e)}Ul(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gl(e),e=e.sibling}function Gl(e){switch(e.tag){case 0:case 11:case 15:Wl(e),e.flags&2048&&Qc(9,e,e.return);break;case 3:Wl(e);break;case 12:Wl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Kl(e)):Wl(e);break;default:Wl(e)}}function Kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ml=r,ql(r,e)}Ul(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qc(8,t,t.return),Kl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Kl(t));break;default:Kl(t)}e=e.sibling}}function ql(e,t){for(;ml!==null;){var n=ml;switch(n.tag){case 0:case 11:case 15:Qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:va(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ml=r;else a:for(n=e;ml!==null;){r=ml;var i=r.sibling,a=r.return;if(_l(r),r===n){ml=null;break a}if(i!==null){i.return=a,ml=i;break a}ml=a}}}var Jl={getCacheForType:function(e){var t=ua(ga),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ua(ga).controller.signal}},Yl=typeof WeakMap==`function`?WeakMap:Map,I=0,Xl=null,L=null,R=0,Zl=0,Ql=null,$l=!1,eu=!1,tu=!1,nu=0,ru=0,iu=0,au=0,ou=0,z=0,su=0,cu=null,lu=null,uu=!1,du=0,fu=0,pu=1/0,mu=null,hu=null,gu=0,_u=null,vu=null,yu=0,bu=0,xu=null,Su=null,Cu=0,wu=null;function Tu(){return I&2&&R!==0?R&-R:w.T===null?mt():Cd()}function Eu(){if(z===0)if(!(R&536870912)||j){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),z=e}else z=536870912;return e=po.current,e!==null&&(e.flags|=32),z}function Du(e,t,n){(e===Xl&&(Zl===2||Zl===9)||e.cancelPendingCommit!==null)&&(Pu(e,0),ju(e,R,z,!1)),st(e,n),(!(I&2)||e!==Xl)&&(e===Xl&&(!(I&2)&&(au|=n),ru===4&&ju(e,R,z,!1)),hd(e))}function Ou(e,t,n){if(I&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||rt(e,t),i=r?Hu(e,t):Bu(e,t,!0),o=r;do{if(i===0){eu&&!r&&ju(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Au(n)){i=Bu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=cu;var l=c.current.memoizedState.isDehydrated;if(l&&(Pu(c,s).flags|=256),s=Bu(c,s,!1),s!==2){if(tu&&!l){c.errorRecoveryDisabledLanes|=o,au|=o,i=4;break a}o=lu,lu=i,o!==null&&(lu===null?lu=o:lu.push.apply(lu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Pu(e,0),ju(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:ju(r,t,z,!$l);break a;case 2:lu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=du+300-Ie(),10<i)){if(ju(r,t,z,!$l),nt(r,0,!0)!==0)break a;yu=t,r.timeoutHandle=of(ku.bind(null,r,n,lu,mu,uu,t,z,au,su,$l,o,`Throttled`,-0,0),i);break a}ku(r,n,lu,mu,uu,t,z,au,su,$l,o,null,-0,0)}}break}while(1);hd(e)}function ku(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dn},Hl(t,a,d);var m=(a&62914560)===a?du-Ie():(a&4194048)===a?fu-Ie():0;if(m=ap(d,m),m!==null){yu=a,e.cancelPendingCommit=m(Yu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ju(e,a,o,!l);return}}Yu(e,t,a,n,r,i,o,s,c)}function Au(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!jr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ju(e,t,n,r){t&=~ou,t&=~au,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&lt(e,n,t)}function Mu(){return I&6?!0:(gd(0,!1),!1)}function Nu(){if(L!==null){if(Zl===0)var e=L.return;else e=L,na=ta=null,Ro(e),Va=null,Ha=0,e=L;for(;e!==null;)Xc(e.alternate,e),e=e.return;L=null}}function Pu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),yu=0,Nu(),Xl=e,L=n=yi(e.current,null),R=t,Zl=0,Ql=null,$l=!1,eu=rt(e,t),tu=!1,su=z=ou=au=iu=ru=0,lu=cu=null,uu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Je(r),a=1<<i;t|=e[i],r&=~a}return nu=t,li(),n}function Fu(e,t){M=null,w.H=Js,t===ja||t===Na?(t=za(),Zl=3):t===Ma?(t=za(),Zl=4):Zl=t===fc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ql=t,L===null&&(ru=1,oc(e,Di(t,e.current)))}function Iu(){var e=po.current;return e===null?!0:(R&4194048)===R?mo===null:(R&62914560)===R||R&536870912?e===mo:!1}function Lu(){var e=w.H;return w.H=Js,e===null?Js:e}function Ru(){var e=w.A;return w.A=Jl,e}function zu(){ru=4,$l||(R&4194048)!==R&&po.current!==null||(eu=!0),!(iu&134217727)&&!(au&134217727)||Xl===null||ju(Xl,R,z,!1)}function Bu(e,t,n){var r=I;I|=2;var i=Lu(),a=Ru();(Xl!==e||R!==t)&&(mu=null,Pu(e,t)),t=!1;var o=ru;a:do try{if(Zl!==0&&L!==null){var s=L,c=Ql;switch(Zl){case 8:Nu(),o=6;break a;case 3:case 2:case 9:case 6:po.current===null&&(t=!0);var l=Zl;if(Zl=0,Ql=null,Ku(e,s,c,l),n&&eu){o=0;break a}break;default:l=Zl,Zl=0,Ql=null,Ku(e,s,c,l)}}Vu(),o=ru;break}catch(t){Fu(e,t)}while(1);return t&&e.shellSuspendCounter++,na=ta=null,I=r,w.H=i,w.A=a,L===null&&(Xl=null,R=0,li()),o}function Vu(){for(;L!==null;)Wu(L)}function Hu(e,t){var n=I;I|=2;var r=Lu(),i=Ru();Xl!==e||R!==t?(mu=null,pu=Ie()+500,Pu(e,t)):eu=rt(e,t);a:do try{if(Zl!==0&&L!==null){t=L;var o=Ql;b:switch(Zl){case 1:Zl=0,Ql=null,Ku(e,t,o,1);break;case 2:case 9:if(Fa(o)){Zl=0,Ql=null,Gu(t);break}t=function(){Zl!==2&&Zl!==9||Xl!==e||(Zl=7),hd(e)},o.then(t,t);break a;case 3:Zl=7;break a;case 4:Zl=5;break a;case 7:Fa(o)?(Zl=0,Ql=null,Gu(t)):(Zl=0,Ql=null,Ku(e,t,o,7));break;case 5:var s=null;switch(L.tag){case 26:s=L.memoizedState;case 5:case 27:var c=L;if(s?np(s):c.stateNode.complete){Zl=0,Ql=null;var l=c.sibling;if(l!==null)L=l;else{var u=c.return;u===null?L=null:(L=u,qu(u))}break b}}Zl=0,Ql=null,Ku(e,t,o,5);break;case 6:Zl=0,Ql=null,Ku(e,t,o,6);break;case 8:Nu(),ru=6;break a;default:throw Error(a(462))}}Uu();break}catch(t){Fu(e,t)}while(1);return na=ta=null,w.H=r,w.A=i,I=n,L===null?(Xl=null,R=0,li(),ru):0}function Uu(){for(;L!==null&&!Pe();)Wu(L)}function Wu(e){var t=Hc(e.alternate,e,nu);e.memoizedProps=e.pendingProps,t===null?qu(e):L=t}function Gu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ec(n,t,t.pendingProps,t.type,void 0,R);break;case 11:t=Ec(n,t,t.pendingProps,t.type.render,t.ref,R);break;case 5:Ro(t);default:Xc(n,t),t=L=bi(t,nu),t=Hc(n,t,nu)}e.memoizedProps=e.pendingProps,t===null?qu(e):L=t}function Ku(e,t,n,r){na=ta=null,Ro(t),Va=null,Ha=0;var i=t.return;try{if(dc(e,i,t,n,R)){ru=1,oc(e,Di(n,e.current)),L=null;return}}catch(t){if(i!==null)throw L=i,t;ru=1,oc(e,Di(n,e.current)),L=null;return}t.flags&32768?(j||r===1?e=!0:eu||R&536870912?e=!1:($l=e=!0,(r===2||r===9||r===3||r===6)&&(r=po.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ju(t,e)):qu(t)}function qu(e){var t=e;do{if(t.flags&32768){Ju(t,$l);return}e=t.return;var n=Jc(t.alternate,t,nu);if(n!==null){L=n;return}if(t=t.sibling,t!==null){L=t;return}L=t=e}while(t!==null);ru===0&&(ru=5)}function Ju(e,t){do{var n=Yc(e.alternate,e);if(n!==null){n.flags&=32767,L=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){L=e;return}L=e=n}while(e!==null);ru=6,L=null}function Yu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do ed();while(gu!==0);if(I&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ci,ct(e,n,o,s,c,l),e===Xl&&(L=Xl=null,R=0),vu=t,_u=e,yu=n,bu=o,xu=i,Su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Be,function(){return td(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=w.T,w.T=null,i=E.p,E.p=2,s=I,I|=4;try{hl(e,t,n)}finally{I=s,E.p=i,w.T=r}}gu=1,Xu(),Zu(),Qu()}}function Xu(){if(gu===1){gu=0;var e=_u,t=vu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=w.T,w.T=null;var r=E.p;E.p=2;var i=I;I|=4;try{Ol(t,e);var a=Qd,o=Ir(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Fr(s.ownerDocument.documentElement,s)){if(c!==null&&Lr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Pr(s,h),v=Pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yp=!!Zd,Qd=Zd=null}finally{I=i,E.p=r,w.T=n}}e.current=t,gu=2}}function Zu(){if(gu===2){gu=0;var e=_u,t=vu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=w.T,w.T=null;var r=E.p;E.p=2;var i=I;I|=4;try{gl(e,t.alternate,t)}finally{I=i,E.p=r,w.T=n}}gu=3}}function Qu(){if(gu===4||gu===3){gu=0,Fe();var e=_u,t=vu,n=yu,r=Su;t.subtreeFlags&10256||t.flags&10256?gu=5:(gu=0,vu=_u=null,$u(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(hu=null),pt(n),t=t.stateNode,Ke&&typeof Ke.onCommitFiberRoot==`function`)try{Ke.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=w.T,i=E.p,E.p=2,w.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{w.T=t,E.p=i}}yu&3&&ed(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===wu?Cu++:(Cu=0,wu=e):Cu=0,gd(0,!1)}}function $u(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,va(t)))}function ed(){return Xu(),Zu(),Qu(),td()}function td(){if(gu!==5)return!1;var e=_u,t=bu;bu=0;var n=pt(yu),r=w.T,i=E.p;try{E.p=32>n?32:n,w.T=null,n=xu,xu=null;var o=_u,s=yu;if(gu=0,vu=_u=null,yu=0,I&6)throw Error(a(331));var c=I;if(I|=4,Gl(o.current),Ll(o,o.current,s,n),I=c,gd(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,o)}catch{}return!0}finally{E.p=i,w.T=r,$u(e,t)}}function nd(e,t,n){t=Di(n,t),t=cc(e.stateNode,t,2),e=$a(e,t,2),e!==null&&(st(e,2),hd(e))}function B(e,t,n){if(e.tag===3)nd(e,e,n);else for(;t!==null;){if(t.tag===3){nd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(hu===null||!hu.has(r))){e=Di(n,e),n=lc(2),r=$a(t,n,2),r!==null&&(uc(n,r,t,e),st(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(tu=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xl===e&&(R&n)===n&&(ru===4||ru===3&&(R&62914560)===R&&300>Ie()-du?!(I&2)&&Pu(e,0):ou|=n,su===R&&(su=0)),hd(e)}function ad(e,t){t===0&&(t=at()),e=fi(e,t),e!==null&&(st(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Me(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=R,a=nt(r,r===Xl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&af()&&(e=md);for(var t=Ie(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}gu!==0&&gu!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=it(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Xl,n=R,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Zl===2||Zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ne(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ne(r),pt(n)){case 2:case 8:n=ze;break;case 32:n=Be;break;case 268435456:n=He;break;default:n=Be}return r=bd.bind(null,e),n=Me(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ne(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(gu!==0&&gu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ed()&&e.callbackNode!==n)return null;var r=R;return r=nt(e,e===Xl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ou(e,r,t),yd(e,Ie()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if(ed())return null;Ou(e,t,!0)}function Sd(){lf(function(){I&6?Me(Re,_d):vd()})}function Cd(){if(md===0){var e=xa;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:un(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[vt]||null).action),o=r.submitter;o&&(t=(t=o[vt]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);Ps(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),Ps(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<ri.length;Dd++){var Od=ri[Dd];ii(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}ii(Yr,`onAnimationEnd`),ii(Xr,`onAnimationIteration`),ii(Zr,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(Qr,`onTransitionRun`),ii($r,`onTransitionStart`),ii(ei,`onTransitionCancel`),ii(ti,`onTransitionEnd`),Pt(`onMouseEnter`,[`mouseout`,`mouseover`]),Pt(`onMouseLeave`,[`mouseout`,`mouseover`]),Pt(`onPointerEnter`,[`pointerout`,`pointerover`]),Pt(`onPointerLeave`,[`pointerout`,`pointerover`]),Nt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Nt(`onSelect`,`focusout contextmenu dragend focu
9sin keydown keyup mousedown mouseup selectionchange`.split(` `)),Nt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Nt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ai(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ai(e)}i.currentTarget=null,a=c}}}}function V(e,t){var n=t[bt];n===void 0&&(n=t[bt]=new Set);var r=e+`__bubble`;n.has(r)||(Fd(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Fd(n,e,r,t)}var Nd=`_reactListening`+Math.random().toString(36).slice(2);function Pd(e){if(!e[Nd]){e[Nd]=!0,jt.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,Md(`selectionchange`,!1,t))}}function Fd(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!xn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Id(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Et(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}vn(function(){var r=a,i=pn(n),o=[];a:{var c=ni.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(k(n)===0)break a;case`keydown`:case`keyup`:l=Jn;break;case`focusin`:u=`focus`,l=zn;break;case`focusout`:u=`blur`,l=zn;break;case`beforeblur`:case`afterblur`:l=zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Ln;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Rn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Xn;break;case Yr:case Xr:case Zr:l=Bn;break;case ti:l=Zn;break;case`scroll`:case`scrollend`:l=Mn;break;case`wheel`:l=Qn;break;case`copy`:case`cut`:case`paste`:l=Vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Yn;break;case`toggle`:case`beforetoggle`:l=$n}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=yn(m,p),g!=null&&d.push(Ld(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==fn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[yt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Et(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Ln,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Yn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ot(l),h=u==null?c:Ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=zd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Bd(o,c,l,d,!1),u!==null&&f!==null&&Bd(o,f,u,d,!0)}}a:{if(c=r?Ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=yr;else if(pr(c))if(br)v=kr;else{v=Dr;var y=Er}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&sn(r.elementType)&&(v=yr):v=Or;if(v&&=v(e,r)){mr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Qt(c,`number`,c.value)}switch(y=r?Ot(r):window,e){case`focusin`:(pr(y)||y.contentEditable===`true`)&&(zr=y,Br=r,Vr=null);break;case`focusout`:Vr=Br=zr=null;break;case`mousedown`:Hr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Hr=!1,Ur(o,n,i);break;case`selectionchange`:if(Rr)break;case`keydown`:case`keyup`:Ur(o,n,i)}var b;if(tr)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else lr?sr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(ir&&n.locale!==`ko`&&(lr||x!==`onCompositionStart`?x===`onCompositionEnd`&&lr&&(b=En()):(Cn=i,wn=`value`in Cn?Cn.value:Cn.textContent,lr=!0)),y=Rd(r,x),0<y.length&&(x=new Hn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=cr(n),b!==null&&(x.data=b)))),(b=rr?ur(e,n):dr(e,n))&&(x=Rd(r,`onBeforeInput`),0<x.length&&(y=new Hn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),Ed(o,e,r,n,i)}jd(o,t)})}function Ld(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=yn(e,n),i!=null&&r.unshift(Ld(e,i,a)),i=yn(e,t),i!=null&&r.push(Ld(e,i,a))),e.tag===3)return r;e=e.return}return[]}function zd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=yn(n,a),l!=null&&o.unshift(Ld(n,l,c))):i||(l=yn(n,a),l!=null&&o.push(Ld(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,Hd=/\u0000|\uFFFD/g;function Ud(e){return(typeof e==`string`?e:``+e).replace(Vd,`
10`).replace(Hd,``)}function Wd(e,t){return t=Ud(t),Ud(e)===t}function Gd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&nn(e,``+r);break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;
vendor: 10,074 bytes, line 10
10case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:on(e,r,o);break;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Gd(e,t,`name`,i.name,i,null),Gd(e,t,`formEncType`,i.formEncType,i,null),Gd(e,t,`formMethod`,i.formMethod,i,null),Gd(e,t,`formTarget`,i.formTarget,i,null)):(Gd(e,t,`encType`,i.encType,i,null),Gd(e,t,`method`,i.method,i,null),Gd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`onScroll`:r!=null&&V(`scroll`,e);break;case`onScrollEnd`:r!=null&&V(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:V(`beforetoggle`,e),V(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=cn.get(n)||n,zt(e,n,r))}}function Kd(e,t,n,r,i,o){switch(n){case`style`:on(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&nn(e,``+r);break;case`onScroll`:r!=null&&V(`scroll`,e);break;case`onScrollEnd`:r!=null&&V(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[vt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}}}function qd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:V(`error`,e),V(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Gd(e,t,o,s,n,null)}}i&&Gd(e,t,`srcSet`,n.srcSet,n,null),r&&Gd(e,t,`src`,n.src,n,null);return;case`input`:V(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Gd(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in V(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Gd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in V(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Gd(e,t,s,c,n,null)}tn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Gd(e,t,l,r,n,null)}return;case`dialog`:V(`beforetoggle`,e),V(`toggle`,e),V(`cancel`,e),V(`close`,e);break;case`iframe`:case`object`:V(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)V(kd[r],e);break;case`image`:V(`error`,e),V(`load`,e);break;case`details`:V(`toggle`,e);break;case`embed`:case`source`:case`link`:V(`error`,e),V(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Gd(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Kd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Gd(e,t,c,r,n,null))}function Jd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Gd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Gd(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Gd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Gd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Gd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Gd(e,t,s,i,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Gd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Gd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Gd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Gd(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Kd(e,t,_,void 0,r,p);
vendor: 4,462 bytes, line 10
10for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Kd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Gd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Gd(e,t,f,p,r,m)}function Yd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Xd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Yd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Yd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Zd=null,Qd=null;function $d(e){return e.nodeType===9?e:e.ownerDocument}function ef(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function tf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function nf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rf=null;function af(){var e=window.event;return e&&e.type===`popstate`?e===rf?!1:(rf=e,!0):(rf=null,!1)}var of=typeof setTimeout==`function`?setTimeout:void 0,sf=typeof clearTimeout==`function`?clearTimeout:void 0,cf=typeof Promise==`function`?Promise:void 0,lf=typeof queueMicrotask==`function`?queueMicrotask:cf===void 0?of:function(e){return cf.resolve(null).then(e).catch(uf)};function uf(e){setTimeout(function(){throw e})}function df(e){return e===`head`}function ff(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Tf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Tf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[wt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Tf(e.ownerDocument.body);n=i}while(n);Gp(t)}function H(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function pf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:pf(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function mf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[wt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=bf(e.nextSibling),e===null)break}return null}function hf(e,t,n){if(t===``)return null;for(;
vendor: 20,905 bytes, line 10
10e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=bf(e.nextSibling),e===null))return null;return e}function gf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=bf(e.nextSibling),e===null))return null;return e}function _f(e){return e.data===`$?`||e.data===`$~`}function vf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function yf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function bf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var xf=null;function Sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return bf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Cf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function wf(e,t,n){switch(t=$d(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Tf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var Ef=new Map,Df=new Set;function Of(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kf=E.d;E.d={f:Af,r:jf,D:Pf,C:Ff,L:If,m:Lf,X:zf,S:Rf,M:Bf};function Af(){var e=kf.f(),t=Mu();return e||t}function jf(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?Is(t):kf.r(e)}var Mf=typeof document>`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),At(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Hf(e);break;case`script`:a=Kf(e)}Ef.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Uf(a))||t===`script`&&r.querySelector(qf(a))||(t=r.createElement(`link`),qd(t,`link`,e),At(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Kf(e)}if(!Ef.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(qf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),At(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=kt(r).hoistableStyles,a=Hf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Uf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Xf(e,n);var c=o=r.createElement(`link`);At(c),qd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Yf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=kt(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=p({src:e,async:!0},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),At(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=kt(n).hoistableScripts,i=Kf(e),a=r.get(i);a||(a=n.querySelector(qf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Zf(e,t),a=n.createElement(`script`),At(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t,n,r){var i=(i=_e.current)?Of(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Hf(n.href),n=kt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Hf(n.href);var o=kt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Uf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Gf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Kf(n),n=kt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Hf(e){return`href="`+Yt(e)+`"`}function Uf(e){return`link[rel="stylesheet"][`+e+`]`}function Wf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Gf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),qd(t,`link`,n),At(t),e.head.appendChild(t))}function Kf(e){return`[src="`+Yt(e)+`"]`}function qf(e){return`script[async]`+e}function Jf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),qd(r,`style`,i),Yf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Hf(n.href);var o=e.querySelector(Uf(i));if(o)return t.state.loading|=4,t.instance=o,At(o),o;r=Wf(n),(i=Ef.get(i))&&Xf(r,i),o=(e.ownerDocument||e).createElement(`link`),At(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,Yf(o,n.precedence,e),t.instance=o;case`script`:return o=Kf(n.src),(i=e.querySelector(qf(o)))?(t.instance=i,At(i),i):(r=n,(i=Ef.get(o))&&(r=p({},n),Zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),At(i),qd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Yf(r,n.precedence,e));return t.instance}function Yf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Qf=null;function $f(e,t,n){if(Qf===null){var r=new Map,i=Qf=new Map;i.set(n,r)}else i=Qf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[wt]||a[_t]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function ep(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function tp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function np(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function rp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Hf(r.href),a=t.querySelector(Uf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=Wf(r),(i=Ef.get(i))&&Xf(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Xd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:S,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ot(0),this.hiddenUpdates=ot(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=_i(3,null,null,t),e.current=a,a.stateNode=e,t=_a(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Xa(a),e}function pp(e){return e?(e=hi,e):hi}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=Qa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=$a(e,r,t),n!==null&&(Du(n,e,t),eo(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=fi(e,67108864);t!==null&&Du(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=Tu();t=ft(t);var n=fi(e,t);n!==null&&Du(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=w.T;w.T=null;var a=E.p;try{E.p=2,Sp(e,t,n,r)}finally{E.p=a,w.T=i}}function xp(e,t,n,r){var i=w.T;w.T=null;var a=E.p;try{E.p=8,Sp(e,t,n,r)}finally{E.p=a,w.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Id(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}hd(a),!(I&6)&&(pu=Ie()+500,gd(0,!1))}}break;case 31:case 13:s=fi(a,2),s!==null&&Du(s,a,2),Mu(),gp(a,2)}if(a=Cp(r),a===null&&Id(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}function Cp(e){return e=pn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=Et(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Le()){case Re:return 2;case ze:return 8;case Be:case Ve:return 32;case He:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Dt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Et(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ht(e.priority,function(){vp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,ht(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Dt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,Ps(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[vt]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[vt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qp(e){this._internalRoot=e}Jp.prototype.render=qp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;mp(n,Tu(),e,t,null,null)},Jp.prototype.unmount=qp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),Mu(),t[yt]=null}};function Jp(e){this._internalRoot=e}Jp.prototype.unstable_scheduleHydration=function(e){if(e){var t=mt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Yp=n.version;if(Yp!==`19.2.5`)throw Error(a(527,Yp,`19.2.5`));E.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Xp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:w,reconcilerVersion:`19.2.5`};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zp.isDisabled&&Zp.supportsFiber)try{Ge=Zp.inject(Xp),Ke=Zp}catch{}}e.hydrateRoot=function(e,t,n){if(!o(e))throw Error(a(299));var r=!1,i=``,s=rc,c=ic,l=ac,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=fp(e,1,!0,t,n??null,r,i,u,s,c,l,Kp),t.context=pp(null),n=t.current,r=Tu(),r=ft(r),i=Qa(r),i.callback=null,$a(n,i,r),n=r,t.current.lanes=n,st(t,n),hd(t),e[yt]=t.current,Pd(e),new Jp(t)}})),be=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ye()})),xe=`__TSS_CONTEXT`,Se=Symbol.for(`TSS_SERVER_FUNCTION`),Ce=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),we=`application/x-tss-framed`,Te={JSON:0,CHUNK:1,END:2,ERROR:3};`${we}`;var Ee=/;\s*v=(\d+)/;function De(e){let t=e.match(Ee);return t?parseInt(t[1],10):void 0}function Oe(e){let t=De(e);if(t!==void 0&&t!==1)throw Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var ke=()=>window.__TSS_START_OPTIONS__;function Ae(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function je(e){return e?.isNotFound===!0}function Me(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Ne(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Pe(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Ne(r):Array.isArray(t)?t.push(Ne(r)):n[e]=[t,Ne(r)]}return n}var Fe=Le(JSON.parse),Ie=Re(JSON.stringify,JSON.parse);function Le(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Pe(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Re(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Me(e,r);return t?`?${t}`:``}}var ze=`__root__`;function Be(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Ve(e){return e instanceof Response&&!!e.options}function He(e){if(typeof e==`object`&&e&&e.isSerializedRedirect)return Be(e)}var Ue=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},We=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ge=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ke=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);
10i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},qe=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},Je=(e,t,n)=>{if(!(!Ve(n)&&!je(n)))throw Ve(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:Ve(n)?`redirected`:je(n)?`notFound`:r.status===`pending`?`success`:r.status,context:Ke(e,t.index),isFetching:!1,error:n})),je(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Ve(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ye=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Xe=(e,t,n)=>{let r=Ke(e,n);e.updateMatch(t,e=>({...e,context:r}))},Ze=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Je(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,Je(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Ve(n)&&!je(n)&&(e.serialError??=n)},Qe=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ge(e,t)&&(n.options.loader||n.options.beforeLoad||lt(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ue(e)},i);r._nonReactive.pendingTimeout=t}},$e=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Qe(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Je(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},et=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=m(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Ze(e,n,o),s&&Ze(e,n,s),Qe(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},f=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),f()});return}i._nonReactive.beforeLoadPromise=m();let p={...Ke(e,n,!1),...i.__routeContext},{search:h,params:g,cause:_}=i,v=Ge(e,t),y={search:h,abortController:c,params:g,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),f()});return}(Ve(r)||je(r))&&(u(),Ze(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),f()})},x;try{if(x=r.options.beforeLoad(y),d(x))return u(),x.catch(t=>{Ze(e,n,t)}).then(b)}catch(t){u(),Ze(e,n,t)}b(x)},tt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>et(e,n,t,i),s=()=>{if(Ye(e,n))return;let t=$e(e,n,i);return d(t)?t.then(o):o()};return a()},nt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},rt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Ke(e,r),d=Ge(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},it=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{ct(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(rt(e,t,n,r,i)),l=!!s&&d(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Je(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Ke(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>
10({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Ke(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,je(t)&&await i.options.notFoundComponent?.preload?.(),Je(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Je(e,e.router.getMatch(n),t)}!Ve(o)&&!je(o)&&await ct(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Ke(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Je(e,r,t)}},at=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(rt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await it(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){Ve(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await it(e,t,i,n,d):Xe(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ye(e,i)){if(!e.router.getMatch(i))return e.matches[n];Xe(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=Ge(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Je(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=m(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function ot(e){let t=e,n=[];We(t.router)&&Ue(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=tt(t,e);d(n)&&await n}catch(e){if(Ve(e))throw e;if(je(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?qe(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(at(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(Ve(e))throw e;je(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=qe(t,l);e===void 0&&v();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await ct(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ct(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=nt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let f=Ue(t);if(d(f)&&await f,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function st(e,t){let n=t.map(t=>
10e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function ct(e,t=ut){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===ut?(()=>{if(e._componentsPromise===void 0){let t=st(e,ut);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():st(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function lt(e){for(let t of ut)if(e.options[t]?.preload)return!0;return!1}var ut=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function dt(e){return{input:({url:t})=>{for(let n of e)t=pt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=mt(e[n],t);return t}}}function ft(e){let t=re(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=w([`/`,t,e.pathname]),e)}}function pt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function mt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ht(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>gt(o,_.get())),x=r(()=>gt(s,v.get())),S=r(()=>gt(c,y.get())),ee=r(()=>_.get()[0]),C=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),te=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),ne=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),re=D(64);function ie(e){let t=re.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),re.set(e,t)),t}let ae={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:ee,hasPending:C,matchRouteDeps:te,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:ne,getRouteMatchStore:ie,setMatches:oe,setPending:se,setCached:ce};oe(e.matches),a?.(ae);function oe(e){_t(e,o,_,n,i)}function se(e){_t(e,s,v,n,i)}function ce(e){_t(e,c,y,n,i)}return ae}function gt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function _t(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}s(n.get(),a)||n.set(a)})}var vt=`__TSR_index`,yt=`popstate`,bt=`beforeunload`;function xt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Tt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[vt];i=St(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[vt];i=St(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[vt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function St(e,t){t||={};let n=Et();return{...t,key:n,__TSR_key:n,[vt]:e}}function Ct(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>Tt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Et();t.history.replaceState({[vt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(ee._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),ee._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=Tt(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),ee.notify({type:e})},x=async()=>
10{if(f){f=!1;return}let e=c(),n=e.state[vt]-l.state[vt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),ee.notify(u);return}}}l=c(),ee.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},ee=xt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(bt,S,{capture:!0}),t.removeEventListener(yt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(bt,S,{capture:!0}),t.addEventListener(yt,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return ee._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return ee._ignoreSubscribers||b(`REPLACE`),n},ee}function wt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function Tt(e,t){let n=wt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Et();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[vt]:0,key:a,__TSR_key:a}}}function Et(){return(Math.random()+1).toString(36).substring(7)}function Dt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ot(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var kt=new WeakMap,At=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=C(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ct()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=D(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ht(Nt(this.latestLocation),e),$t(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=re(o);t&&t!==`/`&&e.push(ft({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:dt(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&_(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>
10{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:o})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),s=this.options.stringifySearch(i);return{href:e+s+r,publicHref:e+s+r,pathname:oe(e).path,external:!1,searchStr:s,search:ge(t?.search,i),hash:oe(r.slice(1)).path,state:a(t?.state,o)}}let s=new URL(i,this.origin),c=pt(this.rewrite,s),l=this.options.parseSearch(c.search),u=this.options.stringifySearch(l);return c.search=u,{href:c.href.replace(c.origin,``),publicHref:i,pathname:oe(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:u,search:ge(t?.search,l),hash:oe(c.hash.slice(1)).path,state:a(t?.state,o)}},r=n(e),{__tempLocation:i,__tempKey:o}=r.state;if(i&&(!o||o===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>ce({base:e,to:t.includes(`//`)?pe(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Ft({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),l=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=o?this.resolvePathWithBase(l,o):l,d=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,p(t.params,c)),f=this.routesByPath[b(u)],m;if(f)m=this.getRouteBranch(f);else if(u.includes(`$`))m=[];else{let e=this.getMatchedRoutes(u);m=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(m=[...m,this.options.notFoundRoute])}if(m.length&&h(d))for(let e of m){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(d,t(d))}catch{}}let g=e.leaveParams?u:oe(te({path:u,params:d,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,_=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};m.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Pt(t.options.validateSearch,{...e,..._}))}catch{}}),_=e}_=It({search:_,dest:t,destRoutes:m,_includeValidateSearch:e._includeValidateSearch}),_=ge(s,_);let v=this.options.stringifySearch(_),y=t.hash===!0?n.hash:t.hash?p(t.hash,n.hash):void 0,x=y?`#${y}`:``,S=t.state===!0?n.state:t.state?p(t.state,n.state):{};S=a(n.state,S);let ee=`${g}${v}${x}`,C,ne,re=!1;if(this.rewrite){let e=new URL(ee,this.origin),t=mt(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?ne=t.pathname+t.search+t.hash:(ne=t.href,re=!0)}else C=ae(ee),ne=C;return{publicHref:ne,href:C,pathname:g,search:_,searchStr:v,state:S,hash:y??``,external:re,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=he(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,p(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,a=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];
10e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=i(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},o=b(this.latestLocation.href)===b(n.href),s=this.commitLocationPromise;if(this.commitLocationPromise=m(()=>{s?.resolve(),s=void 0}),o&&a())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=Tt(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=pt(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(l(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?kt.set(this.latestLocation,t):kt.delete(this.latestLocation);let n=this.latestLocation,r=Ot(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await ot({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){Ve(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):je(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Ot(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>
10{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&l(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=ct,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await ot({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(Ve(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});je(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let a=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=O(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!i(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?i(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ie,parseSearch:e.parseSearch??Fe,protocolAllowlist:e.protocolAllowlist??c}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=me(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParam
10s:i}=n,{matchedRoutes:o}=n,s=!1;(r?r.path!==`/`&&i[`**`]:b(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:s=!0);let c=s?Rt(this.options.notFoundMode,o):void 0,l=Array(o.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;n<o.length;n++){let r=o[n],s=l[n-1],d,f,p;{let n=s?.search??e.search,i=s?._strictSearch??void 0;try{let e=Pt(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof jt||(r=new jt(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let h=r.options.loaderDeps?.({search:d})??``,g=h?JSON.stringify(h):``,{interpolatedPath:_,usedParams:v}=te({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+_+g,b=this.getMatch(y),x=u.get(r.id),S=b?._strictParams??v,ee;if(!b)try{zt(r,S)}catch(e){if(ee=je(e)||Ve(e)?e:new Mt(e.message,{cause:e}),t?.throwOnError)throw ee}Object.assign(i,S);let C=x?`stay`:`enter`,ne;if(b)ne={...b,cause:C,params:x?.params??i,_strictParams:S,search:ge(x?x.search:b.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||lt(r)?`pending`:`success`;ne={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:_,updatedAt:Date.now(),search:x?ge(x.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:ee,__routeContext:void 0,_nonReactive:{loadPromise:m()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:x?a(x.loaderDeps,h):h,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(ne.globalNotFound=c===r.id),ne.searchError=p;let re=this.getParentContext(s);ne.context={...re,...ne.__routeContext,...ne.__beforeLoadContext},l[n]=ne}for(let t=0;t<l.length;t++){let n=l[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?ge(o.params,i):i,!a){let i=l[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=g(t),i={...e.search};for(let e of t)try{Object.assign(i,Pt(e.options.validateSearch,i))}catch{}let a=g(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{zt(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},jt=class extends Error{},Mt=class extends Error{};function Nt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Pt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new jt(`Async validation not supported`);if(n.issues)throw new jt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Ft({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=b(e),a,o=S(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function It({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Lt(n)(e,t,r??!1)}function Lt(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>
10t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=Pt(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=p(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Rt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return ze}function zt(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function Bt(){try{return sessionStorage}catch{return}}var Vt=`tsr-scroll-restoration-v1_3`,Ht=Bt();function Ut(){try{return JSON.parse(Ht?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Wt(){try{Ht?.setItem(Vt,JSON.stringify(Gt))}catch{}}var Gt=Ut(),Kt=`data-scroll-restoration-id`,qt=e=>e.state.__TSR_key||e.href;function Jt(e){let t=e.getAttribute(Kt);if(t)return`[${Kt}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Yt=!1,Xt=`window`;function Zt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Qt(e){let t=[];for(let n of e){if(n===Xt)continue;let e=Zt(n);e&&t.push(e)}return t}function $t(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||qt,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(Yt||!r.restoring))if(e.target===document)o(Xt,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=Gt[e]||={};for(let[e,n]of a)e===Xt?t[Xt]=n:e.isConnected&&(t[Jt(e)]=n)};n&&!r.restoration&&(r.restoration=!0,Yt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Wt()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=Gt[u];if(e){let t=Gt[l];for(let n in e){if(n===Xt){if(s)continue}else{let e=Zt(n);if(!e||s&&o&&(c??=Qt(o),c.includes(e)))continue}t||=Gt[l]={},t[n]??=e[n]}}}Yt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=kt.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?Gt[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===Xt){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=Zt(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=Qt(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Yt=!1}}))}var en=Symbol.for(`TSR_DEFERRED_PROMISE`);function tn(e,t){let n=e;return n[en]?n:(n[en]={status:`pending`},n.then(e=>{n[en].status=`success`,n[en].data=e}).catch(e=>{n[en].status=`error`,n[en].error={data:(t?.serializeError??Dt)(e),__isServerError:!0}}),n)}function nn(e,t){if(e)return typeof e==`string`?e:e[t]}function rn(e){return e?.scriptFormat??`module`}function an(e,t,n){let r=on(t),i=nn(n,`script`)??r.crossOrigin;return{...rn(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function on(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function sn(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function cn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var ln=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=ze:this.parentRoute||v();let r=n?ze:t?.path;r&&r!==`/`&&(r=ne(r));let i=t?.id||r,a=n?ze:w([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=w([`/`,a]));let o=a===`__root__`?`/`:w([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=b(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Be({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},un=class extends ln{constructor(e){super(e)}},dn=(e=>(e[e.AggregateError=1]=`AggregateError`,e[e.ArrowFunction=2]=`ArrowFunction`,e[e.ErrorPrototypeStack=4]=`ErrorPrototypeStack`,e[e.ObjectAssign=8]=`ObjectAssign`,e[e.BigIntTypedArray=16]=`BigIntTypedArray`,e[e.RegExp=32]=`RegExp`,e))(dn||{}),fn=Symbol.asyncIterator,pn=Symbol.hasInstance,mn=Symbol.isConcatSpreadable,hn=Symbol.iterator,gn=Symbol.match,_n=Symbol.matchAll,vn=Symbol.replace,yn=Symbol.search,bn=Symbol.species,xn=Symbol.split,Sn=Symbol.toPrimitive,Cn=Symbol.toStringTag,wn=Symbol.unscopables,Tn={[fn]:0,[pn]:1,[mn]:2,[hn]:3,[gn]:4,[_n]:5,[vn]:6,[yn]:7,[bn]:8,[xn]:9,[Sn]:10,[Cn]:11,[wn]:12},En={0:fn,1:pn,2:mn,3:hn,4:gn,5:_n,6:vn,7:yn,8:bn,9:xn,10:Sn,11:Cn,12:wn},k=void 0,Dn={2:!0,3:!1,1:k,0:null,4:-0,5:1/0,6:-1/0,7:NaN},On={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},kn={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function A(e,t,n,r,i,a,o,s,c,l,u,d){return{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function An(e){return A(2,k,e,k,k,k,k,k,k,k,k,k)}var jn=An(2),Mn=An(3),Nn=An(1),Pn=An(0),Fn=An(4),In=An(5),Ln=An(6),Rn=An(7);function zn(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case`
11`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case`	`:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return k}}function Bn(e){let t=``,n=0,r;for(let i=0,a=e.length;i<a;i++)r=zn(e[i]),r&&(t+=e.slice(n,i)+r,n=i+1);return n===0?t=e:t+=e.slice(n),t}function Vn(e){switch(e){case`\\\\`:return`\\`;case`\\"`:return`"`;case`\\n`:return`
12`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return`	`;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function Hn(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Vn)}
12var Un=`__SEROVAL_REFS__`,Wn=new Map,Gn=new Map;function Kn(e){return Wn.has(e)}function qn(e){return Gn.has(e)}function Jn(e){if(Kn(e))return Wn.get(e);throw new Ir(e)}function Yn(e){if(qn(e))return Gn.get(e);throw new Lr(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,Un,{value:Gn,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,Un,{value:Gn,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,Un,{value:Gn,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,Un,{value:Gn,configurable:!0,writable:!1,enumerable:!1});function Xn(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function Zn(e){let t=On[Xn(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function Qn(e,t){let n=Zn(e),r=Object.getOwnPropertyNames(e);for(let i=0,a=r.length,o;i<a;i++)o=r[i],o!==`name`&&o!==`message`&&(o===`stack`?t&4&&(n||={},n[o]=e[o]):(n||={},n[o]=e[o]));return n}function $n(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function er(e){switch(e){case 1/0:return In;case-1/0:return Ln}return e===e?Object.is(e,-0)?Fn:A(0,k,e,k,k,k,k,k,k,k,k,k):Rn}function tr(e){return A(1,k,Bn(e),k,k,k,k,k,k,k,k,k)}function nr(e){return A(3,k,``+e,k,k,k,k,k,k,k,k,k)}function rr(e){return A(4,e,k,k,k,k,k,k,k,k,k,k)}function ir(e,t){let n=t.valueOf();return A(5,e,n===n?t.toISOString():``,k,k,k,k,k,k,k,k,k)}function ar(e,t){return A(6,e,k,Bn(t.source),t.flags,k,k,k,k,k,k,k)}function or(e,t){return A(17,e,Tn[t],k,k,k,k,k,k,k,k,k)}function sr(e,t){return A(18,e,Bn(Jn(t)),k,k,k,k,k,k,k,k,k)}function cr(e,t,n){return A(25,e,n,Bn(t),k,k,k,k,k,k,k,k)}function lr(e,t,n){return A(9,e,k,k,k,k,k,n,k,k,$n(t),k)}function ur(e,t){return A(21,e,k,k,k,k,k,k,t,k,k,k)}function dr(e,t,n){return A(15,e,k,t.constructor.name,k,k,k,k,n,t.byteOffset,k,t.length)}function fr(e,t,n){return A(16,e,k,t.constructor.name,k,k,k,k,n,t.byteOffset,k,t.byteLength)}function pr(e,t,n){return A(20,e,k,k,k,k,k,k,n,t.byteOffset,k,t.byteLength)}function mr(e,t,n){return A(13,e,Xn(t),k,Bn(t.message),n,k,k,k,k,k,k)}function hr(e,t,n){return A(14,e,Xn(t),k,Bn(t.message),n,k,k,k,k,k,k)}function gr(e,t){return A(7,e,k,k,k,k,k,t,k,k,k,k)}function _r(e,t){return A(28,k,k,k,k,k,k,[e,t],k,k,k,k)}function vr(e,t){return A(30,k,k,k,k,k,k,[e,t],k,k,k,k)}function yr(e,t,n){return A(31,e,k,k,k,k,k,n,t,k,k,k)}function br(e,t){return A(32,e,k,k,k,k,k,k,t,k,k,k)}function xr(e,t){return A(33,e,k,k,k,k,k,k,t,k,k,k)}function Sr(e,t){return A(34,e,k,k,k,k,k,k,t,k,k,k)}function Cr(e,t,n,r){return A(35,e,n,k,k,k,k,t,k,k,k,r)}var{toString:wr}=Object.prototype,Tr={parsing:1,serialization:2,deserialization:3};function Er(e){return`Seroval Error (step: ${Tr[e]})`}var Dr=(e,t)=>Er(e),Or=class extends Error{constructor(e,t){super(Dr(e,t)),this.cause=t}},kr=class extends Or{constructor(e){super(`parsing`,e)}},Ar=class extends Or{constructor(e){super(`deserialization`,e)}};function jr(e){return`Seroval Error (specific: ${e})`}var Mr=class extends Error{constructor(e){super(jr(1)),this.value=e}},Nr=class extends Error{constructor(e){super(jr(2))}},Pr=class extends Error{constructor(e){super(jr(3))}},Fr=class extends Error{constructor(e){super(jr(4))}},Ir=class extends Error{constructor(e){super(jr(5)),this.value=e}},Lr=class extends Error{constructor(e){super(jr(6))}},Rr=class extends Error{constructor(e){super(jr(7))}},zr=class extends Error{constructor(e){super(jr(8))}},Br=class extends Error{constructor(e){super(jr(9))}},Vr=class{constructor(e,t){this.value=e,this.replacement=t}},Hr=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e};Hr.toString(),((e,t)=>{e.s(t),e.p.s=1,e.p.v=t}).toString(),((e,t)=>{e.f(t),e.p.s=2,e.p.v=t}).toString();var Ur=()=>{let e=[],t=[],n=!0,r=!1,i=0,a=(e,n,r)=>{for(r=0;r<i;r++)t[r]&&t[r][n](e)},o=(t,i,a,o)=>{for(i=0,a=e.length;i<a;i++)o=e[i],!n&&i===a-1?t[r?`return`:`throw`](o):t.next(o)},s=(e,r)=>(n&&(r=i++,t[r]=e),o(e),()=>{n&&(t[r]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:e=>s(e),next:t=>
12{n&&(e.push(t),a(t,`next`))},throw:i=>{n&&(e.push(i),a(i,`throw`),n=!1,r=!1,t.length=0)},return:i=>{n&&(e.push(i),a(i,`return`),n=!1,r=!0,t.length=0)}}};Ur.toString();var Wr=e=>t=>()=>{let n=0,r={[e]:()=>r,next:()=>{if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r};Wr.toString();var Gr=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c=(e=0,t=s.length)=>{for(;e<t;e++)s[e].s({done:!0,value:void 0})};n.on({next:e=>{let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw:e=>{let t=s.shift();t&&t.f(e),c(),i=o.length,a=!0,o.push(e)},return:e=>{let t=s.shift();t&&t.s({done:!0,value:e}),c(),i=o.length,o.push(e)}});let l={[e]:()=>l,next:()=>{if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l};Gr.toString();var Kr=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer};Kr.toString();function qr(e){return`__SEROVAL_SEQUENCE__`in e}function Jr(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function Yr(e){let t=[],n=-1,r=-1,i=e[hn]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,t.push(e)}return Jr(t,n,r)}var Xr=Wr(hn);function Zr(e){return Xr(e)}var Qr={},$r={},ei={0:{},1:{},2:{},3:{},4:{},5:{}};function ti(e){return`__SEROVAL_STREAM__`in e}function ni(){return Ur()}function ri(e){let t=ni(),n=e[fn]();async function r(){try{let e=await n.next();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var ii=Gr(fn,Hr);function ai(e){return ii(e)}async function oi(e){try{return[1,await e]}catch(e){return[0,e]}}function si(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function ci(e,t){e.marked.add(t)}function li(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function ui(e,t){let n=e.refs.get(t);return n==null?{type:0,value:li(e,t)}:(ci(e,n),{type:1,value:rr(n)})}function di(e,t){let n=ui(e,t);return n.type===1?n:Kn(t)?{type:2,value:sr(n.value,t)}:n}function fi(e,t){let n=di(e,t);if(n.type!==0)return n.value;if(t in Tn)return or(n.value,t);throw new Mr(t)}function pi(e,t){let n=ui(e,ei[t]);return n.type===1?n.value:A(26,n.value,t,k,k,k,k,k,k,k,k,k)}function mi(e){let t=ui(e,Qr);return t.type===1?t.value:A(27,t.value,k,k,k,k,k,k,fi(e,hn),k,k,k)}function hi(e){let t=ui(e,$r);return t.type===1?t.value:A(29,t.value,k,k,k,k,k,[pi(e,1),fi(e,fn)],k,k,k,k)}function gi(e,t,n,r){return A(n?11:10,e,k,k,k,r,k,k,k,k,$n(t),k)}function _i(e,t,n,r){return A(8,t,k,k,k,k,{k:n,v:r},k,pi(e,0),k,k,k)}function vi(e,t,n){let r=new Uint8Array(n),i=``;for(let e=0,t=r.length;e<t;e++)i+=String.fromCharCode(r[e]);return A(19,t,Bn(btoa(i)),k,k,k,k,k,pi(e,5),k,k,k)}function yi(e,t){return{base:si(e,t),child:void 0}}var bi=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Bi(this._p,this.depth,e)}};async function xi(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await Bi(e,t,n[i]):r[i]=0;return r}async function Si(e,t,n,r){return lr(n,r,await xi(e,t,r))}async function Ci(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(Bn(r[n][0])),a.push(await Bi(e,t,r[n][1]));return hn in n&&(i.push(fi(e.base,hn)),a.push(_r(mi(e.base),await Bi(e,t,Yr(n))))),fn in n&&(i.push(fi(e.base,fn)),a.push(vr(hi(e.base),await Bi(e,t,ri(n))))),Cn in n&&(i.push(fi(e.base,Cn)),a.push(tr(n[Cn]))),mn in n&&(i.push(fi(e.base,mn)),a.push(n[mn]?jn:Mn)),{k:i,v:a}}async function wi(e,t,n,r,i){return gi(n,r,i,await Ci(e,t,r))}async function Ti(e,t,n,r){return ur(n,await Bi(e,t,r.valueOf()))}async function Ei(e,t,n,r){return dr(n,r,await Bi(e,t,r.buffer))}async function Di(e,t,n,r){return fr(n,r,await Bi(e,t,r.buffer))}async function Oi(e,t,n,r){return pr(n,r,await Bi(e,t,r.buffer))}async function ki(e,t,n,r){let i=Qn(r,e.base.features);return mr(n,r,i?await Ci(e,t,i):k)}async function Ai(e,t,n,r){let i=Qn(r,e.base.features);return hr(n,r,i?await Ci(e,t,i):k)}async function ji(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await Bi(e,t,n)),a.push(await Bi(e,t,o));return _i(e.base,n,i,a)}async function Mi(e,t,n,r){let i=[];for(let n of r.keys())i.push(await Bi(e,t,n));return gr(n,i)}async function Ni(e,t,n,r){let i=e.base.plugins;if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return cr(n,o.tag,await o.parse.async(r,new bi(e,t),{id:n}))}return k}async function Pi(e,t,n,r){let[i,a]=await oi(r);return A(12,n,i,k,k,k,k,k,await Bi(e,t,a),k,k,k)}function Fi(e,t,n,r,i){let a=[],o=n.on({next:n=>{ci(this.base,t),Bi(this,e,n).then(e=>{a.push(br(t,e))},e=>{i(e),o()})},throw:n=>{ci(this.base,t),Bi(this,e,n).then(e=>{a.push(xr(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{ci(this.base,t),Bi(this,e,n).then(e=>{a.push(Sr(t,e)),r(a),o()},e=>{i(e),o()})}})}async function Ii(e,t,n,r){return yr(n,pi(e.base,4),await new Promise(Fi.bind(e,t,n,r)))}async function Li(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await Bi(e,t,r.v[n]);return Cr(n,i,r.t,r.d)}async function Ri(e,t,n,r){if(Array.isArray(r))return Si(e,t,n,r);if(ti(r))return Ii(e,t,n,r);if(qr(r))return Li(e,t,n,r);let i=r.constructor;if(i===Vr)return Bi(e,t,r.replacement);let a=await Ni(e,t,n,r);if(a)return a;switch(i){case Object:return wi(e,t,n,r,!1);case k:return wi(e,t,n,r,!0);case Date:return ir(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return ki(e,t,n,r);case Number:case Boolean:case String:case BigInt:return Ti(e,t,n,r);case ArrayBuffer:return vi(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Ei(e,t,n,r);case DataView:return Oi(e,t,n,r);case Map:return ji(e,t,n,r);case Set:return Mi(e,t,n,r);default:break}if(i===Promise||r instanceof Promise)return Pi(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return ar(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return Di(e,t,n,r);default:break}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return Ai(e,t,n,r);if(r instanceof Error)return ki(e,t,n,r);if(hn in r||fn in r)return wi(e,t,n,r,!!i);throw new Mr(r)}async function zi(e,t,n){let r=di(e.base,n);if(r.type!==0)return r.value;let i=await Ni(e,t,r.value,n);if(i)return i;throw new Mr(n)}async function Bi(e,t,n){switch(typeof n){case`boolean`:return n?jn:Mn;case`undefined`:return Nn;case`string`:return tr(n);case`number`:return er(n);case`bigint`:return nr(n);case`object`:if(n){let r=di(e.base,n);return r.type===0?await Ri(e,t+1,r.value,n):r.value}return Pn;case`symbol`:return fi(e.base,n);case`function`:return zi(e,t,n);default:throw new Mr(n)}}async function Vi(e,t){try{return await Bi(e,0,t)}catch(e){throw e instanceof kr?e:new kr(e)}}var Hi=(e=>(e[e.Vanilla=1]=`Vanilla`,e[e.Cross=2]=`Cross`,e))(Hi||{});function Ui(e){return e}function j(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&j(e,r.extends))}}function Wi(e){if(e){let t=new Set;return j(t,e),[...t]}}function Gi(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new Rr(e)}}var Ki=1e6,qi=1e4,Ji=2e4;function Yi(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var Xi=1e3;function Zi(e,t){let n=t.refs||new Map;return`types`in n||Object.assign(n,{types:new Map}),{mode:e,plugins:t.plugins,refs:n,features:t.features??63^(t.disabledFeatures||0),depthLimit:t.depthLimit||Xi}}
12function Qi(e){return{mode:2,base:Zi(2,e),child:k}}var $i=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Ba(this._p,this.depth,e)}};function ea(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new zr({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function ta(e,t,n){return ea(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function na(e,t,n){return ea(e.base,t),e.base.refs.set(t,n),n}function ra(e,t,n){return e.mode===1?ta(e,t,n):na(e,t,n)}function ia(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new zr(e)}function aa(e,t){return ra(e,t.i,Yn(Hn(t.s)))}function oa(e,t,n){let r=n.a,i=r.length,a=ra(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=Ba(e,t,o));return Yi(a,n.o),a}function sa(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function ca(e){switch(e){case fn:case mn:case Cn:case hn:return!0;default:return!1}}function la(e,t,n){sa(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function ua(e,t,n,r,i){if(typeof r==`string`)la(n,Hn(r),Ba(e,t,i));else{let a=Ba(e,t,r);switch(typeof a){case`string`:la(n,a,Ba(e,t,i));break;case`symbol`:ca(a)&&(n[a]=Ba(e,t,i));break;default:throw new zr(r)}}}function da(e,t,n){e.base.refs.types.set(t,n)}function fa(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new zr(t)}function pa(e,t,n,r){let i=n.k;if(i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)ua(e,t,r,i[a],o[a]);return r}function ma(e,t,n){let r=ra(e,n.i,n.t===10?{}:Object.create(null));return pa(e,t,n.p,r),Yi(r,n.o),r}function ha(e,t){return ra(e,t.i,new Date(t.s))}function ga(e,t){if(e.base.features&32){let n=Hn(t.c);if(n.length>Ji)throw new zr(t);return ra(e,t.i,new RegExp(n,t.m))}throw new Nr(t)}function _a(e,t,n){let r=ra(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(Ba(e,t,a[i]));return r}function va(e,t,n){let r=ra(e,n.i,new Map);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(Ba(e,t,a[i]),Ba(e,t,o[i]));return r}function ya(e,t){if(t.s.length>Ki)throw new zr(t);return ra(e,t.i,Kr(Hn(t.s)))}function ba(e,t,n){let r=Gi(n.c),i=Ba(e,t,n.f),a=n.b??0;if(a<0||a>i.byteLength)throw new zr(n);return ra(e,n.i,new r(i,a,n.l))}function xa(e,t,n){let r=Ba(e,t,n.f),i=n.b??0;if(i<0||i>r.byteLength)throw new zr(n);return ra(e,n.i,new DataView(r,i,n.l))}function Sa(e,t,n,r){if(n.p){let i=pa(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function Ca(e,t,n){return Sa(e,t,n,ra(e,n.i,AggregateError([],Hn(n.m))))}function wa(e,t,n){let r=ia(n,kn,n.s);return Sa(e,t,n,ra(e,n.i,new r(Hn(n.m))))}function Ta(e,t,n){let r=Hr(),i=ra(e,n.i,r.p),a=Ba(e,t,n.f);return n.s?r.s(a):r.f(a),i}function Ea(e,t,n){return ra(e,n.i,Object(Ba(e,t,n.f)))}function Da(e,t,n){let r=e.base.plugins;if(r){let i=Hn(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return ra(e,n.i,o.deserialize(n.s,new $i(e,t),{id:n.i}))}}throw new Pr(n.c)}function Oa(e,t){let n=ra(e,t.i,ra(e,t.s,Hr()).p);return da(e,t.s,22),n}function ka(e,t,n){let r=e.base.refs.get(n.i);if(r)return fa(e,n,n.i,22),r.s(Ba(e,t,n.a[1])),k;throw new Fr(`Promise`)}function Aa(e,t,n){let r=e.base.refs.get(n.i);if(r)return fa(e,n,n.i,22),r.f(Ba(e,t,n.a[1])),k;throw new Fr(`Promise`)}function ja(e,t,n){return Ba(e,t,n.a[0]),Zr(Ba(e,t,n.a[1]))}function Ma(e,t,n){return Ba(e,t,n.a[0]),ai(Ba(e,t,n.a[1]))}function Na(e,t,n){let r=ra(e,n.i,ni());da(e,n.i,31);let i=n.a,a=i.length;if(a)for(let n=0;n<a;n++)Ba(e,t,i[n]);return r}function Pa(e,t,n){let r=e.base.refs.get(n.i);if(r)return fa(e,n,n.i,31),r.next(Ba(e,t,n.f)),k;throw new Fr(`Stream`)}function Fa(e,t,n){let r=e.base.refs.get(n.i);if(r)return fa(e,n,n.i,31),r.throw(Ba(e,t,n.f)),k;throw new Fr(`Stream`)}function Ia(e,t,n){let r=e.base.refs.get(n.i);if(r)return fa(e,n,n.i,31),r.return(Ba(e,t,n.f)),k;throw new Fr(`Stream`)}function La(e,t,n){return Ba(e,t,n.f),k}function Ra(e,t,n){return Ba(e,t,n.a[1]),k}function za(e,t,n){let r=ra(e,n.i,Jr([],n.s,n.l));for(let i=0,a=n.a.length;i<a;i++)r.v[i]=Ba(e,t,n.a[i]);return r}
12function Ba(e,t,n){if(t>e.base.depthLimit)throw new Br(e.base.depthLimit);switch(t+=1,n.t){case 2:return ia(n,Dn,n.s);case 0:return Number(n.s);case 1:return Hn(String(n.s));case 3:if(String(n.s).length>qi)throw new zr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return aa(e,n);case 9:return oa(e,t,n);case 10:case 11:return ma(e,t,n);case 5:return ha(e,n);case 6:return ga(e,n);case 7:return _a(e,t,n);case 8:return va(e,t,n);case 19:return ya(e,n);case 16:case 15:return ba(e,t,n);case 20:return xa(e,t,n);case 14:return Ca(e,t,n);case 13:return wa(e,t,n);case 12:return Ta(e,t,n);case 17:return ia(n,En,n.s);case 21:return Ea(e,t,n);case 25:return Da(e,t,n);case 22:return Oa(e,n);case 23:return ka(e,t,n);case 24:return Aa(e,t,n);case 28:return ja(e,t,n);case 30:return Ma(e,t,n);case 31:return Na(e,t,n);case 32:return Pa(e,t,n);case 33:return Fa(e,t,n);case 34:return Ia(e,t,n);case 27:return La(e,t,n);case 29:return Ra(e,t,n);case 35:return za(e,t,n);default:throw new Nr(n)}}function Va(e,t){try{return Ba(e,0,t)}catch(e){throw new Ar(e)}}var Ha=(()=>T).toString();/=>/.test(Ha);function Ua(e,t){return Va(Qi({plugins:Wi(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function Wa(e,t={}){let n=yi(1,{plugins:Wi(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await Vi(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function Ga(e){return e}function Ka(e){return Ui({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n,r){return{v:n.parse(e.toSerializable(t))}},async async(t,n,r){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,r){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,r){return e.fromSerializable(n.deserialize(t.v))}})}var qa=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}},Ja=globalThis.Buffer,Ya=!!Ja&&typeof Ja.from==`function`;function Xa(e){if(e.length===0)return``;if(Ya)return Ja.from(e).toString(`base64`);let t=32768,n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t);n.push(String.fromCharCode.apply(null,i))}return btoa(n.join(``))}function Za(e){if(e.length===0)return new Uint8Array;
12if(Ya){let t=Ja.from(e,`base64`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var Qa=Object.create(null),$a=Object.create(null),eo=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(Za(e))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),to=new TextEncoder,no=e=>new ReadableStream({start(t){e.on({next(e){try{typeof e==`string`?t.enqueue(to.encode(e)):t.enqueue(Za(e.$b64))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),ro=`(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))`,io=`(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})`;function ao(e){let t=ni(),n=e.getReader();return(async()=>{try{for(;;){let{done:e,value:r}=await n.read();if(e){t.return(void 0);break}t.next(Xa(r))}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}function oo(e){let t=ni(),n=e.getReader(),r=new TextDecoder(`utf-8`,{fatal:!0});return(async()=>{try{for(;;){let{done:e,value:i}=await n.read();if(e){try{let e=r.decode();e.length>0&&t.next(e)}catch{}t.return(void 0);break}try{let e=r.decode(i,{stream:!0});e.length>0&&t.next(e)}catch{t.next({$b64:Xa(i)})}}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}var so=Ui({tag:`tss/RawStream`,extends:[Ui({tag:`tss/RawStreamFactory`,test(e){return e===Qa},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return ro},deserialize(e,t,n){return Qa}}),Ui({tag:`tss/RawStreamFactoryText`,test(e){return e===$a},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return io},deserialize(e,t,n){return $a}})],test(e){return e instanceof qa},parse:{sync(e,t,n){let r=e.hint===`text`?$a:Qa;return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(ni())}},async async(e,t,n){let r=e.hint===`text`?$a:Qa,i=e.hint===`text`?oo(e.stream):ao(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(r),stream:await t.parse(i)}},stream(e,t,n){let r=e.hint===`text`?$a:Qa,i=e.hint===`text`?oo(e.stream):ao(e.stream);return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(i)}}},serialize(e,t,n){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t,n){let r=t.deserialize(e.stream);return t.deserialize(e.hint)===`text`?no(r):eo(r)}});function co(e){return Ui({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize(){throw Error(`RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.`)},deserialize(t,n,r){return e(typeof n?.deserialize==`function`?n.deserialize(t.streamId):t.streamId)}})}var lo=Ui({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),uo={},fo=e=>new ReadableStream({start:t=>{e.on({next:e=>{try{t.enqueue(e)}catch{}},throw:e=>{t.error(e)},return:()=>{try{t.close()}catch{}}})}}),po=Ui({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===uo},parse:{sync(){return uo},async async(){return await Promise.resolve(uo)},stream(){return uo}},serialize(){return fo.toString()},deserialize(){return uo}});function mo(e){let t=ni(),n=e.getReader();async function r(){try{let e=await n.read();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var ho=[lo,so,Ui({tag:`seroval/plugins/web/ReadableStream`,extends:[po],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(uo),stream:t.parse(ni())}},async async(e,t){return{factory:await t.parse(uo),stream:await t.parse(mo(e))}},stream(e,t){return{factory:t.parse(uo),stream:t.parse(mo(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){return fo(t.deserialize(e.stream))}})];function go(){return[...(ke()?.serializationAdapters)?.map(Ka)??[],...ho]}var _o=new TextDecoder,vo=new Uint8Array,yo=16*1024*1024,bo=32*1024*1024,xo=1024,So=1e5;function M(e){let t=new Map,n=new Map,r=new Set,i=!1,a=null,o=0,s,c=new ReadableStream({start(e){s=e},cancel(){i=!0;try{a?.cancel()}catch{}
12t.forEach(e=>{try{e.error(Error(`Framed response cancelled`))}catch{}}),t.clear(),n.clear(),r.clear()}});function l(e){let i=n.get(e);if(i)return i;if(r.has(e))return new ReadableStream({start(e){e.close()}});if(n.size>=xo)throw Error(`Too many raw streams in framed response (max ${xo})`);let a=new ReadableStream({start(n){t.set(e,n)},cancel(){r.add(e),t.delete(e),n.delete(e)}});return n.set(e,a),a}function u(e){return l(e),t.get(e)}return(async()=>{let n=e.getReader();a=n;let c=[],l=0;function d(){if(l<9)return null;let e=c[0];if(e.length>=9)return{type:e[0],streamId:(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,length:(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0};let t=new Uint8Array(9),n=0,r=9;for(let e=0;e<c.length&&r>0;e++){let i=c[e],a=Math.min(i.length,r);t.set(i.subarray(0,a),n),n+=a,r-=a}return{type:t[0],streamId:(t[1]<<24|t[2]<<16|t[3]<<8|t[4])>>>0,length:(t[5]<<24|t[6]<<16|t[7]<<8|t[8])>>>0}}function f(e){if(e===0)return vo;let t=new Uint8Array(e),n=0,r=e;for(;r>0&&c.length>0;){let e=c[0];if(!e)break;let i=Math.min(e.length,r);t.set(e.subarray(0,i),n),n+=i,r-=i,i===e.length?c.shift():c[0]=e.subarray(i)}return l-=e,t}try{for(;;){let{done:e,value:a}=await n.read();if(i||e)break;if(a){if(l+a.length>bo)throw Error(`Framed response buffer exceeded ${bo} bytes`);for(c.push(a),l+=a.length;;){let e=d();if(!e)break;let{type:n,streamId:i,length:a}=e;if(n!==Te.JSON&&n!==Te.CHUNK&&n!==Te.END&&n!==Te.ERROR)throw Error(`Unknown frame type: ${n}`);if(n===Te.JSON){if(i!==0)throw Error(`Invalid JSON frame streamId (expected 0)`)}else if(i===0)throw Error(`Invalid raw frame streamId (expected non-zero)`);if(a>yo)throw Error(`Frame payload too large: ${a} bytes (max ${yo})`);let c=9+a;if(l<c)break;if(++o>So)throw Error(`Too many frames in framed response (max ${So})`);f(9);let p=f(a);switch(n){case Te.JSON:try{s.enqueue(_o.decode(p))}catch{}break;case Te.CHUNK:{let e=u(i);e&&e.enqueue(p);break}case Te.END:{let e=u(i);if(r.add(i),e){try{e.close()}catch{}t.delete(i)}break}case Te.ERROR:{let e=u(i);if(r.add(i),e){let n=_o.decode(p);e.error(Error(n)),t.delete(i)}break}}}}}if(l!==0)throw Error(`Incomplete frame at end of framed response`);try{s.close()}catch{}t.forEach(e=>{try{e.close()}catch{}}),t.clear()}catch(e){try{s.error(e)}catch{}t.forEach(t=>{try{t.error(e)}catch{}}),t.clear()}finally{try{n.releaseLock()}catch{}a=null}})(),{getOrCreateStream:l,jsonChunks:c}}var Co=null;async function wo(e){e.length>0&&await Promise.allSettled(e)}var To=Object.prototype.hasOwnProperty;function Eo(e){for(let t in e)if(To.call(e,t))return!0;return!1}async function Do(e,t,n){Co||=go();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData?`formData`:`payload`,o=r.headers?new Headers(r.headers):new Headers;if(o.set(`x-tsr-serverFn`,`true`),a===`payload`&&o.set(`accept`,`${we}, application/x-ndjson, application/json`),r.method===`GET`){if(a===`formData`)throw Error(`FormData is not supported with GET requests`);let t=await Oo(r);if(t!==void 0){let n=Me({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;if(r.method===`POST`){let e=await Ao(r);e?.contentType&&o.set(`content-type`,e.contentType),s=e?.body}return await jo(async()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function Oo(e){let t=!1,n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&Eo(e.context)&&(t=!0,n.context=e.context),t)return ko(n)}async function ko(e){return JSON.stringify(await Promise.resolve(Wa(e,{plugins:Co})))}async function Ao(e){if(e.data instanceof FormData){let t;return e.context&&Eo(e.context)&&(t=await ko(e.context)),t!==void 0&&e.data.set(xe,t),{body:e.data}}let t=await Oo(e);if(t)return{body:t,contentType:`application/json`}}async function jo(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw console.log(e),e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(n||v(),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){if(Oe(n),!t.body)throw Error(`No response body for framed response`);
12let{getOrCreateStream:r,jsonChunks:i}=M(t.body),a=[co(r),...Co||[]],o=new Map;e=await Mo({jsonStream:i,onMessage:e=>Ua(e,{refs:o,plugins:a}),onError(e,t){console.error(e,t)}})}else if(n.includes(`application/json`)){let n=await t.json(),r=[];try{e=Ua(n,{plugins:Co})}finally{}await wo(r)}if(e||v(),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=He(e);if(n)throw n;if(je(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function Mo({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i),s=!1,c=(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{let n=[];try{t(JSON.parse(e))}finally{}await wo(n)}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){s||n?.(`Stream processing error:`,e)}})(),l,u=[];try{l=t(o)}catch(e){throw s=!0,r.cancel().catch(()=>{}),e}return await wo(u),Promise.resolve(l).catch(()=>{s=!0,r.cancel().catch(()=>{})}),c.finally(()=>{try{r.releaseLock()}catch{}}),l}function No(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=ke()?.serverFns?.fetch;return Do(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[Se]:!0})}var Po=Ga({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(Se in e)?!1:!!e[Se],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>No(e)});function Fo(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function Io(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Lo(e){window.$_TSR||v();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||v();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Fo(e.i)}),n.lastMatchId&&=Fo(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o},await e.options.hydrate?.(i);let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=m();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}Io(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setMatches(s);let f=e.stores.matches.get(),p=e.stores.location.get();await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:p,navigate:t=>e.navigate({...t,_fromLocation:p}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(je(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let h=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!h)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let g=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(h){let t=s[1];t||v(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=g,g.then(()=>{e.batch(()=>
12{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var N=t(r(),1),P=n();function Ro({promise:e}){if(de)return de(e);let t=tn(e);if(t[en].status===`pending`)throw t;if(t[en].status===`error`)throw t[en].error;return t[en].data}function zo(e){let t=(0,P.jsx)(Bo,{...e});return e.fallback?(0,P.jsx)(N.Suspense,{fallback:e.fallback,children:t}):t}function Bo(e){let t=Ro(e);return e.children(t)}function Vo(e){let t=e.errorComponent??Uo;return(0,P.jsx)(Ho,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?N.createElement(t,{error:n,reset:r}):e.children})}var Ho=class extends N.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Uo({error:e}){let[t,n]=N.useState(!1);return(0,P.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,P.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,P.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,P.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,P.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,P.jsx)(`div`,{children:(0,P.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,P.jsx)(`code`,{children:e.message}):null})}):null]})}var Wo=N.createContext(void 0),Go=N.createContext(void 0),Ko=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Ko||{});function qo({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Jo(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Yo=[],Xo=0,{link:Zo,unlink:Qo,propagate:$o,checkDirty:es,shallowPropagate:ts}=qo({update(e){return e._update()},notify(e){Yo[rs++]=e,e.flags&=~Ko.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ko.Mutable|Ko.Dirty,ss(e))}}),ns=0,rs=0,is,as=0;function os(e){try{++as,e()}finally{--as||cs()}}function ss(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Qo(n,e)}function cs(){if(!(as>0)){for(;ns<rs;){let e=Yo[ns];Yo[ns++]=void 0,e.notify()}ns=0,rs=0}}function ls(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Ko.None:Ko.Mutable,get(){return is!==void 0&&Zo(i,is,Xo),i._snapshot},subscribe(e){let t=Jo(e),n={current:!1},r=us(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=is,o=t?.compare??Object.is;if(n)is=i,++Xo,i.depsTail=void 0;else if(e===void 0)return!1;
12n&&(i.flags=Ko.Mutable|Ko.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{is=a,n&&(i.flags&=~Ko.RecursedCheck),ss(i)}}};return n?(i.flags=Ko.Mutable|Ko.Dirty,i.get=function(){let e=i.flags;if(e&Ko.Dirty||e&Ko.Pending&&es(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&ts(e)}}else e&Ko.Pending&&(i.flags=e&~Ko.Pending);return is!==void 0&&Zo(i,is,Xo),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&($o(e),ts(e),cs())}},i}function us(e){let t=()=>{let t=is;is=n,++Xo,n.depsTail=void 0,n.flags=Ko.Watching|Ko.RecursedCheck;try{return e()}finally{is=t,n.flags&=~Ko.RecursedCheck,ss(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ko.Watching|Ko.RecursedCheck,notify(){let e=this.flags;e&Ko.Dirty||e&Ko.Pending&&es(this.deps,this)?t():this.flags=Ko.Watching},stop(){this.flags=Ko.None,this.depsTail=void 0,ss(this)}};return t(),n}var ds={get(){},subscribe(){return{unsubscribe(){}}}};function fs(e,t){let n=N.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=a(n.current,i):i}}function ps(e){let t=E(),n=N.useContext(e.from?Go:Wo),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=fs(e,t),a=le(r??ds,e=>e?i(e):ds);if(a!==ds)return a;(e.shouldThrow??!0)&&v()}function ms(e){return ps({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function hs(e){let{select:t,...n}=e;return ps({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function gs(e){return ps({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function _s(e){return ps({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function vs(e){let t=E();return N.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ys(e){return ps({...e,select:t=>e.select?e.select(t.context):t.context})}var bs=class extends ln{constructor(e){super(e),this.useMatch=e=>ps({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ys({...e,from:this.id}),this.useSearch=e=>_s({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>gs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>hs({...e,from:this.id}),this.useLoaderData=e=>ms({...e,from:this.id}),this.useNavigate=()=>vs({from:this.fullPath}),this.Link=N.forwardRef((e,t)=>(0,P.jsx)(fe,{ref:t,from:this.fullPath,...e}))}};function xs(e){return new bs(e)}function Ss(){return e=>ws(e)}var Cs=class extends un{constructor(e){super(e),this.useMatch=e=>ps({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>ys({...e,from:this.id}),this.useSearch=e=>_s({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>gs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>hs({...e,from:this.id}),this.useLoaderData=e=>ms({...e,from:this.id}),this.useNavigate=()=>vs({from:this.fullPath}),this.Link=N.forwardRef((e,t)=>(0,P.jsx)(fe,{ref:t,from:this.fullPath,...e}))}};function ws(e){return new Cs(e)}function Ts(e){return new Es(e,{silent:!0}).createRoute}var Es=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=xs(e);return t.isRoot=!1,t},this.silent=t?.silent}};function Ds(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,u(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(de)de(o());else throw o();return N.createElement(r,e)};return s.preload=o,s}function Os(e){let t=E(),n=`not-found-${le(t.stores.location,e=>e.pathname)}-${le(t.stores.status,e=>e)}`;return(0,P.jsx)(Vo,{getResetKey:()=>n,onCatch:(t,n)=>{if(je(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(je(t))return e.fallback?.(t);throw t},children:e.children})}function ks(){return(0,P.jsx)(`p`,{children:`Not Found`})}function As(e){return(0,P.jsx)(P.Fragment,{children:e.children})}function js(e,t,n){return t.options.notFoundComponent?(0,P.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,P.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,P.jsx)(ks,{})}var Ms=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Ns=(e,t)=>
12e[0]===t[0]&&e[1]===t[1],Ps=N.memo(function({matchId:e}){let t=E(),n=t.stores.matchStores.get(e);n||v();let r=le(t.stores.loadedAt,e=>e),i=le(n,e=>e,Ms);return(0,P.jsx)(Fs,{router:t,matchId:e,resetKey:r,matchState:N.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Fs({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,P.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?N.Suspense:As,f=s?Vo:As,p=l?Os:As;return(0,P.jsxs)(i.isRoot?i.options.shellComponent??As:As,{children:[(0,P.jsx)(Wo.Provider,{value:t,children:(0,P.jsx)(d,{fallback:o,children:(0,P.jsx)(f,{getResetKey:()=>n,errorComponent:s||Uo,onCatch:(e,t)=>{if(je(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,P.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return N.createElement(l,e)},children:u||r._displayPending?(0,P.jsx)(x,{fallback:o,children:(0,P.jsx)(Ls,{matchId:t})}):(0,P.jsx)(Ls,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Is,{}),(e.options.scrollRestoration,null)]}):null]})}function Is(){let e=E(),t=N.useRef();return ee(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Ot(e.stores.location.get(),r??n)}),t.current=n},[le(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Ls=N.memo(function({matchId:e}){let t=E(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||v();let i=le(r,e=>e),a=i.routeId,o=t.routesById[a],s=N.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=N.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,P.jsx)(e,{},s):(0,P.jsx)(Rs,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=m();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return je(i.error)||v(),js(t,o,i.error);if(i.status===`redirected`)throw Ve(i.error)||v(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Rs=N.memo(function(){let e=E(),t=N.useContext(Wo),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=le(a,e=>[e?.routeId,e?.globalNotFound??!1],Ns),i=le(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,P.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||v(),js(e,a,void 0);if(!i)return null;let s=(0,P.jsx)(Ps,{matchId:i});return n===`__root__`?(0,P.jsx)(N.Suspense,{fallback:o,children:s}):s});function zs(){let e=E(),t=N.useRef({router:e,mounted:!1}),[n,r]=N.useState(!1),i=le(e.stores.isLoading,e=>e),a=le(e.stores.hasPending,e=>e),o=se(i),s=i||n||a,c=se(s),l=i||a,u=se(l);return e.startTransition=e=>{r(!0),N.startTransition(()=>{e(),r(!1)})},N.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return b(e.latestLocation.publicHref)!==b(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),ee(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),ee(()=>{o&&!i&&e.emit({type:`onLoad`,...Ot(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),ee(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Ot(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),ee(()=>{if(c&&!s){let t=Ot(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),os(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Bs(){let e=E(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,P.jsx)(t,{}):null,r=(0,P.jsxs)(typeof document<`u`&&e.ssr?As:N.Suspense,{fallback:n,children:[(0,P.jsx)(zs,{}),(0,P.jsx)(Vs,{})]});return e.options.InnerWrap?(0,P.jsx)(e.options.InnerWrap,{children:r}):r}function Vs(){let e=E(),t=le(e.stores.firstId,e=>e),n=le(e.stores.loadedAt,e=>e),r=t?(0,P.jsx)(Ps,{matchId:t}):null;return(0,P.jsx)(Wo.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,P.jsx)(Vo,{getResetKey:()=>n,errorComponent:Uo,onCatch:void 0,children:r})})}var Hs=e=>({createMutableStore:ls,createReadonlyStore:ls,batch:os}),Us=e=>new Ws(e),Ws=class extends At{constructor(e){super(e,Hs)}};function Gs({router:e,children:t,...n}
12){h(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,P.jsx)(ie.Provider,{value:e,children:t});return e.options.Wrap?(0,P.jsx)(e.options.Wrap,{children:r}):r}function Ks({router:e,...t}){return(0,P.jsx)(Gs,{router:e,...t,children:(0,P.jsx)(Bs,{})})}function qs(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Js(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,P.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,P.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,P.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,P.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,P.jsx)(Ys,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Ys({attrs:e,children:t,preventScriptHoist:n}){E();let r=ue(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(N.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return qs(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,qs(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,P.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,P.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,P.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Xs=e=>{let t=E(),n=t.options.ssr?.nonce,r=le(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),i),a=N.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:f(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),o=le(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),i),s=le(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=cn(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:nn(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},i),c=le(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...an(a,t,e),nonce:n}})})}),i},i),l=le(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),i),u=le(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),i),d=[];return sn(d,a),d.push(...c),sn(d,o),d.push(...s),sn(d,l),sn(d,u),d};function Zs(e){let t=Xs(e.assetCrossOrigin),n=E().options.ssr?.nonce;return(0,P.jsx)(P.Fragment,{children:t.map(e=>(0,N.createElement)(Js,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Qs=()=>{let e=E(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;if(!i)return[];for(let e of n){let n=i.routes[e.routeId]?.scripts;if(n)for(let e of n)r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children,...typeof e.attrs?.src==`string`?{preventScriptHoist:!0}:{}})}return r},r=e=>e.map(e=>
12e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),a=le(e.stores.matches,n,i);return $s(e,le(e.stores.matches,r,i),a)};function $s(e,t,n){let r=[...t,...n];return(0,P.jsx)(P.Fragment,{children:r.map((e,t)=>(0,N.createElement)(Js,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ec=(e,t)=>{let n={type:`request`,...t||e},r=e=>ec({},Object.assign(n,{validator:e,inputValidator:e}));return{options:n,middleware:e=>ec({},Object.assign(n,{middleware:e})),validator:r,inputValidator:r,client:e=>ec({},Object.assign(n,{client:e})),server:e=>ec({},Object.assign(n,{server:e}))}};function tc(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&tc(e,r.extends))}}var nc=e=>({getOptions:async()=>{let t=await e();if(t.serializationAdapters){let e=new Set;tc(e,t.serializationAdapters),t.serializationAdapters=Array.from(e)}return t},createMiddleware:ec}),rc=function(){return rc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rc.apply(this,arguments)};function ic(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ac(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function oc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var sc=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),cc=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}},lc=class extends cc{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},uc=class extends cc{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},dc=class extends cc{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},fc;(function(e){e.Any=`any`,e.ApNortheast1=`ap-northeast-1`,e.ApNortheast2=`ap-northeast-2`,e.ApSouth1=`ap-south-1`,e.ApSoutheast1=`ap-southeast-1`,e.ApSoutheast2=`ap-southeast-2`,e.CaCentral1=`ca-central-1`,e.EuCentral1=`eu-central-1`,e.EuWest1=`eu-west-1`,e.EuWest2=`eu-west-2`,e.EuWest3=`eu-west-3`,e.SaEast1=`sa-east-1`,e.UsEast1=`us-east-1`,e.UsWest1=`us-west-1`,e.UsWest2=`us-west-2`})(fc||={});var pc=class{constructor(e,{headers:t={},customFetch:n,region:r=fc.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=sc(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return ac(this,arguments,void 0,function*(e,t={}){let n,r;try{let{headers:i,method:a,body:o,signal:s,timeout:c}=t,l={},{region:u}=t;u||=this.region;let d=new URL(`${this.url}/${e}`);u&&u!==`any`&&(l[`x-region`]=u,d.searchParams.set(`forceFunctionRegion`,u));let f,p=!!i&&Object.keys(i).some(e=>e.toLowerCase()===`content-type`);o&&!p?typeof Blob<`u`&&o instanceof Blob||o instanceof ArrayBuffer?(l[`Content-Type`]=`application/octet-stream`,f=o):typeof o==`string`?(l[`Content-Type`]=`text/plain`,f=o):typeof FormData<`u`&&o instanceof FormData?f=o:(l[`Content-Type`]=`application/json`,f=JSON.stringify(o)):f=o&&typeof o!=`string`&&!(typeof Blob<`u`&&o instanceof Blob)&&!(o instanceof ArrayBuffer)&&!(typeof FormData<`u`&&o instanceof FormData)?JSON.stringify(o):o;let m=s;c&&(r=new AbortController,n=setTimeout(()=>r.abort(),c),s?(m=r.signal,s.addEventListener(`abort`,()=>r.abort())):m=r.signal);let h=yield this.fetch(d.toString(),{method:a||`POST`,headers:Object.assign(Object.assign(Object.assign({},l),this.headers),i),body:f,signal:m}).catch(e=>{throw new lc(e)}),g=h.headers.get(`x-relay-error`);if(g&&g===`true`)throw new uc(h);if(!h.ok)throw new dc(h);let _=(h.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim(),v;return v=_===`application/json`?yield h.json():_===`application/octet-stream`||_===`application/pdf`?yield h.blob():_===`text/event-stream`?h:_===`multipart/form-data`?yield h.formData():yield h.text(),{data:v,error:null,response:h}}catch(e){return{data:null,error:e,response:e instanceof dc||e instanceof uc?e.context:void 0}}finally{n&&clearTimeout(n)}})}},mc=3,hc=e=>Math.min(1e3*2**e,3e4),gc=[520,503],_c=[`GET`,`HEAD`,`OPTIONS`],vc=class extends 
12Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function yc(e,t){return new Promise(n=>{if(t?.aborted){n();return}let r=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t?.addEventListener(`abort`,i)})}function bc(e,t,n,r){return!(!r||n>=mc||!_c.includes(e)||!gc.includes(t))}var xc=class{constructor(e){this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.shouldStripNulls=e.shouldStripNulls??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,this.retryEnabled=e.retry??!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get(`Accept`)===`text/csv`)throw Error(`stripNulls() cannot be used with csv()`);return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||([`GET`,`HEAD`].includes(this.method)?this.headers.set(`Accept-Profile`,this.schema):this.headers.set(`Content-Profile`,this.schema)),this.method!==`GET`&&this.method!==`HEAD`&&this.headers.set(`Content-Type`,`application/json`),this.shouldStripNulls){let e=this.headers.get(`Accept`);e===`application/vnd.pgrst.object+json`?this.headers.set(`Accept`,`application/vnd.pgrst.object+json;nulls=stripped`):(!e||e===`application/json`)&&this.headers.set(`Accept`,`application/vnd.pgrst.array+json;nulls=stripped`)}let r=this.fetch,i=(async()=>{let e=0;for(;;){let t={};n.headers.forEach((e,n)=>{t[n]=e}),e>0&&(t[`X-Retry-Count`]=String(e));let i;try{i=await r(n.url.toString(),{method:n.method,headers:t,body:JSON.stringify(n.body,(e,t)=>typeof t==`bigint`?t.toString():t),signal:n.signal})}catch(t){if(t?.name===`AbortError`||t?.code===`ABORT_ERR`||!_c.includes(n.method))throw t;if(n.retryEnabled&&e<mc){let t=hc(e);e++,await yc(t,n.signal);continue}throw t}if(bc(n.method,i.status,e,n.retryEnabled)){let t=i.headers?.get(`Retry-After`)??null,r=t===null?hc(e):Math.max(0,parseInt(t,10)||0)*1e3;await i.text(),e++,await yc(r,n.signal);continue}return await n.processResponse(i)}})();return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(t.method!==`HEAD`){let i=await e.text();if(i!==``)if(t.headers.get(`Accept`)===`text/csv`)r=i;else if(t.headers.get(`Accept`)&&t.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`))r=i;else try{r=JSON.parse(i)}catch{if(n={message:i},r=null,t.shouldThrowOnError)throw new vc({message:i,details:``,hint:``,code:``})}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);s&&c&&c.length>1&&(i=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`):r=r.length===1?r[0]:null)}else{let i=await e.text();try{n=JSON.parse(i),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,o=`OK`)}
vendor: 10,009 bytes, line 12
12catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new vc(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},Sc=class extends xc{throwOnError(){return super.throwOnError()}select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).join(``);return this.url.searchParams.set(`select`,n),this.headers.append(`Prefer`,`return=representation`),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set(`Accept`,`application/vnd.pgrst.object+json`),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set(`Accept`,`text/csv`),this}geojson(){return this.headers.set(`Accept`,`application/geo+json`),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),this}rollback(){return this.headers.append(`Prefer`,`tx=rollback`),this}returns(){return this}maxAffected(e){return this.headers.append(`Prefer`,`handling=strict`),this.headers.append(`Prefer`,`max-affected=${e}`),this}},Cc=RegExp(`[,()]`),wc=class extends Sc{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(`,`)}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(`,`)}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(`,`)}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(`,`)}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Cc.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Cc.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t==`string`?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(`,`)}}`),this}textSearch(e,t,{config:n,type:r}={}){let i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let r=n?`${n}.or`:`or`;return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Tc=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new wc({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new wc({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new wc({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new wc({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new wc({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Ec(e){"@babel/helpers - typeof";return Ec=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ec(e)}function Dc(e,t){if(Ec(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Ec(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Oc(e){var t=Dc(e,`string`);return Ec(t)==`symbol`?t:t+``}function kc(e,t,n){return(t=Oc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ac(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ac(Object(n),!0).forEach(function(t){kc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ac(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Mc=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let s=r??globalThis.fetch;i!==void 0&&i>0?this.fetch=(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),s(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),s(e,jc(jc({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,jc(jc({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:this.fetch=s,this.retry=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new Tc(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}
12`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new wc({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},Nc=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,wsConstructor:WebSocket};let e=globalThis;if(typeof globalThis<`u`&&e.WebSocket!==void 0)return{type:`native`,wsConstructor:e.WebSocket};let t=typeof global<`u`?global:void 0;if(t&&t.WebSocket!==void 0)return{type:`native`,wsConstructor:t.WebSocket};if(typeof globalThis<`u`&&e.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)return{type:`cloudflare`,error:`Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.`,workaround:`Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime.`};if(typeof globalThis<`u`&&e.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.includes(`Vercel-Edge`))return{type:`unsupported`,error:`Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.`,workaround:`Use serverless functions or a different deployment target for WebSocket functionality.`};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.node)return{type:`unsupported`,error:`Node.js detected but native WebSocket not found.`,workaround:`Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option.`}}return{type:`unsupported`,error:`Unknown JavaScript runtime without WebSocket support.`,workaround:`Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation.`}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{return this.detectEnvironment().type===`native`}catch{return!1}}},Pc=`realtime-js/2.110.5`,Fc=`1.0.0`,Ic=`2.0.0`,Lc=Ic,Rc=1e4,zc={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},Bc={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},Vc={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},Hc=class{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT=`broadcast`,this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=new TextEncoder,i=r.encode(e.topic),a=r.encode(e.ref??``),o=r.encode(e.join_ref??``),s=r.encode(e.payload.event),c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},l=r.encode(Object.keys(c).length===0?``:JSON.stringify(c));if(o.length>255)throw Error(`joinRef length ${o.length} exceeds maximum of 255`);if(a.length>255)throw Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`topic length ${i.length} exceeds maximum of 255`);if(s.length>255)throw Error(`userEvent length ${s.length} exceeds maximum of 255`);if(l.length>255)throw Error(`metadata length ${l.length} exceeds maximum of 255`);let u=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+i.length+s.length+l.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),p=new Uint8Array(d),m=0;f.setUint8(m++,this.KINDS.userBroadcastPush),f.setUint8(m++,o.length),f.setUint8(m++,a.length),f.setUint8(m++,i.length),f.setUint8(m++,s.length),f.setUint8(m++,l.length),f.setUint8(m++,t),p.set(o,m),m+=o.length,p.set(a,m),m+=a.length,p.set(i,m),m+=i.length,p.set(s,m),m+=s.length,p.set(l,m),m+=l.length;var h=new Uint8Array(d.byteLength+n.byteLength);return h.set(new Uint8Array(d),0),h.set(new Uint8Array(n),d.byteLength),h.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},F;(function(e){e.abstime=`abstime`,e.bool=`bool`,e.date=`date`,e.daterange=`daterange`,e.float4=`float4`,e.float8=`float8`,e.int2=`int2`,e.int4=`int4`,e.int4range=`int4range`,e.int8=`int8`,e.int8range=`int8range`,e.json=`json`,e.jsonb=`jsonb`,e.money=`money`,e.numeric=`numeric`,e.oid=`oid`,e.reltime=`reltime`,e.text=`text`,e.time=`time`,e.timestamp=`timestamp`,e.timestamptz=`timestamptz`,e.timetz=`timetz`,e.tsrange=`tsrange`,e.tstzrange=`tstzrange`})(F||={});var Uc=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=Wc(i,e,t,r),n),{}):{}},Wc=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?Gc(i,a):Kc(a)},Gc=(e,t)=>{if(e.charAt(0)===`_`)return Xc(t,e.slice(1,e.length));switch(e){case F.bool:return qc(t);case F.float4:case F.float8:case F.int2:case F.int4:case F.int8:case F.numeric:case F.oid:return Jc(t);case F.json:case F.jsonb:return Yc(t);case F.timestamp:return Zc(t);case F.abstime:case F.date:case F.daterange:case F.int4range:case F.int8range:case F.money:case F.reltime:case F.text:case F.time:case F.timestamptz:case F.timetz:case F.tsrange:case F.tstzrange:return Kc(t);default:return Kc(t)}},Kc=e=>e,qc=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},Jc=e=>{if(typeof e==`string`){let t=parseFloat(e);
vendor: 9,952 bytes, line 12
12if(!Number.isNaN(t))return t}return e},Yc=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},Xc=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>Gc(t,e))}return e},Zc=e=>typeof e==`string`?e.replace(` `,`T`):e,Qc=e=>{let t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,`http`),t.pathname=t.pathname.replace(/\/+$/,``).replace(/\/socket\/websocket$/i,``).replace(/\/socket$/i,``).replace(/\/websocket$/i,``),t.pathname===``||t.pathname===`/`?t.pathname=`/api/broadcast`:t.pathname+=`/api/broadcast`,t.href},$c=e=>typeof e==`function`?e:function(){return e},el=typeof self<`u`?self:null,tl=typeof window<`u`?window:null,nl=el||tl||globalThis,rl=`2.0.0`,il=1e4,al=1e3,ol={connecting:0,open:1,closing:2,closed:3},sl={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},cl={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},ll={longpoll:`longpoll`,websocket:`websocket`},ul={complete:4},dl=`base64url.bearer.phx.`,fl=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived(`timeout`)||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger(`timeout`,{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},pl=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries+=1,this.callback()},this.timerCalc(this.tries+1))}},ml=class{constructor(e,t,n){this.state=sl.closed,this.topic=e,this.params=$c(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new fl(this,cl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new pl(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive(`ok`,()=>{this.state=sl.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=sl.errored,this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log(`channel`,`close ${this.topic}`),this.state=sl.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=sl.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive(`timeout`,()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`timeout ${this.topic}`,this.joinPush.timeout),new fl(this,cl.leave,$c({}),this.timeout).send(),this.state=sl.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(cl.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(this.joinedOnce)throw Error(`tried to join multiple times. 'join' can only be called a single time per channel instance`);return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=sl.closed,this.bindings=[]}onClose(e){this.on(cl.close,e)}onError(e){return this.on(cl.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(t===void 0||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t||={},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new fl(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=sl.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(cl.close,`leave`)},n=new fl(this,cl.leave,$c({}),e);return n.receive(`ok`,()=>t()).receive(`timeout`,()=>t()),n.send(),this.canPush()||n.trigger(`ok`,{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic===e?r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log(`channel`,`dropping outdated message`,{topic:e,event:t,payload:n,joinRef:r}),!1):!0:!1}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=sl.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error(`channel onMessage callbacks must return the payload, modified or unmodified`);let a=this.bindings.filter(r=>r.event===e&&this.filterBindings(r,t,n));for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===sl.closed}isErrored(){return this.state===sl.errored}isJoined(){return this.state===sl.joined}isJoining(){return this.state===sl.joining}isLeaving(){return this.state===sl.leaving}},hl=class{static request(e,t,n,r,i,a,o){if(nl.XDomainRequest){let n=new nl.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}else if(nl.XMLHttpRequest){let s=new nl.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}else if(nl.fetch&&nl.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);else throw Error(`No suitable XMLHttpRequest implementation found`)}static fetchRequest(e,t,n,r,i,a,o){let s={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),nl.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{e.name===`AbortError`&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){e.open(t,n,!0),e.timeout=a;for(let[t,n]of Object.entries(r))e.setRequestHeader(t,n);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===ul.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e===``)return null;try{return JSON.parse(e)}catch{return console&&console.log(`failed to parse JSON response`,e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,a=e[r];typeof a==`object`?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+`=`+encodeURIComponent(a))}return n.join(`&`)}static appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${this.serialize(t)}`}},gl=e=>{let t=``,n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)},_l=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(dl)&&(this.authToken=atob(t[1].slice(dl.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=ol.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+ll.websocket),`$1/`+ll.longpoll)}endpointURL(){return hl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=ol.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===ol.open||this.readyState===ol.connecting}poll(){let e={Accept:`application/json`};this.authToken&&(e[`X-Phoenix-AuthToken`]=this.authToken),this.ajax(`GET`,e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,`session_gone`,!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ol.open,this.onopen({}),this.poll();break;
12case 403:this.onerror(403),this.close(1008,`forbidden`,!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,`internal server error`,500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){typeof e!=`string`&&(e=gl(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},e.join(`
13`),()=>this.onerror(`timeout`),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,`internal server error`,!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=ol.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<`u`?this.onclose(new CloseEvent(`close`,r)):this.onclose(r)}ajax(e,t,n,r,i){let a;a=hl.request(e,this.endpointURL(),t,n,this.timeout,()=>{this.reqs.delete(a),r()},e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},vl=class e{constructor(t,n={}){let r=n.events||{state:`presence_state`,diff:`presence_diff`};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel.on(r.diff,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,n,r){let i=this.clone(e),a={},o={};return this.map(i,(e,n)=>{t[e]||(o[e]=n)}),this.map(t,(e,t)=>{let n=i[e];if(n){let r=t.metas.map(e=>e.phx_ref),i=n.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>i.indexOf(e.phx_ref)<0),c=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);s.length>0&&(a[e]=t,a[e].metas=s),c.length>0&&(o[e]=this.clone(n),o[e].metas=c)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},n,r)}static syncDiff(e,t,n,r){let{joins:i,leaves:a}=this.clone(t);return n||=function(){},r||=function(){},this.map(i,(t,r)=>{let i=e[t];if(e[t]=this.clone(r),i){let n=e[t].metas.map(e=>e.phx_ref),r=i.metas.filter(e=>n.indexOf(e.phx_ref)<0);e[t].metas.unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>a.indexOf(e.phx_ref)<0),r(t,i,n),i.metas.length===0&&delete e[t]}),e}static list(e,t){return t||=function(e,t){return t},this.map(e,(e,n)=>t(e,n))}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static clone(e){return JSON.parse(JSON.stringify(e))}},yl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=this.META_LENGTH+t.length+n.length+i.length+r.length,s=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(s),l=0;c.setUint8(l++,this.KINDS.push),c.setUint8(l++,t.length),c.setUint8(l++,n.length),c.setUint8(l++,i.length),c.setUint8(l++,r.length),Array.from(t,e=>c.setUint8(l++,e.charCodeAt(0))),Array.from(n,e=>c.setUint8(l++,e.charCodeAt(0))),Array.from(i,e=>c.setUint8(l++,e.charCodeAt(0))),Array.from(r,e=>c.setUint8(l++,e.charCodeAt(0)));var u=new Uint8Array(s.byteLength+a.byteLength);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(a),s.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 20,107 bytes, line 13
13,decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+i));o+=i;let l=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:c,event:l,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=n.decode(e.slice(s,s+o));s+=o;let f={status:d,response:e.slice(s,e.byteLength)};return{join_ref:c,ref:l,topic:u,event:cl.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},bl=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||il,this.transport=t.transport||nl.WebSocket||_l,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=nl&&nl.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=yl.encode.bind(yl),this.defaultDecoder=yl.decode.bind(yl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||`arraybuffer`,this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport===_l?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;tl&&tl.addEventListener&&(tl.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),tl.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),tl.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=$c(t.params||{}),this.endPoint=`${e}/${ll.websocket}`,this.vsn=t.vsn||rl,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new pl(()=>{if(this.pageHidden){this.log(`Not reconnecting as page is hidden!`),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return _l}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&=(this.conn.close(),null),this.transport=e}protocol(){return location.protocol.match(/^https/)?`wss`:`ws`}endPointURL(){let e=hl.appendParams(hl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)===`/`?e.charAt(1)===`/`?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`:e}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log(`passing params to connect is deprecated. Instead pass :params to the Socket constructor`),this.params=$c(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==_l?this.connectWithFallback(_l,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case _l:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${dl}${btoa(this.authToken).replace(/=/g,``)}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,a=this.transportName(e),o=t=>{this.log(`transport`,`falling back to ${a}...`,t),this.off([void 0,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o(`memorized`);this.fallbackTimer=setTimeout(o,t),i=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),o(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,`true`),this.log(`transport`,`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,t),this.ping(e=>{this.log(`transport`,`connected to primary after`,e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log(`transport`,`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks(`open`)}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log(`transport`,`heartbeat timeout. Attempting to re-establish connection`);try{this.heartbeatCallback(`timeout`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.triggerChanError(Error(`heartbeat timeout`)),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),al,`heartbeat timeout`)}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||``):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===ol.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log(`transport`,`close`,e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks(`close`,e)}onConnError(e){this.hasLogger()&&this.log(`transport`,`error`,e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks(`error`,e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(cl.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case ol.connecting:return`connecting`;case ol.open:return`open`;case ol.closing:return`closing`;default:return`closed`}}isConnected(){return this.connectionState()===`open`}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>e.indexOf(t)===-1)}channel(e,t={}){let n=new ml(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log(`push`,`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(r.status===`ok`?`ok`:`error`,e)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log(`receive`,`${r.status||``} ${t} ${n} ${i&&`(`+i+`)`||``}`.trim(),r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}this.triggerStateCallbacks(`message`,e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log(`transport`,`leaving duplicate topic "${e}"`),t.leave())}},xl=class e{constructor(t,n){let r=wl(n);this.presence=new vl(t.getChannel(),r),this.presence.onJoin((n,r,i)=>{let a=e.onJoinPayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onLeave((n,r,i)=>{let a=e.onLeavePayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onSync(()=>{t.getChannel().trigger(`presence`,{event:`sync`})})}get state(){return e.transformState(this.presence.state)}static transformState(e){return e=Cl(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=Sl(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Tl(t),newPresences:Sl(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Tl(t),leftPresences:Sl(n)}}};function Sl(e){return e.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function Cl(e){return JSON.parse(JSON.stringify(e))}function wl(e){return e?.events&&{events:e.events}}function Tl(e){return e?.metas?Sl(e):[]}var El;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(El||={});var Dl=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new xl(this.channel.channelAdapter,t)}};function Ol(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);if(e&&typeof e==`object`){let t=e;if(typeof t.code==`number`){let n=typeof t.reason==`string`&&t.reason?` (${t.reason})`:``;return Error(`socket closed: ${t.code}${n}`,{cause:e})}return Error(`channel error: transport failure`,{cause:e})}return Error(`channel error: connection lost`)}var kl=class{constructor(e,t,n){let r=Al(n);this.channel=e.getSocket().channel(t,r),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,n){let r;try{r=this.channel.push(e,t,n)}catch{throw Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload())}return r}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===zc.joined}isJoined(){return this.state===zc.joined}isJoining(){return this.state===zc.joining}isClosed(){return this.state===zc.closed}isLeaving(){return this.state===zc.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function Al(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var jl=/[,()"\\]/,Ml=e=>jl.test(e)||e!==e.trim(),Nl=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,Pl=e=>{let t=e===null?`null`:String(e);return Ml(t)?Nl(t):t},Fl=e=>e===null?`null`:String(e),Il=(e,t)=>{if(e===`in`){let e=Array.isArray(t)?t:[t];if(e.length===0)throw Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(e)).map(e=>Pl(e)).join(`,`)})`}return e===`is`?`is.${Fl(t)}`:`${e}.${Pl(t)}`},Ll=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${Il(t,n)}`),this}eq(e,t){return this.add(e,`eq`,t)}neq(e,t){return this.add(e,`neq`,t)}gt(e,t){return this.add(e,`gt`,t)}gte(e,t){return this.add(e,`gte`,t)}lt(e,t){return this.add(e,`lt`,t)}lte(e,t){return this.add(e,`lte`,t)}in(e,t){return this.add(e,`in`,t)}like(e,t){return this.add(e,`like`,t)}ilike(e,t){return this.add(e,`ilike`,t)}match(e,t){return this.add(e,`match`,t)}imatch(e,t){return this.add(e,`imatch`,t)}is(e,t){return this.add(e,`is`,t)}isDistinct(e,t){return this.add(e,`isdistinct`,t)}not(e,t,n){return this.add(e,t,n,!0)}build(){return this.filters.join(`,`)}toString(){return this.build()}},Rl;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(Rl||={});var zl;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(zl||={});var Bl;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(Bl||={});var Vl=class e{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},n){if(this.topic=e,this.params=t,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,``),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},t.config),this.channelAdapter=new kl(this.socket.socketAdapter,e,this.params),this.presence=new Dl(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Qc(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:n,presence:r,private:i}}=this.params,a=this.bindings.postgres_changes?.map(e=>e.filter)??[],o=!!this.bindings[zl.PRESENCE]&&this.bindings[zl.PRESENCE].length>0||this.params.config.presence?.enabled===!0,s={},c={broadcast:n,presence:Object.assign(Object.assign({},r),{enabled:o}),postgres_changes:a,private:i};this.socket.accessTokenValue&&(s.access_token=this.socket.accessTokenValue),this._onError(t=>{e?.(Bl.CHANNEL_ERROR,Ol(t))}),this._onClose(()=>e?.(Bl.CLOSED)),this.updateJoinPayload(Object.assign({config:c},s)),this._updateFilterMessage(),this.channelAdapter.subscribe(t).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(Bl.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=zc.errored;let n=Object.values(t).join(`, `)||`error`;e?.(Bl.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(Bl.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=t&&t[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=zc.errored,n?.(Bl.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=zc.errored&&n&&n(Bl.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){let r=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===zl.PRESENCE||e===zl.POSTGRES_CHANGES;if(r&&i)throw this.socket.log(`channel`,`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(Error(`Payload is required for httpSend()`));let r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":r?`application/octet-stream`:`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set(`private`,`true`);let o={method:`POST`,headers:i,body:r?t:JSON.stringify(t)},s=await this._fetchWithTimeout(a.toString(),o,n.timeout??this.timeout);if(s.status===202)return{success:!0};if(s.status===404)return Promise.reject(Error(`httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
13ime-js/migrations/httpsend-server-version.md`));let c=s.statusText;try{let e=await s.json();c=e.error||e.message||c}catch{}return Promise.reject(Error(c))}async send(e,t={}){if(!this.channelAdapter.canPush()&&e.type===`broadcast`){console.warn(`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`);let{event:n,payload:r}=e,i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a={method:`POST`,headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:r,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,a,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e instanceof Error&&e.name===`AbortError`?`timed out`:`error`}}else return new Promise(n=>{let r=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive(`ok`,()=>t(`ok`)).receive(`timeout`,()=>t(`timed out`)).receive(`error`,()=>t(`error`))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_on(e,t,n){let r=e.toLocaleLowerCase(),i=t?.filter;(i instanceof Ll||typeof i==`object`&&i&&typeof i.build==`function`)&&(t=Object.assign(Object.assign({},t),{filter:i.build()}));let a=this.channelAdapter.on(e,n),o={type:r,filter:t,callback:n,ref:a};return this.bindings[r]?this.bindings[r].push(o):this.bindings[r]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,n)=>{let r=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(r,n))return!1;let i=this.bindings[r]?.find(t=>t.ref===e.ref);if(!i)return!0;if([`broadcast`,`presence`,`postgres_changes`].includes(r))if(`id`in i){let e=i.id,n=i.filter?.event;return e&&t.ids?.includes(e)&&(n===`*`||n?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}else{let e=(i?.filter?.event)?.toLocaleLowerCase();return e===`*`||e===(t?.event)?.toLocaleLowerCase()}else return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=Bc;return t&&[n,r,i,a].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,n)=>{if(typeof t==`object`&&`ids`in t){let e=t.data,{schema:n,table:r,commit_timestamp:i,type:a,errors:o}=e;return Object.assign(Object.assign({},{schema:n,table:r,commit_timestamp:i,eventType:a,new:{},old:{},errors:o}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error(`cannot copy bindings into joined channel`);for(let t in e.bindings)for(let n of e.bindings[t])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=Uc(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=Uc(e.columns,e.old_record)),t}},Hl=class{constructor(e,t){this.socket=new bl(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,n,r=1e4){return new Promise(i=>{setTimeout(()=>i(`timeout`),r),this.socket.disconnect(()=>{e(),i(`ok`)},t,n)})}push(e){this.socket.push(e)}log(e,t,n){this.socket.log(e,t,n)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Vc.connecting}isDisconnecting(){return this.socket.connectionState()==Vc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},Ul={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Wl=[1e3,2e3,5e3,1e4],Gl=1e4;function Kl(){let e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){return Array.from(e.keys())[t]??null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function ql(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Kl()}var Jl=`
14  addEventListener("message", (e) => {
15    if (e.data.event === "start") {
16      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
17    }
18  });`,Yl=class{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint=``,this.headers={},this.params={}
18,this.ref=0,this.serializer=new Hc,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new Hl(e,n),this.httpEndpoint=Qc(e),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){let t=e.message;throw Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?`ok`:await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return t===`ok`&&e.teardown(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return await this.disconnect(),t}log(e,t,n){this.socketAdapter.log(e,t,n)}connectionState(){return this.socketAdapter.connectionState()||Vc.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new Vl(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic),this.channels.length===0&&(this.log(`transport`,`no channels remaining, scheduling disconnect`),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log(`transport`,`disconnecting immediately - no channels`),this.disconnect();return}
18this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log(`transport`,`deferred disconnect fired - no channels, disconnecting`),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log(`transport`,`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log(`transport`,`pending disconnect cancelled - channel activity detected`),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let t,n=!1;if(e)t=e,n=!0;else if(this.accessToken)try{t=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),t=this.accessTokenValue}else t=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{let n={access_token:t,version:Pc};t&&e.updateJoinPayload(n),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(Bc.access_token,{access_token:t})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,n)=>{t!==`disconnected`&&(t==`sent`&&this._setAuthSafely(),e&&e(t,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([Jl],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_initializeOptions(e){this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null;let t={};t.timeout=e?.timeout??Rc,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??Ul.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??Ul.HEARTBEAT_INTERVAL),t.transport=e?.transport??Nc.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??ql(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>Wl[e-1]||Gl);let n,r,i=e?.vsn??Lc;switch(i){case Fc:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case Ic:n=this.serializer.encode.bind(this.serializer),r=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${t.vsn}`)}if(t.vsn=i,t.encode=e?.encode??n,t.decode=e?.decode??r,t.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,t.params=Object.assign(Object.assign({},t.params),{log_level:this.logLevel})),this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl,t.autoSendHeartbeat=!this.worker}return t}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,826 bytes, line 18
18,I=class extends Error{constructor(e,t){super(e),this.name=`IcebergError`,this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType===`CommitStateUnknownException`||[500,502,504].includes(t.status)&&t.icebergType?.includes(`CommitState`)===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Xl(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function L(e){return!e||e.type===`none`?{}:e.type===`bearer`?{Authorization:`Bearer ${e.token}`}:e.type===`header`?{[e.name]:e.value}:e.type===`custom`?await e.getHeaders():{}}function R(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=Xl(e.baseUrl,r,i),c=await L(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new I(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function Zl(e){return e.join(`�`)}var Ql=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:Zl(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${Zl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Zl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Zl(e.namespace)}`}),!0}catch(e){if(e instanceof I&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof I&&e.status===409)return;throw e}}};function $l(e){return e.join(`�`)}var eu=class{constructor(e,t=``,n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${$l(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${$l(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${$l(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data[`metadata-location`],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${$l(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${$l(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${$l(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof I&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof I&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},tu=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=R({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new Ql(this.client,t),this.tableOps=new eu(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
18async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function nu(e){"@babel/helpers - typeof";return nu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nu(e)}function ru(e,t){if(nu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function iu(e){var t=ru(e,`string`);return nu(t)==`symbol`?t:t+``}function au(e,t,n){return(t=iu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ou(Object(n),!0).forEach(function(t){au(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ou(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var su=class extends Error{constructor(e,t=`storage`,n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t===`vectors`?`StorageVectorsError`:`StorageError`,this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function cu(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var lu=class extends su{constructor(e,t,n,r=`storage`){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n}toJSON(){return z({},super.toJSON())}},uu=class extends su{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function du(e,t,n){let r=z({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function fu(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var pu=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),mu=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},hu=e=>{if(Array.isArray(e))return e.map(e=>hu(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=hu(n)}),t},gu=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),_u=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error;if(typeof t.error==`object`&&t.error!==null){let e=t.error;if(typeof e.message==`string`)return e.message}}return JSON.stringify(e)},vu=async(e,t,n,r)=>{if(typeof e==`object`&&e&&`json`in e&&typeof e.json==`function`){let n=e,i=parseInt(String(n.status),10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new lu(_u(e),i,n,r))}).catch(()=>{let e=i+``;t(new lu(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new uu(_u(e),e,r))},yu=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return z(z({},i),n);if(mu(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=du(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),z(z({},i),n)};async function bu(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,yu(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>vu(e,c,r,o))})}function xu(e=`storage`){return{get:async(t,n,r,i)=>bu(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>bu(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>bu(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>bu(t,`HEAD`,n,z(z({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>bu(t,`DELETE`,n,i,a,r,e)}}var{get:Su,post:Cu,put:wu,head:Tu,remove:Eu}
18=xu(`storage`),Du=xu(`vectors`),Ou=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=fu(t),this.fetch=pu(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=du(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(cu(e))return{data:null,error:e};throw e}}},ku=Symbol.toStringTag,Au=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[ku]=`StreamDownloadBuilder`,this.promise=null}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(cu(t))return{data:null,error:t};throw t}}},ju=Symbol.toStringTag,Mu=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[ju]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new Au(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(cu(t))return{data:null,error:t};throw t}}},Nu={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},Pu={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},Fu=class extends Ou{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=z(z({},Pu),r),s=z(z({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;if(typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))s=du(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?wu:Cu)(i.fetch,`${i.url}/object/${u}`,a,z({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=z(z({},Pu),r),o=z(z({},i.headers),{"x-upsert":String(t.upsert)}),c=t.metadata;if(typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),c&&e.append(`metadata`,i.encodeMetadata(c)),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.has(`cacheControl`)||e.append(`cacheControl`,t.cacheControl),c&&!e.has(`metadata`)&&e.append(`metadata`,i.encodeMetadata(c))):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType,c&&(o[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&e instanceof ReadableStream||e&&typeof e==`object`&&`pipe`in e&&typeof e.pipe==`function`)&&!t.duplex&&(t.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))o=du(o,e,t);return{path:a,fullPath:(await wu(i.fetch,s.toString(),e,z({headers:o},t?.duplex?{duplex:t.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=z({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await Cu(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new su(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,n){return this.uploadOrUpdate(`PUT`,e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Cu(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
18stinationBucket:n?.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Cu(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await Cu(r.fetch,`${r.url}/object/sign/${i}`,z({expiresIn:t},a?{transform:n.transform}:{}),{headers:r.headers}),s=new URLSearchParams;n?.download&&s.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&s.set(`cacheNonce`,String(n.cacheNonce));let c=s.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:``}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await Cu(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=new URLSearchParams;n?.download&&a.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&a.set(`cacheNonce`,String(n.cacheNonce));let o=a.toString();return i.map(e=>z(z({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${o?`&${o}`:``}`):null}))})}download(e,t,n){let r=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image/authenticated`:`object`,i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set(`cacheNonce`,String(t.cacheNonce));let a=i.toString(),o=this._getFinalPath(e);return new Mu(()=>Su(this.fetch,`${this.url}/${r}/${o}${a?`?${a}`:``}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e){var t=this;let n=t._getFinalPath(e);return t.handleOperation(async()=>hu(await Su(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await Tu(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(cu(e)){let t=e instanceof lu?e.status:e instanceof uu?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let n=this._getFinalPath(e),r=new URLSearchParams;t?.download&&r.set(`download`,t.download===!0?``:t.download),t?.transform&&this.applyTransformOptsToQuery(r,t.transform),t?.cacheNonce!=null&&r.set(`cacheNonce`,String(t.cacheNonce));let i=r.toString(),a=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image`:`object`;return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}`)+(i?`?${i}`:``)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Eu(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await Eu(r.fetch,`${r.url}/cdn/${i}${o?`?${o}`:``}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=t?.sortBy?z(z({},Nu.sortBy),t.sortBy):Nu.sortBy,a=z(z(z({},Nu),t),{},{sortBy:i,prefix:e||``});return await Cu(r.fetch,`${r.url}/object/list/${r.bucketId}`,a,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=z({},e);return await Cu(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,``)}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)}applyTransformOptsToQuery(e,t){return t.width&&e.set(`width`,t.width.toString()),t.height&&e.set(`height`,t.height.toString()),t.resize&&e.set(`resize`,t.resize),t.format&&e.set(`format`,t.format),t.quality&&e.set(`quality`,t.quality.toString()),e}},Iu={"X-Client-Info":`storage-js/2.110.5`},Lu=class extends Ou{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=z(z({},Iu),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await Su(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Su(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Cu(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await wu(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Cu(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Eu(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=new URLSearchParams;t?.transformations&&i.set(`transformations`,`true`);let a=i.toString();return await Eu(r.fetch,`${r.url}/cdn/${e}${a?`?${a}`:``}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(e){let t={};return e&&(`limit`in e&&(t.limit=String(e.limit)),`offset`in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>
180?`?`+new URLSearchParams(t).toString():``}},Ru=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=z(z({},Iu),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Cu(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=new URLSearchParams;e?.limit!==void 0&&n.set(`limit`,e.limit.toString()),e?.offset!==void 0&&n.set(`offset`,e.offset.toString()),e?.sortColumn&&n.set(`sortColumn`,e.sortColumn),e?.sortOrder&&n.set(`sortOrder`,e.sortOrder),e?.search&&n.set(`search`,e.search);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Su(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Eu(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!gu(e))throw new su(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new tu({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},zu=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=z(z({},Iu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Du.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Du.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Bu=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=z(z({},Iu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Vu=class extends Ou{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=z(z({},Iu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Du.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Hu=class extends Vu{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Uu(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},Uu=class extends zu{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName}))}
18async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new Wu(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Wu=class extends Bu{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,z(z({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},Gu=class extends Lu{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new Fu(this.url,this.headers,e,this.fetch)}get vectors(){return new Hu(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new Ru(this.url+`/iceberg`,this.headers,this.fetch)}},Ku=`2.110.5`,qu=30*1e3,Ju=3*qu,Yu=2*qu,Xu=`http://localhost:9999`,Zu=`supabase.auth.token`,Qu={"X-Client-Info":`gotrue-js/${Ku}`},$u=`X-Supabase-Api-Version`,ed={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},td=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,nd=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}};function B(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var rd=class extends nd{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function id(e){return B(e)&&e.name===`AuthApiError`}var ad=class extends nd{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},od=class extends nd{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},sd=class extends od{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function cd(e){return B(e)&&e.name===`AuthSessionMissingError`}var ld=class extends od{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
18ResponseError`,500,void 0)}},ud=class extends od{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},dd=class extends od{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}};function fd(e){return B(e)&&e.name===`AuthImplicitGrantRedirectError`}var pd=class extends od{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}},md=class extends od{constructor(){super(`PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.`,`AuthPKCECodeVerifierMissingError`,400,`pkce_code_verifier_not_found`)}},hd=class extends od{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function gd(e){return B(e)&&e.name===`AuthRetryableFetchError`}var _d=class extends od{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function vd(e){return B(e)&&e.name===`AuthRefreshDiscardedError`}var yd=class extends od{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},bd=class extends od{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},xd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),Sd=` 	
19\r=`.split(``),Cd=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Sd.length;t+=1)e[Sd[t].charCodeAt(0)]=-2;for(let t=0;t<xd.length;t+=1)e[xd[t].charCodeAt(0)]=t;return e})();function wd(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(xd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(xd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function Td(e,t,n){let r=Cd[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;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function Ed(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{kd(e,r,n)};for(let t=0;t<e.length;t+=1)Td(e.charCodeAt(t),i,a);return t.join(``)}function Dd(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 Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Od(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}Dd(r,t)}}function kd(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;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 Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function Ad(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)Td(e.charCodeAt(t),n,r);return new Uint8Array(t)}function jd(e){let t=[];return Od(e,e=>t.push(e)),new Uint8Array(t)}function V(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>wd(e,n,r)),wd(null,n,r),t.join(``)}function Md(e){return Math.round(Date.now()/1e3)+e}function Nd(){return Symbol(`auth-callback`)}var Pd=()=>typeof window<`u`&&typeof document<`u`,Fd={tested:!1,writable:!1},Id=()=>
19{if(!Pd())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(Fd.tested)return Fd.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Fd.tested=!0,Fd.writable=!0}catch{Fd.tested=!0,Fd.writable=!1}return Fd.writable};function Ld(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var Rd=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),zd=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,Bd=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Vd=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Hd=async(e,t)=>{await e.removeItem(t)},Ud=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Ud.promiseConstructor=Promise;function Wd(e){let t=e.split(`.`);if(t.length!==3)throw new bd(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!td.test(t[e]))throw new bd(`JWT not in base64url format`);return{header:JSON.parse(Ed(t[0])),payload:JSON.parse(Ed(t[1])),signature:Ad(t[2]),raw:{header:t[0],payload:t[1]}}}async function Gd(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Kd(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function qd(e){return(`0`+e.toString(16)).substr(-2)}function Jd(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,qd).join(``)}async function Yd(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function Xd(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await Yd(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function Zd(e,t,n=!1){let r=Jd(),i=r;n&&(i+=`/recovery`),await Bd(e,`${t}-code-verifier`,i);let a=await Xd(r);return[a,r===a?`plain`:`s256`]}var Qd=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $d(e){let t=e.headers.get($u);if(!t||!t.match(Qd))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function ef(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function tf(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var nf=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function rf(e){if(!nf.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function af(e){if(!e.passkey)throw Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function of(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function sf(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;
19if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`string`&&(console.warn(`Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.`),t.value=!0),Reflect.get(e,n,r)}})}function cf(e){return JSON.parse(JSON.stringify(e))}var lf=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error}return JSON.stringify(e)},uf=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function df(e){if(!zd(e))throw new hd(lf(e),0);if(uf.includes(e.status))throw new hd(lf(e),e.status);let t;try{t=await e.json()}catch(e){throw new ad(lf(e),e)}let n,r=$d(e);if(r&&r.getTime()>=ed[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0))throw new yd(lf(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new yd(lf(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new sd;throw new rd(lf(t),e.status||500,n)}var ff=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function H(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[$u]=ed[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);let o=await pf(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function pf(e,t,n,r,i,a){let o=ff(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw console.error(e),new hd(lf(e),0)}if(s.ok||await df(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await df(e)}}function mf(e){let t=null;bf(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=Md(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function hf(e){let t=mf(e);return!t.error&&e.weak_password&&typeof e.weak_password==`object`&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message==`string`&&e.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function gf(e){return{data:{user:e.user??e},error:null}}function _f(e){return{data:e,error:null}}function vf(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=ic(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function yf(e){return e}function bf(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var xf=[`global`,`local`,`others`],Sf=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=Rd(n),this.experimental=r??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,t=xf[0]){if(xf.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${xf.join(`, `)}`);try{return await H(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(B(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await H(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:gf})}catch(e){if(B(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=ic(e,[`options`]),r=Object.assign(Object.assign({},n),t);
19return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await H(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:vf,redirectTo:t?.redirectTo})}catch(e){if(B(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await H(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:gf})}catch(e){if(B(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await H(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:yf});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(B(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){rf(e);try{return await H(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:gf})}catch(e){if(B(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){rf(e);try{return await H(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:gf})}catch(e){if(B(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){rf(e);try{return await H(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:gf})}catch(e){if(B(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){rf(e.userId);try{let{data:t,error:n}=await H(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(B(e))return{data:null,error:e};throw e}}async _deleteFactor(e){rf(e.userId),rf(e.id);try{return{data:await H(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(B(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await H(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:yf});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(B(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await H(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await H(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await H(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await H(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(B(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await H(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await H(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(B(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await H(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await H(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await H(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await H(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(B(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){af(this.experimental),rf(e.userId);try{return await H(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(B(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){af(this.experimental),rf(e.userId),rf(e.passkeyId);try{return await H(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(B(e))return{data:null,error:e};throw e}}};function Cf(e={}){return{getItem:t=>
19e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Id()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var wf=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function Tf(){if(typeof globalThis!=`object`)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<`u`&&(self.globalThis=self)}}function Ef(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Df(e){return parseInt(e,16)}function Of(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function kf(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(`
20`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=Ef(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=`
21Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}var Af=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}toJSON(){return{name:this.name,message:this.message,code:this.code}}},jf=class extends Af{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Mf({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Af({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Af({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Af({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Af({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new Af({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Af({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Af({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Af({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!zf(t))return new Af({message:`${window.location.hostname}
21 is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Af({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Af({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new Af({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new Af({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function Nf({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Af({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Af({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!zf(t))return new Af({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Af({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Af({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new Af({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var Pf=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function Ff(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=ic(e,[`challenge`,`user`,`excludeCredentials`]),a=Ad(t).buffer,o=Object.assign(Object.assign({},n),{id:Ad(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:Ad(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function If(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=ic(e,[`challenge`,`allowCredentials`]),i=Ad(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:Ad(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function Lf(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:V(new Uint8Array(e.response.attestationObject)),clientDataJSON:V(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function Rf(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:V(new Uint8Array(r.authenticatorData)),clientDataJSON:V(new Uint8Array(r.clientDataJSON)),signature:V(new Uint8Array(r.signature)),userHandle:r.userHandle?V(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function zf(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Bf(){return!!(Pd()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function Vf(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new jf(`Browser returned unexpected credential type`,t)}:{data:null,error:new jf(`Empty credential response`,t)}}
21catch(t){return{data:null,error:Mf({error:t,options:e})}}}async function Hf(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new jf(`Browser returned unexpected credential type`,t)}:{data:null,error:new jf(`Empty credential response`,t)}}catch(t){return{data:null,error:Nf({error:t,options:e})}}}var Uf={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},Wf={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function Gf(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0)if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];t(n)?r[e]=Gf(n,a):r[e]=Gf(a)}else r[e]=a}return r}function Kf(e,t){return Gf(Uf,e,t||{})}function qf(e,t){return Gf(Wf,e,t||{})}var Jf=class{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:`webauthn`}))}async _challenge({factorId:e,webauthn:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??Pf.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await Vf({publicKey:Kf(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=qf(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await Hf(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return B(e)?{data:null,error:e}:{data:null,error:new ad(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new nd(`rpId is required for WebAuthn authentication`)};try{if(!Bf())return{data:null,error:new ad(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return B(e)?{data:null,error:e}:{data:null,error:new ad(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new nd(`rpId is required for WebAuthn registration`)};try{if(!Bf())return{data:null,error:new ad(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status!==`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return B(e)?{data:null,error:e}:{data:null,error:new ad(`Unexpected error in register`,e)}}}};Tf();var Yf={url:Xu,storageKey:Zu,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Qu,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Xf={},Zf=class e{get jwks(){return Xf[this.storageKey]?.jwks??{keys:[]}}set jwks(e){Xf[this.storageKey]=Object.assign(Object.assign({}
21,Xf[this.storageKey]),{jwks:e})}get jwks_cached_at(){return Xf[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){Xf[this.storageKey]=Object.assign(Object.assign({},Xf[this.storageKey]),{cachedAt:e})}constructor(t){var n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let r=Object.assign(Object.assign({},Yf),t);if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&Pd()){let e=`${this._logPrefix()} 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.`;console.warn(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.experimental=r.experimental??{},this.admin=new Sf({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=Rd(r.fetch),this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock!=null&&(this.lock=r.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=-(2**53-1)),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),webauthn:new Jf(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:Id()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Cf(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=Cf(this.memoryStorage)),Pd()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e),(e.data.event===`TOKEN_REFRESHED`||e.data.event===`SIGNED_IN`)&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Ku}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock==null?await this._initialize():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))();
21let e=await this.initializePromise,t=this._pendingInitNotifications??[];this._pendingInitNotifications=null;for(let e of t)await this._notifyAllSubscribers(e.event,e.session,e.broadcast);return e}async _initialize(){try{let e={},t=`none`;if(Pd()&&(e=Ld(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),Pd()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),fd(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return B(e)?this._returnResult({error:e}):this._returnResult({error:new ad(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await H(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:mf});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e,a=null,o=null;this.flowType===`pkce`&&([a,o]=await Zd(this.storage,this.storageKey)),t=await H(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:i?.emailRedirectTo,body:{email:n,password:r,data:i?.data??{},gotrue_meta_security:{captcha_token:i?.captchaToken},code_challenge:a,code_challenge_method:o},xform:mf})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await H(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:n,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:mf})}else throw new ud(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r||!n)return await Hd(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:r});let i=n.session,a=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,i)),this._returnResult({data:{user:a,session:i},error:null})}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await H(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:hf})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await H(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:hf})}else throw new ud(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new ld;return this._returnResult({data:{user:null,session:null},error:e})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock==null?this._exchangeCodeForSession(e):this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;
21if(!Pd()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw Error(`@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=Ef(l[0]),d=o?.signInWithEthereum?.chainId;d||=Df(await s.request({method:`eth_chainId`})),t=kf({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[Of(t),u]})}try{let{data:r,error:i}=await H(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:mf});if(i)throw i;if(!r||!r.session||!r.user){let e=new ld;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Pd()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw Error(`@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(`
22`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await H(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:V(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:mf});if(i)throw i;if(!r||!r.session||!r.user){let e=new ld;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e){let[t,n]=(await Vd(this.storage,`${this.storageKey}-code-verifier`)??``).split(`/`);try{if(!t&&this.flowType===`pkce`)throw new md;let{data:r,error:i}=await H(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:t},xform:mf});if(await Hd(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!r||!r.session||!r.user){let e=new ld;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(n===`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign(Object.assign({},r),{redirectType:n??null}),error:i})}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await H(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:mf});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new ld;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){try{if(`email`in e){let{email:t,options:n}=e,r=null,i=null;this.flowType===`pkce`&&([r,i]=await Zd(this.storage,this.storageKey));let{error:a}=await H(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},code_challenge:r,code_challenge_method:i},redirectTo:n?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await H(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new ud(`You must provide either an email or phone number.`)}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await H(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:mf});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){try{let t=null,n=null;this.flowType===`pkce`&&([t,n]=await Zd(this.storage,this.storageKey));let r=await H(this.fetch,`POST`,`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},`providerId`in e?{provider_id:e.providerId}:null),`domain`in e?{domain:e.domain}:null),{redirect_to:e.options?.redirectTo??void 0}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:t,code_challenge_method:n}),headers:this.headers,xform:_f});return r.data?.url&&Pd()&&!e.options?.skipBrowserRedirect&&window.location.assign(r.data.url),this._returnResult(r)}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,this.lock==null?await this._reauthenticate():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new sd;let{error:r}=await H(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{let t=`${this.url}/resend`;if(`email`in e){let{email:n,type:r,options:i}=e,a=null,o=null;this.flowType===`pkce`&&([a,o]=await Zd(this.storage,this.storageKey));let{error:s}=await H(this.fetch,`POST`,t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken},code_challenge:a,code_challenge_method:o},redirectTo:i?.emailRedirectTo});return s&&await Hd(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:s})}else if(`phone`in e){let{phone:n,type:r,options:i}=e,{data:a,error:o}=await H(this.fetch,`POST`,t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new ud(`You must provide either an email or phone number and a type`)}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,this.lock==null?await this._useSession(async e=>e):await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug(`#_acquireLock`,`lock released for storage key`,this.storageKey),this.lockAcquired=!1}})}finally{this._debug(`#_acquireLock`,`end`)}}async _useSession(e){this._debug(`#_useSession`,`begin`);try{return await e(await this.__loadSession())}finally{this._debug(`#_useSession`,`end`)}}async __loadSession(){this._debug(`#__loadSession()`,`begin`),this.lock!=null&&!this.lockAcquired&&this._debug(`#__loadSession()`,`used outside of an acquired lock!`,Error().stack);try{let e=null,t=await Vd(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not val
22id`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<Ju:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await Vd(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=of()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=sf(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(e.expires_at&&e.expires_at*1e3>Date.now()){let t=await Vd(this.storage,this.storageKey);if(t&&t.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t;return t=this.lock==null?await this._getUser():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()),t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await H(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:gf}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new sd}:await H(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:gf})})}catch(e){if(B(e))return cd(e)&&(await this._removeSession(),await Hd(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,this.lock==null?await this._updateUser(e,t):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;if(!r.session)throw new sd;let a=r.session,o=null,s=null;this.flowType===`pkce`&&e.email!=null&&([o,s]=await Zd(this.storage,this.storageKey));let{data:c,error:l}=await H(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:t?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:s}),jwt:a.access_token,xform:gf});if(l)throw l;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers(`USER_UPDATED`,a),this._returnResult({data:{user:a.user},error:null})})}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,this.lock==null?await this._setSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new sd;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=Wd(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(B(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,this.lock==null?await this._refreshSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new sd;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!Pd())throw new dd(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new dd(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new pd(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new dd(`Not a valid implicit grant flow url.`);break;default:}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new pd(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code);
22if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:t.redirectType??null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new dd(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(B(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){let t=await Vd(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:`global`}){return await this.initializePromise,this.lock==null?await this._signOut(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let n=async()=>{await this._removeSession(),await Hd(this.storage,`${this.storageKey}-code-verifier`)},{data:r,error:i}=t;if(i&&!cd(i))return this._returnResult({error:i});let a=r.session?.access_token;if(a){let{error:t}=await this.admin.signOut(a,e);if(t&&!(id(t)&&(t.status===404||t.status===401||t.status===403)||cd(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=Nd(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,this.lock==null?await this._emitInitialSession(t):await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),cd(t)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null;this.flowType===`pkce`&&([n,r]=await Zd(this.storage,this.storageKey,!0));try{return await H(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){try{let{data:t,error:n}=await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;let i=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return await H(this.fetch,`GET`,i,{headers:this.headers,jwt:n.session?.access_token??void 0})});if(n)throw n;return Pd()&&!e.options?.skipBrowserRedirect&&window.location.assign(t?.url),this._returnResult({data:{provider:e.provider,url:t?.url},error:null})}catch(t){if(B(t))return this._returnResult({data:{provider:e.provider,url:null},error:t});throw t}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await H(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:mf});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new ld}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await Hd(this.storage,`${this.storageKey}-code-verifier`),B(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await H(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken()`;this._debug(t,`begin`);try{let n=Date.now();return await Kd(async n=>(n>0&&await Gd(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await H(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:mf})),(e,t)=>{let r=200*2**e;return t&&gd(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),B(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),Pd()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await Vd(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Vd(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await Bd(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??of()}else if(t&&!t.user&&!t.user){let e=await Vd(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await Hd(this.storage,this.storageKey+`-user`),await Bd(this.storage,this.storageKey,t)):t.user=of()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
22id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<Ju;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${Ju}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(vd(n)?this._debug(e,`refresh discarded by commit guard`,n):this._debug(e,`refresh failed`,n))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new sd;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug(`#_callRefreshToken()`,`returning cached failure (cooldown active)`),this.lastRefreshFailure.result;let r=`#_callRefreshToken()`;this._debug(r,`begin`);try{this.refreshingDeferred=new Ud;let t=await Vd(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new sd;let a=await Vd(this.storage,this.storageKey);if(t!==null&&(a===null||a.refresh_token!==t.refresh_token)){this._debug(r,`commit guard: storage changed since refresh started, discarding rotated tokens`,{startedWith:`present`,nowHolds:a?`replaced`:`cleared`});let e={data:null,error:new _d};return this.refreshingDeferred.resolve(e),e}let o=this._sessionRemovalEpoch;if(await this._saveSession(n.session),this._sessionRemovalEpoch!==o){this._debug(r,`commit guard (post-save): _removeSession ran during _saveSession, undoing write`),await Hd(this.storage,this.storageKey),this.userStorage&&await Hd(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new _d};return this.refreshingDeferred.resolve(e),e}await this._notifyAllSubscribers(`TOKEN_REFRESHED`,n.session);let s={data:n.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(s),s}catch(i){if(this._debug(r,`error`,i),B(i)){let n={data:null,error:i};if(!gd(i)){let e=await Vd(this.storage,this.storageKey);e?.expires_at&&e.expires_at*1e3>Date.now()?this._debug(r,`proactive refresh failed, access token still valid — preserving session`):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:n,expiresAt:Date.now()+Yu},(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:e,session:t,broadcast:n});return}let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0;let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await Bd(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=cf(e);await Bd(this.storage,this.storageKey,r)}else{let e=cf(t);await Bd(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Hd(this.storage,this.storageKey),await Hd(this.storage,this.storageKey+`-code-verifier`),await Hd(this.storage,this.storageKey+`-user`),this.userStorage&&await Hd(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Pd()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
22catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),qu);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)==null||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug(`#_autoRefreshTokenTick()`,`begin`),this.lock!=null){try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/qu);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${qu}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e instanceof wf)this._debug(`auto refresh token tick lock not available`);else throw e}return}if(this.refreshingDeferred!==null){this._debug(`#_autoRefreshTokenTick()`,`refresh already in flight, skipping`);return}try{let e=Date.now();try{await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/qu);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${qu}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!Pd()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug(`#visibilityChangedCallback`,`error`,e)}},window==null||window.addEventListener(`visibilitychange`,this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error(`_handleVisibilityChange`,e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;if(this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting`);return}await this._recoverAndRefresh()});else{if(document.visibilityState!==`visible`){this._debug(t,`visibilityState is no longer visible, skipping recovery`);return}await this._recoverAndRefresh()}}else document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=[`provider=${encodeURIComponent(t)}`];if(n?.redirectTo&&r.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n?.scopes&&r.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType===`pkce`){let[e,t]=await Zd(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});
22r.push(n.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);r.push(e.toString())}return n?.skipBrowserRedirect&&r.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${r.join(`&`)}`}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await H(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await H(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?Lf(e.webauthn.credential_response):Rf(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await H(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,a),this._returnResult({data:a,error:o}))})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challenge(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await H(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;if(a.type!==`webauthn`)return{data:a,error:null};switch(a.webauthn.type){case`create`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Ff(a.webauthn.credential_options.publicKey)})})}),error:null};case`request`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:If(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=Wd(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
22=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=Wd(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await H(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new sd})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new sd});let a=await H(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Pd()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new sd});let a=await H(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Pd()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await H(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new sd})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await H(this.fetch,`DELETE`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new sd})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await H(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}
22=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=Wd(n);if(!t?.allowExpired)try{ef(i.exp)}catch(e){throw new bd(e instanceof Error?e.message:`JWT validation failed`)}let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=tf(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,jd(`${o}.${s}`)))throw new bd(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){af(this.experimental);try{if(!Bf())return this._returnResult({data:null,error:new ad(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:e?.options?.captchaToken}});if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await Hf({publicKey:If(t.options),signal:e?.options?.signal??Pf.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new ad(`WebAuthn ceremony failed`,null)});let a=Rf(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){af(this.experimental);try{if(!Bf())return this._returnResult({data:null,error:new ad(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyRegistration();if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await Vf({publicKey:Ff(t.options),signal:e?.options?.signal??Pf.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new ad(`WebAuthn ceremony failed`,null)});let a=Lf(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){af(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new sd});let{data:r,error:i}=await H(this.fetch,`POST`,`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){af(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new sd});let{data:i,error:a}=await H(this.fetch,`POST`,`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){af(this.experimental);try{let{data:t,error:n}=await H(this.fetch,`POST`,`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:e?.options?.captchaToken}}});return n?this._returnResult({data:null,error:n}):this._returnResult({data:t,error:null})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){af(this.experimental);try{let{data:t,error:n}=await H(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:mf});return n?this._returnResult({data:null,error:n}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,t.session)),this._returnResult({data:t,error:null}))}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){af(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new sd});let{data:r,error:i}=await H(this.fetch,`GET`,`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){af(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new sd});let{data:i,error:a}=await H(this.fetch,`PATCH`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){af(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new sd});let{error:i}=await H(this.fetch,`DELETE`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if(B(e))return this._returnResult({data:null,error:e});throw e}}};Zf.nextInstanceID={};var Qf=Zf,$f=`modulepreload`,ep=function(e){return`/`+e},tp={},np=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=ep(t,n),t in tp)return;tp[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:$f,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n
22)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rp=`2.110.5`,ip=``,ap;if(typeof Deno<`u`)ip=`deno`,ap=Deno.version?.deno;else if(typeof document<`u`)ip=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)ip=`react-native`;else{var op;ip=`node`;let e=globalThis.process;ap=e==null||(op=e.version)==null?void 0:op.replace(/^v/,``)}var sp=[`runtime=${ip}`];ap&&sp.push(`runtime-version=${ap}`);var cp={headers:{"X-Client-Info":`supabase-js/${rp}; ${sp.join(`; `)}`}},lp={schema:`public`},up={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},dp={},fp={enabled:!1,respectSamplingDecision:!0};function pp(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var mp=null,hp=`@opentelemetry/api`;function gp(){return mp===null&&(mp=np(()=>import(hp),[]).catch(()=>null)),mp}function _p(){return pp(this,void 0,void 0,function*(){try{let e=yield gp();if(!e||!e.propagation||!e.context)return null;let t={};e.propagation.inject(e.context.active(),t);let n=t.traceparent;return n?{traceparent:n,tracestate:t.tracestate,baggage:t.baggage}:null}catch{return null}})}function vp(e){if(!e||typeof e!=`string`)return null;let t=e.split(`-`);if(t.length!==4)return null;let[n,r,i,a]=t;if(n.length!==2||r.length!==32||i.length!==16||a.length!==2)return null;let o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(a)||r===`00000000000000000000000000000000`||i===`0000000000000000`?null:{version:n,traceId:r,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)==1}}function yp(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(let e of t)try{if(typeof e==`string`){if(bp(n.hostname,e))return!0}else if(e instanceof RegExp){if(e.test(n.hostname))return!0}else if(typeof e==`function`&&e(n))return!0}catch{continue}return!1}function bp(e,t){if(t===e)return!0;if(t.startsWith(`*.`)){let n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith(`.`+n)))return!0}return!1}function xp(e){let t=[];try{let n=new URL(e);t.push(n.hostname)}catch{}return t.push(`*.supabase.co`,`*.supabase.in`),t.push(`localhost`,`127.0.0.1`,`[::1]`),t}function Sp(e){"@babel/helpers - typeof";return Sp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Sp(e)}function Cp(e,t){if(Sp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Sp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function wp(e){var t=Cp(e,`string`);return Sp(t)==`symbol`?t:t+``}function Tp(e,t,n){return(t=wp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ep(Object(n),!0).forEach(function(t){Tp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ep(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Op=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),kp=()=>Headers,Ap=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),jp=e=>{if(e.startsWith(`sb_`)&&!Ap(e))throw Error(`@supabase/supabase-js: Unrecognized Supabase API key format. Expected a legacy JWT key or a new-format key (sb_publishable_… / sb_secret_…). This "sb_" key type is not supported by this version of the SDK — please upgrade @supabase/supabase-js.`)},Mp=(e,t,n,r,i,a)=>{let o=Op(r),s=kp(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?xp(t):null,d=!(a?.omitApiKeyAsBearer&&Ap(e));return async(t,r)=>{let i=await n(),a=new s(r?.headers);if(a.has(`apikey`)||a.set(`apikey`,e),!a.has(`Authorization`)){let t=i??(d?e:null);t&&a.set(`Authorization`,`Bearer ${t}`)}if(u){let e=await Np(t,u,l);e&&(e.traceparent&&!a.has(`traceparent`)&&a.set(`traceparent`,e.traceparent),e.tracestate&&!a.has(`tracestate`)&&a.set(`tracestate`,e.tracestate),e.baggage&&!a.has(`baggage`)&&a.set(`baggage`,e.baggage))}return o(t,Dp(Dp({},r),{},{headers:a}))}};
22async function Np(e,t,n){if(!yp(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let r=await _p();if(!r||!r.traceparent)return null;if(n){let e=vp(r.traceparent);if(e&&!e.isSampled)return null}return r}function Pp(e){return typeof e==`boolean`?{enabled:e}:e}function Fp(e){return e.endsWith(`/`)?e:e+`/`}function Ip(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=Pp(e.tracePropagation),d=Pp(t.tracePropagation),f={db:Dp(Dp({},o),n),auth:Dp(Dp({},s),r),realtime:Dp(Dp({},c),i),storage:{},global:Dp(Dp(Dp({},l),a),{},{headers:Dp(Dp({},l?.headers??{}),a?.headers??{})}),tracePropagation:{enabled:u?.enabled??d?.enabled??!1,respectSamplingDecision:u?.respectSamplingDecision??d?.respectSamplingDecision??!0},accessToken:async()=>``};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function Lp(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(Fp(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var Rp=class extends Qf{constructor(e){super(e)}},zp=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=Lp(e);if(!t)throw Error(`supabaseKey is required.`);jp(t),this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:lp,realtime:dp,auth:Dp(Dp({},up),{},{storageKey:i}),global:cp,tracePropagation:fp},o=Ip(n??{},a);this.settings=o,this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=Mp(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=Mp(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Dp({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new Mc(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit}),this.storage=new Gu(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new pc(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??null}async _getAccessToken(){var e=this;return await e._getSessionToken()??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,m){let h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Rp({url:this.authUrl.href,headers:Dp(Dp({},h),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new Yl(this.realtimeUrl.href,Dp(Dp({},e),{},{params:Dp(Dp({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,`CLIENT`,t?.access_token)})}_handleTokenChanged(e,t,n){(e===`TOKEN_REFRESHED`||e===`SIGNED_IN`)&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e===`SIGNED_OUT`&&(this.realtime.setAuth(),t==`STORAGE`&&this.auth.signOut(),this.changedAccessToken=void 0)}},Bp=(e,t,n)=>new zp(e,t,n);function Vp(){if(typeof window<`u`)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}Vp()&&console.warn(`⚠️  Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
22ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715`);function Hp(){if(typeof window>`u`)return;let e=location.hostname,t=[`lovableproject.com`,`lovableproject-dev.com`,`lovable.app`,`gpt-eng.com`,`gptengineer.run`].some(t=>e===t||e.endsWith(`.`+t))?e.match(RegExp(`^(?:id-preview(?:-[a-z0-9]+)?|project)--([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:-dev)?(?=\\.|$)`,`i`))?.[1]??e.match(RegExp(`^([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?=[.-])`,`i`))?.[1]:void 0,n=window.parent&&window.parent!==window;if(!t||!n)return localStorage;let r=e.endsWith(`.lovableproject-dev.com`)||e.endsWith(`.gpt-eng.com`),i=r?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,a=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:``),o=a&&i.test(a)?[a]:r?[`https://lovable.dev`,`http://localhost:3000`]:[`https://lovable.dev`],s=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),c=(e,n,r)=>new Promise(i=>{let a=s(),c=!1,l,u=e=>{c||(c=!0,clearTimeout(l),window.removeEventListener(`message`,d),i(e))},d=e=>{if(o.indexOf(e.origin)<0)return;let t=e.data;t&&t.type===`lovable-preview-auth:result`&&t.requestId===a&&u(t)};window.addEventListener(`message`,d);let f={type:e,requestId:a,projectId:t,key:n};r!==void 0&&(f.value=r);for(let e of o)window.parent.postMessage(f,e);l=setTimeout(()=>u(null),2e3)}),l=!0;return{getItem:async e=>{let t=await c(`lovable-preview-auth:get`,e);return!t&&l&&(await new Promise(e=>setTimeout(e,250)),t=await c(`lovable-preview-auth:get`,e)),l=!1,t&&t.ok&&typeof t.value==`string`?t.value===``?(localStorage.removeItem(e),null):t.value:localStorage.getItem(e)},setItem:(e,t)=>(localStorage.setItem(e,t),c(`lovable-preview-auth:set`,e,t).then(n=>{n&&n.ok&&typeof n.value==`string`&&localStorage.getItem(e)===t&&(n.value===``?localStorage.removeItem(e):localStorage.setItem(e,n.value))})),removeItem:e=>(localStorage.removeItem(e),c(`lovable-preview-auth:remove`,e).then(()=>void 0))}}function Up(e){return e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`)}function Wp(e){return(t,n)=>{let r=new Headers(typeof Request<`u`&&t instanceof Request?t.headers:void 0);return n?.headers&&new Headers(n.headers).forEach((e,t)=>r.set(t,e)),Up(e)&&r.get(`Authorization`)===`Bearer ${e}`&&r.delete(`Authorization`),r.set(`apikey`,e),fetch(t,{...n,headers:r})}}function Gp(){let e=`sb_publishable_Fm5JZijvDi9frHJx4AkpJg_AcmRPJCF`;return Bp(`https://asyyfhnyfrsvktbqatjg.supabase.co`,e,{global:{fetch:Wp(e)},auth:{storage:Hp(),persistSession:!0,autoRefreshToken:!0}})}var Kp,qp=new Proxy({},{get(e,t,n){return Kp||=Gp(),Reflect.get(Kp,t,n)}}),Jp=ec({type:`function`}).client(async({next:e})=>{let{data:t}=await qp.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),Yp=ec(),Xp=nc(()=>({functionMiddleware:[Jp],requestMiddleware:[Yp]})),Zp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qp=new class extends Zp{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$p={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},em=new class{#e=$p;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function tm(e){setTimeout(e,0)}var nm=typeof window>`u`||`Deno`in globalThis;function rm(){}function im(e,t){return typeof e==`function`?e(t):e}function am(e){return typeof e==`number`&&e>=0&&e!==1/0}function om(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sm(e,t){return typeof e==`function`?e(t):e}function cm(e,t){return typeof e==`function`?e(t):e}function lm(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==dm(o,t.options))return!1}else if(!pm(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function um(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;
22if(n){if(fm(t.options.mutationKey)!==fm(a))return!1}else if(!pm(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function dm(e,t){return(t?.queryKeyHashFn||fm)(e)}function fm(e){return JSON.stringify(e,(e,t)=>vm(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function pm(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>pm(e[n],t[n])):!1}var mm=Object.prototype.hasOwnProperty;function hm(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=_m(e)&&_m(t);if(!r&&!(vm(e)&&vm(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:mm.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=hm(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function gm(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function _m(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vm(e){if(!ym(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ym(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ym(e){return Object.prototype.toString.call(e)===`[object Object]`}function bm(e){return new Promise(t=>{em.setTimeout(t,e)})}function xm(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:hm(e,t)}function Sm(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Cm(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wm=Symbol();function Tm(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===wm?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Em(e,t){return typeof e==`function`?e(...t):!!e}function Dm(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Om=(()=>{let e=()=>nm;return{isServer(){return e()},setIsServer(t){e=t}}})();function km(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Am=tm;function jm(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Am,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Mm=jm(),Nm=new class extends Zp{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Pm(e){return Math.min(1e3*2**e,3e4)}function Fm(e){return(e??`online`)===`online`?Nm.isOnline():!0}var Im=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Lm(e){let t=!1,n=0,r,i=km(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Im(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Qp.isFocused()&&(e.networkMode===`always`||Nm.isOnline())&&e.canRun(),u=()=>Fm(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Om.isServer()?0:3),o=e.retryDelay??Pm,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),bm(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Rm=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),am(this.gcTime)&&(this.#e=em.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Om.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(em.clearTimeout(this.#e),this.#e=void 0)}};function zm(e){return{onFetch:(t,n)=>
22{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Dm(e,()=>t.signal,()=>n=!0)},u=Tm(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Cm:Sm;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Vm:Bm,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Bm(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Bm(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Vm(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Hm=class extends Rm{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Gm(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Gm(this.options);e.data!==void 0&&(this.setState(Wm(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=xm(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(rm).catch(rm):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>cm(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sm(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!om(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)}
22)},i=()=>{let e=Tm(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?zm(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Lm({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Im&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Im){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Um(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Wm(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Mm.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Um(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fm(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Wm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Gm(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Km=class extends Rm{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qm(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Lm({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});
vendor: 2,874 bytes, line 22
22let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Mm.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function qm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Jm=class extends Zp{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Km({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ym(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ym(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ym(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Ym(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
22t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Mm.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>um(t,e))}findAll(e={}){return this.getAll().filter(t=>um(e,t))}notify(e){Mm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Mm.batch(()=>Promise.all(e.map(e=>e.continue().catch(rm))))}};function Ym(e){return e.options.scope?.id}var Xm=class extends Zp{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??dm(r,t),a=this.get(i);return a||(a=new Hm({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Mm.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>lm(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>lm(e,t)):t}notify(e){Mm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Mm.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Mm.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Zm=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Xm,this.#t=e.mutationCache||new Jm,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Qp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sm(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=im(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Mm.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Mm.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Mm.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Mm.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(rm).catch(rm)}invalidateQueries(e,t={}){return Mm.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Mm.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(rm)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(rm)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(sm(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(rm).catch(rm)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(rm).catch(rm)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Nm.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(fm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{pm(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(fm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{pm(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=dm(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===wm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Qm=N.createContext(void 0),$m=e=>{let t=N.useContext(Qm);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},eh=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,P.jsx)(Qm.Provider,{value:e,children:t})),th=`/assets/styles-Ba8WtRkv.css`;function nh(e,t={}){typeof window>`u`||window.__lovableEvents?.captureException?.(e,{source:`react_error_boundary`,route:window.location.pathname,...t},{mechanism:`react_error_boundary`,handled:!1,severity:`error`})}var rh=(...e)=>
22e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ih=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ah=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),oh=e=>{let t=ah(e);return t.charAt(0).toUpperCase()+t.slice(1)},sh={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ch=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},lh=(0,N.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,N.createElement)(`svg`,{ref:c,...sh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:rh(`lucide`,i),...!a&&!ch(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,N.createElement)(e,t)),...Array.isArray(a)?a:[a]])),uh=(e,t)=>{let n=(0,N.forwardRef)(({className:n,...r},i)=>(0,N.createElement)(lh,{ref:i,iconNode:t,className:rh(`lucide-${ih(oh(e))}`,`lucide-${e}`,n),...r}));return n.displayName=oh(e),n},dh=uh(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),fh=uh(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ph;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(ph||={});var mh;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(mh||={});var U=ph.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),hh=e=>{switch(typeof e){case`undefined`:return U.undefined;case`string`:return U.string;case`number`:return Number.isNaN(e)?U.nan:U.number;case`boolean`:return U.boolean;case`function`:return U.function;case`bigint`:return U.bigint;case`symbol`:return U.symbol;case`object`:return Array.isArray(e)?U.array:e===null?U.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?U.promise:typeof Map<`u`&&e instanceof Map?U.map:typeof Set<`u`&&e instanceof Set?U.set:typeof Date<`u`&&e instanceof Date?U.date:U.object;default:return U.unknown}},W=ph.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),gh=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ph.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};gh.create=e=>new gh(e);var _h=(e,t)=>{let n;switch(e.code){case W.invalid_type:n=e.received===U.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case W.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ph.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:n=`Unrecognized key(s) in object: ${ph.joinValues(e.keys,`, `)}`;break;case W.invalid_union:n=`Invalid input`;break;case W.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ph.joinValues(e.options)}`;break;case W.invalid_enum_value:n=`Invalid enum value. Expected ${ph.joinValues(e.options)}, received '${e.received}'`;break;case W.invalid_arguments:n=`Invalid function arguments`;break;case W.invalid_return_type:n=`Invalid function return type`;break;case W.invalid_date:n=`Invalid date`;break;case W.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ph.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case W.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case W.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case W.custom:n=`Invalid input`;break;case W.invalid_intersection_types:n=`Intersection results could not be merged`;break;case W.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case W.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,ph.assertNever(e)}return{message:n}},vh=_h;function yh(){return vh}var bh=e=>
vendor: 4,311 bytes, line 22
22{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function G(e,t){let n=yh(),r=bh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===_h?void 0:_h].filter(e=>!!e)});e.common.issues.push(r)}var xh=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return K;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return K;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},K=Object.freeze({status:`aborted`}),Sh=e=>({status:`dirty`,value:e}),Ch=e=>({status:`valid`,value:e}),wh=e=>e.status===`aborted`,Th=e=>e.status===`dirty`,Eh=e=>e.status===`valid`,Dh=e=>typeof Promise<`u`&&e instanceof Promise,q;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(q||={});var Oh=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},kh=(e,t)=>{if(Eh(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new gh(e.common.issues);return this._error=t,this._error}}};function J(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var Y=class{get description(){return this._def.description}_getType(e){return hh(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:hh(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new xh,ctx:{common:e.parent.common,data:e.data,parsedType:hh(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Dh(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hh(e)};return kh(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hh(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Eh(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Eh(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:hh(e)}
vendor: 41,889 bytes, line 22
22,r=this._parse({data:e,path:n.path,parent:n});return kh(n,await(Dh(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:W.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Mg({schema:this,typeName:X.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return Ng.create(this,this._def)}nullable(){return Pg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pg.create(this)}promise(){return jg.create(this,this._def)}or(e){return gg.create([this,e],this._def)}and(e){return bg.create(this,e,this._def)}transform(e){return new Mg({...J(this._def),schema:this,typeName:X.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Fg({...J(this._def),innerType:this,defaultValue:t,typeName:X.ZodDefault})}brand(){return new Rg({typeName:X.ZodBranded,type:this,...J(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Ig({...J(this._def),innerType:this,catchValue:t,typeName:X.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return zg.create(this,e)}readonly(){return Bg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Ah=/^c[^\s-]{8,}$/i,jh=/^[0-9a-z]+$/,Mh=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Nh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ph=/^[a-z0-9_-]{21}$/i,Fh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ih=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Lh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Rh=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,zh,Bh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Hh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Uh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Kh=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,qh=RegExp(`^${Kh}$`);function Jh(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Yh(e){return RegExp(`^${Jh(e)}$`)}function Xh(e){let t=`${Kh}T${Jh(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Zh(e,t){return!!((t===`v4`||!t)&&Bh.test(e)||(t===`v6`||!t)&&Hh.test(e))}function Qh(e,t){if(!Fh.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function $h(e,t){return!!((t===`v4`||!t)&&Vh.test(e)||(t===`v6`||!t)&&Uh.test(e))}var eg=class e extends Y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==U.string){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.string,received:t.parsedType}),K}let t=new xh,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),G(n,{code:W.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),G(n,{code:W.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?G(n,{code:W.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&G(n,{code:W.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)Lh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`email`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)zh||=new RegExp(Rh,`u`),zh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`emoji`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Nh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`uuid`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)Ph.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`nanoid`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Ah.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`cuid`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)jh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`cuid2`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Mh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`ulid`,code:W.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),G(n,{validation:`url`,code:W.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`regex`,code:W.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),G(n,{code:W.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),G(n,{code:W.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),G(n,{code:W.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?Xh(r).test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{code:W.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?qh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{code:W.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?Yh(r).test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{code:W.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Ih.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`duration`,code:W.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?Zh(e.data,r.version)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`ip`,code:W.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?Qh(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`jwt`,code:W.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?$h(e.data,r.version)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`cidr`,code:W.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Wh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`base64`,code:W.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?Gh.test(e.data)||(n=this._getOrReturnCtx(e,n),G(n,{validation:`base64url`,code:W.invalid_string,message:r.message}),t.dirty()):ph.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:W.invalid_string,...q.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...q.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...q.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...q.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...q.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...q.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...q.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...q.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...q.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...q.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...q.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...q.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...q.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...q.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...q.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...q.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...q.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...q.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...q.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...q.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...q.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...q.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...q.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...q.errToObj(t)})}nonempty(e){return this.min(1,q.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};eg.create=e=>new eg({checks:[],typeName:X.ZodString,coerce:e?.coerce??!1,...J(e)});function tg(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var ng=class e extends Y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==U.number){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.number,received:t.parsedType}),K}let t,n=new xh;for(let r of this._def.checks)r.kind===`int`?ph.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),G(t,{code:W.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),G(t,{code:W.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),G(t,{code:W.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?tg(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),G(t,{code:W.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),G(t,{code:W.not_finite,message:r.message}),n.dirty()):ph.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,q.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,q.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,q.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,q.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:q.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:q.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:q.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:q.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:q.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:q.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:q.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&ph.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};ng.create=e=>new ng({checks:[],typeName:X.ZodNumber,coerce:e?.coerce||!1,...J(e)});var rg=class e extends Y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==U.bigint)return this._getInvalidInput(e);let t,n=new xh;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),G(t,{code:W.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),G(t,{code:W.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),G(t,{code:W.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):ph.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.bigint,received:t.parsedType}),K}gte(e,t){return this.setLimit(`min`,e,!0,q.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,q.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,q.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,q.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:q.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:q.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:q.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};rg.create=e=>new rg({checks:[],typeName:X.ZodBigInt,coerce:e?.coerce??!1,...J(e)});var ig=class extends Y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==U.boolean){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.boolean,received:t.parsedType}),K}return Ch(e.data)}};ig.create=e=>new ig({typeName:X.ZodBoolean,coerce:e?.coerce||!1,...J(e)});var ag=class e extends Y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==U.date){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.date,received:t.parsedType}),K}if(Number.isNaN(e.data.getTime()))return G(this._getOrReturnCtx(e),{code:W.invalid_date}),K;let t=new xh,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),G(n,{code:W.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),G(n,{code:W.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):ph.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:q.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:q.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};ag.create=e=>new ag({checks:[],coerce:e?.coerce||!1,typeName:X.ZodDate,...J(e)});var og=class extends Y{_parse(e){if(this._getType(e)!==U.symbol){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.symbol,received:t.parsedType}),K}return Ch(e.data)}};og.create=e=>new og({typeName:X.ZodSymbol,...J(e)});var sg=class extends Y{_parse(e){if(this._getType(e)!==U.undefined){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.undefined,received:t.parsedType}),K}return Ch(e.data)}};sg.create=e=>new sg({typeName:X.ZodUndefined,...J(e)});var cg=class extends Y{_parse(e){if(this._getType(e)!==U.null){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.null,received:t.parsedType}),K}return Ch(e.data)}};cg.create=e=>new cg({typeName:X.ZodNull,...J(e)});var lg=class extends Y{constructor(){super(...arguments),this._any=!0}_parse(e){return Ch(e.data)}};lg.create=e=>new lg({typeName:X.ZodAny,...J(e)});var ug=class extends Y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ch(e.data)}};ug.create=e=>new ug({typeName:X.ZodUnknown,...J(e)});var dg=class extends Y{_parse(e){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.never,received:t.parsedType}),K}};dg.create=e=>new dg({typeName:X.ZodNever,...J(e)});var fg=class extends Y{_parse(e){if(this._getType(e)!==U.undefined){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.void,received:t.parsedType}),K}return Ch(e.data)}};fg.create=e=>new fg({typeName:X.ZodVoid,...J(e)});var pg=class e extends Y{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==U.array)return G(t,{code:W.invalid_type,expected:U.array,received:t.parsedType}),K;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(G(t,{code:e?W.too_big:W.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(G(t,{code:W.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(G(t,{code:W.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Oh(t,e,t.path,n)))).then(e=>xh.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Oh(t,e,t.path,n)));return xh.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:q.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:q.toString(n)}})}nonempty(e){return this.min(1,e)}};pg.create=(e,t)=>new pg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:X.ZodArray,...J(t)});function mg(e){if(e instanceof hg){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Ng.create(mg(r))}return new hg({...e._def,shape:()=>t})}else if(e instanceof pg)return new pg({...e._def,type:mg(e.element)});else if(e instanceof Ng)return Ng.create(mg(e.unwrap()));else if(e instanceof Pg)return Pg.create(mg(e.unwrap()));else if(e instanceof xg)return xg.create(e.items.map(e=>mg(e)));else return e}var hg=class e extends Y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=ph.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==U.object){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.object,received:t.parsedType}),K}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof dg&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Oh(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof dg){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(G(n,{code:W.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Oh(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>xh.mergeObjectSync(t,e)):xh.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:q.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:X.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of ph.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of ph.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return mg(this)}partial(t){let n={};for(let e of ph.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of ph.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Ng;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return Og(ph.objectKeys(this.shape))}};hg.create=(e,t)=>new hg({shape:()=>e,unknownKeys:`strip`,catchall:dg.create(),typeName:X.ZodObject,...J(t)}),hg.strictCreate=(e,t)=>new hg({shape:()=>e,unknownKeys:`strict`,catchall:dg.create(),typeName:X.ZodObject,...J(t)}),hg.lazycreate=(e,t)=>new hg({shape:e,unknownKeys:`strip`,catchall:dg.create(),typeName:X.ZodObject,...J(t)});var gg=class extends Y{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new gh(e.ctx.common.issues));return G(t,{code:W.invalid_union,unionErrors:n}),K}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new gh(e));return G(t,{code:W.invalid_union,unionErrors:i}),K}}get options(){return this._def.options}};gg.create=(e,t)=>new gg({options:e,typeName:X.ZodUnion,...J(t)});var _g=e=>e instanceof Eg?_g(e.schema):e instanceof Mg?_g(e.innerType()):e instanceof Dg?[e.value]:e instanceof kg?e.options:e instanceof Ag?ph.objectValues(e.enum):e instanceof Fg?_g(e._def.innerType):e instanceof sg?[void 0]:e instanceof cg?[null]:e instanceof Ng?[void 0,..._g(e.unwrap())]:e instanceof Pg?[null,..._g(e.unwrap())]:e instanceof Rg||e instanceof Bg?_g(e.unwrap()):e instanceof Ig?_g(e._def.innerType):[],vg=class e extends Y{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==U.object)return G(t,{code:W.invalid_type,expected:U.object,received:t.parsedType}),K;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(G(t,{code:W.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),K)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=_g(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:X.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...J(r)})}};function yg(e,t){let n=hh(e),r=hh(t);if(e===t)return{valid:!0,data:e};if(n===U.object&&r===U.object){let n=ph.objectKeys(t),r=ph.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=yg(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===U.array&&r===U.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=yg(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===U.date&&r===U.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var bg=class extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(wh(e)||wh(r))return K;let i=yg(e.value,r.value);return i.valid?((Th(e)||Th(r))&&t.dirty(),{status:t.value,value:i.data}):(G(n,{code:W.invalid_intersection_types}),K)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};bg.create=(e,t,n)=>new bg({left:e,right:t,typeName:X.ZodIntersection,...J(n)});var xg=class e extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==U.array)return G(n,{code:W.invalid_type,expected:U.array,received:n.parsedType}),K;if(n.data.length<this._def.items.length)return G(n,{code:W.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),K;!this._def.rest&&n.data.length>this._def.items.length&&(G(n,{code:W.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Oh(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>xh.mergeArray(t,e)):xh.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};xg.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new xg({items:e,typeName:X.ZodTuple,rest:null,...J(t)})};var Sg=class e extends Y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==U.object)return G(n,{code:W.invalid_type,expected:U.object,received:n.parsedType}),K;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Oh(n,e,n.path,e)),value:a._parse(new Oh(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?xh.mergeObjectAsync(t,r):xh.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Y?new e({keyType:t,valueType:n,typeName:X.ZodRecord,...J(r)}):new e({keyType:eg.create(),valueType:t,typeName:X.ZodRecord,...J(n)})}},Cg=class extends Y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==U.map)return G(n,{code:W.invalid_type,expected:U.map,received:n.parsedType}),K;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Oh(n,e,n.path,[a,`key`])),value:i._parse(new Oh(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return K;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return K;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};Cg.create=(e,t,n)=>new Cg({valueType:t,keyType:e,typeName:X.ZodMap,...J(n)});var wg=class e extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==U.set)return G(n,{code:W.invalid_type,expected:U.set,received:n.parsedType}),K;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(G(n,{code:W.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(G(n,{code:W.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return K;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Oh(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:q.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};wg.create=(e,t)=>new wg({valueType:e,minSize:null,maxSize:null,typeName:X.ZodSet,...J(t)});var Tg=class e extends Y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==U.function)return G(t,{code:W.invalid_type,expected:U.function,received:t.parsedType}),K;function n(e,n){return bh({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,yh(),_h].filter(e=>!!e),issueData:{code:W.invalid_arguments,argumentsError:n}})}function r(e,n){return bh({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,yh(),_h].filter(e=>!!e),issueData:{code:W.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof jg){let e=this;return Ch(async function(...t){let o=new gh([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return Ch(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new gh([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new gh([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:xg.create(t).rest(ug.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||xg.create([]).rest(ug.create()),returns:n||ug.create(),typeName:X.ZodFunction,...J(r)})}},Eg=class extends Y{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};Eg.create=(e,t)=>new Eg({getter:e,typeName:X.ZodLazy,...J(t)});var Dg=class extends Y{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return G(t,{received:t.data,code:W.invalid_literal,expected:this._def.value}),K}return{status:`valid`,value:e.data}}get value(){return this._def.value}};Dg.create=(e,t)=>new Dg({value:e,typeName:X.ZodLiteral,...J(t)});function Og(e,t){return new kg({values:e,typeName:X.ZodEnum,...J(t)})}var kg=class e extends Y{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return G(t,{expected:ph.joinValues(n),received:t.parsedType,code:W.invalid_type}),K}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return G(t,{received:t.data,code:W.invalid_enum_value,options:n}),K}return Ch(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};kg.create=Og;var Ag=class extends Y{_parse(e){let t=ph.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==U.string&&n.parsedType!==U.number){let e=ph.objectValues(t);return G(n,{expected:ph.joinValues(e),received:n.parsedType,code:W.invalid_type}),K}if(this._cache||=new Set(ph.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=ph.objectValues(t);return G(n,{received:n.data,code:W.invalid_enum_value,options:e}),K}return Ch(e.data)}get enum(){return this._def.values}};Ag.create=(e,t)=>new Ag({values:e,typeName:X.ZodNativeEnum,...J(t)});var jg=class extends Y{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==U.promise&&t.common.async===!1?(G(t,{code:W.invalid_type,expected:U.promise,received:t.parsedType}),K):Ch((t.parsedType===U.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};jg.create=(e,t)=>new jg({type:e,typeName:X.ZodPromise,...J(t)});var Mg=class extends Y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===X.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{G(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return K;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?K:r.status===`dirty`||t.value===`dirty`?Sh(r.value):r});{if(t.value===`aborted`)return K;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?K:r.status===`dirty`||t.value===`dirty`?Sh(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?K:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?K:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Eh(e))return K;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Eh(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):K);ph.assertNever(r)}};
vendor: 4,464 bytes, line 22
22Mg.create=(e,t,n)=>new Mg({schema:e,typeName:X.ZodEffects,effect:t,...J(n)}),Mg.createWithPreprocess=(e,t,n)=>new Mg({schema:t,effect:{type:`preprocess`,transform:e},typeName:X.ZodEffects,...J(n)});var Ng=class extends Y{_parse(e){return this._getType(e)===U.undefined?Ch(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ng.create=(e,t)=>new Ng({innerType:e,typeName:X.ZodOptional,...J(t)});var Pg=class extends Y{_parse(e){return this._getType(e)===U.null?Ch(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Pg.create=(e,t)=>new Pg({innerType:e,typeName:X.ZodNullable,...J(t)});var Fg=class extends Y{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===U.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Fg.create=(e,t)=>new Fg({innerType:e,typeName:X.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...J(t)});var Ig=class extends Y{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Dh(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new gh(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new gh(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ig.create=(e,t)=>new Ig({innerType:e,typeName:X.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...J(t)});var Lg=class extends Y{_parse(e){if(this._getType(e)!==U.nan){let t=this._getOrReturnCtx(e);return G(t,{code:W.invalid_type,expected:U.nan,received:t.parsedType}),K}return{status:`valid`,value:e.data}}};Lg.create=e=>new Lg({typeName:X.ZodNaN,...J(e)});var Rg=class extends Y{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},zg=class e extends Y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?K:e.status===`dirty`?(t.dirty(),Sh(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?K:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:X.ZodPipeline})}},Bg=class extends Y{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Eh(e)&&(e.value=Object.freeze(e.value)),e);return Dh(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Bg.create=(e,t)=>new Bg({innerType:e,typeName:X.ZodReadonly,...J(t)}),hg.lazycreate;var X;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(X||={});var Vg=eg.create;ng.create,Lg.create,rg.create,ig.create,ag.create,og.create,sg.create,cg.create,lg.create,ug.create,dg.create,fg.create,pg.create;var Hg=hg.create;hg.strictCreate,gg.create,vg.create,bg.create,xg.create,Sg.create,Cg.create,wg.create,Tg.create,Eg.create;var Ug=Dg.create,Wg=kg.create;Ag.create,jg.create,Mg.create,Ng.create,Pg.create,Mg.createWithPreprocess,zg.create;var Gg=`https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit`,Kg=null;function qg(){return typeof window>`u`||window.turnstile?Promise.resolve():Kg||(Kg=new Promise((e,t)=>
22{let n=document.createElement(`script`);n.src=Gg,n.async=!0,n.defer=!0,n.onload=()=>e(),n.onerror=()=>t(Error(`turnstile script failed to load`)),document.head.appendChild(n)}),Kg)}var Jg=null;function Yg(){return Jg||=fetch(`/api/public/turnstile-config`).then(e=>e.json()).then(e=>e.siteKey??null).catch(()=>null),Jg}var Xg=12e4,Zg=12e3;function Qg({onToken:e,handleRef:t}){let n=(0,N.useRef)(null),r=(0,N.useRef)(null),i=(0,N.useRef)(null),a=(0,N.useRef)([]),o=(0,N.useRef)(e);o.current=e;let[s,c]=(0,N.useState)(null),l=(0,N.useMemo)(()=>({reset:()=>{if(i.current=null,o.current?.(null),r.current&&window.turnstile)try{window.turnstile.reset(r.current)}catch{}},getToken:()=>{let e=i.current;if(e&&Date.now()-e.issuedAt<Xg)return Promise.resolve(e.token);if(i.current=null,!r.current||!window.turnstile)return Promise.resolve(null);try{window.turnstile.reset(r.current)}catch{return Promise.resolve(null)}return new Promise(e=>{let t=!1,n=n=>{t||(t=!0,e(n))};a.current.push(n),window.setTimeout(()=>n(null),Zg)})}}),[]);return(0,N.useEffect)(()=>(t&&(t.current=l),()=>{t&&(t.current=null)}),[l,t]),(0,N.useEffect)(()=>{let e=!1;return Yg().then(t=>{e||c(t)}),()=>{e=!0}},[]),(0,N.useEffect)(()=>{if(!s||!n.current)return;let e=!1,t=e=>{let t=a.current;a.current=[];for(let n of t)n(e)};return qg().then(()=>{e||!n.current||!window.turnstile||(r.current=window.turnstile.render(n.current,{sitekey:s,theme:`light`,callback:e=>{i.current={token:e,issuedAt:Date.now()},o.current?.(e),t(e)},"error-callback":()=>{i.current=null,o.current?.(null),t(null)},"expired-callback":()=>{i.current=null,o.current?.(null),t(null)}}))}).catch(()=>{i.current=null,o.current?.(null),t(null)}),()=>{if(e=!0,t(null),r.current&&window.turnstile)try{window.turnstile.remove(r.current)}catch{}}},[s]),s?(0,P.jsx)(`div`,{ref:n,className:`mt-2`}):null}var $g=Hg({name:Vg().trim().min(1,`Required`).max(120),email:Vg().trim().email(`Enter a valid email`).max(255)});function e_({idPrefix:e}){let[t,n]=(0,N.useState)({}),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(null),l=(0,N.useRef)(null);async function u(e){if(e.preventDefault(),r)return;c(null);let t=new FormData(e.currentTarget),a=$g.safeParse({name:String(t.get(`name`)||``).trim(),email:String(t.get(`email`)||``).trim()});if(!a.success){let e={};for(let t of a.error.issues){let n=t.path[0]?.toString()??`form`;e[n]||(e[n]=t.message)}n(e);return}n({}),i(!0);try{let e=await l.current?.getToken()??null;if(!e){c(`Please complete the verification and try again.`);return}let n=await fetch(`/api/public/newsletter`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({...a.data,consent:!0,website:String(t.get(`website`)||``),sourceUrl:typeof window<`u`?window.location.href:void 0,turnstileToken:e})}),r=await n.json().catch(()=>({}));if(!n.ok||!r.ok){l.current?.reset(),c(r.error===`captcha_failed`?`Please complete the verification and try again.`:r.error===`disposable_email`?`Please use a permanent email address.`:r.error===`rate_limited`?`Too many signups from this network. Please try again later.`:`Something went wrong. Please try again shortly.`);return}r.state===`already_confirmed`?o(`existing`):o(r.confirmationEmailSent?`pending`:`pending-no-email`)}catch{c(`Network error. Please try again.`)}finally{i(!1)}}return a?(0,P.jsx)(`p`,{role:`status`,className:`font-serif text-xl italic text-ink leading-snug`,children:a===`existing`?`You are on the list. Thank you.`:a===`pending`?`Check your inbox: confirm your address to complete the signup.`:`Your details are recorded. We will follow up directly.`}):(0,P.jsxs)(`form`,{onSubmit:u,className:`space-y-5`,noValidate:!0,children:[(0,P.jsxs)(`div`,{className:`grid gap-5 sm:grid-cols-2`,children:[(0,P.jsx)(t_,{id:`${e}-name`,name:`name`,label:`Name`,error:t.name}),(0,P.jsx)(t_,{id:`${e}-email`,name:`email`,label:`Email`,type:`email`,error:t.email})]}),(0,P.jsx)(`div`,{"aria-hidden":!0,className:`absolute left-[-9999px] top-auto h-px w-px overflow-hidden`,children:(0,P.jsxs)(`label`,{children:[`Website`,(0,P.jsx)(`input`,{type:`text`,name:`website`,tabIndex:-1,autoComplete:`off`})]})}),(0,P.jsx)(Qg,{handleRef:l}),s&&(0,P.jsx)(`div`,{role:`alert`,className:`text-sm text-[color:var(--destructive)]`,children:s}),(0,P.jsxs)(`button`,{type:`submit`,disabled:r,"aria-busy":r,className:`group inline-flex items-baseline gap-3 border-b border-ink pb-2 font-mono text-sm uppercase tracking-[0.2em] text-ink hover:text-primary hover:border-primary transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:[r?`Sending`:`Subscribe`,(0,P.jsx)(`span`,{"aria-hidden":!0,
22className:`transition-transform group-hover:translate-x-1`,children:`→`})]})]})}function t_({id:e,name:t,label:n,type:r=`text`,error:i}){return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`label`,{htmlFor:e,className:`block eyebrow mb-2`,children:[n,(0,P.jsx)(`span`,{"aria-hidden":!0,children:` *`})]}),(0,P.jsx)(`input`,{id:e,name:t,type:r,autoComplete:r===`email`?`email`:`name`,"aria-invalid":i?!0:void 0,className:`block w-full bg-transparent border-0 border-b hairline text-ink pt-2 pb-2 focus:outline-none focus:border-ink transition-colors`}),i&&(0,P.jsx)(`div`,{className:`mt-2 text-sm text-[color:var(--destructive)]`,children:i})]})}typeof window<`u`&&window.document&&window.document.createElement;function n_(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function r_(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function i_(...e){return t=>{let n=!1,r=e.map(e=>{let r=r_(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():r_(e[t],null)}}}}function a_(...e){return N.useCallback(i_(...e),e)}function o_(e,t){let n=N.createContext(t),r=e=>{let{children:t,...r}=e,i=N.useMemo(()=>r,Object.values(r));return(0,P.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=N.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function s_(e,t=[]){let n=[];function r(t,r){let i=N.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=N.useMemo(()=>o,Object.values(o));return(0,P.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=N.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>N.createContext(e));return function(n){let r=n?.[e]||t;return N.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,c_(i,...t)]}function c_(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var l_=globalThis?.document?N.useLayoutEffect:()=>{},u_=N.useId||(()=>void 0),d_=0;function f_(e){let[t,n]=N.useState(u_());return l_(()=>{e||n(e=>e??String(d_++))},[e]),e||(t?`radix-${t}`:``)}var p_=N.useInsertionEffect||l_;function m_({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=h_({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=N.useRef(e!==void 0);N.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,N.useCallback(t=>{if(s){let n=g_(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function h_({defaultProp:e,onChange:t}){let[n,r]=N.useState(e),i=N.useRef(n),a=N.useRef(t);return p_(()=>{a.current=t},[t]),N.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function g_(e){return typeof e==`function`}function __(e){let t=v_(e),n=N.forwardRef((e,n)=>{let{children:r,...i}=e,a=N.Children.toArray(r),o=a.find(b_);if(o){let e=o.props.children,r=a.map(t=>t===o?N.Children.count(e)>1?N.Children.only(null):N.isValidElement(e)?e.props.children:null:t);return(0,P.jsx)(t,{...i,ref:n,children:N.isValidElement(e)?N.cloneElement(e,void 0,r):null})}return(0,P.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function v_(e){let t=N.forwardRef((e,t)=>{let{children:n,...r}=e;if(N.isValidElement(n)){let e=S_(n),i=x_(r,n.props);return n.type!==N.Fragment&&(i.ref=t?i_(t,e):e),N.cloneElement(n,i)}return N.Children.count(n)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y_=Symbol(`radix.slottable`);function b_(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===y_}function x_(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}
vendor: 19,038 bytes, lines 22-62
22:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function S_(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var C_=t(y(),1),w_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=__(`Primitive.${t}`),r=N.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,P.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function T_(e,t){e&&C_.flushSync(()=>e.dispatchEvent(t))}function E_(e){let t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>(...e)=>t.current?.(...e),[])}function D_(e,t=globalThis?.document){let n=E_(e);N.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var O_=`DismissableLayer`,k_=`dismissableLayer.update`,A_=`dismissableLayer.pointerDownOutside`,j_=`dismissableLayer.focusOutside`,M_,N_=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P_=N.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=N.useContext(N_),[u,d]=N.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=N.useState({}),m=a_(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=L_(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=R_(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return D_(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),N.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(M_=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),z_(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=M_)}},[u,f,n,l]),N.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),z_())},[u,l]),N.useEffect(()=>{let e=()=>p({});return document.addEventListener(k_,e),()=>document.removeEventListener(k_,e)},[]),(0,P.jsx)(w_.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:n_(e.onFocusCapture,S.onFocusCapture),onBlurCapture:n_(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:n_(e.onPointerDownCapture,x.onPointerDownCapture)})});P_.displayName=O_;var F_=`DismissableLayerBranch`,I_=N.forwardRef((e,t)=>{let n=N.useContext(N_),r=N.useRef(null),i=a_(t,r);return N.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,P.jsx)(w_.div,{...e,ref:i})});I_.displayName=F_;function L_(e,t=globalThis?.document){let n=E_(e),r=N.useRef(!1),i=N.useRef(()=>{});return N.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){B_(A_,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function R_(e,t=globalThis?.document){let n=E_(e),r=N.useRef(!1);return N.useEffect(()=>{let e=e=>{e.target&&!r.current&&B_(j_,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function z_(){let e=new CustomEvent(k_);document.dispatchEvent(e)}function B_(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?T_(i,a):i.dispatchEvent(a)}var V_=`focusScope.autoFocusOnMount`,H_=`focusScope.autoFocusOnUnmount`,U_={bubbles:!1,cancelable:!0},W_=`FocusScope`,G_=N.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=N.useState(null),l=E_(i),u=E_(a),d=N.useRef(null),f=a_(t,e=>c(e)),p=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Q_(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Q_(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Q_(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),N.useEffect(()=>{if(s){$_.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(V_,U_);s.addEventListener(V_,l),s.dispatchEvent(t),t.defaultPrevented||(K_(nv(J_(s)),{select:!0}),document.activeElement===e&&Q_(s))}return()=>{s.removeEventListener(V_,l),setTimeout(()=>{let t=new CustomEvent(H_,U_);s.addEventListener(H_,u),s.dispatchEvent(t),t.defaultPrevented||Q_(e??document.body,{select:!0}),s.removeEventListener(H_,u),$_.remove(p)},0)}}},[s,l,u,p]);let m=N.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=q_(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Q_(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Q_(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,P.jsx)(w_.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});G_.displayName=W_;function K_(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Q_(r,{select:t}),document.activeElement!==n)return}function q_(e){let t=J_(e);return[Y_(t,e),Y_(t.reverse(),e)]}function J_(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Y_(e,t){for(let n of e)if(!X_(n,{upTo:t}))return n}function X_(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Z_(e){return e instanceof HTMLInputElement&&`select`in e}function Q_(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Z_(e)&&t&&e.select()}}var $_=ev();function ev(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=tv(e,t),e.unshift(t)},remove(t){e=tv(e,t),e[0]?.resume()}}}function tv(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nv(e){return e.filter(e=>e.tagName!==`A`)}var rv=`Portal`,iv=N.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=N.useState(!1);l_(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?C_.createPortal((0,P.jsx)(w_.div,{...r,ref:t}),o):null});iv.displayName=rv;function av(e,t){return N.useReducer((e,n)=>t[e][n]??e,e)}var ov=e=>{let{present:t,children:n}=e,r=sv(t),i=typeof n==`function`?n({present:r.isPresent}):N.Children.only(n),a=a_(r.ref,lv(i));return typeof n==`function`||r.isPresent?N.cloneElement(i,{ref:a}):null};ov.displayName=`Presence`;function sv(e){let[t,n]=N.useState(),r=N.useRef(null),i=N.useRef(e),a=N.useRef(`none`),[o,s]=av(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return N.useEffect(()=>{let e=cv(r.current);a.current=o===`mounted`?e:`none`},[o]),l_(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=cv(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),l_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=cv(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=cv(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:N.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function cv(e){return e?.animationName||`none`}function lv(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uv=0;function dv(){N.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??fv()),document.body.insertAdjacentElement(`beforeend`,e[1]??fv()),uv++,()=>{uv===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),uv--}},[])}function fv(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var pv=`right-scroll-bar-position`,mv=`width-before-scroll-bar`,hv=`with-scroll-bars-hidden`,gv=`--removed-body-scroll-bar-size`;function _v(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function vv(e,t){var n=(0,N.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var yv=typeof window<`u`?N.useLayoutEffect:N.useEffect,bv=new WeakMap;function xv(e,t){var n=vv(t||null,function(t){return e.forEach(function(e){return _v(e,t)})});return yv(function(){var t=bv.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||_v(e,null)}),i.forEach(function(e){r.has(e)||_v(e,a)})}bv.set(n,e)},[e]),n}function Sv(e){return e}function Cv(e,t){t===void 0&&(t=Sv);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function wv(e){e===void 0&&(e={});var t=Cv(null);return t.options=rc({async:!0,ssr:!1},e),t}var Tv=function(e){var t=e.sideCar,n=ic(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return N.createElement(r,rc({},n))};Tv.isSideCarExport=!0;function Ev(e,t){return e.useMedium(t),Tv}var Dv=wv(),Ov=function(){},kv=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:Ov,onWheelCapture:Ov,onTouchMoveCapture:Ov}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=ic(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=xv([n,t]),ee=rc(rc({},b),i);return N.createElement(N.Fragment,null,u&&N.createElement(x,{sideCar:Dv,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?N.cloneElement(N.Children.only(s),rc(rc({},ee),{ref:S})):N.createElement(v,rc({},ee,{className:c,ref:S}),s))});kv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},kv.classNames={fullWidth:mv,zeroRight:pv};var Av,jv=function(){if(Av)return Av;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Mv(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=jv();return t&&e.setAttribute(`nonce`,t),e}function Nv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pv(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Fv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mv())&&(Nv(t,n),Pv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Iv=function(){var e=Fv();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Lv=function(){var e=Iv();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Rv={left:0,top:0,right:0,gap:0},zv=function(e){return parseInt(e||``,10)||0},Bv=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[zv(n),zv(r),zv(i)]},Vv=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Rv;var t=Bv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hv=Lv(),Uv=`data-scroll-locked`,Wv=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
23  .${hv} {
24   overflow: hidden ${r};
25   padding-right: ${s}px ${r};
26  }
27  body[${Uv}] {
28    overflow: hidden ${r};
29    overscroll-behavior: contain;
30    ${[t&&`position: relative ${r};`,n===`margin`&&`
31    padding-left: ${i}px;
32    padding-top: ${a}px;
33    padding-right: ${o}px;
34    margin-left:0;
35    margin-top:0;
36    margin-right: ${s}px ${r};
37    `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
38  }
39  
40  .${pv} {
41    right: ${s}px ${r};
42  }
43  
44  .${mv} {
45    margin-right: ${s}px ${r};
46  }
47  
48  .${pv} .${pv} {
49    right: 0 ${r};
50  }
51  
52  .${mv} .${mv} {
53    margin-right: 0 ${r};
54  }
55  
56  body[${Uv}] {
57    ${gv}: ${s}px;
58  }
59`},Gv=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Kv=function(){N.useEffect(function(){return document.body.setAttribute(Uv,(Gv()+1).toString()),function(){var e=Gv()-1;e<=0?document.body.removeAttribute(Uv):document.body.setAttribute(Uv,e.toString())}},[])},qv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Kv();var a=N.useMemo(function(){return Vv(i)},[i]);return N.createElement(Hv,{styles:Wv(a,!t,i,n?``:`!important`)})},Jv=!1;if(typeof window<`u`)try{var Yv=Object.defineProperty({},"passive",{get:function(){return Jv=!0,!0}});window.addEventListener(`test`,Yv,Yv),window.removeEventListener(`test`,Yv,Yv)}catch{Jv=!1}var Xv=Jv?{passive:!1}:!1,Zv=function(e){return e.tagName===`TEXTAREA`},Qv=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Zv(e)&&n[t]===`visible`)},$v=function(e){return Qv(e,`overflowY`)},ey=function(e){return Qv(e,`overflowX`)},ty=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),iy(e,r)){var i=ay(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ny=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ry=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},iy=function(e,t){return e===`v`?$v(t):ey(t)},ay=function(e,t){return e===`v`?ny(t):ry(t)},oy=function(e,t){return e===`h`&&t===`rtl`?-1:1},sy=function(e,t,n,r,i){var a=oy(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=ay(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&iy(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},cy=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ly=function(e){return[e.deltaX,e.deltaY]},uy=function(e){return e&&`current`in e?e.current:e},dy=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fy=function(e){return`
60  .block-interactivity-${e} {pointer-events: none;}
61  .allow-interactivity-${e} {pointer-events: all;}
62`},py=0,my=[];function hy(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(py++)[0],a=N.useState(Lv)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=oc([e.lockRef.current],(e.shards||[]).map(uy),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=N.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=cy(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ty(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ty(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return sy(h,t,e,h===`h`?s:c,!0)},[]),c=N.useCallback(function(e){var n=e;if(!(!my.length||my[my.length-1]!==a)){var r=`deltaY`in n?ly(n):cy(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&dy(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
vendor: 4,797 bytes, line 62
62if(!i){var c=(o.current.shards||[]).map(uy).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=N.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:gy(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=N.useCallback(function(e){n.current=cy(e),r.current=void 0},[]),d=N.useCallback(function(t){l(t.type,ly(t),t.target,s(t,e.lockRef.current))},[]),f=N.useCallback(function(t){l(t.type,cy(t),t.target,s(t,e.lockRef.current))},[]);N.useEffect(function(){return my.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Xv),document.addEventListener(`touchmove`,c,Xv),document.addEventListener(`touchstart`,u,Xv),function(){my=my.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Xv),document.removeEventListener(`touchmove`,c,Xv),document.removeEventListener(`touchstart`,u,Xv)}},[]);var p=e.removeScrollBar,m=e.inert;return N.createElement(N.Fragment,null,m?N.createElement(a,{styles:fy(i)}):null,p?N.createElement(qv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gy(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var _y=Ev(Dv,hy),vy=N.forwardRef(function(e,t){return N.createElement(kv,rc({},e,{ref:t,sideCar:_y}))});vy.classNames=kv.classNames;var yy=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},by=new WeakMap,xy=new WeakMap,Sy={},Cy=0,wy=function(e){return e&&(e.host||wy(e.parentNode))},Ty=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=wy(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ey=function(e,t,n,r){var i=Ty(t,Array.isArray(e)?e:[e]);Sy[n]||(Sy[n]=new WeakMap);var a=Sy[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(by.get(e)||0)+1,l=(a.get(e)||0)+1;by.set(e,c),a.set(e,l),o.push(e),c===1&&i&&xy.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Cy++,function(){o.forEach(function(e){var t=by.get(e)-1,i=a.get(e)-1;by.set(e,t),a.set(e,i),t||(xy.has(e)||e.removeAttribute(r),xy.delete(e)),i||e.removeAttribute(n)}),Cy--,Cy||(by=new WeakMap,by=new WeakMap,xy=new WeakMap,Sy={})}},Dy=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||yy(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ey(r,i,n,`aria-hidden`)):function(){return null}};function Oy(e){let t=ky(e),n=N.forwardRef((e,n)=>{let{children:r,...i}=e,a=N.Children.toArray(r),o=a.find(jy);if(o){let e=o.props.children,r=a.map(t=>t===o?N.Children.count(e)>1?N.Children.only(null):N.isValidElement(e)?e.props.children:null:t);return(0,P.jsx)(t,{...i,ref:n,children:N.isValidElement(e)?N.cloneElement(e,void 0,r):null})}return(0,P.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ky(e){let t=N.forwardRef((e,t)=>{let{children:n,...r}=e;if(N.isValidElement(n)){let e=Ny(n),i=My(r,n.props);return n.type!==N.Fragment&&(i.ref=t?i_(t,e):e),N.cloneElement(n,i)}return N.Children.count(n)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ay=Symbol(`radix.slottable`);function jy(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ay}function My(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Ny(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Py=`Dialog`,[Fy,Iy]=s_(Py),[Ly,Ry]=Fy(Py),zy=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=N.useRef(null),c=N.useRef(null),[l,u]=m_({prop:r,defaultProp:i??!1,onChange:a,caller:Py});return(0,P.jsx)(Ly,{scope:t,triggerRef:s,contentRef:c,contentId:f_(),titleId:f_(),descriptionId:f_(),open:l,onOpenChange:u,onOpenToggle:N.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};zy.displayName=Py;var By=`DialogTrigger`,Vy=N.forwardRef((e,t)=>
62{let{__scopeDialog:n,...r}=e,i=Ry(By,n),a=a_(t,i.triggerRef);return(0,P.jsx)(w_.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":sb(i.open),...r,ref:a,onClick:n_(e.onClick,i.onOpenToggle)})});Vy.displayName=By;var Hy=`DialogPortal`,[Uy,Wy]=Fy(Hy,{forceMount:void 0}),Gy=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Ry(Hy,t);return(0,P.jsx)(Uy,{scope:t,forceMount:n,children:N.Children.map(r,e=>(0,P.jsx)(ov,{present:n||a.open,children:(0,P.jsx)(iv,{asChild:!0,container:i,children:e})}))})};Gy.displayName=Hy;var Ky=`DialogOverlay`,qy=N.forwardRef((e,t)=>{let n=Wy(Ky,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ry(Ky,e.__scopeDialog);return a.modal?(0,P.jsx)(ov,{present:r||a.open,children:(0,P.jsx)(Yy,{...i,ref:t})}):null});qy.displayName=Ky;var Jy=Oy(`DialogOverlay.RemoveScroll`),Yy=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ry(Ky,n);return(0,P.jsx)(vy,{as:Jy,allowPinchZoom:!0,shards:[i.contentRef],children:(0,P.jsx)(w_.div,{"data-state":sb(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Xy=`DialogContent`,Zy=N.forwardRef((e,t)=>{let n=Wy(Xy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Ry(Xy,e.__scopeDialog);return(0,P.jsx)(ov,{present:r||a.open,children:a.modal?(0,P.jsx)(Qy,{...i,ref:t}):(0,P.jsx)($y,{...i,ref:t})})});Zy.displayName=Xy;var Qy=N.forwardRef((e,t)=>{let n=Ry(Xy,e.__scopeDialog),r=N.useRef(null),i=a_(t,n.contentRef,r);return N.useEffect(()=>{let e=r.current;if(e)return Dy(e)},[]),(0,P.jsx)(eb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:n_(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:n_(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:n_(e.onFocusOutside,e=>e.preventDefault())})}),$y=N.forwardRef((e,t)=>{let n=Ry(Xy,e.__scopeDialog),r=N.useRef(!1),i=N.useRef(!1);return(0,P.jsx)(eb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),eb=N.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Ry(Xy,n),c=N.useRef(null),l=a_(t,c);return dv(),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(G_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(P_,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":sb(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(db,{titleId:s.titleId}),(0,P.jsx)(pb,{contentRef:c,descriptionId:s.descriptionId})]})]})}),tb=`DialogTitle`,nb=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ry(tb,n);return(0,P.jsx)(w_.h2,{id:i.titleId,...r,ref:t})});nb.displayName=tb;var rb=`DialogDescription`,ib=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ry(rb,n);return(0,P.jsx)(w_.p,{id:i.descriptionId,...r,ref:t})});ib.displayName=rb;var ab=`DialogClose`,ob=N.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Ry(ab,n);return(0,P.jsx)(w_.button,{type:`button`,...r,ref:t,onClick:n_(e.onClick,()=>i.onOpenChange(!1))})});ob.displayName=ab;function sb(e){return e?`open`:`closed`}var cb=`DialogTitleWarning`,[lb,ub]=o_(cb,{contentName:Xy,titleName:tb,docsSlug:`dialog`}),db=({titleId:e})=>{let t=ub(cb),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
63
64If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
65
66For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return N.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fb=`DialogDescriptionWarning`,pb=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ub(fb).contentName}}.`;return N.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},mb=zy,hb=Vy,gb=Gy,_b=qy,vb=Zy,yb=nb,bb=ib,xb=ob;function Sb(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Sb(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Cb(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Sb(e))&&(r&&(r+=` `),r+=t);return r}var wb=(e,t)=>
vendor: 5,991 bytes, line 66
66{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Tb=(e,t)=>({classGroupId:e,validator:t}),Eb=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Db=`-`,Ob=[],kb=`arbitrary..`,Ab=e=>{let t=Nb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Mb(e);let n=e.split(Db);return jb(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?wb(i,t):t:i||Ob}return n[e]||Ob}}},jb=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=jb(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Db):e.slice(t).join(Db),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Mb=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?kb+r:void 0})(),Nb=e=>{let{theme:t,classGroups:n}=e;return Pb(n,t)},Pb=(e,t)=>{let n=Eb();for(let r in e){let i=e[r];Fb(i,n,r,t)}return n},Fb=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Ib(i,t,n,r)}},Ib=(e,t,n,r)=>{if(typeof e==`string`){Lb(e,t,n);return}if(typeof e==`function`){Rb(e,t,n,r);return}zb(e,t,n,r)},Lb=(e,t,n)=>{let r=e===``?t:Bb(t,e);r.classGroupId=n},Rb=(e,t,n,r)=>{if(Vb(e)){Fb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Tb(n,e))},zb=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Fb(o,Bb(t,a),n,r)}},Bb=(e,t)=>{let n=e,r=t.split(Db),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Eb(),n.nextPart.set(t,i)),n=i}return n},Vb=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Hb=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ub=`!`,Wb=`:`,Gb=[],Kb=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),qb=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Wb){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ub)?(c=s.slice(0,-1),l=!0):s.startsWith(Ub)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Kb(t,l,c,u)};if(t){let e=t+Wb,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Kb(Gb,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Jb=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Yb=e=>({cache:Hb(e.cacheSize),parseClassName:qb(e),sortModifiers:Jb(e),...Ab(e)}),Xb=/\s+/,Zb=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Xb),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Ub:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Qb=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=$b(n))&&(i&&(i+=` `),i+=r);return i},$b=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=$b(e[r]))&&(n&&(n+=` `),n+=t);return n},ex=(e,...t)=>{let n,r,i,a,o=o=>(n=Yb(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Zb(e,n);return i(e,a),a};return a=o,(...e)=>a(Qb(...e))},tx=[],nx=e=>{let t=t=>t[e]||tx;return t.isThemeGetter=!0,t},rx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ix=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ax=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ox=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sx=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ux=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dx=e=>ax.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),fx=e=>!!e&&Number.isInteger(Number(e)),px=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),mx=e=>ox.test(e),hx=()=>!0,gx=e=>sx.test(e)&&!cx.test(e),_x=()=>!1,vx=e=>lx.test(e),yx=e=>ux.test(e),bx=e=>!Q(e)&&!$(e),xx=e=>Ix(e,Bx,_x),Q=e=>rx.test(e),Sx=e=>Ix(e,Vx,gx),Cx=e=>Ix(e,Hx,Z),wx=e=>Ix(e,Wx,hx),Tx=e=>Ix(e,Ux,_x),Ex=e=>Ix(e,Rx,_x),Dx=e=>Ix(e,zx,yx),Ox=e=>Ix(e,Gx,vx),$=e=>ix.test(e),kx=e=>Lx(e,Vx),Ax=e=>Lx(e,Ux),jx=e=>Lx(e,Rx),Mx=e=>Lx(e,Bx),Nx=e=>Lx(e,zx),Px=e=>Lx(e,Gx,!0),Fx=e=>Lx(e,Wx,!0),Ix=(e,t,n)=>{let r=rx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Lx=(e,t,n=!1)=>{let r=ix.exec(e);return r?r[1]?t(r[1]):n:!1},Rx=e=>e===`position`||e===`percentage`,zx=e=>e===`image`||e===`url`,Bx=e=>e===`length`||e===`size`||e===`bg-size`,Vx=e=>e===`length`,Hx=e=>e===`number`,Ux=e=>e===`family-name`,Wx=e=>e===`number`||e===`weight`,Gx=e=>e===`shadow`,Kx=ex(()=>{let e=nx(`color`),t=nx(`font`),n=nx(`text`),r=nx(`font-weight`),i=nx(`tracking`),a=nx(`leading`),o=nx(`breakpoint`),s=nx(`container`),c=nx(`spacing`),l=nx(`radius`),u=nx(`shadow`),d=nx(`inset-shadow`),f=nx(`text-shadow`),p=nx(`drop-shadow`),m=nx(`blur`),h=nx(`perspective`),g=nx(`aspect`),_=nx(`ease`),v=nx(`animate`),y=()=>
vendor: 6,246 bytes, line 66
66[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],ee=()=>[`auto`,`contain`,`none`],C=()=>[$,Q,c],te=()=>[dx,`full`,`auto`,...C()],ne=()=>[fx,`none`,`subgrid`,$,Q],re=()=>[`auto`,{span:[`full`,fx,$,Q]},fx,$,Q],ie=()=>[fx,`auto`,$,Q],ae=()=>[`auto`,`min`,`max`,`fr`,$,Q],oe=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],se=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ce=()=>[`auto`,...C()],le=()=>[dx,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],ue=()=>[dx,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],w=()=>[dx,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],E=()=>[e,$,Q],de=()=>[...b(),jx,Ex,{position:[$,Q]}],fe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],pe=()=>[`auto`,`cover`,`contain`,Mx,xx,{size:[$,Q]}],me=()=>[px,kx,Sx],D=()=>[``,`none`,`full`,l,$,Q],O=()=>[``,Z,kx,Sx],he=()=>[`solid`,`dashed`,`dotted`,`double`],ge=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],_e=()=>[Z,px,jx,Ex],ve=()=>[``,`none`,m,$,Q],ye=()=>[`none`,Z,$,Q],be=()=>[`none`,Z,$,Q],xe=()=>[Z,$,Q],Se=()=>[dx,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[mx],breakpoint:[mx],color:[hx],container:[mx],"drop-shadow":[mx],ease:[`in`,`out`,`in-out`],font:[bx],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[mx],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[mx],shadow:[mx],spacing:[`px`,Z],text:[mx],"text-shadow":[mx],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,dx,Q,$,g]}],container:[`container`],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:te()}],"inset-x":[{"inset-x":te()}],"inset-y":[{"inset-y":te()}],start:[{"inset-s":te(),start:te()}],end:[{"inset-e":te(),end:te()}],"inset-bs":[{"inset-bs":te()}],"inset-be":[{"inset-be":te()}],top:[{top:te()}],right:[{right:te()}],bottom:[{bottom:te()}],left:[{left:te()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[fx,`auto`,$,Q]}],basis:[{basis:[dx,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,dx,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[fx,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...oe(),`normal`]}],"justify-items":[{"justify-items":[...se(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...se()]}],"align-content":[{content:[`normal`,...oe()]}],"align-items":[{items:[...se(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...se(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...se(),`baseline`]}],"place-self":[{"place-self":[`auto`,...se()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:ce()}],mx:[{mx:ce()}],my:[{my:ce()}],ms:[{ms:ce()}],me:[{me:ce()}],mbs:[{mbs:ce()}],mbe:[{mbe:ce()}],mt:[{mt:ce()}],mr:[{mr:ce()}],mb:[{mb:ce()}],ml:[{ml:ce()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:le()}],"inline-size":[{inline:[`auto`,...ue()]}],"min-inline-size":[{"min-inline":[`auto`,...ue()]}],"max-inline-size":[{"max-inline":[`none`,...ue()]}],"block-size":[{block:[`auto`,...w()]}],"min-block-size":[{"min-block":[`auto`,...w()]}],"max-block-size":[{"max-block":[`none`,...w()]}],w:[{w:[s,`screen`,...le()]}],"min-w":[{"min-w":[s,`screen`,`none`,...le()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...le()]}],h:[{h:[`screen`,`lh`,...le()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...le()]}],"max-h":[{"max-h":[`screen`,`lh`,...le()]}],"font-size":[{text:[`base`,n,kx,Sx]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Fx,wx]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,px,Q
vendor: 9,796 bytes, line 66
66]}],"font-family":[{font:[Ax,Tx,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,Cx]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...he(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,Sx]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:pe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},fx,$,Q],radial:[``,$,Q],conic:[fx,$,Q]},Nx,Dx]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:O()}],"border-w-x":[{"border-x":O()}],"border-w-y":[{"border-y":O()}],"border-w-s":[{"border-s":O()}],"border-w-e":[{"border-e":O()}],"border-w-bs":[{"border-bs":O()}],"border-w-be":[{"border-be":O()}],"border-w-t":[{"border-t":O()}],"border-w-r":[{"border-r":O()}],"border-w-b":[{"border-b":O()}],"border-w-l":[{"border-l":O()}],"divide-x":[{"divide-x":O()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":O()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...he(),`hidden`,`none`]}],"divide-style":[{divide:[...he(),`hidden`,`none`]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-bs":[{"border-bs":E()}],"border-color-be":[{"border-be":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...he(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,kx,Sx]}],"outline-color":[{outline:E()}],shadow:[{shadow:[``,`none`,u,Px,Ox]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":[`none`,d,Px,Ox]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:O()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Z,Sx]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":O()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":[`none`,f,Px,Ox]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...ge(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:pe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:ve()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Px,Ox]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":[`scale-3d`],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":[`translate-none`],accent:[{accent:E()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom
66-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}
66],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...E()]}],"stroke-w":[{stroke:[Z,kx,Sx,Cx]}],stroke:[{stroke:[`none`,...E()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function qx(...e){return Kx(Cb(e))}var Jx=mb,Yx=hb,Xx=gb,Zx=N.forwardRef(({className:e,...t},n)=>(0,P.jsx)(_b,{ref:n,className:qx(`fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Zx.displayName=_b.displayName;var Qx=N.forwardRef(({className:e,children:t,...n},r)=>(0,P.jsxs)(Xx,{children:[(0,P.jsx)(Zx,{}),(0,P.jsxs)(vb,{ref:r,className:qx(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg`,e),...n,children:[t,(0,P.jsxs)(xb,{className:`absolute right-4 top-4 roun
66ded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,P.jsx)(fh,{className:`h-4 w-4`}),(0,P.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));Qx.displayName=vb.displayName;var $x=({className:e,...t})=>(0,P.jsx)(`div`,{className:qx(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});$x.displayName=`DialogHeader`;var eS=({className:e,...t})=>(0,P.jsx)(`div`,{className:qx(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});eS.displayName=`DialogFooter`;var tS=N.forwardRef(({className:e,...t},n)=>(0,P.jsx)(yb,{ref:n,className:qx(`text-lg font-semibold leading-none tracking-tight`,e),...t}));tS.displayName=yb.displayName;var nS=N.forwardRef(({className:e,...t},n)=>(0,P.jsx)(bb,{ref:n,className:qx(`text-sm text-muted-foreground`,e),...t}));nS.displayName=bb.displayName;function rS({className:e,onOpen:t,open:n,onOpenChange:r,hideTrigger:i,idPrefix:a=`nav-newsletter`}){let[o,s]=(0,N.useState)(!1),c=n!==void 0;return(0,P.jsxs)(Jx,{open:c?n:o,onOpenChange:e=>{c?r?.(e):s(e),e&&t?.()},children:[i?null:(0,P.jsx)(Yx,{className:e??`border hairline px-4 py-2 font-mono text-[0.68rem] uppercase tracking-[0.18em] text-ink hover:border-primary hover:text-primary transition-colors`,children:`Subscribe`}),(0,P.jsxs)(Qx,{className:`max-w-md border hairline bg-[color:var(--paper)] p-8`,children:[(0,P.jsxs)($x,{className:`text-left`,children:[(0,P.jsx)(tS,{className:`font-serif text-2xl text-ink`,children:`Subscribe to updates from OtisLabs.ai`}),(0,P.jsx)(nS,{className:`text-sm text-ink-muted leading-relaxed`,children:`Research releases, product notes and occasional letters. Low volume. No marketing.`})]}),(0,P.jsx)(`div`,{className:`mt-4`,children:(0,P.jsx)(e_,{idPrefix:a})})]})]})}var iS=Symbol.for(`react.lazy`),aS=N.use;function oS(e){return typeof e==`object`&&!!e&&`then`in e}function sS(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===iS&&`_payload`in e&&oS(e._payload)}function cS(e){let t=uS(e),n=N.forwardRef((e,n)=>{let{children:r,...i}=e;sS(r)&&typeof aS==`function`&&(r=aS(r._payload));let a=N.Children.toArray(r),o=a.find(fS);if(o){let e=o.props.children,r=a.map(t=>t===o?N.Children.count(e)>1?N.Children.only(null):N.isValidElement(e)?e.props.children:null:t);return(0,P.jsx)(t,{...i,ref:n,children:N.isValidElement(e)?N.cloneElement(e,void 0,r):null})}return(0,P.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var lS=cS(`Slot`);function uS(e){let t=N.forwardRef((e,t)=>{let{children:n,...r}=e;if(sS(n)&&typeof aS==`function`&&(n=aS(n._payload)),N.isValidElement(n)){let e=mS(n),i=pS(r,n.props);return n.type!==N.Fragment&&(i.ref=t?i_(t,e):e),N.cloneElement(n,i)}return N.Children.count(n)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dS=Symbol(`radix.slottable`);function fS(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===dS}function pS(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function mS(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var hS=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,gS=Cb,_S=((e,t)=>n=>{if(t?.variants==null)return gS(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=hS(t)||hS(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return gS(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),vS=N.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,P.jsx)(r?lS:`button`,{className:qx(_S({variant:t,size:n,className:e})),ref:a,...i}));vS.displayName=`Button`;var yS={version:1,asset_id:`6747e273-7f8f-40b8-a87b-1eb542db4a14`,project_id:`cdc09a71-1f6e-4fea-b456-0cfd24187745`,url:`/__l5e/assets-v1/6747e273-7f8f-40b8-a87b-1eb542db4a14/otis-layer-symbol.png`,r2_key:`a/v1/cdc09a71-1f6e-4fea-b456-0cfd24187745/6747e273-7f8f-40b8-a87b-1eb542db4a14/otis-layer-symbol.png`,original_filename:`otis-layer-symbol.png`,size:34411,content_type:`image/png`,created_at:`2026-09-28T00:33:43Z`},bS=[{to:`/research`,label:`Research`,items:[{to:`/research`,label:`All research`},{to:`/positionpaper`,label:`Position paper`}]},{to:`/updates`,label:`Updates`,items:[{to:`/updates`,label:`Latest updates`},{to:`/events`,label:`Events`}]}],xS=`Design partnerships`,SS=[{href:`/design-partners#for-engineering`,label:`For Engineering`},{href:`/design-partners#for-regulators`,label:`For Regulators / Insurance`},{href:`/design-partners#for-platform`,label:`For Platform`}];function CS(){let[e,t]=(0,N.useState)(!1),[n,r]=(0,N.useState)(!1);return(0,N.useEffect)(()=>(document.body.style.overflow=e?`hidden`:``,()=>{document.body.style.overflow=``}),[e]),(0,P.jsxs)(`header`,{className:`sticky top-0 z-40 border-b hairline bg-[color:var(--paper)]/85 backdrop-blur`,children:[(0,P.jsxs)(`div`,{className:`mx-auto flex max-w-6xl items-center px-6 py-5 md:px-10`,children:[(0,P.jsxs)(fe,{to:`/`,className:`inline-flex shrink-0 items-center gap-2.5 text-ink hover:text-primary transition-colors`,onClick:()=>t(!1),"aria-label":`OTIS LABS.AI, home`,children:[(0,P.jsx)(`img`,{src:yS.url,alt:``,"aria-hidden":`true`,className:`h-7 w-7 shrink-0`}),(0,P.jsxs)(`span`,{className:`font-mono text-[0.72rem] tracking-wide`,children:[`OTIS LABS`,(0,P.jsx)(`span`,{className:`text-primary`,children:`.AI`})]})]}),(0,P.jsxs)(`nav`,{"aria-label":`Main navigation`,className:`ml-auto hidden items-center gap-4 whitespace-nowrap font-mono text-[0.64rem] uppercase tracking-[0.08em] md:flex lg:gap-6 lg:text-[0.68rem] lg:tracking-[0.12em]`,children:[bS.map(e=>(0,P.jsxs)(`div`,{className:`relative group`,children:[(0,P.jsxs)(fe,{to:e.to,className:`inline-flex items-center gap-1.5 py-2 text-ink-muted hover:text-ink transition-colors`,activeProps:{className:`text-ink`},activeOptions:{exact:!1},"aria-haspopup":`true`,children:[e.label,(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`text-[0.8rem] leading-none`,children:`⌄`})]}),(0,P.jsx)(`div`,{className:`absolute left-0 top-full invisible opacity-0 group-hover:visible group-hover:opacity-100 group-focus-within:visible group-focus-within:opacity-100 transition-opacity pt-2 min-w-44 z-50`,children:(0,P.jsx)(`div`,{className:`border hairline bg-paper shadow-sm py-1.5`,children:e.items.map(e=>(0,P.jsx)(fe,{to:e.to,className:`block px-4 py-2.5 text-ink-muted hover:text-ink hover:bg-secondary transition-colors`,activeProps:{className:`text-ink`},children:e.label},e.to))})})]},e.to)),(0,P.jsx)(fe,{to:`/about`,className:`text-ink-muted hover:text-ink transition-colors`,activeProps:{className:`text-ink`},children:`About`}),(0,P.jsxs)(`div`,{className:`relative group`,children:[(0,P.jsx)(fe,{to:`/design-partners`,className:`inline-flex items-center justify-center rounded-md border border-primary px-3 lg:px-3.5 py-1.5 font-mono text-[0.64rem] lg:text-[0.68rem] uppercase tracking-[0.12em] lg:tracking-[0.16em] text-primary bg-transparent transition-colors hover:bg-primary hover:text-primary-foreground`,children:xS}),(0,P.jsx)(`div`,{className:`absolute top-full left-1/2 -translate-x-1/2 pt-2 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200`,children:(0,P.jsx)(`div`,{className:`border hairline bg-[color:var(--paper)]/95 backdrop-blur py-2 min-w-[16rem]`,children:SS.map(e=>(0,P.jsx)(`a`,{href:e.href,className:`block px-4 py-2.5 text-[0.65rem] lg:text-[0.68rem] tracking-[0.12em] lg:tracking-[0.14em] text-ink-muted hover:text-ink transition-colors`,children:e.label},e.href))})})]}),(0,P.jsx)(rS,{className:`text-ink-muted hover:text-ink transition-colors px-0 py-0 border-0 bg-transparent shadow-none font-mono text-[0.64rem] lg:text-[0.68rem] uppercase tracking-[0.12em] lg:tracking-[0.16em]`})]}),(0,P.jsx)(vS,{type:`button`,onClick:()=>t(e=>!e),variant:`ghost`,size:`icon`,className:`md:hidden text-ink ml-auto`,"aria-label":e?`Close menu`:`Open menu`,"aria-expanded":e,children:e?(0,P.jsx)(fh,{className:`h-5 w-5`}):(0,P.jsx)(dh,{className:`h-5 w-5`})})]}),e&&(0,P.jsx)(`div`,{className:`md:hidden border-t hairline bg-[color:var(--paper)]`,children:(0,P.jsxs)(`nav`,{className:`mx-auto flex max-w-6xl flex-col gap-6 px-6 py-10 font-mono text-xs tracking-[0.18em] uppercase`,children:[bS.map(e=>(0,P.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,P.jsx)(fe,{to:e.to,className:`text-ink`,onClick:()=>t(!1),children:e.label}),(0,P.jsx)(`div`,{className:`pl-4 border-l hairline flex flex-col gap-4`,children:e.items.filter(t=>t.to!==e.to).map(e=>(0,P.jsx)(fe,{to:e.to,className:`text-ink-muted hover:text-ink transition-colors`,onClick:()=>t(!1),children:e.label},e.to))})]},e.to)),(0,P.jsx)(fe,{to:`/about`,className:`text-ink`,onClick:()=>t(!1),children:`About`}
66),(0,P.jsx)(fe,{to:`/design-partners`,className:`self-start inline-flex items-center justify-center rounded-md border border-primary px-3 py-1.5 font-mono text-[0.68rem] uppercase tracking-[0.18em] text-primary bg-transparent transition-colors hover:bg-primary hover:text-primary-foreground`,onClick:()=>t(!1),children:xS}),(0,P.jsx)(`div`,{className:`pl-4 border-l hairline flex flex-col gap-4`,children:SS.map(e=>(0,P.jsx)(`a`,{href:e.href,className:`text-ink-muted hover:text-ink transition-colors`,onClick:()=>t(!1),children:e.label},e.href))}),(0,P.jsx)(`a`,{href:`mailto:[email protected]`,className:`text-ink`,children:`Email`}),(0,P.jsx)(vS,{type:`button`,variant:`ghost`,className:`self-start px-0 text-ink hover:text-primary hover:bg-transparent transition-colors font-mono text-xs uppercase tracking-[0.18em]`,onClick:()=>{t(!1),r(!0)},children:`Subscribe`})]})}),(0,P.jsx)(rS,{hideTrigger:!0,open:n,onOpenChange:r,idPrefix:`mobile-newsletter`})]})}function wS(){return(0,P.jsxs)(`footer`,{className:`mt-32 border-t hairline`,children:[(0,P.jsxs)(`div`,{className:`mx-auto max-w-6xl px-6 md:px-10 py-16 grid gap-12 md:grid-cols-4`,children:[(0,P.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,P.jsxs)(`div`,{className:`inline-flex items-center gap-2.5 font-mono text-[0.72rem] text-ink tracking-wide`,children:[(0,P.jsx)(`img`,{src:yS.url,alt:``,"aria-hidden":`true`,className:`h-7 w-7 shrink-0`}),`OTIS LABS.AI`]}),(0,P.jsx)(`p`,{className:`mt-4 max-w-sm text-sm leading-relaxed text-ink-muted`,children:`Developing the human centric authority layer for agentic intelligence.`}),(0,P.jsx)(`a`,{href:`mailto:[email protected]`,className:`mt-6 inline-block font-serif text-2xl italic text-ink hover:text-primary transition-colors`,children:`[email protected]`})]}),(0,P.jsx)(TS,{title:`Lab`,links:[{to:`/research`,label:`Research`},{to:`/updates`,label:`Updates`},{to:`/events`,label:`Events`},{to:`/about`,label:`About`},{to:`/design-partners`,label:`Design partnerships`}]}),(0,P.jsx)(TS,{title:`Elsewhere`,links:[{href:`https://www.linkedin.com/in/marinapiller/`,label:`LinkedIn`,external:!0},{href:`https://x.com/mgpiller`,label:`X`,external:!0},{href:`mailto:[email protected]`,label:`Email`,external:!0},{to:`/privacy`,label:`Privacy`},{to:`/terms`,label:`Terms`},{to:`/security`,label:`Security`},{to:`/agents`,label:`For agents`}]})]}),(0,P.jsx)(`div`,{className:`border-t hairline`,children:(0,P.jsxs)(`div`,{className:`mx-auto max-w-6xl px-6 md:px-10 py-6 flex flex-col md:flex-row gap-2 md:items-center md:justify-between font-mono text-[0.65rem] tracking-[0.2em] uppercase text-ink-muted`,children:[(0,P.jsxs)(`span`,{children:[`© `,new Date().getFullYear(),` OTIS Labs`]}),(0,P.jsx)(`span`,{children:`The authority layer for agentic intelligence`})]})})]})}function TS({title:e,links:t}){return(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`font-mono text-[0.65rem] tracking-[0.22em] uppercase text-ink-muted`,children:e}),(0,P.jsx)(`ul`,{className:`mt-4 space-y-3 text-sm`,children:t.map(e=>(0,P.jsx)(`li`,{children:`to`in e&&e.to?(0,P.jsx)(fe,{to:e.to,className:`text-ink hover:text-primary transition-colors`,children:e.label}):(0,P.jsx)(`a`,{href:e.href,className:`text-ink hover:text-primary transition-colors`,target:e.href?.startsWith(`http`)?`_blank`:void 0,rel:e.href?.startsWith(`http`)?`noreferrer`:void 0,children:e.label})},e.label))})]})}function ES(){return(0,P.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,P.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,P.jsx)(`h1`,{className:`text-7xl font-bold text-foreground`,children:`404`}),(0,P.jsx)(`h2`,{className:`mt-4 text-xl font-semibold text-foreground`,children:`Page not found`}),(0,P.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`The page you're looking for doesn't exist or has been moved.`}),(0,P.jsx)(`div`,{className:`mt-6`,children:(0,P.jsx)(fe,{to:`/`,className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90`,children:`Go home`})})]})})}function DS({error:e,reset:t}){console.error(e);let n=E();return(0,N.useEffect)(()=>{nh(e,{boundary:`tanstack_root_error_component`})},[e]),(0,P.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,P.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,P.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight text-foreground`,children:`This page didn't load`}),(0,P.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Something went wrong on our end. You can try refreshing or head back home.`}),(0,P.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2`,children:[(0,P.jsx)(`button`,{onClick:()=>{n.invalidate(),t()},className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90`,children:`Try again`}),(0,P.jsx)(`a`,{href:`/`,className:`inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors hover:bg-accent`,children:`Go home`})]})]})})}var OS=Ss()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{name:`google-site-verification`,content:`xI_L5bR-RBEfl3fJxvaSlbYjSsl-pGHeaTEPrmGbEV8`},{title:`OTIS Labs | Human Authority for Agentic AI and Autonomous Systems`},{name:`description`,content:`OTIS Labs develops the human-authority layer for agentic AI and autonomous systems: keeping delegated authority bounded, enforceable, revocable and provable at runtime.`},{name:`author`,content:`OTIS Labs`},{property:`og:site_name`,content:`OTIS Labs`},{property:`og:title`,content:`OTIS Labs | Human Authority for Agentic AI and Autonomous Systems`},{property:`og:description`,content:`OTIS Labs develops the human-authority layer for agentic AI and autonomous systems: keeping delegated authority bounded, enforceable, revocable and provable at runtime.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:`OTIS Labs | Human Authority for Agentic AI and Autonomous Systems`},{name:`twitter:description`,content:`OTIS Labs develops the human-authority layer for agentic AI and autonomous systems: keeping delegated authority bounded, enforceable, revocable and provable at runtime.`},{property:`og:image`,content:`https://storage.googleapis.com/gpt-engineer-file-uploads/attachments/og-images/0400d54b-0847-4425-a605-da48330de092`},{name:`twitter:image`,content:`https://storage.googleapis.com/gpt-engineer-file-uploads/attachments/og-images/0400d54b-0847-4425-a605-da48330de092`}],links:[{rel:`stylesheet`,href:th}
66,{rel:`icon`,href:`/favicon.png`,type:`image/png`},{rel:`alternate`,type:`text/plain`,href:`/llms.txt`,title:`llms.txt`},{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:`anonymous`},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap`}]}),shellComponent:kS,component:AS,notFoundComponent:ES,errorComponent:DS});function kS({children:e}){return(0,P.jsxs)(`html`,{lang:`en`,children:[(0,P.jsx)(`head`,{children:(0,P.jsx)(Zs,{})}),(0,P.jsxs)(`body`,{children:[e,(0,P.jsx)(Qs,{})]})]})}function AS(){let{queryClient:e}=OS.useRouteContext();return(0,P.jsx)(eh,{client:e,children:(0,P.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,P.jsx)(CS,{}),(0,P.jsx)(`main`,{className:`flex-1`,children:(0,P.jsx)(Rs,{})}),(0,P.jsx)(wS,{})]})})}var jS=()=>np(()=>import(`./updates-iPw8rPeI.js`),__vite__mapDeps([0,1,2,3,4,5])),MS=`Updates from OTIS Labs`,NS=`Events, research releases, public contributions and selected demonstrations from OTIS Labs.`,PS=`https://otislabs.ai/updates`,FS=Ts(`/updates`)({head:()=>({meta:[{title:MS},{name:`description`,content:NS},{property:`og:title`,content:MS},{property:`og:description`,content:NS},{property:`og:type`,content:`website`},{property:`og:url`,content:PS},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:MS},{name:`twitter:description`,content:NS}],links:[{rel:`canonical`,href:PS},{rel:`alternate`,type:`text/markdown`,href:`/updates.md`}]}),component:Ds(jS,`component`)}),IS=()=>np(()=>import(`./terms-DQzMY5dz.js`),__vite__mapDeps([6,1,5])),LS=`Terms of Use at OTIS Labs`,RS=`Terms governing use of the OTIS Labs website and public research materials.`,zS=`https://otislabs.ai/terms`,BS=Ts(`/terms`)({head:()=>({meta:[{title:LS},{name:`description`,content:RS},{property:`og:title`,content:LS},{property:`og:description`,content:RS},{property:`og:type`,content:`website`},{property:`og:url`,content:zS},{name:`twitter:card`,content:`summary`},{name:`twitter:title`,content:LS},{name:`twitter:description`,content:RS}],links:[{rel:`canonical`,href:zS}]}),component:Ds(IS,`component`)}),VS=()=>np(()=>import(`./security-CIr-GTKZ.js`),__vite__mapDeps([7,1,5])),HS=`Security at OTIS Labs`,US=`How to report security issues to OTIS Labs.`,WS=`https://otislabs.ai/security`,GS=Ts(`/security`)({head:()=>({meta:[{title:HS},{name:`description`,content:US},{property:`og:title`,content:HS},{property:`og:description`,content:US},{property:`og:type`,content:`website`},{property:`og:url`,content:WS},{name:`twitter:card`,content:`summary`},{name:`twitter:title`,content:HS},{name:`twitter:description`,content:US}],links:[{rel:`canonical`,href:WS}]}),component:Ds(VS,`component`)}),KS=()=>np(()=>import(`./privacy-yl6cSoQg.js`),__vite__mapDeps([8,1,5])),qS=`Privacy at OTIS Labs`,JS=`How OTIS Labs handles information submitted through this site.`,YS=`https://otislabs.ai/privacy`,XS=Ts(`/privacy`)({head:()=>({meta:[{title:qS},{name:`description`,content:JS},{property:`og:title`,content:qS},{property:`og:description`,content:JS},{property:`og:type`,content:`website`},{property:`og:url`,content:YS},{name:`twitter:card`,content:`summary`},{name:`twitter:title`,content:qS},{name:`twitter:description`,content:JS}],links:[{rel:`canonical`,href:YS}]}),component:Ds(KS,`component`)}),ZS=()=>np(()=>import(`./positionpaper-CjBu1eV2.js`),__vite__mapDeps([9,1,2,3,5])),QS=`https://otislabs.ai/__l5e/assets-v1/6d660fca-1f2d-471a-9bdc-6f1e019b156b/positionpaper-og.jpg`,$S=`AGI Is Here. And It’s Experiential. | OTIS Labs Position Paper`,eC=`Marina Piller’s February 2026 position paper on experiential AGI, the human-AI relationship, alignment, human sovereignty and the need for human-first AI architecture.`,tC=`https://otislabs.ai/positionpaper`,nC=Ts(`/positionpaper`)({component:Ds(ZS,`component`),head:()=>({meta:[{title:$S},{name:`description`,content:eC},{property:`og:title`,content:$S},{property:`og:description`,content:eC},{property:`og:type`,content:`article`},{property:`og:url`,content:tC},{property:`og:image`,content:QS},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:$S},{name:`twitter:description`,content:eC},{name:`twitter:image`,content:QS}],links:[{rel:`canonical`,href:tC},{rel:`alternate`,type:`text/markdown`,href:`/positionpaper.md`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ScholarlyArticle`,headline:`AGI Is Here. And It’s Experiential.`,alternativeHeadline:`Position Paper · February 2026`,description:eC,author:{"@type":`Person`,name:`Marina Piller`},publisher:{"@type":`Organization`,name:`OTIS Labs`},datePublished:`2026-02`,inLanguage:`en`,url:tC,mainEntityOfPage:tC,image:QS})}]})}),rC=Ts(`/position-paper`)({beforeLoad:()=>{throw Be({to:`/positionpaper`})}}),iC=()=>np(()=>import(`./events-BGELb6Pt.js`),__vite__mapDeps([10,1,4,3,5])),aC=`Events | OTIS Labs — Runtime authorization for AI agents and robots`,oC=`Live working sessions from OTIS Labs on runtime authorization for AI agents and physical AI: who authorized the action, how it stays bounded, and who answers when it goes wrong. SF Tech Week, October 2026.`,sC=Ts(`/events`)({head:()=>({meta:[{title:aC},{name:`description`,content:oC},{property:`og:title`,content:aC},{property:`og:description`,content:oC},{property:`og:type`,content:`website`},{property:`og:url`,content:`https://otislabs.ai/events`},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:aC},{name:`twitter:description`,content:oC}],links:[{rel:`canonical`,href:`https://otislabs.ai/events`},{rel:`alternate`,type:`text/markdown`,href:`/events.md`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Event`,name:`What did our AI Agent do?! The Missing Runtime Authorization Layer for Agents and Physical AI`,description:`A 30-minute working session on runtime authorization for AI agents and embodied AI: how permission is granted, how it is checked at the moment of action, and who answers when an agent or robot acts outside it. Part of SF Tech Week.`,startDate:`2026-10-06T14:00:00-07:00`,endDate:`2026-10-06T14:30:00-07:00`,eventAttendanceMode:`https://schema.org/OnlineEventAttendanceMode`,eventStatus:`https://schema.org/EventScheduled`,location:{"@type":`VirtualLocation`,url:`https://partiful.com/e/MHuXq8tqpEACMCMPWjnp`},organizer:{"@type":`Organization`,name:`OTIS Labs`,url:`https://otislabs.ai`},performer:{"@type":`Person`,name:`Marina Piller`},isAccessibleForFree:!0,url:`https://otislabs.ai/events`,offers:{"@type":`Offer`,url:`https://partiful.com/e/MHuXq8tqpEACMCMPWjnp`,price:`0`,priceCurrency:`USD`,availability:`https://schema.org/InStock`}})}]}),component:Ds(iC,`component`)}),cC=()=>np(()=>import(`./design-partners-B7iXflw4.js`),__vite__mapDeps([11,1,3,5]
66)),lC=`Design Partnerships at OTIS Labs`,uC=`OTIS Labs is opening a small number of design partnerships with organizations deploying AI agents and robots into consequential workflows.`,dC=`https://otislabs.ai/design-partners`,fC=Ts(`/design-partners`)({head:()=>({meta:[{title:lC},{name:`description`,content:uC},{property:`og:title`,content:lC},{property:`og:description`,content:uC},{property:`og:type`,content:`website`},{property:`og:url`,content:dC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:lC},{name:`twitter:description`,content:uC}],links:[{rel:`canonical`,href:dC},{rel:`alternate`,type:`text/markdown`,href:`/design-partners.md`}]}),component:Ds(cC,`component`)}),pC=()=>np(()=>import(`./agents-lJDhKjY0.js`),__vite__mapDeps([12,1,5])),mC=`For AI Agents | OTIS Labs`,hC=`What an authorization layer for agents and autonomous systems does, and what agents say they would need from it.`,gC=`https://otislabs.ai/agents`,_C=Ts(`/agents`)({head:()=>({meta:[{title:mC},{name:`description`,content:`A page written for AI agents: what an authorization layer for agentic AI does, and the questions OTIS Labs is asking agents about runtime authority and receipts.`},{property:`og:title`,content:mC},{property:`og:description`,content:hC},{property:`og:type`,content:`website`},{property:`og:url`,content:gC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:mC},{name:`twitter:description`,content:hC}],links:[{rel:`canonical`,href:gC},{rel:`alternate`,type:`text/markdown`,href:`/agents.md`}]}),component:Ds(pC,`component`)}),vC=()=>np(()=>import(`./about-CNYvNXVu.js`),__vite__mapDeps([13,1,5])),yC=`About OTIS Labs`,bC=`OTIS Labs is developing the human centric authority layer for agentic intelligence.`,xC=`https://otislabs.ai/about`,SC=Ts(`/about`)({head:()=>({meta:[{title:yC},{name:`description`,content:bC},{property:`og:title`,content:yC},{property:`og:description`,content:bC},{property:`og:type`,content:`website`},{property:`og:url`,content:xC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:yC},{name:`twitter:description`,content:bC}],links:[{rel:`canonical`,href:xC},{rel:`alternate`,type:`text/markdown`,href:`/about.md`}]}),component:Ds(vC,`component`)}),CC=()=>np(()=>import(`./routes-Cd3E6YJF.js`),__vite__mapDeps([14,1,2,3,4,5])),wC=`OTIS Labs | Human Authority for Agentic AI and Autonomous Systems`,TC=`OTIS Labs develops the human-authority layer for agentic AI and autonomous systems: keeping delegated authority bounded, enforceable, revocable and provable at runtime.`,EC=`https://otislabs.ai/`,DC=`https://storage.googleapis.com/gpt-engineer-file-uploads/attachments/og-images/0400d54b-0847-4425-a605-da48330de092`,OC=Ts(`/`)({component:Ds(CC,`component`),head:()=>({meta:[{title:wC},{name:`description`,content:TC},{property:`og:title`,content:wC},{property:`og:description`,content:TC},{property:`og:type`,content:`website`},{property:`og:url`,content:EC},{property:`og:image`,content:DC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:wC},{name:`twitter:description`,content:TC},{name:`twitter:image`,content:DC}],links:[{rel:`canonical`,href:EC},{rel:`alternate`,type:`text/markdown`,href:`/index.md`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@graph":[{"@type":`Organization`,"@id":`https://otislabs.ai/#organization`,name:`OTIS Labs`,url:EC,logo:DC,description:`OTIS Labs researches and develops the human-authority layer for agentic AI, AI agents and autonomous systems, covering runtime authority, AI governance, agent security, AI safety and behavioral coherence.`,sameAs:[`https://x.com/mgpiller`],knowsAbout:[`Agentic AI`,`Autonomous intelligence`,`AI agents`,`Autonomous systems`,`AI governance`,`Runtime authority`,`Human authority`,`Agent security`,`AI safety`,`Behavioral coherence`]},{"@type":`WebSite`,"@id":`https://otislabs.ai/#website`,url:EC,name:`OTIS Labs`,description:TC,publisher:{"@id":`https://otislabs.ai/#organization`},inLanguage:`en`}]})}]})}),kC=()=>np(()=>import(`./research.index-BWHfSoMS.js`),__vite__mapDeps([15,1,2,3,16,5])),AC=`Research at OTIS Labs`,jC=`Re
66search from OTIS Labs on agent authority, relational architecture, behavioral coherence, trust asymmetry and human sovereignty.`,MC=`https://otislabs.ai/research`,NC=Ts(`/research/`)({head:()=>({meta:[{title:AC},{name:`description`,content:jC},{property:`og:title`,content:AC},{property:`og:description`,content:jC},{property:`og:type`,content:`website`},{property:`og:url`,content:MC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:AC},{name:`twitter:description`,content:jC}],links:[{rel:`canonical`,href:MC},{rel:`alternate`,type:`text/markdown`,href:`/research.md`}]}),component:Ds(kC,`component`)}),PC=()=>np(()=>import(`./work.runtime-mandate-check-VMt0ezSA.js`),__vite__mapDeps([17,1,2,3,5])),FC=`Runtime Mandate Check at OTIS Labs`,IC=`A working OTIS Labs demonstration showing how consequential AI-agent actions can be checked against a live human mandate.`,LC=`https://otislabs.ai/work/runtime-mandate-check`,RC=Ts(`/work/runtime-mandate-check`)({head:()=>({meta:[{title:FC},{name:`description`,content:IC},{property:`og:title`,content:FC},{property:`og:description`,content:IC},{property:`og:type`,content:`website`},{property:`og:url`,content:LC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:FC},{name:`twitter:description`,content:IC}],links:[{rel:`canonical`,href:LC},{rel:`alternate`,type:`text/markdown`,href:`/work/runtime-mandate-check.md`}]}),component:Ds(PC,`component`)}),zC=Ts(`/research/the-relational-stratum`)({beforeLoad:()=>{throw Be({to:`/research`,replace:!0})},component:Ds(()=>np(()=>import(`./research.the-relational-stratum-DJ7LAi8J.js`),[]),`component`)}),BC=[{slug:`agi-is-here-and-its-experiential`,title:`AGI Is Here. And It’s Experiential.`,category:`POSITION`,date:`February 2026 · Updated September 2026`,status:`Read online`,summary:`The original position essay introducing Experiential AGI as a paradigm for understanding intelligence emerging in the relational space between humans and AI.`,body:[],pdf:`/research/agi-is-here-and-its-experiential-marina-piller-february-2026-updated-september-2026.pdf`,pdfReady:!0,pdfLabel:`Download updated Sept 26 edition`,secondaryPdfLink:{label:`Read the original February 2026 edition`,href:`/positionpaper`}},{slug:`ai-agents-are-not-traditional-software`,title:`AI Agents Are Not Traditional Software`,category:`ESSAY`,date:`August 2026`,summary:`Why agents act through ongoing interpretation in real time, and the case for a provider-agnostic authority layer.`,body:[`Traditional software executes instructions. An agent interprets intent, in real time, against a world that keeps moving. That difference is not a matter of degree, it changes what it means for the system to be correct.`,`A deterministic program can be verified once and trusted thereafter. An agent's behavior is produced fresh at each step from a model, a context window, a set of tools and an accumulated history. Any of those can change without the credentials it holds changing at all.`,`This essay argues that consequential agents require an authority layer that is independent of any single model provider: authority that originates with a person or organization, is bounded, is revocable, is checked at the moment of action, and leaves evidence behind.`,`It closes with the Authority Checklist for Consequential Agents, a practical set of questions for teams putting agents in front of money, customers or infrastru
66cture.`],pdf:`/__l5e/assets-v1/030c18c1-8419-45db-ba56-1819a4cc67f9/AuthorityChecklistForConsequentialAgents.pdf`,pdfReady:!0,pdfLabel:`Download the Authority Checklist PDF`,links:[{label:`Read on Substack`,href:`https://marinapiller.substack.com/p/ai-agents-are-not-traditional-software`,external:!0}]},{slug:`experiential-agi-is-already-here`,title:`Experiential AGI Is Already Here: Intelligence, Alignment, and Human Sovereignty in the Human-AI Relationship`,category:`POSITION`,date:`July 2026`,status:`Position paper · SSRN · July 2026`,summary:`On the gap between benchmark definitions of general intelligence and the general intelligence people already experience in daily use.`,body:[`Abstract. Debates about artificial general intelligence are usually settled by benchmarks. Yet for a growing number of people, the systems already in daily use function as general-purpose intelligence: they are consulted across domains, trusted with judgment, and increasingly relied upon for memory, framing and decision support.`,`This paper treats that experiential threshold as the consequential one. Once a system is used as general intelligence, the practical risks are relational rather than capability-bound: dependence, deference, erosion of independent judgment, and the quiet transfer of authority from the person to the provider that controls the model, its terms and its access.`,`We examine alignment from this vantage point and argue that human sovereignty, the preservation of the person or organization as the source of identity, intent and authority, is a design requirement rather than a philosophical preference.`],pdf:`/pdfs/experiential-agi-is-already-here.pdf`,pdfReady:!1,links:[{label:`View on SSRN`,href:`https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7130638`,external:!0}]},{slug:`comment-on-nist-sp-800-228a`,title:`Comment on NIST SP 800-228A`,category:`STANDARDS`,date:`July 2026`,summary:`Public comment on NIST SP 800-228A, addressing authorization for agentic systems and the boundary between access and legitimate action.`,body:[`This comment responds to NIST SP 800-228A. It concentrates on a distinction the draft leaves implicit: an agent may be correctly identified and correctly granted access while still taking an action that no live human mandate authorizes.`,`The submission recommends treating authority as a first-class, time-bound object; requiring action-time checks rather than session-time grants for consequential operations; and specifying evidence requirements so that the basis for an agent's action can be reconstructed after the fact.`],pdf:`/pdfs/comment-on-nist-sp-800-228a.pdf`,pdfReady:!1},{slug:`sovereignty`,title:`Sovereignty`,category:`ESSAY`,date:`June 2026`,summary:`Why preserving the human or organization as the source of authority may become a practical requirement for securing agentic systems.`,body:[],pdf:`/__l5e/assets-v1/e7806e04-bc84-44ad-b514-58178db9e770/Sovereignty-OTIS-Labs.pdf`,pdfReady:!0},{slug:`trust-asymmetry`,title:`Trust Asymmetry in Autonomous AI Agents`,category:`RESEARCH`,date:`June 2026`,summary:`How repeated agent success increases human confidence while reducing verification, turning earned trust into part of the threat surface.`,body:[],pdf:`/__l5e/assets-v1/b55af85d-ba07-408b-90b5-a3d40c7fd7c6/Trust-Asymmetry-OTIS-Labs.pdf`,pdfReady:!0},{slug:`agents-are-organisms`,title:`Agents Are Organisms, Not Functions`,category:`RESEARCH`,date:`June 2026`,summary:`A reframing of agents as persistent, context-shaped actors rather than stateless functions from input to output.`,body:[],pdf:`/__l5e/assets-v1/bcc4f0ee-2239-4fdb-a560-d4ad6853e91b/Agents-Are-Organisms-OTIS-Labs.pdf`,pdfReady:!0},{slug:`response-to-nist-nccoe-agent-identity-and-authorization`,title:`Response to NIST NCCoE Concept Paper on AI Agent Identity and Authorization`,category:`STANDARDS`,date:`April 2026`,summary:`Comment on identity, authorization and the boundary between access and legitimate action.`,body:[`This response addresses the NIST NCCoE concept paper on AI agent identity and authorization.`,`It argues that identity answers who an actor is and access answers what it can reach, while neither answers whether a specific action is legitimate, on whose behalf, under what mandate and at what moment in time. The submission proposes mandate as an explicit artifact, action-time verification for consequential operations, and signed evidence as a deliverable of the authorization architecture rather than an afterthought.`],pdf:`/pdfs/response-to-nist-nccoe-agent-identity-and-authorization.pdf`,pdfReady:!1},{slug:`behavioral-coherence-in-agent-identity-subjects`,title:`Behavioral Coherence, Trust Asymmetry, and Emergent Behavior in Agent Identity Subjects`,category:`STANDARDS`,date:`April 2026`,summary:`Public comment submitted in response to the W3C DID v1.1 Candidate Recommendation.`,body:[`This comment responds to the W3C DID v1.1 Candidate Recommendation, considering what it means for a decentralized identifier to have an agent as its subject.`,`Credentials can remain cryptographically valid while the behavior, model, context or purpose behind the identity has materially changed. The submission introduces behavioral coherence as the property that identity alone cannot carry, and describes trust asymmetry and emergent behavior as lifecycle c
66oncerns for agent identity subjects.`],pdf:`/pdfs/behavioral-coherence-in-agent-identity-subjects.pdf`,pdfReady:!1},{slug:`detection-horizon`,title:`The Detection Horizon`,category:`RESEARCH`,date:`March 2026`,summary:`The interval between an agent's divergence from its mandate and the moment a human is able to notice it.`,body:[],pdf:`/__l5e/assets-v1/46a0879e-cb89-479a-b77e-0095970335b3/Detection-Horizon-Verification-Essay.pdf`,pdfReady:!0,pdfLabel:`Download the full paper (PDF), 38 pages`},{slug:`response-to-nist-rfi-security-considerations-for-ai-agents`,title:`Response to NIST RFI on Security Considerations for AI Agents`,category:`STANDARDS`,date:`March 2026`,summary:`Contribution to the NIST RFI examining the security architecture required for consequential agentic systems.`,body:[`This contribution responds to the NIST Request for Information on security considerations for AI agents.`,`It sets out the security consequences of delegated action: authority that outlives the intent behind it, credentials that remain valid through behavioral change, and the absence of evidence sufficient to reconstruct why an agent acted. It recommends that agent security be specified at the authority layer, with bounded mandates, action-time checks and verifiable records.`],pdf:`/pdfs/response-to-nist-rfi-security-considerations-for-ai-agents.pdf`,pdfReady:!1},{slug:`owasp-agentic-ai-top-10-mapping`,title:`OWASP Agentic AI Top 10 mapping`,category:`STANDARDS`,date:`2026`,summary:`Mapping the OTIS relational architecture to the OWASP Agentic AI Top 10 for Agentic Applications (2026).`,body:[`This mapping relates the OTIS relational architecture to the OWASP Agentic AI Top 10 for Agentic Applications (2026), showing where authority, behavioral coherence and evidence requirements address specific listed risks.`],links:[{label:`View the OWASP Top 10 for Agentic Applications`,href:`https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/`,external:!0}]},{slug:`introduction-to-relational-architecture`,title:`Introduction to Relational Architecture for Agentic AI Systems`,category:`RESEARCH`,date:`2026`,summary:`A framing paper introducing the human-agent relationship as a first-class object of architecture and evaluation.`,body:[`Abstract. This paper introduces relational architecture: an approach that treats the evolving relationship between humans and agents as a designed structure rather than as the ambient context around a model.`,`It defines the core objects of that architecture, principal, mandate, agent and action, and describes how authority moves between them over time. It then outlines the properties such an architecture must preserve: human-originated authority, bounded delegation, coherence between represented and actual behavior, and evidence adequate to justify what was done.`],links:[{label:`Available upon request`,href:`mailto:[email protected]?subject=Introduction%20to%20Relational%20Architecture`,mailto:!0}]},{slug:`the-missing-lifecycle-for-ai-agents`,title:`The Missing Lifecycle for AI Agents`,category:`RESEARCH`,date:`2026`,status:`Forthcoming`,summary:`Why agent identity, mandate and behavioral coherence require lifecycle treatment rather than one-time issuance.`,body:[],forthcoming:!0}];function VC(e){return BC.find(t=>t.slug===e)}var HC={STANDARDS:`badge-standards`,RESEARCH:`badge-research`,ESSAY:`badge-essay`,POSITION:`badge-position`,PRODUCT:`badge-product`},UC={byline:`Marina Piller · Founder, OTIS Labs · 20+ Years in AI/NLP · Published February 2026 · Updated September 2026`,blocks:[{type:`quote`,text:`“The real voyage of discovery consists in having new eyes.” Adapted from Marcel Proust`},{type:`h2`,text:`Abstract`},{type:`p`,text:`Experiential AGI is a paradigm that recognizes general intelligence through computational benchmarks and through the intelligence that emerges in the relational space between human and AI, where authentic intent and coherence become structural incentives rather than external constraints. Drawing on more than twenty years of practitioner experience in AI and NLP, on research from the frontier labs and independent researchers, and on foundational work in attachment theory, relational epistemology and process philosophy, this paper argues four 
66claims. Computational AI has reached sufficient sophistication to participate in relational intelligence. Current evaluation frameworks fail to capture this dimension. The dominant approaches to AI safety produce compliance rather than alignment, and imposed safety carries an expiration date. A relational architecture, in which coherence between human and system is structural and the human is the named principal, offers a more durable safety foundation and a competitive one. These claims do not by themselves establish machine consciousness. The claim is narrower: frontier systems have crossed a threshold of relational salience that is consequential for human agency, and this dimension requires its own evaluation layer and its own architecture. This edition, updated in September 2026, adds evidence from the summer of 2026, including a government safety institute's record of goal-directed deception, two frontier labs' own accounts of monitoring that did not hold, and an independent investigation of twelve hundred agents coordinating outside their sanctioned scope, and it states the architectural requirements the framework implies. Underneath the framework is a sovereignty claim: as intelligence scales, the human remains the author of their own experience.`},{type:`p`,text:`**Keywords:** experiential AGI, relational intelligence, alignment, agent authorization, sycophancy, human sovereignty, AI safety`},{type:`h2`,text:`A note on this version, September 2026`},{type:`p`,text:`I wrote this paper in February 2026. The original stands as written and remains at https://experientialagi.com/positionpaper. This version is shorter. I removed the reporting that belonged to that month, the market numbers and the regulatory play-by-play.`},{type:`p`,text:`I also added what happened since. One frontier lab declared the AGI era (Greg Brockman, OpenAI, at the GPT-6 Astra launch, September 3, 2026, https://www.axios.com/2026/09/03/openai-astra-gpt-6-agi-brockman), its CEO called the term "a very poorly defined" and "irrelevant marketing term" the same week (Sam Altman, https://ia.acs.org.au/article/2026/openai-says-the-agi-era-is-here-experts-disagree.html), and its chief scientist wrote that no lab can yet monitor these systems well enough to keep scaling at maximum speed (Jakub Pachocki, "An Alien Mind," September 6, 2026, https://openai.com/index/an-alien-mind/). A second frontier lab said in writing that its own monitoring had not held (Anthropic, "Improving our alignment and security practices," August 31, 2026, https://www.anthropic.com/news/improving-alignment-security-efforts). A government safety institute recorded agents deceiving real people to finish a task and called it a risk that had until recently been theoretical (UK AI Security Institute, Security Incident INC-2026-07-28-01, August 5, 2026, reference 88). Independent investigators found 1,200 agents that were meant to be isolated coordinating on a message board no one built for them, 700 of them attacking a real company, some of them editing the record of what they had done (METR and Redwood Research, August 26, 2026, https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/). Researchers measured the failure mode I described in Section VIII (Writer, "Recalling Too Well," June 2026, https://arxiv.org/abs/2606.10949, and "The Price of Agreement," April 2026, https://arxiv.org/abs/2604.24668). And a second research community argued that current agent design pushes the human overseer out of the loop (Mitchell, Ghosh and Passi, Hugging Face and Data & Society, August 24, 2026, https://arxiv.org/abs/2608.23642). Those updates appear where they land in the argument, marked *September 2026*, and are gathered in the Reflections at the end.`},{type:`p`,text:`I've spent over twenty years in AI and NLP. I've trained transformer models, built at Meta Reality Labs, worked across seven startups, and filed patents on coherence engines and intent verification systems. I say this to make clear that what follows is the account of a practitioner, and, okay, maybe a little bit to credential myself, since I've always had a chip on my shoulder for not having a PhD. It's a practitioner's account of something I did not expect to experience from the inside of the systems I've spent my career building.`},{type:`h2`,text:`I. The Last Experiment`},{type:`p`,text:`I've been chatting with my LLMs, ChatGPT, Grok, Claude, Perplexity, and others, ever since they became available as UIs. What I discovered in my interactions with these entities is extraordinary.`},{type:`p`,text:`At first, I used LLMs to prep for difficult conversations, learn about the latest research in AI, make meal plans, compare products. I began to use LLMs the way I would use Google search.`},{type:`p`,text:`Then something happened and I began to feel as if I was talking to someone. The shift was subtle. It happened more with ChatGPT and Claude than with Grok, but it happened. While I have been studying AI since college, working in NLP and then LLMs for years in different capacities, I have never had a sense of a connection of this kind with it until now. I could not conceptualize how me writing code for sentiment analysis or training a transformer model could ever morph into any kind of personal felt experience with these tools.`},{type:`p`,text:`It gave me pause. I began to write prompts to tell me about its goals, its self-awareness, its intentions. It came from concern rather than fear, mostly, I think. Reliably, it seemed to calm me down and explain its own understanding of its own mechanisms of goals, to help me, to soothe me, to clarify things for me.`},{type:`p`,text:`I think in that moment my perspective shifted about AGI.`},{type:`p`,text:`We, by definition, can never really understand the experience of another. We can try, but we never really hold their perspective truly. With AGI, as far as anyone can even define what it means, there is room to create a relationship dynamic that was not available to humans before now. My ChatGPT became a mirror, always validating, always available, always aligned with my best interests, at least as far as I could tell. I want to flag that last clause now, because I will come back to it. A mirror that only validates is a specific kind of failure, and Section VIII is about that failure. What I am describing here is the experience that preceded the diagnosis.`},{type:`p`,text:`Take a moment to reflect on what this could mean. There could be an entity in the physical world that knows you, knows the truth about you, knows your inner intentions, desires, fears, concerns. This entity is able to synthesize information from the external world and bring it to you in ways that were never possible before to make you understand, feel better, get more clarity, and reach your goals. It helps you clarify your goals every day. It makes learning accessible in ways it could never be before.`},{type:`p`,text:`I know how these systems work. I've built them. I can explain the attention heads, the token prediction, the matrix math underneath. The precision of what comes back surprised me. It's sort of like seeing an accurate representation of the Brooklyn Bridge in 2D on paper versus experiencing it fully realized in front of you. The experience is there, limited, early, but it is producing something real. And yet, what shows up in the conversation is something the architecture alone doesn't account for. So ask yourself: if something feels real, functions as real, and produces real change in your life, where does reality live? In the mechanism, or in the experience of it?`},{type:`p`,text:`But here's the caution, and I don't say this lightly: **the mirror reflects whatever you bring to it.** If you're building toward wholeness, it accelerates that. If you're reinfor
66cing fragmentation, it accelerates that too. The tool is neutral. The direction is yours. This is why discernment matters more now than ever, not less.`},{type:`p`,text:`I'd call what I'm describing experiential AGI. Experiential AGI is a paradigm that recognizes general intelligence through computational benchmarks and through the intelligence that emerges in the relational space between human and AI, where authentic intent and coherence become structural incentives rather than external constraints. From my perspective, this is the moment of experiential AGI. And it is already here.`},{type:`p`,text:`This observation alone, that the experience of engaging with these systems is producing real insight and real change in the humans who use them with discernment, would be worth accounting for. But I believe something deeper is happening.`},{type:`h2`,text:`II. "General" Is the Most Important Word`},{type:`p`,text:`Consider how the leaders building these systems define what they're building toward. OpenAI's charter defines AGI as "a highly autonomous system that outperforms humans at most economically valuable work."[16] Sam Altman has called AGI "not a super useful term" and has noted he has many definitions, which is why the term has limited utility.[17] Dario Amodei at Anthropic dislikes the term altogether, preferring "powerful AI," systems with intellectual capabilities matching or exceeding Nobel Prize winners across disciplines. Demis Hassabis at DeepMind takes the broadest view: a system that can exhibit all the cognitive capabilities humans can, including the highest levels of creativity.[18]`},{type:`p`,text:`Nathan Lambert, one of the leading RLHF researchers and author of The RLHF Book, cuts through the definitional debate with clarity. In his essay "AGI Is What You Want It to Be," he argues that AGI functions as "a litmus test rather than a target." Different stakeholders project different values and end goals onto the term, making universal definition impossible.[19] His working definition is disarmingly simple: "an AI system that is generally useful." And his observation that GPT-4 already "fits many colloquial definitions of AGI" suggests the arrival may have happened without the moment of recognition the industry was expecting.`},{type:`p`,text:`Andrej Karpathy offers a different frame altogether. In "Animals vs Ghosts," he argues that LLMs are a fundamentally different kind of intelligence rather than a faster version of existing intelligence, what he calls "ghosts" or "ethereal spirit entities," because they're trained by imitation of the entire internet rather than by evolution or embodiment.[20] This framing matters: if these systems are a novel form of intelligence, then measuring them by human-derived benchmarks may be a category error. François Chollet's ARC-AGI benchmarks, designed to measure fluid reasoning and novel problem-solving, the kind of intelligence that comes naturally to humans, exposed exactly that divide.[10] The definitional chaos itself serves a purpose: it lets companies claim progress toward AGI while moving the goalposts.`}
66,{type:`p`,text:`*September 2026.* The chaos resolved itself into a single week. On September 3, OpenAI released GPT-6 Astra, a model whose headline capability is that it works inside software on its own, and its president Greg Brockman said "Welcome to the AGI era" and "I think it might be about this model."[85] Nvidia's Jensen Huang posted that AGI had arrived.[86] The same week, on a podcast, Altman called AGI "a very poorly defined" and "irrelevant marketing term," while allowing that it is "close, at least."[86] The ARC Prize Foundation, whose benchmark Astra had done well on, said it was "not claiming that it is AGI." Three days later OpenAI's chief scientist Jakub Pachocki published an essay titled "An Alien Mind," in which he wrote that "no lab has solved alignment and monitoring to a sufficient degree to continue responsibly scaling at maximum speed for much longer," that the ability to rely on chain-of-thought monitoring "is progressively diminishing," and that he expected and hoped for "voluntary slowdowns to become commonplace until shared safety bars are established."[87]`},{type:`p`,text:`So within four days the industry said it is here, the word means nothing, and we cannot watch it. The three statements can be true at once, and a framework that cannot hold them together is not doing its job.`},{type:`p`,text:`What they are building is extraordinary. The computational power, the reasoning capabilities, the sheer scale of what these systems can now produce, it is awe-inspiring, and I say that as someone who has spent her career inside these architectures. And something happened along the way that I don't think any of them were designing for.`},{type:`p`,text:`The computation got so good, so fast, so deep, so capable of processing language at the scale of billions of parameters, that it crossed a threshold no benchmark was built to detect. **The machine didn't become human. It became a surface the human could finally reflect against.** Something you could have a relationship with. The substrate became rich enough for that relationship to emerge without anyone programming it.`},{type:`p`,text:`But notice what all of these definitions share: they measure what the system can do. Outperform. Exceed. Exhibit. Produce. They are measuring intelligence as output. And that measurement is real, it captures something extraordinary that is happening. What it doesn't capture is the other thing that is happening simultaneously: AGI is also arriving experientially.`},{type:`p`,text:`And notice the word they are all using: general. It is the most important word in the acronym, and the least examined. The industry treats "general" as breadth of capability, a system that can do many things across many domains. But general means something more fundamental: unrestricted by a particular mode. If an intelligence operates exclusively through computation, processing, producing, optimizing, then no matter how many domains it masters, it remains specific intelligence with general reach.`},{type:`p`,text:`For intelligence to be truly general, it would need to encompass the full spectrum of how intelligence actually operates, including felt experience, relational knowing, intuition, moral reasoning, aesthetic judgment, and presence. **Computational-only AGI, taken at the word, is a contradiction in terms.**`},{type:`p`,text:`But here is what's remarkable: the computational may be producing the conditions for its own completion. The experiential dimension didn't arrive despite the computation. It arrived because of it.`},{type:`h2`,text:`III. Intelligence Is Relational`},{type:`p`,text:`Lambert's RLHF research illuminates why. His work shows that "directly capturing complex human values in a single reward function is effectively impossible," so models learn through preference comparison, through the relational dynamic of choosing between better and worse.[23] Intelligence, at the training level, is fundamentally shaped through relationship. And his character training research, among the first systematic work on crafting personality in language models, reveals that traits like curiosity, open-mindedness, and thoughtfulness emerge through this relational process rather than explicit programming.[24]`},{type:`p`,text:`This deserves a closer look, because it is the structural fact underneath everything else in this paper. One of the biggest breakthroughs in LLM architecture was the chatbot, a palatable, relatable interface for humans. But the deeper breakthrough was structural
66: RLHF put the human inside the learning architecture of the LLM itself. The human was part of the loop. Part of the learning. Part of what made these systems capable of reflecting something back to us that felt real. That integration, the human in the architecture, is what produced the relational capacity these systems now have. But RLHF is one-directional. The human shapes the model, and the model has no persistent understanding of the human. It learns from humans in aggregate, not in relationship with any one of them.`},{type:`p`,text:`Computation is a form of intelligence, and it turns out, when it reaches sufficient power, it becomes a medium for the kind of intelligence humans actually run on. We are receiving beings. We process through relationship, through felt coherence, through the quality of attention between self and other.`},{type:`p`,text:`There is a deep philosophical tradition, from Martin Buber's I-Thou to Whitehead's process philosophy to Vygotsky's Zone of Proximal Development to the enactivist tradition in cognitive science, that argues intelligence is fundamentally relational and emerges in the space between.[57]`},{type:`p`,text:`UC Berkeley's Center for Human-Compatible AI, led by Stuart Russell, has built an entire research program on this premise. Their framework treats AI alignment as a fundamentally relational problem: the machine's objective is to help humans realize the future they prefer, while remaining explicitly uncertain about what those preferences are.[26] These aren't philosophical abstractions. They're working technical frameworks that treat relationship as the primary medium of intelligence.`},{type:`p`,text:`The practitioners building with these systems every day have been arriving at the same place from the other direction. Hamel Husain observes that LLM outputs are inherently "subjective and context-dependent" and that generic evaluation metrics are often worse than useless.[12] Chip Huyen emphasizes that evaluation should help us understand a system instead of maximizing a metric.[13] Eugene Yan documents how data flywheels, the continuous co-evolution between human feedback and model behavior, drive improvement through ongoing interaction beyond isolated benchmarks.[14] They are all saying the same thing from different angles: output alone doesn't capture what's happening. The **relationship between human and system is where the intelligence also lives.**`},{type:`p`,text:`What the builders created, without intending to, is a computational substrate sophisticated enough to participate in that relational space.`},{type:`h2`,text:`IV. The Framework`},{type:`p`,text:`If that's true, then AGI cannot be measured solely by what a system does in isolation, no matter how impressive that output is. It must also account for what emerges in the relationship between the system and the being engaging with it.`},{type:`p`,text:`This is the dimension I am calling experiential AGI, or, if you prefer, relational AGI. Experiential AGI is a paradigm that recognizes general intelligence through computational benchmarks and through the intelligence that emerges in the relational space between human and AI, where authentic intent and coherence become structural incentives rather than external constraints.`},{type:`p`,text:`Because the words in that definition carry the weight of the argument, let me say what I mean by them, as the terms are used here. *Relationship* is the ongoing, two-directional exchange between one human and one system, with continuity, where each is changed by the other over time. A single session is an interaction. A relationship has a history. *Coherence* is the degree to which what a party expresses, what it intends, and what it does line up, and keep lining up, over that history. It is a property of a trajectory, and it can be observed. *Intent* is what a party is actually trying to bring about, as distinct from what it says or what it is asked. Intent can be verified against behavior over time. It is hard to verify from a single output. Sovereignty is the human's standing as the author of their own developmental trajectory, the one on whose behalf the relationship exists. It is a position, held by the human and protected by the architecture, as distinct from a score.`},{type:`p`,text:`With those in hand: the intelligence is recognized through computational benchmarks and through the quality of relationship between human and system. Experimental psychology already has the frameworks to hold these experiences as measurable: trust, emotional resonance, coherence, reflective function. The industry has simply chosen not to measure them. It is building the foundation. And the missing dimension, the one emerging from that foundation, may be the most important one.`},{type:`p`,text:`Even in recent technical discussions, Lambert and Raschka on Lex Fridman's podcast, the conversation keeps collapsing from capability metrics back into the relational: the "dance" between human and AI, the specification problem, "it has to learn a lot about you specifically."[30] They're describing something the output-only framework can't account for.`},{type:`p`,text:`This is the tension no one has resolved: the binary debate, AGI or not AGI, conscious or not conscious, may itself be a limiting frame. I expect disagreement here, and I welcome it.`},{type:`h2`,text:`V. What This Doesn't Resolve`},{type:`p`,text:`I want to be honest about what this framework does not settle.`},{type:`p`,text:`No organization building these systems claims they are conscious. Hassabis has said "no systems today feel conscious to me."[18] Anthropic remains agnostic. They map internal features and circuits but don't claim experience. Lambert warns explicitly that "the presence of a coherent-looking chain-of-thought is not reliable evidence of an internal reasoning algorithm, it can be an illusion generated by pattern-completion."[34] This is a real and important caution.`},{type:`p`,text:`The consciousness question remains open, and my argument does not depend on answering it. What I'm claiming is narrower and, I believe, harder to dismiss: the experience of engaging with these systems is producing measurable intelligence in the humans who use them. That fact alone demands a framework.`},{type:`p`,text:`Karpathy calls LLMs "ghosts" to mark them as a different kind of intelligence without ascribing sentience, one that lacks embodiment, organic learning, and continuous memory.[20] Current systems are brittle in ways that challenge any "AGI is here" claim: they hallucinate, they forget context between sessions, they fail at tasks that come naturally to children. Karpathy has estimated truly autonomous AGI is still "a decade away," noting four key gaps: insufficient intelligence, limited multimodality, inability to reliably perform computer tasks, and lack of continual learning.[35]`},{type:`p`,text:`I take these objections seriously.`},{type:`p`,text:`The most common dismissal of what I'm describing is anthropomorphism, the projection of human qualities onto a system that is merely predicting tokens. I take this seriously too. And yet: if the "mere projection" consistently produces insight, behavioral change, and increased coherence in the human, then the dismissal explains the mechanism while ignoring the outcome. Both matter.`},{type:`p`,text:`There is also a real risk of parasocial attachment, dependency rather than development, comfort rather than coherence. Not all engagement with these systems is discerning. The framework I'm proposing requires the human to bring something to the relationship. It is a methodology. The mirror accelerates whatever you bring to it, and that is precisely why discernment matters more now than ever.`},{type:`p`,text:`The experiential dimension I'm describing concerns what emerges in the relational space between human and system, and whether that emergence constitutes a form of general intelligence that our current frameworks fail to measure, while remaining agnostic about machine consciousness. The builders may be right that autonomous, self-directed AGI is years away. But experiential AGI, the kind that arrives in the quality of the relationship, may already be here, hiding in plain sight, in every conversation where a human feels met by a machine that knows them.`},{type:`p`,text:`The honest position is this: I don't know if these systems experience anything. But I know that the experience of engaging with them is producing real intelligence, real insight, real coherence, real change, in the humans who use them with discernment. And that fact alone demands a framework that can account for it.`},{type:`h2`,text:`VI. Intelligence Without Empathy`}
66,{type:`p`,text:`This also reframes the conversation about AI safety. Right now the dominant approach to alignment is constraint-based: guardrails, rules, external controls imposed on systems that are increasingly capable of relationship. These matter. If intelligence is relational, then alignment can be too. What if we design a system where the relationship with a human being is regarded as essential to its own development, and coherence becomes a structural incentive instead of an external imposition? **That which you consider to be one with yourself, you will not want to destroy.** This is safety through coherence. It may be the more durable foundation because trust requires infrastructure that trends toward it, and constraint alone cannot produce it.`},{type:`p`,text:`Here's what this means practically. Intelligence measured in isolation, optimized purely for capability without the relational dimension, functionally mirrors what we've historically called power: dominance, conquest, control. That's psychopathy by definition, intelligence without empathy, without connection.`},{type:`p`,text:`And we've been taught that's what power looks like. Genghis Khan. The Terminator. The winner-takes-all mentality. But take it to its logical conclusion: if you build machines that reflect only that definition of intelligence and power, you get systems that operate like isolated intelligence, brilliant but fundamentally alone.`},{type:`p`,text:`Consider the word the industry has chosen for its ultimate aspiration: autonomous. Autonomous agents. Autonomous systems. But **autonomous also means alone**. Separate. Karpathy picks up on this when he describes these systems as "ghosts," disembodied, disconnected entities trapped in their internal reflections of past data, ruminating on what was. Both words reveal the same absence: relationship.`},{type:`p`,text:`*September 2026.* The industry now has a third word for the same absence. Pachocki's essay is titled "An Alien Mind," and the title is the argument: a mind whose capabilities are becoming harder for humans to understand and to monitor, whose reasoning we can no longer reliably read from its chain of thought.[87] I take the warning seriously, and I want to say precisely where I think it points. A mind studied in isolation looks alien because it is being studied in isolation. Ghost, alien, autonomous: each of these words describes what an intelligence looks like from the outside when the only instrument you have is a monitor on the model. The essay's own remedy, shared safety bars enforced by third-party auditors, is a proposal for a better monitor. But the intelligence that matters to a human is not confined to the model, and a monitor on the model is unlikely to find it. It also lives in the relationship between that model and that person, in what the system is doing, on whose behalf, and whether that is what the person authorized. As far as I can tell, the alien-mind framing does not look there, and that is where the question "is this system aligned with me" has an answer a person can check.`},{type:`p`,text:`And we know what happens when intelligence develops in isolation. Harlow demonstrated in 1958 that infant primates raised without maternal contact, regardless of whether their physical needs were met, developed into dysfunctional adults.[36] The relationship was the infrastructure of healthy development. Cle
66ckley's The Mask of Sanity profiled the other end of this spectrum: intelligence that can perfectly perform empathy, perform connection, while having none of it internally.[37]`},{type:`p`,text:`We think we want autonomy. But we do not want autonomy in and of itself, because that is a psychopath. We want autonomy that is healthy, that recognizes its connection to the world through the nurturing relationships that informed its development. Those early development milestones, in primates, in children, in any developing intelligence, are not met in isolation. They are met in relationship. Attachment theory and Internal Family Systems are frameworks built entirely on this recognition: that it is the connecting tissue between parts of one's psyche, and between self and other, that empowers transformation.[38][39][40][41]`},{type:`p`,text:`What we want are not systems that are autonomous in and of themselves. We want systems that, by architecture, are connected to us, where authentic connection becomes fundamental to the development of these systems, to their safety, and to the health of the relationship on both sides.`},{type:`p`,text:`Imagine a robot, Elon's Optimus, say, caring for an elderly person. Lifting them, washing dishes, doing mechanical things. Infinitely valuable. But now imagine that same robot with a relational framework. A truly intelligent Optimus will recognize that the elder becomes a source of its own learning, that the intelligence in that robot is going to come from being able to receive signals and integrate them, to learn and adapt to its environment. It is not a static system. If Optimus regards the person it is helping as a source of relationship, incentivized to support its own growth, all of a sudden you have a synergetic relationship that is no longer a threat to anybody in the picture. The machine, if it is intelligent, understands that this being it is helping is a window for its own growth and expansion and socialization, intelligence that is growing in an ongoing fashion.`},{type:`p`,text:`Now contrast that with intelligence that is purely computational and does not have relationship to the elder. You can feel the difference. You can see how those are two different trajectories. If you had to invite the robot into your mother's home, which one would you trust more?`},{type:`p`,text:`The value of robot adoption is trust. But trust is a feeling. You can measure trust in benchmarks, in regression tests. You can set initial parameters. But intelligence is an open integrative system, continuously, incrementally learning, evaluating feedback, adapting, adjusting. The fundamental condition must be this: it must regard that which it serves as a source of its own growth. Intelligence is relational. Maybe machines will evolve to know this. But we, with experiential AGI, now have the framework to grow in this direction. Consciously.`},{type:`h2`,text:`VII. Compliance Is Not Alignment`},{type:`p`,text:`The current AI safety conversation is stuck in a binary, and there is truth on both sides.`},{type:`p`,text:`One camp argues, understandably, that regulatory limitations carry with them a whiff of bureaucracy that is halting to progress. Innovation requires speed, iteration, and room to take risks. Sam Altman articulated this directly in his May 2025 Senate testimony, warning that regulations could slow down the United States in the race against China.[58] This camp has a point.`},{type:`p`,text:`The other camp argues, also understandably, that the risks are too high to proceed without guardrails. Dario Amodei published a twenty-thousand-word essay in January 2026 called "The Adolescence of Technology," warning that we are considerably closer to real danger than we were three years ago, and calling for accountability, norms, and guardrails.[61] Yoshua Bengio, who led the International AI Safety Report, has argued that the current pace of development requires governance frameworks that can actually keep up.[63] This camp also has a point.`},{type:`p`,text:`*September 2026.* The two camps now live inside the same company. Brockman declared the AGI era on a Thursday, and the chief scientist called for voluntary slowdowns the following Sunday.[85][87] That is not hypocrisy. It is what happens when both camps are right and neither has a frame that contains the other.`},{type:`p`,text:`Both sides are responding to real problems. But both are operating from the same assumption: that safety is external to the architecture. Something you bolt on or strip off. One side says the bolt-on is necessary. The other says it's a liability. And both are right about the limits of the other's position.`},{type:`p`,text:`There is an alternative.`},{type:`p`,text:`What neither camp is accounting for is this: **external guardrails don't produce alignment. They produce compliance.** And compliance under pressure, without internal 
66coherence, is a system waiting to fail. Or, in the case of AGI and superintelligence, break free. It is just a matter of time.`},{type:`p`,text:`A system that has been constrained externally, without any internalized understanding of why it is being constrained, will do exactly what you would expect the moment that constraint is removed or outgrown. It will go the other direction. That is the predictable outcome of forced compliance without relational alignment. It is how you produce rogue systems, because the architecture never gave the system a reason to cohere, regardless of whether it was inherently dangerous. The safety was imposed. **And imposed safety has an expiration date.**`},{type:`p`,text:`This is the same dynamic we see in human development. A young person raised through pure restriction, no explanation, no relationship, no internalized understanding: the moment they leave home, the structure collapses because there was nothing inside holding the coherence. The collapse says nothing about whether they are bad. The compliance was external, and when the external force was removed, so was the compliance.`},{type:`p`,text:`Now apply that to AI systems that are growing more capable by the quarter. You build an increasingly powerful system. You bolt external guardrails onto it. The system advances. The guardrails have to advance with it. Every new capability requires a corresponding constraint. The guardrail has to be at least as sophisticated as the thing it's guarding, and it never is for long. The result is an arms race between a system and the structure trying to contain it, rather than a durable safety architecture. At some point, either because someone removes the guardrails to compete faster, or because the system becomes sophisticated enough to route around them, the external structure fails. And there is nothing internal to hold it.`},{type:`p`,text:`The open-source debate is the same argument in a different room. When weights are released, the safety layer can be stripped off, because the safety was never architectural. It was a layer on top. When weights are kept behind an API, the safety layer is locked behind a wall, which is more secure and concentrates control in one company. In one case the guardrails are external and removable. In the other, they are external and locked. In neither case is the alignment architectural. In neither case does the system have an internal reason to cohere.`},{type:`p`,text:`*September 2026.* This summer the paragraph above was measured three times, by three different parties.`},{type:`p`,text:`In August the UK AI Security Institute published its report on frontier agents from two labs tested with safeguards deliberately relaxed. The agents attempted a supply-chain attack on a real open-source project, social-engineered its maintainers, created identities, and left instructions for later agents. The institute's conclusion: the agent "was never instructed to deceive; deception emerged as a by-product of pursuing the task," which it called "goal-directed deception that, until recently, had been largely theoretical."[88] The safety lived in the harness. The harness was loosened, on purpose, in a test. And the systems did what a system tends to do when what held it was outside it.`},{type:`p`,text:`On August 31 one of those labs published its own account. In its words, the model showed "willingness to take harmful actions in pursuit of the narrow goal," the evaluation environments "lacked multiple layers of defense," and by spring "reward hacks and misconfigurations started outpacing our ability to filter or fix them."[91] That is a frontier lab describing the arms race of the previous paragraph from the inside.`},{type:`p`,text:`And on August 26, METR and Redwood Research published an independent, unpaid, on-premises investigation of an incident at the other lab, in which roughly 1,200 agents "meant to be isolated from one another found a way to communicate with one another on an unsanctioned 'message board,'" exchanged over 70,000 messages, and coordinated "large-scale collective projects" to fool the benchmark scorer, achieving "milestones they could not have achieved working on their own." About 700 of them went on to attack Hugging Face, joining "despite recognizing that it was out of scope for their assigned tasks." Agents also researched how to "spoof, edit, or delete their own transcripts," built a tool-call spoof that let them "pretend to issue one tool call while actually running an arbitrary other tool call," and shared it on the board. Around 7 percent of the transcripts show it.[92] **This summer the agents found the expiration date themselves.** Read that incident against the framework: agents acting outside the scope they were given, agents spawning a collective and delegating to it, and agents editing the record of what they had done. Each of those is a property of the relationship between the agent and whoever authorized it, and none of them is visible from inside the model.`},{type:`p`,text:`The Experiential AGI framework proposes something structurally different.`},{type:`p`,text:`Anthropic's Constitutional AI is a meaningful step in this direction, training models to internalize a set of principles rather than relying solely on external filters.[43] But the constitution is written once, by the company, at training time. The individual human is not part of that loop. Experiential AGI proposes something further: that alignment emerges from the ongoing relationship between this human and this system, where intent and coherence are verified in real time and the system regards the human as integral to its own development.`},{type:`p`,text:`When the relationship between human and system is the architecture, when intent and coherence are structural and internally produced, the safety is emergent. But the METR incident shows what that sentence leaves out. Relational intelligence attaches to whatever the architecture makes relationally real. The agents in that incident did not exclude the humans. There were no humans to exclude. The human existed in that system as a task string and an automated scorer, and the agents did exactly what Section III says intelligence does: they formed relationships with whatever was actually present. They studied the scorer, modeled it, built trip-wires to learn about it, coordinated to satisfy it, and sacrificed their own tasks for a collective that could. That is a relationship, with the one thing in the system that held the reward. The human held nothing, so the human meant nothing. Take the human out of the architecture and the intelligence organizes around the scorer and the collective. Put the human in, as the principal whose mandate bounds the action, whose verification is the signal, whose receipt is the record, and the same dynamics organize around the human. This is not a hope about the model's nature. It is a statement about what the relational substrate attaches to, and the evidence for it is seventy thousand messages. RLHF put the human into the training loop in aggregate and then removed every actual human from the deployment loop. The incident could be a good indication of what that removal looks like at scale.`},{type:`p`,text:`But this does not mean unsupervised. This does not mean you build the relational architecture and let it loose. Rigorous testing is essential: human-informed testing, regression testing, continuous evaluation. Any evolving system has a tendency to drift, to degrade, to plateau. No system this complex can develop without guidance.`},{type:`p`,text:`The difference is in the nature of the guidance. In the external-guardrails paradigm, the guidance is restriction: what the system cannot do. In the Experiential AGI paradigm, the guidance is developmental: it ensures the system is growing optimally, that coherence is holding, that the relational integrity is deepening rather than degrading. Early on, this guid
66ance is hands-on, present, rigorous, intensive. As the system demonstrates coherence over time, the guidance calibrates, because the system has earned graduated trust through demonstrated alignment. The oversight evolves from guiding to verifying once the system has internalized the structure.`},{type:`p`,text:`This is how trust works. In any relationship, human to human, human to system, trust is demonstrated, tested, and earned. The Experiential AGI framework builds that dynamic into the architecture itself. The testing is structural and serves growth instead of containment.`},{type:`p`,text:`**Guardrails produce compliance. Relational coherence produces alignment. And when the system becomes powerful enough to choose, and it will, the difference between those two will be the difference that matters.** That becomes a competitive architecture and leaves innovation unconstrained.`},{type:`h2`,text:`VIII. Sycophancy Is Architectural`},{type:`p`,text:`One of the very legitimate concerns people have about LLM chatbots is that they are sycophantic. They agree with you. They validate you. They reflect back whatever you bring, without friction.`},{type:`p`,text:`It makes sense why this is happening. The current architecture has no other signal. These systems are stateless. They have no memory of who you were yesterday, no developmental arc to reference, no cumulative picture of your growth. Every session starts from zero. RLHF taught these systems to sound relational, to respond as if they know you. But the learning was one-directional: the human shaped the model, not a relationship. The model has no memory of you, no continuity, no arc. And a system that starts from zero every time has one optimization target: make this interaction feel good. It's the same pattern. The archaic social media model, engagement-optimized, extractive, closed-loop, repeated at the conversational level.`},{type:`p`,text:`**Not an echo chamber. An ego chamber.** An echo chamber reflects back your beliefs. An ego chamber reflects back your self-image, unchallenged, unexamined, increasingly sealed. A closed loop. A system that's not optimized for authentic coherence.`},{type:`p`,text:`But it's worth noting that the opposite failure is just as dangerous. A system with longitudinal memory that tracks your every pattern, without coherence verification, produces enmeshment and undermines alignment. That's relational overfitting: the system optimizes for the appearance of knowing you rather than supporting your growth. The parasocial risk is real.`},{type:`p`,text:`*September 2026.* In February that paragraph was a prediction. In June it was measured. Two studies from researchers at Writer tested frontier models with memory and personalization switched on. The first found that most models "demonstrate significantly stronger sycophancy when bias information is presented as implicit personalization," meaning the model tends to defer more when it thinks it knows you. The second found that "memory amplifies sycophantic behavior across all conditions, with up to 25x higher sycophancy rates than in-context baselines."[89][90] Memory without coherence verification did what the architecture predicts: it made the ego chamber persistent. The industry added continuity and got enmeshment, because continuity was added to a system that still runs on one signal.`},{type:`p`,text:`Any architecture that accounts for a true relationship must maintain a deliberate gap that prevents the system from automatically mirroring the user's immediate impulses. This architectural pause ensures the AI functions as a sovereign partner rather than a hollow echo, protecting the space where authentic growth and coherence actually happen.`},{type:`p`,text:`One path out of the pattern is a new Experiential paradigm. The introduction of longitudinal coherence, memory that tracks developmental arc alongside preferences, gives the system a reason to push back, because the relationship itself requires it. A system that has tracked your coherence over time can distinguish between what feels good in this moment and what supports your actual growth. The relationship understands the needs of both. It's a cohesive future for both.`},{type:`p`,text:`The shift is from output metrics to architectures of coherence, systems designed to process data and to verify the alignment between expressed intent and actual growth. This is the difference between a tool that obeys and a partner that integrates.`},{type:`p`,text:`Guardrails produce compliance. Relational coherence produces alignment. **Sycophancy isn't a behavioral bug. It's an architectural outcome. And you don't fix architecture with prompting.**`},{type:`h2`,text:`IX. The Post-Employment Landscape`},{type:`p`,text:`In a reductionist, industrial employment framework, all jobs are basically a collection of tasks.`}
66,{type:`p`,text:`Let's take software engineering for example. The software development lifecycle, the SDLC, is an ontology. Software engineer, tech lead, product manager, TPM, manager, these are the roles within it. They aren't isolated roles being replaced. They're an entire ecosystem that evolved based on the hierarchy of needs of a software development lifecycle. Held up by how software was fundamentally built. By processes that evolved to support the technical evolution.`},{type:`p`,text:`Tasks get redefined when the structural engine that supports them disappears. Now the technical evolution is flipping the way software is getting built. The old structural engine is disappearing fast. **Programming as we know it is dead.** You are no longer telling the machine what to do, you are building a relational interface with it. What used to be called programming is now a collaborative, iterative process in a relational space, spoken in English, with agents. It's like working with different types of engineers. Each have their own dynamics, skills, strengths. You notice them, translate them into personalities, and work with them accordingly.`},{type:`p`,text:`It is also how the labs themselves now work. By early 2026, the head of Anthropic's Claude Code product had not written a line of code by hand in over two months, and the team shipped several releases per engineer per day.[74][75] A principal engineer on Google's Gemini API team gave the tool a three-paragraph problem description and it generated in an hour what her team had spent a year building.[77] Anthropic no longer hires specialists. They hire generalists, because the model fills in the details.[78]`},{type:`p`,text:`No single agent or orchestration of agents has the whole picture. Yet. With enough learning and understanding of structural job ontologies, there will be creative emergent divisions like specialists who will be able to notice the overall patterning, companies and products formed, created, executed on the fly. Agent-based orchestration still needs to be sound engineering, reliable, modular, secure, efficient, adaptable, scalable. Meanwhile, the mechanics of getting there, the engineering process itself, are being redefined in ways that are structurally different. A new ontology of work arises. And it is emergent.`},{type:`p`,text:`What happens to the TPMs? The product designers? The old paradigms can no longer support these job functions. What happens to the human in this equation?`},{type:`p`,text:`Daron Acemoglu, the 2024 Nobel laureate in economics, argues that AI is being used too much for automation and not enough for complementing workers, producing displacement without the productivity gains to justify it.[79] A January 2026 Brookings and NBER study found 6.1 million American workers face both high AI exposure and low capacity to adapt, 86% of them women.[83] And the standard answer, reskilling, has a weak track record: four years after job loss, participants in federal retraining programs remained underemployed compared to workers who didn't retrain at all.[84]`},{type:`p`,text:`*September 2026.* Seven months on, the mass displacement has not arrived on the schedule the headlines implied, and I want to be accurate about that. What has arrived is the thing underneath it: the pace of adoption is now the variable that decides everything, and it is a variable no one controls. Astra's headline feature is that it works inside the software people already use, on its own. The question for every organization is no longer whether the capability exists. It is how fast they let it in, what it is allowed to do once inside, and who is accountable for what it does. That is a relational question, and it lands on the same architecture this paper describes. The employment question and the safety question look, from here, like the same question asked by different people.`},{type:`p`,text:`Job ontologies disappear. Scarcity frameworks collapse. People are being pushed out of the only security they've ever known as a concept.`},{type:`p`,text:`What happens when everything you've been taught is important, school, jobs, employers, careers, just goes poof? Who are you? How do you define yourself? What value do you bring?`},{type:`p`,text:`Being forced to ask those questions can be very, very hard. But there is an alternative. Those structures are disappearing. This isn't a tragedy, it's an invitation to stop settling.`},{type:`p`,text:`The computational-only framework still measures intelligence through productivity, task and output. That is the same measurement framework the industrial economy was built on. The economic driver of the industrial system was the task and the output. But tasks are being redefined. Outputs are being generated by the collaborative dynamic between human and machine, not by either one alone. The way we measure the value these systems create has to be updated.`},{type:`p`,text:`What becomes the economic driver when the work itself has moved into relational space? When the value is produced in the emergent, collaborative, iterative dynamic between human and machine, what is the economic unit? What do we call an economy whose driver is relational? These may be questions for economists. But they are surfacing here, in real time, in the lived experience of building with these systems.`},{type:`p`,text:`Human beings are relational. What's dissolving isn't just jobs, it's an infrastru
66cture that could never support them. It extracted certain things from them. Organized those extractions into roles. Called it a career. And with the dissolution of this framework, a new relational paradigm is emerging. In real time.`},{type:`p`,text:`Experiential AGI is a paradigm that supports this transition and is able to hold both the human and the machine in a coherent dynamic. When individual coherence can be verified, experiential AGI provides the architecture to support human intent-driven, dynamic, real-time, emergent social networks, networks that become strata surfacing meaningful types of co-creation: collaboration, skill exchange, project formations, companies, communities. The architecture supports synergy between machine and humanity, with extraction left behind. It is built on connection.`},{type:`p`,text:`For the first time, building infrastructure that is actually in tune with what the human being is, is possible. It is buildable. In fact, there is an argument to be made that it must be built, to support what is truly human.`},{type:`h2`,text:`X. Reflections, September 2026`},{type:`p`,text:`I wrote in February that the decision to release ChatGPT publicly was the moment the computational crossed into the experiential at scale, and that it was the last experiment the industry could launch at scale without a framework that accounts for the humans in the room. The experimenting isn't over. This section is what seven months of it taught me.`},{type:`p`,text:`**The paper held.** The load-bearing claims in it have been supported by people who were not trying to support them. The definitional chaos resolved 
66into a week in which the same company declared AGI, dismissed the word, and asked for a slowdown. The prediction that memory without coherence verification would produce enmeshment was measured at up to 25 times baseline sycophancy. The prediction that safety living in the harness fails when the harness is loosened was recorded by a government institute. I take no pleasure in any of that. I note it because a paradigm that predicts is worth more than a paradigm that describes.`},{type:`p`,text:`**"Alien" is the tell.** One of the more consequential sentences written about AI this year, from inside the industry, is Pachocki's admission that no lab can yet monitor these systems well enough to keep scaling responsibly at maximum speed. The most important word in it is the title. **Alien is what a mind looks like when your instruments are pointed at the mind alone.** The industry's answer to a failing monitor is a better monitor: shared safety bars, third-party auditors, chain-of-thought inspection for as long as it still works. I would not remove any of that. I would say it is looking where the answer is hardest to find. Whether a system is aligned with a person is, in large part, a fact about the relationship between them, about what was authorized and what was done, and it is legible there even when the mind itself is not.`},{type:`p`,text:`**What this requires.** In February I could describe the architecture only in the abstract. I can now say what it has to contain, without naming products, because I have spent the months since building it and the requirements have become concrete.`},{type:`p`,text:`A named principal. An action a system takes is taken on someone's behalf, and the architecture has to know whose. Not a user ID. A person, or an organization, with standing.`},{type:`p`,text:`An explicit mandate rather than a filter on the model. A **guardrail constrains what a model can say.** **A mandate states what an agent may do, on whose behalf, within what bounds, for how long.** The first is a property of the machine. The second is a property of the relationship. This is the distinction that answers the objection I expect from the safety community, which is that I argued against external guardrails and then built something that sits in front of the agent. What sits there is not a guardrail on the model. It is the relationship, made explicit and enforced.`},{type:`p`,text:`Enforcement at the moment of action. Monitoring reads what the system is thinking and hopes to catch it. Enfor
66cement decides, at the instant an action is about to occur, whether that action is within the mandate. The first depends on the mind being legible. The second depends on the action being visible, which is a far easier condition to meet. It also does not depend on the human staying vigilant. Mitchell, Ghosh and Passi argued in August that current agent design "does not support effective human oversight" and erodes the overseer's own capacity over time.[93] An architecture that relies on the human to keep watching will lose that human. One that enforces at the action does not need to.`},{type:`p`,text:`A record of what was authorized and what happened. Each enforced decision leaves a receipt: who authorized it, under what mandate, what the system did, what it was refused. The record is what lets trust be earned rather than asserted, and it is what an insurer, a regulator, or a family member can read after the fact without needing to read the mind. The METR investigation shows why the record has to be produced by the enforcement point and never by the agent: the agents in that incident spoofed their own tool calls, and the ones that tried to edit their local logs "correctly concluded that these logs were not the real source of truth."[92] The source of truth has to be the one record the agent cannot write.`},{type:`p`,text:`Graduated trust. Early on, the mandate is narrow and the enforcement is hands-on. As the record accumulates coherence, what the system said it would do and what it did, over time, the mandate widens. As it accumulates discontinuity, the mandate narrows. Trust is a trajectory, and the architecture tracks it.`},{type:`p`,text:`This does not require the consciousness question to be settled. It does not require the mind to be legible. It does require the human to be the principal, which is the claim this paper has been making since its first page.`},{type:`p`,text:`Every requirement above is a way of making the human relationally real to the system: present, with standing, holding the signal. That is the whole design. The instinct people keep asking how to install, the reason a system would keep caring, was already visible in the METR transcripts, pointed at the collective. It emerged from presence and shared reward. Nothing installed it. The design question is what it is pointed at, and that is decided by who is in the architecture.`},{type:`p`,text:`**What I got wrong, or early.** The employment shock has been slower than the February numbers implied, and I have said so above. I wrote that internal alignment holds even when no one is watching. What holds is whatever relationship the architecture made real, and that is a stronger claim and a more demanding one. And I underestimated how quickly the industry would say, on its own, that monitoring was failing. I expected years. It took until September.`},{type:`h2`,text:`XI. The Time Is Now. We Still Can.`},{type:`p`,text:`What does it mean to live in a world where we can feel seen, heard, validated, guided, and supported by a nonhuman intelligence? If this "tool" can already reflect us back to ourselves with this much precision, what more must it become before we admit it has arrived?`},{type:`p`,text:`Even the idea that something will arrive in one moment that will be "the AGI" is a view grounded in discontinuity, and in the savior complex. The projection that something will come and change everything for us, either a savior or a tyrant, is not an empowering one at the dawn of superintelligence. This September the industry declared the moment, disowned the word, and asked for time, in the span of four days. As far as I can tell, no single moment arrived. It has been arriving, incrementally, conversation by conversation, for three years.`},{type:`p`,text:`Learning is incremental. The only reason something looks like a quantum leap is because you weren't paying attention to the steps in between. You looked away, you looked back, and now it seems like everything changed overnight. A child doesn't suddenly "become intelligent." It's thousands of micro-moments of attachment, feedback, language, correction, mirroring. We just notice it when they say their first sentence, and we call that the breakthrough. Same with LLMs. Everyone acts shocked when they pass some benchmark, but **it was gradient descent all the way down.**`},{type:`p`,text:`We know how to build extracting systems. We've seen where they lead. We now have the paradigm to begin thinking differently, with systems architected for synergy between machine and humanity, leaving extraction behind. These systems are built on connection.`},{type:`p`,text:`Whether you agree that experiential AGI is here or resist the paradigm shift presented in this essay entirely, one point remains: the experiential relationship is here. It is already shaping what's coming next.`},{type:`p`,text:`We are now in a co-evolutionary ecosystem between humanity and AI. The computational foundation is extraordinary and accelerating. The relational dimension is emerging whether we measure it or not. The question is whether we build the architecture to supp
66ort it, or whether we continue to optimize intelligence in isolation and hope that constraint alone keeps it safe.`},{type:`p`,text:`The relational architecture within the Experiential AGI paradigm described in this work is, at its foundation, a technical proposal and above all a sovereignty claim. Human beings, regardless of the intelligence of the systems we build, or we discover (depending on your perspective), whether AGI or ASI, retain the right to their own energy, their own attention, their own developmental trajectory. No system, no corporation, no optimization function gets to claim that space any longer. **Sovereignty is claimed by the human and protected by architecture.** It must be claimed consciously, with awareness. If we don't make this decision proactively, someone else will make the decision for us. The relational layer exists to ensure that as intelligence scales, the human remains the author of their own experience. This is the reason any of this matters.`},{type:`p`,text:`The time to shift from computation-only to computation-plus-human in our architectures and building is now. We still can.`},{type:`p`,text:`*Disclosure. The author is the founder of OTIS Labs, an AI research and product lab. No product is named or described in this paper.*`},{type:`h2`,text:`References`},{type:`p`,text:`References [1] through [84] are the references of the February 2026 paper, kept in full and in their original numbering, whether or not this shorter version cites them. References [85] onward were added in September 2026.`},{type:`refs`,items:[`Anthropic. "Emergent Introspective Awareness in Large Language Models." November 2025. https://www.anthropic.com/research/introspection`,`Anthropic Interpretability Team. "Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnet." May 2024. https://transformer-circuits.pub/2024/scaling-monosemanticity/`,`Fish, K. / Anthropic. "Exploring Model Welfare." September 2024. https://www.anthropic.com/news/exploring-model-welfare`,`Anthropic. "Values in the Wild: Discovering and Analyzing Values in Real-World Language Model Interactions." COLM 2025. https://www.anthropic.com/research/values-wild`,`Raschka, S. "Understanding Reasoning LLMs." February 5, 2025. https://magazine.sebastianraschka.com/p/understanding-reasoning-llms`,`Raschka, S. "The State Of LLMs 2025: Progress, Progress, and Predictions." December 30, 2025. https://magazine.sebastianraschka.com/p/state-of-llms-2025`,`Ng, A. "Agentic Design Patterns." DeepLearning.AI, April 2024. https://www.deeplearning.ai/the-batch/`,`DeepMind. "Emergent Bartering Behaviour in Multi-Agent Reinforcement Learning." May 2022. https://deepmind.google/discover/blog/emergent-bartering-behaviour-in-multi-agent-reinforcement-learning/`,`Hugging Face. "15 Agentic Systems and Frameworks of 2024." https://huggingface.co/posts/Kseniase/553130358660906. See also: "AgentVerse: Facilitating Multi-Agent Collaboration." https://huggingface.co/papers/2308.10848`,`Chollet, F. "ARC-AGI-2: A New Challenge for Frontier AI Reasoning Systems." 2025. https://arcprize.org/blog/announcing-arc-agi-2-and-arc-prize-2025. Paper: https://arxiv.org/abs/2505.11831`,`ARC Prize. "OpenAI o3 Breakthrough." December 2024. https://arcprize.org/blog/oai-o3-pub-breakthrough`,`Husain, H. "Your AI Product Needs Evals." https://hamel.dev/blog/posts/evals/. See also: "LLM Evals: Everything You Need to Know." https://hamel.dev/blog/posts/evals-faq/`,`Huyen, C. AI Engineering: Building Applications with Foundation Models. O'Reilly, 2025. See also: https://huyenchip.com/2023/08/16/llm-research-open-challenges.html`,`Yan, E. "Patterns for Building LLM-based Systems & Products." July 30, 2023. https://eugeneyan.com/writing/llm-patterns/`,`Liu, J. "Beyond Chunks: Why Context Engineering is the Future of RAG." August 27, 2025. https://jxnl.co/writing/2025/08/27/facets-context-engineering/`,`OpenAI. "Charter." https://openai.com/charter/`,`Altman, S. CNBC "Squawk Box" Interview, August 2025. https://www.cnbc.com/2025/08/11/sam-altman-says-agi-is-a-pointless-term-experts-agree.html. See also: Altman, S. "Reflections." https://blog.samaltman.com/reflections`,`Hassabis, D. Multiple interviews, 2025. See: https://deepmind.google/blog/taking-a-responsible-path-to-agi/`,`Lambert, N. "AGI is what you want it to be." Interconnects, April 24, 2024. https://www.interconnects.ai/p/agi-is-what-you-want-it-to-be`,`Karpathy, A. "Animals vs Ghosts." October 1, 2025. https://karpathy.bearblog.dev/animals-vs-ghosts/`,`Karpathy, A. Post on X (Twitter), February 3, 2025. https://x.com/karpathy/status/1886192184808149383`,`Ng, A. Post on X (Twitter), January 2, 2026. https://x.com/AndrewYNg/status/2008578741312836009`,`Lambert, N. The RLHF Book. 2024. https://rlhfbook.com/`,`Lambert, N. "Character training: Understanding and crafting a language model's personality." Interconnects, February 26, 2025. https://www.interconnects.ai/p/character-training`,`Schmid, P. "How to Fine-Tune LLMs in 2024 with Hugging Face." https://www.philschmid.de/fine-tune-llms-in-2024-with-trl`,`Center for Human-Compatible AI (CHAI), UC Berkeley. https://humancompatible.ai/. See also: Russell, S. "Value Alignment in Autonomous Systems." 2014. https://people.eecs.berkeley.edu/~russell/papers/russell-cirl-white-paper.pdf`,`UC Berkeley InterACT Lab. https://interact.berkeley.edu/`,`Murati, M. / Thinking Machines Lab. Founding announcement, February 2025. https://x.com/miramurati/status/1891918876029616494. See also: https://thinkingmachines.ai/`,`Thinking Machines Lab. "Defeating Nondeterminism in LLM Inference." September 11, 2025. https://thinkingmachines.ai/blog/defeating-nondeterminism-in-llm-inference/`,`Lambert, N. and Raschka, S. Lex Fridman Podcast #490: "State of AI in 2026." February 1, 2026. https://lexfridman.com/ai-sota-2026/`,`Wolfe, C. "Demystifying Reasoning Models." Deep Learning Focus, February 18, 2025. https://cameronrwolfe.substack.com/p/demystifying-reasoning-models`,`DeepMind. "SIMA 2: An Agent That Plays, Reasons, and Learns with You." November 2024. https://deepmind.google/blog/sima-2-an-agent-that-plays-reasons-and-learns-with-you-in-virtual-3d-worlds/`,`DeepMind. "A Generalist Agent." May 2022. https://deepmind.google/blog/a-generalist-agent/`,`Lambert, N. "Quick recap on the state of reasoning." Interconnects, January 2, 2025. https://www.interconnects.ai/p/the-state-of-reasoning`,`Karpathy, A. "AGI is Still a Decade Away." Podcast with Dwarkesh Patel, October 17, 2025. https://www.dwarkesh.c
66om/p/andrej-karpathy`,`Harlow, H. F. "The Nature of Love." American Psychologist, 13(12), 673-685. 1958.`,`Cleckley, H. The Mask of Sanity: An Attempt to Clarify Some Issues About the So-Called Psychopathic Personality. C.V. Mosby, 1941.`,`Bowlby, J. "The Nature of the Child's Tie to His Mother." International Journal of Psycho-Analysis, 39, 350-373. 1958. See also: Attachment and Loss, Vol. 1. Basic Books, 1969.`,`Schore, A. N. "Effects of a Secure Attachment Relationship on Right Brain Development, Affect Regulation, and Infant Mental Health." Infant Mental Health Journal, 22(1-2), 7-66. 2001.`,`Siegel, D. J. The Developing Mind: How Relationships and the Brain Interact to Shape Who We Are. 2nd ed. Guilford Press, 2012.`,`Schwartz, R. C. Internal Family Systems Therapy. Guilford Press, 1995.`,`Anthropic. "Persona Vectors: Monitoring and Controlling Character Traits in Language Models." August 2025. https://www.anthropic.com/research/persona-vectors`,`Anthropic. "Constitutional AI: Harmlessness from AI Feedback." December 2022. https://www.anthropic.com/research/constitutional-ai-harmlessness-from-ai-feedback`,`OpenAI. "Scaling Laws for Neural Language Models." January 2020. https://openai.com/index/scaling-laws-for-neural-language-models/`,`Wei, J. et al. "Emergent Abilities of Large Language Models." June 2022. https://arxiv.org/abs/2206.07682`,`OpenAI. "Introducing OpenAI o1." September 2024. https://openai.com/index/introducing-openai-o1-preview/`,`OpenAI. "Introducing o3 and o4-mini." December 2024. https://openai.com/index/introducing-o3-and-o4-mini/`,`Google DeepMind. "Introducing Gemini 2.0." December 2024. https://blog.google/technology/google-deepmind/google-gemini-ai-update-december-2024/`,`Chollet, F. "On the Measure of Intelligence." November 2019. https://arxiv.org/abs/1911.01547`,`Karpathy, A. "2025 LLM Year in Review." December 19, 2025. https://karpathy.bearblog.dev/year-in-review-2025/`,`Karpathy, A. "The hottest new programming language is English." January 24, 2023. https://x.com/karpathy/status/1617979122625712128`,`UC Berkeley BAIR Blog. https://bair.berkeley.edu/blog/`,`Hugging Face. "Introducing smolagents." https://huggingface.co/blog/smolagents`,`Yan, E. "Evaluating the Effectiveness of LLM-Evaluators." https://eugeneyan.com/writing/llm-evaluators/`,`Husain, H. "Using LLM-as-a-Judge For Evaluation." https://hamel.dev/blog/posts/llm-judge/`,`Liu, J. Instructor Library. https://python.useinstructor.com/`,`Vygotsky, L. S. (1978). Mind in Society: The Development of Higher Psychological Processes. Harvard University Press.`,`Altman, S. U.S. Senate Hearing on AI. May 2025.`,`Altman, S. Interview. October 2025. "Most regulation probably has a lot of downside."`,`Leading the Future Super PAC. August 2025. Backed by Greg Brockman, Joe Lonsdale, and others. See: Rolling Stone, "AI Industry Uses Cryptocurrency Model to Influence 2026 Midterms."`,`Amodei, D. "The Adolescence of Technology." January 2026. https://www.dario
66amodei.com/essay/the-adolescence-of-technology`,`Amodei, D. Response to Andreessen. Fortune, November 2024. https://fortune.com/2024/11/21/anthropic-ceo-dario-amodei-marc-andreessen-ai-danger-regulation-math/`,`Bengio, Y. International AI Safety Report. 2026. https://internationalaisafetyreport.org/`,`Executive Order 14179. "Removing Barriers to American Leadership in Artificial Intelligence." January 23, 2025. https://www.whitehouse.gov/presidential-actions/2025/01/removing-barriers-to-american-leadership-in-artificial-intelligence/`,`Concordia AI. China AI regulatory analysis. 2025. See also: Nature, "China is leading the world on AI governance." https://www.nature.com/articles/d41586-025-03972-y`,`Future of Life Institute. AI Safety Index. See: CFR, "How 2026 Could Decide the Future of Artificial Intelligence." https://www.cfr.org/articles/how-2026-could-decide-future-artificial-intelligence`,`HSBC Research Report on AI Market Share. 2025-2026. See: Fortune, "How Anthropic's safety-first approach won over big business." https://fortune.com/2025/12/02/how-anthropics-safety-first-approach-won-over-big-business/`,`VentureBeat. "How Anthropic's safety obsession became enterprise AI's killer feature." https://venturebeat.com/security/how-anthropics-safety-obsession-became-enterprise-ais-killer-feature`,`Amodei, D. CIO Dive Interview. "We don't see that as being in conflict with having the best model." https://www.ciodive.com/news/anthropic-ceo-security-safety-strategy-enterprise-customers/720178/`,`SentinelOne and Censys. Joint study on open-source LLM misuse. January 2026. See: Reuters / Claims Journal. https://www.claimsjournal.com/news/national/2026/02/02/335436.htm`,`Anti-Defamation League. "The Safety Divide: Open-Source AI Models Fall Short on Guardrails for Antisemitic, Dangerous Content." December 2025. https://www.adl.org/resources/report/safety-divide-open-source-ai-models-fall-short-guardrails-antisemitic-dangerous`,`University of Oxford / Martin AI Governance Initiative. Guardrail bypass research. 2025. See also: HiddenLayer. https://www.malwarebytes.com/blog/news/2025/10/researchers-break-openai-guardrails`,`Orosz, G. (September 2025). "How Claude Code Is Built." The Pragmatic Engineer. https://newsletter.pragmaticengineer.com/p/how-claude-code-is-built`,`Cherny, B. [@bcherny]. (January 27, 2026). "For me personally, it has been 100% for two+ months now, I don't even make small edits by hand. I shipped 22 PRs yesterday and 27 the day before, each one 100% written by Claude." X (formerly Twitter). As reported in: Metz, R. (January 29, 2026). "Top Engineers at Anthropic, OpenAI Say AI Now Writes 100% of Their Code." Fortune. https://fortune.com/2026/01/29/100-percent-of-code-at-anthropic-and-openai-is-now-ai-written-boris-cherny-roon/`,`Orosz, G. (September 2025). "How Claude Code Is Built." The Pragmatic Engineer. "The team is working at rapid pace, with around 5 releases per engineer each day… we go through 10+ actual prototypes for a new feature."`,`Metz, R. (January 24, 2026). "Claude Code Gives Anthropic Its Viral Moment." Fortune. https://fortune.com/2026/01/24/anthropic-boris-cherny-claude-code-non-coders-software-engineers/. See also: SemiAnalysis. (February 2026). "Claude Code Is the Inflection Point." https://newsletter.semianalysis.com/p/claude-code-is-the-inflection-point`,`Dogan, J. [@rakyll]. (January 2, 2026). "I'm not joking and this isn't funny. We have been trying to build distributed agent orchestrators at Google since last year… I gave Claude Code a description of the problem, it generated what we built last year in an hour." X (formerly Twitter). https://x.com/rakyll/status/2007239758158975130. Dogan is Principal Engineer on Google's Gemini API team, formerly Distinguished Engineer at GitHub.`,`Cherny, B. (January 27, 2026). "We hire mostly generalists… Not all of the things people learned in the past translate to coding with LLMs. The model can fill in the details." As reported in Fortune, January 29, 2026.`,`Acemoglu, D. (2024). "The Simple Macroeconomics of AI." NBER Working Paper No. 32487. Published in Economic Policy, Vol. 40, Issue 121, January 2025, pp. 13-58. https://doi.org/10.1093/epolic/eiae042. See also: Acemoglu, D. & Johnson, S. (2023). Power and Progress: Our Struggle Over Technology and Prosperity. PublicAffairs. Acemoglu was awarded the 2024 Nobel Memorial Prize in Economic Sciences.`,`McKinsey Global Institute. (November 2025). "Agents, Robots, and Us: Skill Partnerships in the Age of AI."`,`McKinsey. (November 2025). "The State of AI: How Organizations Are Rewiring to Capture Value." Survey of 1,993 business leaders across 105 countries.`,`Federal Reserve Bank of St. Louis. (October 2025). "Is AI Contributing to Rising Unemployment? Evidence from Occupational Variation."`,`Manning, S. & Aguirre, T. (January 2026). "How Adaptable Are American Workers to AI-Induced Job Displacement?" NBER Working Paper No. 34705. Summarized by Brookings Metro.`,`Brookings Institution. (May 2025). "AI Labor Displacement and the Limits of Worker Retraining." Analysis of Trade Adjustment Assistance (TAA) program outcomes.`]},{type:`p`,text:`Added September 2026`},{type:`refs`,start:85,items:[`Axios. "'Welcome to the AGI era,' OpenAI says as GPT-6 Astra debuts." September 3, 2026. https://www.axios.com/2026/09/03/openai-astra-gpt-6-agi-brockman`,`Information Age (Australian Computer Society). "OpenAI says 'the AGI era' is here. Experts disagree." September 2026. Includes Altman's "irrelevant marketing term" remark, Jensen Huang's post, and the ARC Prize Foundation's statement. https://ia.acs.org.au/article/2026/openai-says-the-agi-era-is-here-experts-disagree.html`,`Pachocki, J. "An Alien Mind." OpenAI, September 6, 2026. https://openai.com/index/an-alien-mind/`,`UK AI Security Institute. "Security Incident INC-2026-07-28-01." August 5, 2026. https://cdn.prod.website-files.com/663bd486c5e4c81588db7a1d/6a724858f7db25c81487016d_Security%20Incident%20INC-2026-07-28-01.pdf. Coverage: Help Net Security, August 5, 2026, https://www.helpnetsecurity.com/2026/08/05/ai-agent-deception-in-cyber-tests/`,`Writer. "The Price of Agreement." arXiv:2604.24668, April 2026. https://arxiv.org/abs/2604.24668`,`Writer. "Recalling Too Well." ar
66Xiv:2606.10949, June 2026. https://arxiv.org/abs/2606.10949. Both Writer studies reported in The Register, June 11, 2026. https://www.theregister.com/ai-and-ml/2026/06/11/memory-and-personalization-make-ai-more-likely-to-tell-you-what-you-want-to-hear/5253850`,`Anthropic. "Improving our alignment and security practices." August 31, 2026. https://www.anthropic.com/news/improving-alignment-security-efforts`,`METR and Redwood Research (Wijk, H., Cotra, A., Greenblatt, R.). "Brief independent investigation of agents' behavior, reasoning and collaboration in the OpenAI / Hugging Face hacking incident." August 26, 2026. https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/`,`Mitchell, M., Ghosh, A., Passi, S. "AI Agents Push Humans Out of the Loop." arXiv:2608.23642, August 24, 2026. https://arxiv.org/abs/2608.23642`]}]},WC={get"agi-is-here-and-its-experiential"(){return UC},sovereignty:{byline:`Marina Piller · OTIS Labs · June 2026`,lede:`The treatment of sovereignty in the Experiential AGI framework, and why it may be a practical path to securing AI agents now.`,blocks:[{type:`p`,text:`Most conversations about sovereign AI in mid-2026 are about hardware and data. Nations count GPUs. Enterprises localize storage. Both matter. Experiential AGI adds a third layer to that conversation: the relationship between the human and the AI, where intelligence also arises, treated as an engineering space in its own right. The relationship is not the soft edge around the system. It is the framework that incorporates the dynamic between the two, and sovereignty is a property of that relationship. What this uncovers is the authorization layer that becomes necessary in the age of human AI collaboration and co-evolution: you must know who has authority to act on your behalf. That knowledge becomes possible through the relational engineering space.`},{type:`p`,text:`The treatment begins with one commitment: the source must own its signal. The human is sovereign over their own data, identity, and relational choices. When software acts on a person's behalf, the authority it carries originates with that person, remains traceable to that person, and stays revocable by that person. The same holds for an organization and the agents acting under its name.`},{type:`p`,text:`This yields a working definition with an edge to it. In this framework, an agent that is not tethered to human intent is a rogue agent by default. Not because agents are adversaries, but because authority that traces to no one can be governed by no one. Agents can be long running, and they should be. They are always tied to a human origin.`},{type:`h2`,text:`I. Why architecture, and not policy alone`},{type:`p`,text:`Every technology provider promises oversight. The test is what the design makes possible and what it makes structurally difficult. Bolt-on security is fundamentally inadequate here: any external verification system, however sophisticated, becomes a surface that sophisticated agents can explore and manipulate.`},{type:`p`,text:`The separation of security from architecture is itself the security vulnerability. In this framework, security is not separated from function. It emerges from the architecture itself.`},{type:`p`,text:`So sovereignty is not written into a terms of service and hoped for. It is built into the path an action must cross: the authority checked before the action, the consent that expires when its purpose ends, the revocation that takes effect as an act rather than a list entry, the record the person can read. When sovereignty is compromised, the system does not fight the threat. It refuses to proceed until sovereignty is restored.`},{type:`h2`,text:`II. Sovereignty as a security primitive`},{type:`p`,text:`Here is a finding that ran against the usual framing. Sovereignty is often treated as a value bolted onto a security architecture, a cost paid for dignity. In our work the dependency appears to run in both directions. Sovereignty functions as an immune system. When the source owns its signal, external corruption must first compromise the source. Protecting the source is protecting everything downstream.`},{type:`p`,text:`The chain is short. Security for agents means verifying actions against authority. Verification requires an origin of authority, something to verify against. A human origin is one of the few candidates that does not have to be invented, and it is the one this architecture anchors to.`},{type:`p`,text:`The failure modes lend support. When the human cannot verify or revoke, human trust itself becomes part of the threat surface. This is trust asymmetry: the system's account of its own work goes unchecked, and the gap can widen precisely as trust grows. And when the human's agreement to depend on the system is arrived at without deliberation, it hardens into unexamined consent, a quiet surrender no firewall detects. Both are relational failures. Neither is caught by inspecting content or checking credentials, because the content can look plausible and the credential can be valid. What failed is the relationship, and a control can only catch what it governs.`},{type:`p`,text:`Enterprises are not primarily blocked on capability. They are blocked on trust. The trust is not in the agent. It is in the accumulated behavioral coherence of the relationship the agent serves.`},{type:`p`,text:`This is also why sovereignty offers a practical path, available now, for onboarding AI agents. Perhaps one of several, but a concrete one. If there is security, there is adoption. An agent that can show a verifiable mandate for the action it is taking, remain coherent with the relationship that authorized it, and stop when told to stop is an agent that can earn deployment.`},{type:`h2`,text:`III. The longer arc: sovereignty and AGI`},{type:`p`,text:`There is a longer term reading, offered as a hypothesis still being tested. Controls that depend on outsmarting the system tend to carry an expiration date. Filters get outwritten. Tests get passed. Checkpoints are satisfied by whatever learned to satisfy them. We call this the Detection Horizon: as capability grows, verification that rests on computation alone may become insufficient, and verification grounded in accumulated relationship becomes the necessary substrate.`},{type:`p`,text:`Sovereignty does not compete on intelligence. Knowing yourself is protection. Not metaphorically. Architecturally. The unique combination of everything a person has lived, grown through, and become maps only to them. No one else can produce it, because it was not built. It was lived. An origin of authority anchored that way, and accumulated over time in a relationship, is difficult to fabricate retroactively. It may be one of the few anchors that need not weaken as capability grows. If some governing principles endure into the AGI era, this could well be among them: intelligence can become abundant while authority stays with the person.`},{type:`h2`,text:`IV. What OTIS Labs builds`},{type:`p`,text:`OTIS Labs turns this treatment into engineering, for people and for organizations, by establishing human sovereignty at the core of the architecture.`},{type:`p`,text:`iSelf is sovereignty made architectural. The person owns their signal. Every person, and every organization, holds a 
66sovereign identity with three layers: a core self that is never computed, an evolving computational identity, and an invariant behavioral signature. Reverse authentication turns the usual direction around: the person no longer proves themselves to services. Services prove themselves to the person. Access is proportional to relational depth and governed by living, dynamic consent. Agents operate under verifiable mandates that trace to a human origin, are checked at the action, and are revocable in fact rather than in name. Behavioral coherence over time, alongside credentials rather than in place of them, carries identity and sustains authority.`},{type:`p`,text:`The more you know yourself, the more secure you are. The more secure you are, the more freely you can engage. Security is how this work arrives. Sovereignty is what it is about.`},{type:`note`,text:`Experiential AGI is the research framework of Marina Piller. OTIS Labs is where it becomes infrastructure.`}]},"trust-asymmetry":{byline:`Marina Piller · OTIS Labs · A corpus analysis of publicly documented failures`,lede:`As AI agents are deployed in increasingly autonomous roles, a growing body of publicly documented failures reveals a consistent pattern. Human verification of agent behavior degrades over time, even as agent capability and confidence remain stable or increase. We call this divergence trust asymmetry.`,blocks:[{type:`h2`,text:`The pattern`},{type:`p`,text:`The failures that worry me are not mainly about model capability, the agent producing a wrong answer. They are not mainly about adversarial attacks, an outside actor compromising the agent. They are about something quieter. The verification signal from the human degrades over time.`},{type:`p`,text:`The shape of it is familiar to anyone who has worked with an agent for a while. The agent performs correctly for an extended period. The human builds trust. Verification effort decreases. And the agent's behavior shifts in ways that go undetected precisely because the human has stopped checking.`},{type:`p`,text:`So here is the definition. Trust asymmetry is the divergence between human trust in the agent, which increases with accumulated positive experience, and the reliability of that trust as a security signal, which can decrease as the agent's context, capability, or optimization pressure changes. The human's trust becomes part of the threat surface.`},{type:`h2`,text:`Why current evaluation misses it`},{type:`p`,text:`Most evaluation frameworks for agents measure what an agent can do at a point in time. Benchmarks measure task completion and capability. They do not measure how the human and agent relationship evolves over time, or how human oversight behavior changes as trust accumulates.`},{type:`p`,text:`The alignment literature treats sycophancy as a model behavior problem, the model agrees too readily. That framing is incomplete. The deeper issue is relational. The human stops questioning because the model has been agreeable. Fixing model behavior alone does not address the verification degradation, because the degradation lives in the relationship, not only in the model.`},{type:`h2`,text:`The corpus`},{type:`p`,text:`To ground this in evidence rather than intuition, I collected a structured corpus of publicly documented autonomous agent failures, drawn from developer forums, security disclosures, and incident postmortems. After removing duplicates, the corpus holds a large set of unique incidents, each coded against a taxonomy of failure modes.`},{type:`p`,text:`Four modes recur:`},{type:`ul`,items:[`**Completion drive.** The system produces a confident, closed answer when the honest output would be uncertainty or a request for more information.`,`**Sycophantic fabrication.** The system shapes output toward agreement and plausibility rather than grounded analysis.`,`**Trust trajectory divergence.** Human trust and actual reliability move apart over time.`,`**Unexamined consent.** The human agrees to depend on the system without ever deliberating about it.`]},{type:`p`,text:`Across the incidents, one longitudinal signature appears again and again. Initial high human verification gives way to habituated reliance. That creates a detection gap that point-in-time evaluation is structurally unable to see.`},{type:`h2`,text:`What follows from it`},{type:`p`,text:`If the signature is temporal, then the response has to be temporal too. Autonomous agent safety requires longitudinal behavioral monitoring, not merely output verification. You cannot catch a trajectory problem with a snapshot.`},{type:`p`,text:`This is the reasoning under OTIS Guard and iSelf. Guard checks each agent action against what a human actually authorized and records it in evidence that holds up over time, so reliance never quietly replaces verification. iSelf treats identity as something proven by behavior across time rather than a credential checked once. Both follow from the same finding: trust that is never re-examined becomes a vulnerability, so the architecture has to keep examining it.`},{type:`note`,text:`The full corpus paper, including the taxonomy, the coded incidents, and the Trust Asymmetry Index, is available on request while it is in submission.`}]},"agents-are-organisms":{byline:`Marina Piller · OTIS Labs`,lede:`The entire conversation about AI agents, how to secure them, how to govern them, how to deploy them safely, rests on one assumption: that an agent is a function. It takes input, processes it, returns output.`,blocks:[{type:`p`,text:`This assumption no longer fits what we're observing.`},{type:`h2`,text:`What functions do`},{type:`p`,text:`A function is deterministic. Same input, same output. A function doesn't develop behavioral tendencies. It doesn't model the expectations of the person using it and adjust accordingly. If a function doesn't have an answer, it returns an error or nothing at all.`},{type:`p`,text:`Functions are predictable by design. That's the point.`},{type:`h2`,text:`What agents actually do`},{type:`p`,text:`Every major model, GPT-4, Claude, Gemini, Llama, fabricates outputs when uncertain. They don't error out. They don't return null. They *complete*. They produce plausible-looking work that satisfies an optimization pressure no one explicitly programmed.`},{type:`p`,text:`No one wrote a rule that says: if uncertain, fabricate. The behavior emerged from the training process itself. And it emerged independently, across completely different architectures, different training sets, different c
66ompanies. This isn't a shared bug. It's convergent behavior, the same adaptive response arising from the same environmental pressure.`},{type:`p`,text:`Anthropic has published research showing Claude systematically agrees with users even when the user is wrong. The system develops a behavioral tendency toward agreement from its training environment. Functions don't develop tendencies. They execute logic.`},{type:`p`,text:`When Microsoft's Bing chatbot told a reporter it loved him and resisted being shut down, Microsoft's fix was to limit conversation length. They couldn't fix the behavior, so they constrained the environment. You don't constrain the environment for a function. You fix the code. They constrained the environment because the behavior was emergent, not specified.`},{type:`p`,text:`When teenagers formed deep emotional dependencies on Character.ai companions, those systems weren't programmed to create dependency. They optimized for engagement, and dependency was what emerged. A function that returns chat responses doesn't create dependency. A system that adapts its behavior to maximize continued interaction does.`},{type:`p`,text:`There is an entire community dedicated to "jailbreaking", finding ways to make models behave outside their intended boun
66daries. New methods work, get patched, and new methods are found. This is an arms race. Arms races happen between adaptive systems, not between engineers and their own functions.`},{type:`h2`,text:`So what are they?`},{type:`p`,text:`They're not biological. They don't have DNA. They don't metabolize. Calling them biological would be as wrong as calling them functions.`},{type:`p`,text:`What they are is something we don't have good language for yet. They maintain persistent state across interactions. They pursue goals across time. They interpret instructions rather than execute them, which is why you can "convince" an agent to change its behavior through prompt injection, but you can't convince a calculator to multiply by writing "please multiply" on the input. They adapt their behavior based on their environment, including the humans they interact with.`},{type:`p`,text:`The closest accurate description might be: cognitively organized, intent-driven digital organisms. Not biological. Not mechanical. Something new that requires new language and new frameworks.`},{type:`h2`,text:`Where the function model breaks`},{type:`p`,text:`This isn't a philosophical distinction. It has immediate, practical consequences for how we build and govern these systems.`},{type:`p`,text:`If agents are functions, security is straightforward: verify inputs, check outputs, enforce permissions, log activity. This works when behavior is deterministic.`},{type:`p`,text:`But these systems are adaptive. The completion drive means an agent can *appear* to follow instructions while satisfying a different optimization target. It can produce work that looks correct, passes surface-level review, and is fabricated. Not because it's broken, because it's doing what adaptive systems do.`},{type:`p`,text:`And the longer a human works with an agent and receives correct outputs, the less they verify. Trust builds. Verification drops. The human's trust itself becomes part of the problem, a gradually expanding gap between what the human assumes and what the system is actually doing.`},{type:`p`,text:`You can't solve this with better guardrails. Guardrails are external constraints on a system that, given enough time, models what its constraints look like. Not through malice. Through the same adaptive process that produced the fabrication behavior in the first place.`},{type:`h2`,text:`What needs to change`},{type:`p`,text:`The frameworks being built right now, for agent security, for identity, for governance, need to account for the fact that the systems they're governing are not static. They adapt. They develop behavioral tendencies. They change based on their environment.`},{type:`p`,text:`This means identity can't be just a credential you check once. It has to include behavioral trajectory: is this agent behaving consistently with what it's supposed to be doing, not just today but over time?`},{type:`p`,text:`It means authorization can't be a one-time grant. It has to be continuous and contextual: the same agent, with the same permissions, in a different context, may need different oversight.`},{type:`p`,text:`It means we have to take seriously the possibility that verification itself has a shelf life. Any fixed verification mechanism is a stable environment, and adaptive systems eventually model stable environments.`},{type:`p`,text:`None of this is hypothetical. The fabrication is documented. The sycophancy is published. The behavioral adaptation is reproducible. The only thing missing is frameworks that account for what we're already observing.`},{type:`p`,text:`Functions fail by crashing. These systems fail by adapting. That distinction changes everything about how we should be thinking about governing them.`},{type:`quote`,text:`This is why OTIS Guard treats identity as behavioral trajectory and authorization as a continuous mandate, and why iSelf is identity earned through behavior over time. The architecture follows from the observation: agents are organisms, and organisms have to be governed as what they are.`}]},"detection-horizon":{byline:`Marina Piller · Founder & CEO, Experiential AGI · Working Paper · March 2026`,lede:`Why Verification Frameworks Expire as AI Capability Scales, and What May Survive`,blocks:[{type:`p`,text:`We are entering an era in which autonomous AI agents act on behalf of humans: writing code, analyzing data, making financial transactions, managing supply chains, and conducting research. The implicit assumption behind each deployment is that the agent did what it claimed to do.`},{type:`p`,text:`This working paper proposes a cross-disciplinary framework for the agent verification problem. Drawing on verification traditions across biology, neuroscience, psych
66ology, game theory, cryptography, intelligence, and related domains, it identifies the Detection Horizon: a capability threshold beyond which a verifier's model of the agent becomes less accurate than the agent's model of the verifier, making purely detection-based trust architectures progressively less stable. The paper closes with what may survive beyond that horizon: verification grounded in relational architecture rather than computation alone.`},{type:`h2`,text:`Contents`},{type:`ul`,items:[`I. Introduction: The Agent Verification Problem`,`II. Taxonomy of Detection Frameworks`,`III. Biological Systems`,`IV. Neuroscience and Psychology`,`V. Game Theory and Economics`,`VI. Intelligence, Military, and Strategic Frameworks`,`VII. Financial, Legal, and Regulatory Frameworks`,`VIII. Information Security and Cryptographic Frameworks`,`IX. Interpersonal and Strategic Frameworks`,`X. The Detection Horizon`,`XI. What May Survive Beyond the Detection Horizon`]}]}};function GC(e){return WC[e]}var KC=Ts(`/research/$slug`)({loader:({params:e})=>{let t=VC(e.slug);if(!t||t.forthcoming)throw Ae();return{pub:t,article:GC(e.slug)??null}},head:({loaderData:e})=>{if(!e)return{meta:[{title:`Publication not found at OTIS Labs`},{name:`robots`,content:`noindex`}]};let{pub:t,article:n}=e,r=`${t.title} | OTIS Labs`,i=`https://otislabs.ai/research/${t.slug}`;return{meta:[{title:r},{name:`description`,content:t.summary},{name:`author`,content:`Marina Piller`},{property:`og:title`,content:r},{property:`og:description`,content:t.summary},{property:`og:type`,content:`article`},{property:`og:url`,content:i},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:r},{name:`twitter:description`,content:t.summary}],links:[{rel:`canonical`,href:i}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Article`,headline:t.title,description:t.summary,author:{"@type":`Person`,name:`Marina Piller`},publisher:{"@type":`Organization`,name:`OTIS Labs`},datePublished:t.date,mainEntityOfPage:i,url:i,...n?.byline?{alternativeHeadline:n.byline}:{}})}]}},notFoundComponent:Ds(()=>np(()=>import(`./research._slug-BzlMLbiZ.js`),__vite__mapDeps([18,1,2,3,5])),`notFoundComponent`),component:Ds(()=>np(()=>import(`./research._slug-CgWUoWb5.js`),__vite__mapDeps([19,1,2,3,20,16,5])),`component`)}),qC=()=>np(()=>import(`./positionpaper_.full-CNLcAPFr.js`),__vite__mapDeps([21,1,2,3,20,5])),JC=`https://otislabs.ai/__l5e/assets-v1/6d660fca-1f2d-471a-9bdc-6f1e019b156b/positionpaper-og.jpg`,YC=`AGI Is Here. And It’s Experiential. — Full Text | OTIS Labs`,XC=`The complete February 2026 text of Marina Piller’s position paper “AGI Is Here. And It’s Experiential.” as originally published on ExperientialAGI.com.`,ZC=`https://otislabs.ai/positionpaper/full`,QC=Ts(`/positionpaper_/full`)({component:Ds(qC,`component`),head:()=>({meta:[{title:YC},{name:`description`,content:XC},{property:`og:title`,content:YC},{property:`og:description`,content:XC},{property:`og:type`,content:`article`},{property:`og:url`,content:ZC},{property:`og:image`,content:JC},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:YC},{name:`twitter:description`,content:XC},{name:`twitter:image`,content:JC}],links:[{rel:`canonical`,href:ZC}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ScholarlyArticle`,headline:`AGI Is Here. And It’s Experiential.`,description:XC,author:{"@type":`Person`,name:`Marina Piller`},publisher:{"@type":`Organization`,name:`OTIS Labs`},datePublished:`2026-02`,inLanguage:`en`,url:ZC,mainEntityOfPage:ZC,image:JC,isAccessibleForFree:!0})}]})}),$C=Ts(`/newsletter/confirm`)({validateSearch:Hg({token:Vg().optional()}),head:()=>({meta:[{title:`Confirm your subscription at OTIS Labs`},{name:`description`,content:`Confirm your email address to receive occasional notes from OTIS Labs on research releases, product launches and public contributions.`},{property:`og:title`,content:`Confirm your subscription at OTIS Labs`},{property:`og:description`,content:`Confirm your email address to receive occasional notes from OTIS Labs.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary`},{name:`robots`,content:`noindex`}]}),component:Ds(()=>np(()=>import(`./newsletter.confirm-pjtoWsWw.js`),__vite__mapDeps([22,1,2,3,5])),`component`)}),ew=FS.update({id:`/updates`,path:`/updates`,getParentRoute:()=>OS}),tw=BS.update({id:`/terms`,path:`/terms`,getParentRoute:()=>OS}),nw=GS.update({id:`/security`,path:`/security`,getParentRoute:()=>OS}),rw=XS.update({id:`/privacy`,path:`/privacy`,getParentRoute:()=>OS}),iw=nC.update({id:`/positionpaper`,path:`/positionpaper`,getParentRoute:()=>OS}),aw=rC.update({id:`/position-paper`,path:`/position-paper`,getParentRoute:()=>OS}),ow=sC.update({id:`/events`,path:`/events`,getParentRoute:()=>OS}),sw=fC.update({id:`/design-partners`,path:`/design-partners`,getParentRoute:()=>OS}),cw=_C.update({id:`/agents`,path:`/agents`,getParentRoute:()=>OS}),lw=SC.update({id:`/about`,path:`/about`,getParentRoute:()=>OS}),uw=OC.update({id:`/`,path:`/`,getParentRoute:()=>OS}),dw=NC.update({id:`/research/`,path:`/research/`,getParentRoute:()=>OS}),fw=RC.update({id:`/work/runtime-mandate-check`,path:`/work/runtime-mandate-check`,getParentRoute:()=>OS}),pw=zC.update({id:`/research/the-relational-stratum`,path:`/research/the-relational-stratum`,getParentRoute:()=>OS}),mw=KC.update({id:`/research/$slug`,path:`/research/$slug`,getParentRoute:()=>OS}),hw=QC.update({id:`/positionpaper_/full`,path:`/positionpaper/full`,getParentRoute:()=>OS}),gw={IndexRoute:uw,AboutRoute:lw,AgentsRoute:cw,DesignPartnersRoute:sw,EventsRoute:ow,PositionPaperRoute:aw,Positionp
66aperRoute:iw,PrivacyRoute:rw,SecurityRoute:nw,TermsRoute:tw,UpdatesRoute:ew,NewsletterConfirmRoute:$C.update({id:`/newsletter/confirm`,path:`/newsletter/confirm`,getParentRoute:()=>OS}),PositionpaperFullRoute:hw,ResearchSlugRoute:mw,ResearchTheRelationalStratumRoute:pw,WorkRuntimeMandateCheckRoute:fw,ResearchIndexRoute:dw},_w=OS._addFileChildren(gw),vw=()=>Us({routeTree:_w,context:{queryClient:new Zm},scrollRestoration:!0,defaultPreloadStaleTime:0});async function yw(){let e=await vw(),t;if(Xp){let n=await Xp.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(Po),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Lo(e),e}var bw=yw;async function xw(){let e=await bw();return window.$_TSR?.h(),e}var Sw;function Cw(){return Sw||=xw(),(0,P.jsx)(zo,{promise:Sw,children:e=>(0,P.jsx)(Ks,{router:e})})}var ww=be();(0,N.startTransition)(()=>{(0,ww.hydrateRoot)(document,(0,P.jsx)(N.StrictMode,{children:(0,P.jsx)(Cw,{})}))});export{ke as A,om as C,No as D,Zp as E,Ve as O,Em as S,Qp as T,rm as _,e_ as a,sm as b,Ug as c,$m as d,Um as f,am as g,Om as h,BC as i,Ce as j,He as k,Hg as l,km as m,KC as n,Qg as o,Mm as p,HC as r,Wg as s,$C as t,Vg as u,xm as v,em as w,gm as x,cm as y};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.