PageSourceSearch

https://photome.onhercules.app/assets/index-BQJ0rAko.js

js photome.onhercules.app collected 2026-10-03 05:06:32 UTC 798,913 bytes, 58 lines download raw bytes

vendor: 2,129 bytes, line 1
1function BC(e,t){for(var s=0;s<t.length;s++){const r=t[s];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(r,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function u1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var bh={exports:{}},No={};var cb;function IC(){if(cb)return No;cb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(r,o,l){var u=null;if(l!==void 0&&(u=""+l),o.key!==void 0&&(u=""+o.key),"key"in o){l={};for(var d in o)d!=="key"&&(l[d]=o[d])}else l=o;return o=l.ref,{$$typeof:e,type:r,key:u,ref:o!==void 0?o:null,props:l}}return No.Fragment=t,No.jsx=s,No.jsxs=s,No}var ub;function $C(){return ub||(ub=1,bh.exports=IC()),bh.exports}var w=$C(),xh={exports:{}},Do={},wh={exports:{}},Sh={};var db;function HC(){return db||(db=1,(function(e){function t(j,F){var G=j.length;j.push(F);e:for(;0<G;){var ie=G-1>>>1,X=j[ie];if(0<o(X,F))j[ie]=F,j[G]=X,G=ie;else break e}}function s(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var F=j[0],G=j.pop();if(G!==F){j[0]=G;e:for(var ie=0,X=j.length,O=X>>>1;ie<O;){var Z=2*(ie+1)-1,H=j[Z],J=Z+1,se=j[J];if(0>o(H,G))J<X&&0>o(se,H)?(j[ie]=se,j[J]=G,ie=J):(j[ie]=H,j[Z]=G,ie=Z);
vendor: 18,024 bytes, line 1
1else if(J<X&&0>o(se,G))j[ie]=se,j[J]=G,ie=J;else break e}}return F}function o(j,F){var G=j.sortIndex-F.sortIndex;return G!==0?G:j.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var h=[],p=[],y=1,g=null,v=3,x=!1,S=!1,E=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(j){for(var F=s(p);F!==null;){if(F.callback===null)r(p);else if(F.startTime<=j)r(p),F.sortIndex=F.expirationTime,t(h,F);else break;F=s(p)}}function P(j){if(E=!1,D(j),!S)if(s(h)!==null)S=!0,B||(B=!0,oe());else{var F=s(p);F!==null&&fe(P,F.startTime-j)}}var B=!1,I=-1,L=5,W=-1;function ee(){return C?!0:!(e.unstable_now()-W<L)}function re(){if(C=!1,B){var j=e.unstable_now();W=j;var F=!0;try{e:{S=!1,E&&(E=!1,M(I),I=-1),x=!0;var G=v;try{t:{for(D(j),g=s(h);g!==null&&!(g.expirationTime>j&&ee());){var ie=g.callback;if(typeof ie=="function"){g.callback=null,v=g.priorityLevel;var X=ie(g.expirationTime<=j);if(j=e.unstable_now(),typeof X=="function"){g.callback=X,D(j),F=!0;break t}g===s(h)&&r(h),D(j)}else r(h);g=s(h)}if(g!==null)F=!0;else{var O=s(p);O!==null&&fe(P,O.startTime-j),F=!1}}break e}finally{g=null,v=G,x=!1}F=void 0}}finally{F?oe():B=!1}}}var oe;if(typeof k=="function")oe=function(){k(re)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,he=me.port2;me.port1.onmessage=re,oe=function(){he.postMessage(null)}}else oe=function(){A(re,0)};function fe(j,F){I=A(function(){j(e.unstable_now())},F)}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(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(j){switch(v){case 1:case 2:case 3:var F=3;break;default:F=v}var G=v;v=F;try{return j()}finally{v=G}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(j,F){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var G=v;v=j;try{return F()}finally{v=G}},e.unstable_scheduleCallback=function(j,F,G){var ie=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?ie+G:ie):G=ie,j){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=G+X,j={id:y++,callback:F,priorityLevel:j,startTime:G,expirationTime:X,sortIndex:-1},G>ie?(j.sortIndex=G,t(p,j),s(h)===null&&j===s(p)&&(E?(M(I),I=-1):E=!0,fe(P,G-ie))):(j.sortIndex=X,t(h,j),S||x||(S=!0,B||(B=!0,oe()))),j},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(j){var F=v;return function(){var G=v;v=F;try{return j.apply(this,arguments)}finally{v=G}}}})(Sh)),Sh}var fb;function FC(){return fb||(fb=1,wh.exports=HC()),wh.exports}var _h={exports:{}},_e={};var hb;function QC(){if(hb)return _e;hb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,C={};function A(O,Z,H){this.props=O,this.context=Z,this.refs=C,this.updater=H||S}A.prototype.isReactComponent={},A.prototype.setState=function(O,Z){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,Z,"setState")},A.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function M(){}M.prototype=A.prototype;function k(O,Z,H){this.props=O,this.context=Z,this.refs=C,this.updater=H||S}var D=k.prototype=new M;D.constructor=k,E(D,A.prototype),D.isPureReactComponent=!0;var P=Array.isArray;function B(){}var I={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function W(O,Z,H){var J=H.ref;return{$$typeof:e,type:O,key:Z,ref:J!==void 0?J:null,props:H}}function ee(O,Z){return W(O.type,Z,O.props)}function re(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function oe(O){var Z={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(H){return Z[H]})}var me=/\/+/g;function he(O,Z){return typeof O=="object"&&O!==null&&O.key!=null?oe(""+O.key):Z.toString(36)}function fe(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(B,B):(O.status="pending",O.then(function(Z){O.status==="pending"&&(O.status="fulfilled",O.value=Z)},function(Z){O.status==="pending"&&(O.status="rejected",O.reason=Z)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function j(O,Z,H,J,se){var ae=typeof O;(ae==="undefined"||ae==="boolean")&&(O=null);var ye=!1;if(O===null)ye=!0;else switch(ae){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(O.$$typeof){case e:case t:ye=!0;break;case y:return ye=O._init,j(ye(O._payload),Z,H,J,se)}}if(ye)return se=se(O),ye=J===""?"."+he(O,0):J,P(se)?(H="",ye!=null&&(H=ye.replace(me,"$&/")+"/"),j(se,Z,H,"",function(_t){return _t})):se!=null&&(re(se)&&(se=ee(se,H+(se.key==null||O&&O.key===se.key?"":(""+se.key).replace(me,"$&/")+"/")+ye)),Z.push(se)),1;ye=0;var xe=J===""?".":J+":";if(P(O))for(var ve=0;ve<O.length;ve++)J=O[ve],ae=xe+he(J,ve),ye+=j(J,Z,H,ae,se);else if(ve=x(O),typeof ve=="function")for(O=ve.call(O),ve=0;!(J=O.next()).done;)J=J.value,ae=xe+he(J,ve++),ye+=j(J,Z,H,ae,se);else if(ae==="object"){if(typeof O.then=="function")return j(fe(O),Z,H,J,se);throw Z=String(O),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ye}function F(O,Z,H){if(O==null)return O;var J=[],se=0;return j(O,J,"","",function(ae){return Z.call(H,ae,se++)}),J}function G(O){if(O._status===-1){var Z=O._result;Z=Z(),Z.then(function(H){(O._status===0||O._status===-1)&&(O._status=1,O._result=H)},function(H){(O._status===0||O._status===-1)&&(O._status=2,O._result=H)}),O._status===-1&&(O._status=0,O._result=Z)}if(O._status===1)return O._result.default;throw O._result}var ie=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},X={map:F,forEach:function(O,Z,H){F(O,function(){Z.apply(this,arguments)},H)},count:function(O){var Z=0;return F(O,function(){Z++}),Z},toArray:function(O){return F(O,function(Z){return Z})||[]},only:function(O){if(!re(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return _e.Activity=g,_e.Children=X,_e.Component=A,_e.Fragment=s,_e.Profiler=o,_e.PureComponent=k,_e.StrictMode=r,_e.Suspense=h,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,_e.__COMPILER_RUNTIME={__proto__:null,c:function(O){return I.H.useMemoCache(O)}},_e.cache=function(O){return function(){return O.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(O,Z,H){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var J=E({},O.props),se=O.key;if(Z!=null)for(ae in Z.key!==void 0&&(se=""+Z.key),Z)!L.call(Z,ae)||ae==="key"||ae==="__self"||ae==="__source"||ae==="ref"&&Z.ref===void 0||(J[ae]=Z[ae]);var ae=arguments.length-2;if(ae===1)J.children=H;else if(1<ae){for(var ye=Array(ae),xe=0;xe<ae;xe++)ye[xe]=arguments[xe+2];J.children=ye}return W(O.type,se,J)},_e.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:l,_context:O},O},_e.createElement=function(O,Z,H){var J,se={},ae=null;if(Z!=null)for(J in Z.key!==void 0&&(ae=""+Z.key),Z)L.call(Z,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(se[J]=Z[J]);var ye=arguments.length-2;if(ye===1)se.children=H;else if(1<ye){for(var xe=Array(ye),ve=0;ve<ye;ve++)xe[ve]=arguments[ve+2];se.children=xe}if(O&&O.defaultProps)for(J in ye=O.defaultProps,ye)se[J]===void 0&&(se[J]=ye[J]);return W(O,ae,se)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(O){return{$$typeof:d,render:O}},_e.isValidElement=re,_e.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:G}},_e.memo=function(O,Z){return{$$typeof:p,type:O,compare:Z===void 0?null:Z}},_e.startTransition=function(O){var Z=I.T,H={};I.T=H;try{var J=O(),se=I.S;se!==null&&se(H,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(B,ie)}catch(ae){ie(ae)}finally{Z!==null&&H.types!==null&&(Z.types=H.types),I.T=Z}},_e.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},_e.use=function(O){return I.H.use(O)},_e.useActionState=function(O,Z,H){return I.H.useActionState(O,Z,H)},_e.useCallback=function(O,Z){return I.H.useCallback(O,Z)},_e.useContext=function(O){return I.H.useContext(O)},_e.useDebugValue=function(){},_e.useDeferredValue=function(O,Z){return I.H.useDeferredValue(O,Z)},_e.useEffect=function(O,Z){return I.H.useEffect(O,Z)},_e.useEffectEvent=function(O){return I.H.useEffectEvent(O)},_e.useId=function(){return I.H.useId()},_e.useImperativeHandle=function(O,Z,H){return I.H.useImperativeHandle(O,Z,H)},_e.useInsertionEffect=function(O,Z){return I.H.useInsertionEffect(O,Z)},_e.useLayoutEffect=function(O,Z){return I.H.useLayoutEffect(O,Z)},_e.useMemo=function(O,Z){return I.H.useMemo(O,Z)},_e.useOptimistic=function(O,Z){return I.H.useOptimistic(O,Z)},_e.useReducer=function(O,Z,H){return I.H.useReducer(O,Z,H)},_e.useRef=function(O){return I.H.useRef(O)},_e.useState=function(O){return I.H.useState(O)},_e.useSyncExternalStore=function(O,Z,H){return I.H.useSyncExternalStore(O,Z,H)},_e.useTransition=function(){return I.H.useTransition()},_e.version="19.2.5",_e}var pb;function im(){return pb||(pb=1,_h.exports=QC()),_h.exports}var Th={exports:{}},Lt={};var mb;function ZC(){if(mb)return Lt;mb=1;var e=im();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(t(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(h,p,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:h,containerInfo:p,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Lt.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return l(h,p,null,y)},Lt.flushSync=function(h){var p=u.T,y=r.p;try{if(u.T=null,r.p=2,h)return h()}finally{u.T=p,r.p=y,r.d.f()}},Lt.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(h,p))},Lt.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},Lt.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,g=d(y,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?r.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):y==="script"&&r.d.X(h,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Lt.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=d(p.as,p.crossOrigin);r.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(h)},Lt.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,g=d(y,p.crossOrigin);r.d.L(h,y,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Lt.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=d(p.as,p.crossOrigin);r.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(h)},Lt.requestFormReset=function(h){r.d.r(h)},Lt.unstable_batchedUpdates=function(h,p){return h(p)},Lt.useFormState=function(h,p,y){return u.H.useFormState(h,p,y)},Lt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Lt.version="19.2.5",Lt}var gb;function d1(){if(gb)return Th.exports;gb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Th.exports=ZC(),Th.exports}var yb;function GC(){if(yb)return Do;yb=1;var e=FC(),t=im(),s=d1();function r(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var i=n,a=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(a=i.return),n=i.return;while(n)}return i.tag===3?a:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function d(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function h(n){if(l(n)!==n)throw Error(r(188))}function p(n){var i=n.alternate;if(!i){if(i=l(n),i===null)throw Error(r(188));return i!==n?null:n}for(var a=n,c=i;;){var f=a.return;if(f===null)break;var m=f.alternate;if(m===null){if(c=f.return,c!==null){a=c;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===a)return h(f),n;if(m===c)return h(f),i;m=m.sibling}throw Error(r(188))}if(a.return!==c.return)a=f,c=m;else{for(var b=!1,T=f.child;T;){if(T===a){b=!0,a=f,c=m;break}if(T===c){b=!0,c=f,a=m;break}T=T.sibling}if(!b){for(T=m.child;T;){if(T===a){b=!0,a=m,c=f;break}if(T===c){b=!0,c=m,a=f;break}T=T.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==c)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?n:i}function y(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=y(n),i!==null)return i;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function oe(n){return n===null||typeof n!="object"?null:(n=re&&n[re]||n["@@iterator"],typeof n=="function"?n:null)}var me=Symbol.for("react.client.reference");function he(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===me?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case E:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case P:return"Suspense";case B:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case k:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case I:return i=n.displayName||null,i!==null?i:he(n.type)||"Memo";case L:i=n._payload,n=n._init;try{return he(n(i))}catch{}}return null}var fe=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pen
vendor: 4,192 bytes, lines 1-8
1ding:!1,data:null,method:null,action:null},ie=[],X=-1;function O(n){return{current:n}}function Z(n){0>X||(n.current=ie[X],ie[X]=null,X--)}function H(n,i){X++,ie[X]=n.current,n.current=i}var J=O(null),se=O(null),ae=O(null),ye=O(null);function xe(n,i){switch(H(ae,i),H(se,n),H(J,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?N0(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=N0(i),n=D0(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Z(J),H(J,n)}function ve(){Z(J),Z(se),Z(ae)}function _t(n){n.memoizedState!==null&&H(ye,n);var i=J.current,a=D0(i,n.type);i!==a&&(H(se,n),H(J,a))}function Dt(n){se.current===n&&(Z(J),Z(se)),ye.current===n&&(Z(ye),ko._currentValue=G)}var Tt,ln;function jt(n){if(Tt===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);Tt=i&&i[1]||"",ln=-1<a.stack.indexOf(`
2    at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3`+Tt+n+ln}var Pa=!1;function wr(n,i){if(!n||Pa)return"";Pa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch($){var q=$}Reflect.construct(n,[],K)}else{try{K.call()}catch($){q=$}n.call(K.prototype)}}else{try{throw Error()}catch($){q=$}(K=n())&&typeof K.catch=="function"&&K.catch(function(){})}}catch($){if($&&q&&typeof $.stack=="string")return[$.stack,q.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),b=m[0],T=m[1];if(b&&T){var R=b.split(`
4`),V=T.split(`
5`);for(f=c=0;c<R.length&&!R[c].includes("DetermineComponentFrameRoot");)c++;for(;f<V.length&&!V[f].includes("DetermineComponentFrameRoot");)f++;if(c===R.length||f===V.length)for(c=R.length-1,f=V.length-1;1<=c&&0<=f&&R[c]!==V[f];)f--;for(;1<=c&&0<=f;c--,f--)if(R[c]!==V[f]){if(c!==1||f!==1)do if(c--,f--,0>f||R[c]!==V[f]){var Q=`
6`+R[c].replace(" at new "," at ");return n.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",n.displayName)),Q}while(1<=c&&0<=f);break}}}finally{Pa=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?jt(a):""}function Di(n,i){switch(n.tag){case 26:case 27:case 5:return jt(n.type);case 16:return jt("Lazy");case 13:return n.child!==i&&i!==null?jt("Suspense Fallback"):jt("Suspense");case 19:return jt("SuspenseList");case 0:case 15:return wr(n.type,!1);case 11:return wr(n.type.render,!1);case 1:return wr(n.type,!0);case 31:return jt("Activity");default:return""}}function La(n){try{var i="",a=null;do i+=Di(n,a),a=n,n=n.return;while(n);return i}catch(c){return`
7Error generating stack: `+c.message+`
8`+c.stack}}var cn=Object.prototype.hasOwnProperty,Ua=e.unstable_scheduleCallback,Va=e.unstable_cancelCallback,Vt=e.unstable_shouldYield,Zs=e.unstable_requestPaint,qt=e.unstable_now,ad=e.unstable_getCurrentPriorityLevel,ji=e.unstable_ImmediatePriority,bl=e.unstable_UserBlockingPriority,zi=e.unstable_NormalPriority,qa=e.unstable_LowPriority,vs=e.unstable_IdlePriority,xl=e.log,Gs=e.unstable_setDisableYieldValue,Pi=null,Bt=null;function Pn(n){if(typeof xl=="function"&&Gs(n),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(Pi,n)}catch{}}var zt=Math.clz32?Math.clz32:Gn,od=Math.log,Ba=Math.LN2;function Gn(n){return n>>>=0,n===0?32:31-(od(n)/Ba|0)|0}var Sr=256,_r=262144,Li=4194304;function Yn(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;
vendor: 7,724 bytes, line 8
8case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function we(n,i,a){var c=n.pendingLanes;if(c===0)return 0;var f=0,m=n.suspendedLanes,b=n.pingedLanes;n=n.warmLanes;var T=c&134217727;return T!==0?(c=T&~m,c!==0?f=Yn(c):(b&=T,b!==0?f=Yn(b):a||(a=T&~n,a!==0&&(f=Yn(a))))):(T=c&~m,T!==0?f=Yn(T):b!==0?f=Yn(b):a||(a=c&~n,a!==0&&(f=Yn(a)))),f===0?0:i!==0&&i!==f&&(i&m)===0&&(m=f&-f,a=i&-i,m>=a||m===32&&(a&4194048)!==0)?i:f}function Ke(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function xt(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Pt(){var n=Li;return Li<<=1,(Li&62914560)===0&&(Li=4194304),n}function Ys(n){for(var i=[],a=0;31>a;a++)i.push(n);return i}function Je(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function Yt(n,i,a,c,f,m){var b=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var T=n.entanglements,R=n.expirationTimes,V=n.hiddenUpdates;for(a=b&~a;0<a;){var Q=31-zt(a),K=1<<Q;T[Q]=0,R[Q]=-1;var q=V[Q];if(q!==null)for(V[Q]=null,Q=0;Q<q.length;Q++){var $=q[Q];$!==null&&($.lane&=-536870913)}a&=~K}c!==0&&Ui(n,c,0),m!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=m&~(b&~i))}function Ui(n,i,a){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-zt(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|a&261930}function Kt(n,i){var a=n.entangledLanes|=i;for(n=n.entanglements;a;){var c=31-zt(a),f=1<<c;f&i|n[c]&i&&(n[c]|=i),a&=~f}}function Xt(n,i){var a=i&-i;return a=(a&42)!==0?1:Tr(a),(a&(n.suspendedLanes|i))!==0?0:a}function Tr(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Ln(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ld(){var n=F.p;return n!==0?n:(n=window.event,n===void 0?32:nb(n.type))}function vg(n,i){var a=F.p;try{return F.p=n,i()}finally{F.p=a}}var Ks=Math.random().toString(36).slice(2),Et="__reactFiber$"+Ks,Wt="__reactProps$"+Ks,Er="__reactContainer$"+Ks,cd="__reactEvents$"+Ks,OE="__reactListeners$"+Ks,ME="__reactHandles$"+Ks,bg="__reactResources$"+Ks,Ia="__reactMarker$"+Ks;function ud(n){delete n[Et],delete n[Wt],delete n[cd],delete n[OE],delete n[ME]}function Cr(n){var i=n[Et];if(i)return i;for(var a=n.parentNode;a;){if(i=a[Er]||a[Et]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(n=q0(n);n!==null;){if(a=n[Et])return a;n=q0(n)}return i}n=a,a=n.parentNode}return null}function Ar(n){if(n=n[Et]||n[Er]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function $a(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(r(33))}function kr(n){var i=n[bg];return i||(i=n[bg]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function wt(n){n[Ia]=!0}var xg=new Set,wg={};function Vi(n,i){Rr(n,i),Rr(n+"Capture",i)}function Rr(n,i){for(wg[n]=i,n=0;n<i.length;n++)xg.add(i[n])}var NE=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]*$"),Sg={},_g={};function DE(n){return cn.call(_g,n)?!0:cn.call(Sg,n)?!1:NE.test(n)?_g[n]=!0:(Sg[n]=!0,!1)}function wl(n,i,a){if(DE(i))if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+a)}}function Sl(n,i,a){if(a===null)n.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+a)}}function bs(n,i,a,c){if(c===null)n.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(i,a,""+c)}}function xn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Tg(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function jE(n,i,a){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var f=c.get,m=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return f.call(this)},set:function(b){a=""+b,m.call(this,b)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function dd(n){if(!n._valueTracker){var i=Tg(n)?"checked":"value";n._valueTracker=jE(n,i,""+n[i])}}function Eg(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return n&&(c=Tg(n)?n.checked?"true":"false":n.value),n=c,n!==a?(i.setValue(n),!0):!1}function _l(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var zE=/[\n"\\]/g;function wn(n){return n.replace(zE,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function fd(n,i,a,c,f,m,b,T){n.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?n.type=b:n.removeAttribute("type"),i!=null?b==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+xn(i)):n.value!==""+xn(i)&&(n.value=""+xn(i)):b!=="submit"&&b!=="reset"||n.removeAttribute("value"),i!=null?hd(n,b,xn(i)):a!=null?hd(n,b,xn(a)):c!=null&&n.removeAttribute("value"),f==null&&m!=null&&(n.defaultChecked=!!m),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.name=""+xn(T):n.removeAttribute("name")}function Cg(n,i,a,c,f,m,b,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),i!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||i!=null)){dd(n);return}a=a!=null?""+xn(a):"",i=i!=null?""+xn(i):a,T||i===n.value||(n.value=i),n.defaultValue=i}c=c??f,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=T?n.checked:!!c,n.defaultChecked=!!c,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.name=b),dd(n)}function hd(n,i,a){i==="number"&&_l(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Or(n,i,a,c){if(n=n.options,i){i={};for(var f=0;f<a.length;f++)i["$"+a[f]]=!0;for(a=0;a<n.length;a++)f=i.hasOwnProperty("$"+n[a].value),n[a].selected!==f&&(n[a].selected=f),f&&c&&(n[a].defaultSelected=!0)}else{for(a=""+xn(a),i=null,f=0;f<n.length;f++){if(n[f].value===a){n[f].selected=!0,c&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}
vendor: 4,574 bytes, line 8
8function Ag(n,i,a){if(i!=null&&(i=""+xn(i),i!==n.value&&(n.value=i),a==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=a!=null?""+xn(a):""}function kg(n,i,a,c){if(i==null){if(c!=null){if(a!=null)throw Error(r(92));if(fe(c)){if(1<c.length)throw Error(r(93));c=c[0]}a=c}a==null&&(a=""),i=a}a=xn(i),n.defaultValue=a,c=n.textContent,c===a&&c!==""&&c!==null&&(n.value=c),dd(n)}function Mr(n,i){if(i){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=i;return}}n.textContent=i}var PE=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 Rg(n,i,a){var c=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,a):typeof a!="number"||a===0||PE.has(i)?i==="float"?n.cssFloat=a:n[i]=(""+a).trim():n[i]=a+"px"}function Og(n,i,a){if(i!=null&&typeof i!="object")throw Error(r(62));if(n=n.style,a!=null){for(var c in a)!a.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var f in i)c=i[f],i.hasOwnProperty(f)&&a[f]!==c&&Rg(n,f,c)}else for(var m in i)i.hasOwnProperty(m)&&Rg(n,m,i[m])}function pd(n){if(n.indexOf("-")===-1)return!1;switch(n){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 LE=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"],["clipPath","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
8-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"]]),UE=/^[\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 Tl(n){return UE.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function xs(){}var md=null;function gd(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Nr=null,Dr=null;function Mg(n){var i=Ar(n);if(i&&(n=i.stateNode)){var a=n[Wt]||null;e:switch(n=i.stateNode,i.type){case"input":if(fd(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+wn(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var c=a[i];if(c!==n&&c.form===n.form){var f=c[Wt]||null;if(!f)throw Error(r(90));fd(c,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<a.length;i++)c=a[i],c.form===n.form&&Eg(c)}break e;case"textarea":Ag(n,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&Or(n,!!a.multiple,i,!1)}}}var yd=!1;function Ng(n,i,a){if(yd)return n(i,a);yd=!0;try{var c=n(i);return c}finally{if(yd=!1,(Nr!==null||Dr!==null)&&(dc(),Nr&&(i=Nr,n=Dr,Dr=Nr=null,Mg(i),n)))for(i=0;i<n.length;i++)Mg(n[i])}}function Ha(n,i){var a=n.stateNode;if(a===null)return null;var c=a[Wt]||null;if(c===null)return null;a=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(r(231,i,typeof a));return a}var ws=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vd=!1;if(ws)try{var Fa={};Object.defineProperty(Fa,"passive",{get:function(){vd=!0}}),window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch{vd=!1}var Xs=null,bd=null,El=null;function Dg(){if(El)return El;var n,i=bd,a=i.length,c,f="value"in Xs?Xs.value:Xs.textContent,m=f.length;for(n=0;n<a&&i[n]===f[n];n++);var b=a-n;for(c=1;c<=b&&i[a-c]===f[m-c];c++);return El=f.slice(n,1<c?1-c:void 0)}function Cl(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Al(){return!0}function jg(){return!1}function Jt(n){function i(a,c,f,m,b){this._reactName=a,this._targetInst=f,this.type=c,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(a=n[T],this[T]=a?a(m):m[T]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Al:jg,this.isPropagationStopped=jg,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Al)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Al)},persist:function(){},isPersistent:Al}),i}var qi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kl=Jt(qi),Qa=g({},qi,{view:0,detail:0}),VE=Jt(Qa),xd,wd,Za,Rl=g({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_d,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Za&&(Za&&n.type==="mousemove"?(xd=n.screenX-Za.screenX,wd=n.screenY-Za.screenY):wd=xd=0,Za=n),xd)},movementY:function(n){return"movementY"in n?n.movementY:wd}}),zg=Jt(Rl),qE=g({},Rl,{dataTransfer:0}),BE=Jt(qE),IE=g({},Qa,{relatedTarget:0}),Sd=Jt(IE),$E=g({},qi,{animationName:0,elapsedTime:0,pseudoElement:0}),HE=Jt($E),FE=g({},qi,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),QE=Jt(FE),ZE=g({},qi,{data:0}),Pg=Jt(ZE),GE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YE={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"},KE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XE(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=KE[n])?!!i[n]:!1}function _d(){return XE}var WE=g({},Qa,{key:function(n){if(n.key){var i=GE[n.key]||n.key;if(i!=="Unidentified")return i}
vendor: 3,506 bytes, line 8
8return n.type==="keypress"?(n=Cl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?YE[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_d,charCode:function(n){return n.type==="keypress"?Cl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Cl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),JE=Jt(WE),e2=g({},Rl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lg=Jt(e2),t2=g({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_d}),n2=Jt(t2),s2=g({},qi,{propertyName:0,elapsedTime:0,pseudoElement:0}),i2=Jt(s2),r2=g({},Rl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),a2=Jt(r2),o2=g({},qi,{newState:0,oldState:0}),l2=Jt(o2),c2=[9,13,27,32],Td=ws&&"CompositionEvent"in window,Ga=null;ws&&"documentMode"in document&&(Ga=document.documentMode);var u2=ws&&"TextEvent"in window&&!Ga,Ug=ws&&(!Td||Ga&&8<Ga&&11>=Ga),Vg=" ",qg=!1;function Bg(n,i){switch(n){case"keyup":return c2.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ig(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var jr=!1;function d2(n,i){switch(n){case"compositionend":return Ig(i);case"keypress":return i.which!==32?null:(qg=!0,Vg);case"textInput":return n=i.data,n===Vg&&qg?null:n;default:return null}}function f2(n,i){if(jr)return n==="compositionend"||!Td&&Bg(n,i)?(n=Dg(),El=bd=Xs=null,jr=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Ug&&i.locale!=="ko"?null:i.data;default:return null}}var h2={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 $g(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!h2[n.type]:i==="textarea"}function Hg(n,i,a,c){Nr?Dr?Dr.push(c):Dr=[c]:Nr=c,i=vc(i,"onChange"),0<i.length&&(a=new kl("onChange","change",null,a,c),n.push({event:a,listeners:i}))}var Ya=null,Ka=null;function p2(n){C0(n,0)}function Ol(n){var i=$a(n);if(Eg(i))return n}function Fg(n,i){if(n==="change")return i}var Qg=!1;if(ws){var Ed;if(ws){var Cd="oninput"in document;if(!Cd){var Zg=document.createElement("div");Zg.setAttribute("oninput","return;"),Cd=typeof Zg.oninput=="function"}Ed=Cd}else Ed=!1;Qg=Ed&&(!document.documentMode||9<document.documentMode)}function Gg(){Ya&&(Ya.detachEvent("onpropertychange",Yg),Ka=Ya=null)}function Yg(n){if(n.propertyName==="value"&&Ol(Ka)){var i=[];Hg(i,Ka,n,gd(n)),Ng(p2,i)}}function m2(n,i,a){n==="focusin"?(Gg(),Ya=i,Ka=a,Ya.attachEvent("onpropertychange",Yg)):n==="focusout"&&Gg()}function g2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ol(Ka)}function y2(n,i){if(n==="click")return Ol(i)}function v2(n,i){if(n==="input"||n==="change")return Ol(i)}function b2(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var un=typeof Object.is=="function"?Object.is:b2;
vendor: 18,083 bytes, line 8
8function Xa(n,i){if(un(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var a=Object.keys(n),c=Object.keys(i);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var f=a[c];if(!cn.call(i,f)||!un(n[f],i[f]))return!1}return!0}function Kg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Xg(n,i){var a=Kg(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=i&&c>=i)return{node:a,offset:i-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Kg(a)}}function Wg(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Wg(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Jg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=_l(n.document);i instanceof n.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)n=i.contentWindow;else break;i=_l(n.document)}return i}function Ad(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var x2=ws&&"documentMode"in document&&11>=document.documentMode,zr=null,kd=null,Wa=null,Rd=!1;function ey(n,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Rd||zr==null||zr!==_l(c)||(c=zr,"selectionStart"in c&&Ad(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Wa&&Xa(Wa,c)||(Wa=c,c=vc(kd,"onSelect"),0<c.length&&(i=new kl("onSelect","select",null,i,a),n.push({event:i,listeners:c}),i.target=zr)))}function Bi(n,i){var a={};return a[n.toLowerCase()]=i.toLowerCase(),a["Webkit"+n]="webkit"+i,a["Moz"+n]="moz"+i,a}var Pr={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},Od={},ty={};ws&&(ty=document.createElement("div").style,"AnimationEvent"in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),"TransitionEvent"in window||delete Pr.transitionend.transition);function Ii(n){if(Od[n])return Od[n];if(!Pr[n])return n;var i=Pr[n],a;for(a in i)if(i.hasOwnProperty(a)&&a in ty)return Od[n]=i[a];return n}var ny=Ii("animationend"),sy=Ii("animationiteration"),iy=Ii("animationstart"),w2=Ii("transitionrun"),S2=Ii("transitionstart"),_2=Ii("transitioncancel"),ry=Ii("transitionend"),ay=new Map,Md="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(" ");Md.push("scrollEnd");function Un(n,i){ay.set(n,i),Vi(i,[n])}var Ml=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Sn=[],Lr=0,Nd=0;function Nl(){for(var n=Lr,i=Nd=Lr=0;i<n;){var a=Sn[i];Sn[i++]=null;var c=Sn[i];Sn[i++]=null;var f=Sn[i];Sn[i++]=null;var m=Sn[i];if(Sn[i++]=null,c!==null&&f!==null){var b=c.pending;b===null?f.next=f:(f.next=b.next,b.next=f),c.pending=f}m!==0&&oy(a,f,m)}}function Dl(n,i,a,c){Sn[Lr++]=n,Sn[Lr++]=i,Sn[Lr++]=a,Sn[Lr++]=c,Nd|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function Dd(n,i,a,c){return Dl(n,i,a,c),jl(n)}function $i(n,i){return Dl(n,null,null,i),jl(n)}function oy(n,i,a){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a);for(var f=!1,m=n.return;m!==null;)m.childLanes|=a,c=m.alternate,c!==null&&(c.childLanes|=a),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(f=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,f&&i!==null&&(f=31-zt(a),n=m.hiddenUpdates,c=n[f],c===null?n[f]=[i]:c.push(i),i.lane=a|536870912),m):null}function jl(n){if(50<wo)throw wo=0,$f=null,Error(r(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var Ur={};function T2(n,i,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(n,i,a,c){return new T2(n,i,a,c)}function jd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ss(n,i){var a=n.alternate;return a===null?(a=dn(n.tag,i,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=i,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,i=n.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function ly(n,i){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function zl(n,i,a,c,f,m){var b=0;if(c=n,typeof n=="function")jd(n)&&(b=1);else if(typeof n=="string")b=RC(n,a,J.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=dn(31,a,i,f),n.elementType=W,n.lanes=m,n;case E:return Hi(a.children,f,m,i);case C:b=8,f|=24;break;case A:return n=dn(12,a,i,f|2),n.elementType=A,n.lanes=m,n;case P:return n=dn(13,a,i,f),n.elementType=P,n.lanes=m,n;case B:return n=dn(19,a,i,f),n.elementType=B,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:b=10;break e;case M:b=9;break e;case D:b=11;break e;case I:b=14;break e;case L:b=16,c=null;break e}b=29,a=Error(r(130,n===null?"null":typeof n,"")),c=null}return i=dn(b,a,i,f),i.elementType=n,i.type=c,i.lanes=m,i}function Hi(n,i,a,c){return n=dn(7,n,c,i),n.lanes=a,n}function zd(n,i,a){return n=dn(6,n,null,i),n.lanes=a,n}function cy(n){var i=dn(18,null,null,0);return i.stateNode=n,i}function Pd(n,i,a){return i=dn(4,n.children!==null?n.children:[],n.key,i),i.lanes=a,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var uy=new WeakMap;function _n(n,i){if(typeof n=="object"&&n!==null){var a=uy.get(n);return a!==void 0?a:(i={value:n,source:i,stack:La(i)},uy.set(n,i),i)}return{value:n,source:i,stack:La(i)}}var Vr=[],qr=0,Pl=null,Ja=0,Tn=[],En=0,Ws=null,Kn=1,Xn="";function _s(n,i){Vr[qr++]=Ja,Vr[qr++]=Pl,Pl=n,Ja=i}function dy(n,i,a){Tn[En++]=Kn,Tn[En++]=Xn,Tn[En++]=Ws,Ws=n;var c=Kn;n=Xn;var f=32-zt(c)-1;c&=~(1<<f),a+=1;var m=32-zt(i)+f;if(30<m){var b=f-f%5;m=(c&(1<<b)-1).toString(32),c>>=b,f-=b,Kn=1<<32-zt(i)+f|a<<f|c,Xn=m+n}else Kn=1<<m|a<<f|c,Xn=n}function Ld(n){n.return!==null&&(_s(n,1),dy(n,1,0))}function Ud(n){for(;n===Pl;)Pl=Vr[--qr],Vr[qr]=null,Ja=Vr[--qr],Vr[qr]=null;for(;n===Ws;)Ws=Tn[--En],Tn[En]=null,Xn=Tn[--En],Tn[En]=null,Kn=Tn[--En],Tn[En]=null}function fy(n,i){Tn[En++]=Kn,Tn[En++]=Xn,Tn[En++]=Ws,Kn=i.id,Xn=i.overflow,Ws=n}var Ct=null,Ze=null,Ne=!1,Js=null,Cn=!1,Vd=Error(r(519));function ei(n){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw eo(_n(i,n)),Vd}function hy(n){var i=n.stateNode,a=n.type,c=n.memoizedProps;switch(i[Et]=n,i[Wt]=c,a){case"dialog":Re("cancel",i),Re("close",i);break;case"iframe":case"object":case"embed":Re("load",i);break;case"video":case"audio":for(a=0;a<_o.length;a++)Re(_o[a],i);break;case"source":Re("error",i);break;case"img":case"image":case"link":Re("error",i),Re("load",i);break;case"details":Re("toggle",i);break;case"input":Re("invalid",i),Cg(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Re("invalid",i);break;case"textarea":Re("invalid",i),kg(i,c.value,c.defaultValue,c.children)}a=c.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||c.suppressHydrationWarning===!0||O0(i.textContent,a)?(c.popover!=null&&(Re("beforetoggle",i),Re("toggle",i)),c.onScroll!=null&&Re("scroll",i),c.onScrollEnd!=null&&Re("scrollend",i),c.onClick!=null&&(i.onclick=xs),i=!0):i=!1,i||ei(n,!0)}function py(n){for(Ct=n.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Ct=Ct.return}}function Br(n){if(n!==Ct)return!1;if(!Ne)return py(n),Ne=!0,!1;var i=n.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||ih(n.type,n.memoizedProps)),a=!a),a&&Ze&&ei(n),py(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));Ze=V0(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));Ze=V0(n)}else i===27?(i=Ze,pi(n.type)?(n=ch,ch=null,Ze=n):Ze=i):Ze=Ct?kn(n.stateNode.nextSibling):null;return!0}function Fi(){Ze=Ct=null,Ne=!1}function qd(){var n=Js;return n!==null&&(sn===null?sn=n:sn.push.apply(sn,n),Js=null),n}function eo(n){Js===null?Js=[n]:Js.push(n)}var Bd=O(null),Qi=null,Ts=null;function ti(n,i,a){H(Bd,i._currentValue),i._currentValue=a}function Es(n){n._currentValue=Bd.current,Z(Bd)}function Id(n,i,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===a)break;n=n.return}}function $d(n,i,a,c){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var T=m;m=f;for(var R=0;R<i.length;R++)if(T.context===i[R]){m.lanes|=a,T=m.alternate,T!==null&&(T.lanes|=a),Id(m.return,a,n),c||(b=null);break e}m=T.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(r(341));b.lanes|=a,m=b.alternate,m!==null&&(m.lanes|=a),Id(b,a,n),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===n){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function Ir(n,i,a,c){n=null;for(var f=i,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var T=f.type;un(f.pendingProps.value,b.value)||(n!==null?n.push(T):n=[T])}}else if(f===ye.current){if(b=f.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(ko):n=[ko])}f=f.return}n!==null&&$d(i,n,a,c),i.flags|=262144}function Ll(n){for(n=n.firstContext;n!==null;){if(!un(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Zi(n){Qi=n,Ts=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function At(n){return my(Qi,n)}function Ul(n,i){return Qi===null&&Zi(n),my(n,i)}function my(n,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},Ts===null){if(n===null)throw Error(r(308));Ts=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Ts=Ts.next=i;return a}var E2=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(a,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(a){return a()})}},C2=e.unstable_scheduleCallback,A2=e.unstable_NormalPriority,ot={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hd(){return{controller:new E2,data:new Map,refCount:0}}function to(n){n.refCount--,n.refCount===0&&C2(A2,function(){n.controller.abort()})}var no=null,Fd=0,$r=0,Hr=null;function k2(n,i){if(no===null){var a=no=[];Fd=0,$r=Yf(),Hr={status:"pending",value:void 0,then:function(c){a.push(c)}}}return Fd++,i.then(gy,gy),i}function gy(){if(--Fd===0&&no!==null){Hr!==null&&(Hr.status="fulfilled");var n=no;no=null,$r=0,Hr=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function R2(n,i){var a=[],c={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var f=0;f<a.length;f++)(0,a[f])(i)},function(f){for(c.status="rejected",c.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),c}var yy=j.S;j.S=function(n,i){e0=qt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&k2(n,i),yy!==null&&yy(n,i)};var Gi=O(null);function Qd(){var n=Gi.current;return n!==null?n:He.pooledCache}function Vl(n,i){i===null?H(Gi,Gi.current):H(Gi,i.pool)}function vy(){var n=Qd();return n===null?null:{parent:ot._currentValue,pool:n}}var Fr=Error(r(460)),Zd=Error(r(474)),ql=Error(r(542)),Bl={then:function(){}};function by(n){return n=n.status,n==="fulfilled"||n==="rejected"}function xy(n,i,a){switch(a=n[a],a===void 0?n.push(i):a!==i&&(i.then(xs,xs),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Sy(n),n;default:if(typeof i.status=="string")i.then(xs,xs);else{if(n=He,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=c}},function(c){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Sy(n),n}throw Ki=i,Fr}}function Yi(n){try{var i=n._init;return i(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ki=a,Fr):a}}var Ki=null;function wy(){if(Ki===null)throw Error(r(459));var n=Ki;return Ki=null,n}function Sy(n){if(n===Fr||n===ql)throw Error(r(483))}var Qr=null,so=0;function Il(n){var i=so;return so+=1,Qr===null&&(Qr=[]),xy(Qr,n,i)}function io(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function $l(n,i){throw i.$$typeof===v?Error(r(525)):(n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function _y(n){function i(z,N){if(n){var U=z.deletions;U===null?(z.deletions=[N],z.flags|=16):U.push(N)}}function a(z,N){if(!n)return null;for(;N!==null;)i(z,N),N=N.sibling;return null}function c(z){for(var N=new Map;z!==null;)z.key!==null?N.set(z.key,z):N.set(z.index,z),z=z.sibling;return N}function f(z,N){return z=Ss(z,N),z.index=0,z.sibling=null,z}function m(z,N,U){return z.index=U,n?(U=z.alternate,U!==null?(U=U.index,U<N?(z.flags|=67108866,N):U):(z.flags|=67108866,N)):(z.flags|=1048576,N)}function b(z){return n&&z.alternate===null&&(z.flags|=67108866),z}function T(z,N,U,Y){return N===null||N.tag!==6?(N=zd(U,z.mode,Y),N.return=z,N):(N=f(N,U),N.return=z,N)}function R(z,N,U,Y){var ge=U.type;return ge===E?Q(z,N,U.props.children,Y,U.key):N!==null&&(N.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===L&&Yi(ge)===N.type)?(N=f(N,U.props),io(N,U),N.return=z,N):(N=zl(U.type,U.key,U.props,null,z.mode,Y),io(N,U),N.return=z,N)}function V(z,N,U,Y){return N===null||N.tag!==4||N.stateNode.containerInfo!==U.containerInfo||N.stateNode.implementation!==U.implementation?(N=Pd(U,z.mode,Y),N.return=z,N):(N=f(N,U.children||[]),N.return=z,N)}function Q(z,N,U,Y,ge){return N===null||N.tag!==7?(N=Hi(U,z.mode,Y,ge),N.return=z,N):(N=f(N,U),N.return=z,N)}function K(z,N,U){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=zd(""+N,z.mode,U),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case x:return U=zl(N.type,N.key,N.props,null,z.mode,U),io(U,N),U.return=z,U;case S:return N=Pd(N,z.mode,U),N.return=z,N;case L:return N=Yi(N),K(z,N,U)}if(fe(N)||oe(N))return N=Hi(N,z.mode,U,null),N.return=z,N;if(typeof N.then=="function")return K(z,Il(N),U);if(N.$$typeof===k)return K(z,Ul(z,N),U);$l(z,N)}return null}function q(z,N,U,Y){var ge=N!==null?N.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ge!==null?null:T(z,N,""+U,Y);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return U.key===ge?R(z,N,U,Y):null;case S:return U.key===ge?V(z,N,U,Y):null;case L:return U=Yi(U),q(z,N,U,Y)}if(fe(U)||oe(U))return ge!==null?null:Q(z,N,U,Y,null);if(typeof U.then=="function")return q(z,N,Il(U),Y);if(U.$$typeof===k)return q(z,N,Ul(z,U),Y);$l(z,U)}return null}function $(z,N,U,Y,ge){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return z=z.get(U)||null,T(N,z,""+Y,ge);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:return z=z.get(Y.key===null?U:Y.key)||null,R(N,z,Y,ge);case S:return z=z.get(Y.key===null?U:Y.key)||null,V(N,z,Y,ge);case L:return Y=Yi(Y),$(z,N,U,Y,ge)}if(fe(Y)||oe(Y))return z=z.get(U)||null,Q(N,z,Y,ge,null);if(typeof Y.then=="function")return $(z,N,U,Il(Y),ge);if(Y.$$typeof===k)return $(z,N,U,Ul(N,Y),ge);$l(N,Y)}return null}function le(z,N,U,Y){for(var ge=null,je=null,pe=N,Ee=N=0,Me=null;pe!==null&&Ee<U.length;Ee++){pe.index>
vendor: 5,661 bytes, line 8
8Ee?(Me=pe,pe=null):Me=pe.sibling;var ze=q(z,pe,U[Ee],Y);if(ze===null){pe===null&&(pe=Me);break}n&&pe&&ze.alternate===null&&i(z,pe),N=m(ze,N,Ee),je===null?ge=ze:je.sibling=ze,je=ze,pe=Me}if(Ee===U.length)return a(z,pe),Ne&&_s(z,Ee),ge;if(pe===null){for(;Ee<U.length;Ee++)pe=K(z,U[Ee],Y),pe!==null&&(N=m(pe,N,Ee),je===null?ge=pe:je.sibling=pe,je=pe);return Ne&&_s(z,Ee),ge}for(pe=c(pe);Ee<U.length;Ee++)Me=$(pe,z,Ee,U[Ee],Y),Me!==null&&(n&&Me.alternate!==null&&pe.delete(Me.key===null?Ee:Me.key),N=m(Me,N,Ee),je===null?ge=Me:je.sibling=Me,je=Me);return n&&pe.forEach(function(bi){return i(z,bi)}),Ne&&_s(z,Ee),ge}function be(z,N,U,Y){if(U==null)throw Error(r(151));for(var ge=null,je=null,pe=N,Ee=N=0,Me=null,ze=U.next();pe!==null&&!ze.done;Ee++,ze=U.next()){pe.index>Ee?(Me=pe,pe=null):Me=pe.sibling;var bi=q(z,pe,ze.value,Y);if(bi===null){pe===null&&(pe=Me);break}n&&pe&&bi.alternate===null&&i(z,pe),N=m(bi,N,Ee),je===null?ge=bi:je.sibling=bi,je=bi,pe=Me}if(ze.done)return a(z,pe),Ne&&_s(z,Ee),ge;if(pe===null){for(;!ze.done;Ee++,ze=U.next())ze=K(z,ze.value,Y),ze!==null&&(N=m(ze,N,Ee),je===null?ge=ze:je.sibling=ze,je=ze);return Ne&&_s(z,Ee),ge}for(pe=c(pe);!ze.done;Ee++,ze=U.next())ze=$(pe,z,Ee,ze.value,Y),ze!==null&&(n&&ze.alternate!==null&&pe.delete(ze.key===null?Ee:ze.key),N=m(ze,N,Ee),je===null?ge=ze:je.sibling=ze,je=ze);return n&&pe.forEach(function(qC){return i(z,qC)}),Ne&&_s(z,Ee),ge}function $e(z,N,U,Y){if(typeof U=="object"&&U!==null&&U.type===E&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case x:e:{for(var ge=U.key;N!==null;){if(N.key===ge){if(ge=U.type,ge===E){if(N.tag===7){a(z,N.sibling),Y=f(N,U.props.children),Y.return=z,z=Y;break e}}else if(N.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===L&&Yi(ge)===N.type){a(z,N.sibling),Y=f(N,U.props),io(Y,U),Y.return=z,z=Y;break e}a(z,N);break}else i(z,N);N=N.sibling}U.type===E?(Y=Hi(U.props.children,z.mode,Y,U.key),Y.return=z,z=Y):(Y=zl(U.type,U.key,U.props,null,z.mode,Y),io(Y,U),Y.return=z,z=Y)}return b(z);case S:e:{for(ge=U.key;N!==null;){if(N.key===ge)if(N.tag===4&&N.stateNode.containerInfo===U.containerInfo&&N.stateNode.implementation===U.implementation){a(z,N.sibling),Y=f(N,U.children||[]),Y.return=z,z=Y;break e}else{a(z,N);break}else i(z,N);N=N.sibling}Y=Pd(U,z.mode,Y),Y.return=z,z=Y}return b(z);case L:return U=Yi(U),$e(z,N,U,Y)}if(fe(U))return le(z,N,U,Y);if(oe(U)){if(ge=oe(U),typeof ge!="function")throw Error(r(150));return U=ge.call(U),be(z,N,U,Y)}if(typeof U.then=="function")return $e(z,N,Il(U),Y);if(U.$$typeof===k)return $e(z,N,Ul(z,U),Y);$l(z,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,N!==null&&N.tag===6?(a(z,N.sibling),Y=f(N,U),Y.return=z,z=Y):(a(z,N),Y=zd(U,z.mode,Y),Y.return=z,z=Y),b(z)):a(z,N)}return function(z,N,U,Y){try{so=0;var ge=$e(z,N,U,Y);return Qr=null,ge}catch(pe){if(pe===Fr||pe===ql)throw pe;var je=dn(29,pe,null,z.mode);return je.lanes=Y,je.return=z,je}}}var Xi=_y(!0),Ty=_y(!1),ni=!1;function Gd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yd(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function si(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ii(n,i,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Pe&2)!==0){var f=c.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),c.pending=i,i=jl(n),oy(n,null,a),i}return Dl(n,c,i,a),jl(n)}function ro(n,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,Kt(n,a)}}function Kd(n,i){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,a=a.next}while(a!==null);m===null?f=m=i:m=m.next=i}else f=m=i;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=i:n.next=i,a.lastBaseUpdate=i}var Xd=!1;function ao(){if(Xd){var n=Hr;if(n!==null)throw n}}function oo(n,i,a,c){Xd=!1;var f=n.updateQueue;ni=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,T=f.shared.pending;if(T!==null){f.shared.pending=null;var R=T,V=R.next;R.next=null,b===null?m=V:b.next=V,b=R;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,T=Q.lastBaseUpdate,T!==b&&(T===null?Q.firstBaseUpdate=V:T.next=V,Q.lastBaseUpdate=R))}if(m!==null){var K=f.baseState;b=0,Q=V=R=null,T=m;do{var q=T.lane&-536870913,$=q!==T.lane;if($?(Oe&q)===q:(c&q)===q){q!==0&&q===$r&&(Xd=!0),Q!==null&&(Q=Q.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var le=n,be=T;q=i;var $e=a;switch(be.tag){case 1:if(le=be.payload,typeof le=="function"){K=le.call($e,K,q);break e}K=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=be.payload,q=typeof le=="function"?le.call($e,K,q):le,q==null)break e;K=g({},K,q);break e;case 2:ni=!0}}q=T.callback,q!==null&&(n.flags|=64,$&&(n.flags|=8192),$=f.callbacks,$===null?f.callbacks=[q]:$.push(q))}else $={lane:q,tag:T.tag,payload:T.payload,callback:T.callback,next:null},Q===null?(V=Q=$,R=K):Q=Q.next=$,b|=q;if(T=T.next,T===null){if(T=f.shared.pending,T===null)break;$=T,T=$.next,$.next=null,f.lastBaseUpdate=$,f.shared.pending=null}}while(!0);Q===null&&(R=K),f.baseState=R,f.firstBaseUpdate=V,f.lastBaseUpdate=Q,m===null&&(f.shared.lanes=0),ci|=b,n.lanes=b,n.memoizedState=K}}
vendor: 7,337 bytes, line 8
8function Ey(n,i){if(typeof n!="function")throw Error(r(191,n));n.call(i)}function Cy(n,i){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)Ey(a[n],i)}var Zr=O(null),Hl=O(0);function Ay(n,i){n=js,H(Hl,n),H(Zr,i),js=n|i.baseLanes}function Wd(){H(Hl,js),H(Zr,Zr.current)}function Jd(){js=Hl.current,Z(Zr),Z(Hl)}var fn=O(null),An=null;function ri(n){var i=n.alternate;H(rt,rt.current&1),H(fn,n),An===null&&(i===null||Zr.current!==null||i.memoizedState!==null)&&(An=n)}function ef(n){H(rt,rt.current),H(fn,n),An===null&&(An=n)}function ky(n){n.tag===22?(H(rt,rt.current),H(fn,n),An===null&&(An=n)):ai()}function ai(){H(rt,rt.current),H(fn,fn.current)}function hn(n){Z(fn),An===n&&(An=null),Z(rt)}var rt=O(0);function Fl(n){for(var i=n;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||oh(a)||lh(a)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Cs=0,Te=null,Be=null,lt=null,Ql=!1,Gr=!1,Wi=!1,Zl=0,lo=0,Yr=null,O2=0;function nt(){throw Error(r(321))}function tf(n,i){if(i===null)return!1;for(var a=0;a<i.length&&a<n.length;a++)if(!un(n[a],i[a]))return!1;return!0}function nf(n,i,a,c,f,m){return Cs=m,Te=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,j.H=n===null||n.memoizedState===null?dv:vf,Wi=!1,m=a(c,f),Wi=!1,Gr&&(m=Oy(i,a,c,f)),Ry(n),m}function Ry(n){j.H=fo;var i=Be!==null&&Be.next!==null;if(Cs=0,lt=Be=Te=null,Ql=!1,lo=0,Yr=null,i)throw Error(r(300));n===null||ct||(n=n.dependencies,n!==null&&Ll(n)&&(ct=!0))}function Oy(n,i,a,c){Te=n;var f=0;do{if(Gr&&(Yr=null),lo=0,Gr=!1,25<=f)throw Error(r(301));if(f+=1,lt=Be=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}j.H=fv,m=i(a,c)}while(Gr);return m}function M2(){var n=j.H,i=n.useState()[0];return i=typeof i.then=="function"?co(i):i,n=n.useState()[0],(Be!==null?Be.memoizedState:null)!==n&&(Te.flags|=1024),i}function sf(){var n=Zl!==0;return Zl=0,n}function rf(n,i,a){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~a}function af(n){if(Ql){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Ql=!1}Cs=0,lt=Be=Te=null,Gr=!1,lo=Zl=0,Yr=null}function It(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Te.memoizedState=lt=n:lt=lt.next=n,lt}function at(){if(Be===null){var n=Te.alternate;n=n!==null?n.memoizedState:null}else n=Be.next;var i=lt===null?Te.memoizedState:lt.next;if(i!==null)lt=i,Be=n;else{if(n===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Be=n,n={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},lt===null?Te.memoizedState=lt=n:lt=lt.next=n}return lt}function Gl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function co(n){var i=lo;return lo+=1,Yr===null&&(Yr=[]),n=xy(Yr,n,i),i=Te,(lt===null?i.memoizedState:lt.next)===null&&(i=i.alternate,j.H=i===null||i.memoizedState===null?dv:vf),n}function Yl(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return co(n);if(n.$$typeof===k)return At(n)}throw Error(r(438,String(n)))}function of(n){var i=null,a=Te.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var c=Te.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=Gl(),Te.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(n),c=0;c<n;c++)a[c]=ee;return i.index++,a}function As(n,i){return typeof i=="function"?i(n):i}function Kl(n){var i=at();return lf(i,Be,n)}function lf(n,i,a){var c=n.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=a;var f=n.baseQueue,m=c.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}i.baseQueue=f=m,c.pending=null}if(m=n.baseState,f===null)n.memoizedState=m;else{i=f.next;var T=b=null,R=null,V=i,Q=!1;do{var K=V.lane&-536870913;if(K!==V.lane?(Oe&K)===K:(Cs&K)===K){var q=V.revertLane;if(q===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),K===$r&&(Q=!0);else if((Cs&q)===q){V=V.next,q===$r&&(Q=!0);continue}else K={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(T=R=K,b=m):R=R.next=K,Te.lanes|=q,ci|=q;K=V.action,Wi&&a(m,K),m=V.hasEagerState?V.eagerState:a(m,K)}else q={lane:K,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(T=R=q,b=m):R=R.next=q,Te.lanes|=K,ci|=K;V=V.next}while(V!==null&&V!==i);if(R===null?b=m:R.next=T,!un(m,n.memoizedState)&&(ct=!0,Q&&(a=Hr,a!==null)))throw a;n.memoizedState=m,n.baseState=b,n.baseQueue=R,c.lastRenderedState=m}return f===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function cf(n){var i=at(),a=i.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var c=a.dispatch,f=a.pending,m=i.memoizedState;if(f!==null){a.pending=null;var b=f=f.next;do m=n(m,b.action),b=b.next;while(b!==f);un(m,i.memoizedState)||(ct=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),a.lastRenderedState=m}return[m,c]}function My(n,i,a){var c=Te,f=at(),m=Ne;if(m){if(a===void 0)throw Error(r(407));a=a()}else a=i();var b=!un((Be||f).memoizedState,a);if(b&&(f.memoizedState=a,ct=!0),f=f.queue,ff(jy.bind(null,c,f,n),[n]),f.getSnapshot!==i||b||lt!==null&&lt.memoizedState.tag&1){if(c.flags|=2048,Kr(9,{destroy:void 0},Dy.bind(null,c,f,a,i),null),He===null)throw Error(r(349));m||(Cs&127)!==0||Ny(c,i,a)}return a}function Ny(n,i,a){n.flags|=16384,n={getSnapshot:i,value:a},i=Te.updateQueue,i===null?(i=Gl(),Te.updateQueue=i,i.stores=[n]):(a=i.stores,a===null?i.stores=[n]:a.push(n))}function Dy(n,i,a,c){i.value=a,i.getSnapshot=c,zy(i)&&Py(n)}function jy(n,i,a){return a(function(){zy(i)&&Py(n)})}function zy(n){var i=n.getSnapshot;n=n.value;try{var a=i();return!un(n,a)}catch{return!0}}function Py(n){var i=$i(n,2);i!==null&&rn(i,n,2)}function uf(n){var i=It();if(typeof n=="function"){var a=n;if(n=a(),Wi){Pn(!0);try{a()}finally{Pn(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:n},i}function Ly(n,i,a,c){return n.baseState=a,lf(n,Be,typeof c=="function"?c:As)}function N2(n,i,a,c,f){if(Jl(n))throw Error(r(485));if(n=i.action,n!==null){var m={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};j.T!==null?a(!0):m.isTransition=!1,c(m),a=i.pending,a===null?(m.next=i.pending=m,Uy(i,m)):(m.next=a.next,i.pending=a.next=m)}}function Uy(n,i){var a=i.action,c=i.payload,f=n.state;if(i.isTransition){var m=j.T,b={};j.T=b;try{var T=a(f,c),R=j.S;R!==null&&R(b,T),Vy(n,i,T)}catch(V){df(n,i,V)}finally{m!==null&&b.types!==null&&(m.types=b.types),j.T=m}}
vendor: 2,739 bytes, line 8
8else try{m=a(f,c),Vy(n,i,m)}catch(V){df(n,i,V)}}function Vy(n,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(c){qy(n,i,c)},function(c){return df(n,i,c)}):qy(n,i,a)}function qy(n,i,a){i.status="fulfilled",i.value=a,By(i),n.state=a,i=n.pending,i!==null&&(a=i.next,a===i?n.pending=null:(a=a.next,i.next=a,Uy(n,a)))}function df(n,i,a){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=a,By(i),i=i.next;while(i!==c)}n.action=null}function By(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Iy(n,i){return i}function $y(n,i){if(Ne){var a=He.formState;if(a!==null){e:{var c=Te;if(Ne){if(Ze){t:{for(var f=Ze,m=Cn;f.nodeType!==8;){if(!m){f=null;break t}if(f=kn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){Ze=kn(f.nextSibling),c=f.data==="F!";break e}}ei(c)}c=!1}c&&(i=a[0])}}return a=It(),a.memoizedState=a.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Iy,lastRenderedState:i},a.queue=c,a=lv.bind(null,Te,c),c.dispatch=a,c=uf(!1),m=yf.bind(null,Te,!1,c.queue),c=It(),f={state:i,dispatch:null,action:n,pending:null},c.queue=f,a=N2.bind(null,Te,f,m,a),f.dispatch=a,c.memoizedState=n,[i,a,!1]}function Hy(n){var i=at();return Fy(i,Be,n)}function Fy(n,i,a){if(i=lf(n,i,Iy)[0],n=Kl(As)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=co(i)}catch(b){throw b===Fr?ql:b}else c=i;i=at();var f=i.queue,m=f.dispatch;return a!==i.memoizedState&&(Te.flags|=2048,Kr(9,{destroy:void 0},D2.bind(null,f,a),null)),[c,m,n]}function D2(n,i){n.action=i}function Qy(n){var i=at(),a=Be;if(a!==null)return Fy(i,a,n);at(),i=i.memoizedState,a=at();var c=a.queue.dispatch;return a.memoizedState=n,[i,c,!1]}function Kr(n,i,a,c){return n={tag:n,create:a,deps:c,inst:i,next:null},i=Te.updateQueue,i===null&&(i=Gl(),Te.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,i.lastEffect=n),n}function Zy(){return at().memoizedState}function Xl(n,i,a,c){var f=It();Te.flags|=n,f.memoizedState=Kr(1|i,{destroy:void 0},a,c===void 0?null:c)}function Wl(n,i,a,c){var f=at();c=c===void 0?null:c;var m=f.memoizedState.inst;Be!==null&&c!==null&&tf(c,Be.memoizedState.deps)?f.memoizedState=Kr(i,m,a,c):(Te.flags|=n,f.memoizedState=Kr(1|i,m,a,c))}function Gy(n,i){Xl(8390656,8,n,i)}function ff(n,i){Wl(2048,8,n,i)}function j2(n){Te.flags|=4;var i=Te.updateQueue;if(i===null)i=Gl(),Te.updateQueue=i,i.events=[n];else{var a=i.events;a===null?i.events=[n]:a.push(n)}}function Yy(n){var i=at().memoizedState;return j2({ref:i,nextImpl:n}),function(){if((Pe&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function Ky(n,i){return Wl(4,2,n,i)}function Xy(n,i){return Wl(4,4,n,i)}
vendor: 4,499 bytes, line 8
8function Wy(n,i){if(typeof i=="function"){n=n();var a=i(n);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Jy(n,i,a){a=a!=null?a.concat([n]):null,Wl(4,4,Wy.bind(null,i,n),a)}function hf(){}function ev(n,i){var a=at();i=i===void 0?null:i;var c=a.memoizedState;return i!==null&&tf(i,c[1])?c[0]:(a.memoizedState=[n,i],n)}function tv(n,i){var a=at();i=i===void 0?null:i;var c=a.memoizedState;if(i!==null&&tf(i,c[1]))return c[0];if(c=n(),Wi){Pn(!0);try{n()}finally{Pn(!1)}}return a.memoizedState=[c,i],c}function pf(n,i,a){return a===void 0||(Cs&1073741824)!==0&&(Oe&261930)===0?n.memoizedState=i:(n.memoizedState=a,n=n0(),Te.lanes|=n,ci|=n,a)}function nv(n,i,a,c){return un(a,i)?a:Zr.current!==null?(n=pf(n,a,c),un(n,i)||(ct=!0),n):(Cs&42)===0||(Cs&1073741824)!==0&&(Oe&261930)===0?(ct=!0,n.memoizedState=a):(n=n0(),Te.lanes|=n,ci|=n,i)}function sv(n,i,a,c,f){var m=F.p;F.p=m!==0&&8>m?m:8;var b=j.T,T={};j.T=T,yf(n,!1,i,a);try{var R=f(),V=j.S;if(V!==null&&V(T,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var Q=R2(R,c);uo(n,i,Q,gn(n))}else uo(n,i,c,gn(n))}catch(K){uo(n,i,{then:function(){},status:"rejected",reason:K},gn())}finally{F.p=m,b!==null&&T.types!==null&&(b.types=T.types),j.T=b}}function z2(){}function mf(n,i,a,c){if(n.tag!==5)throw Error(r(476));var f=iv(n).queue;sv(n,f,i,G,a===null?z2:function(){return rv(n),a(c)})}function iv(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:G},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:a},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function rv(n){var i=iv(n);i.next===null&&(i=n.alternate.memoizedState),uo(n,i.next.queue,{},gn())}function gf(){return At(ko)}function av(){return at().memoizedState}function ov(){return at().memoizedState}function P2(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var a=gn();n=si(a);var c=ii(i,n,a);c!==null&&(rn(c,i,a),ro(c,i,a)),i={cache:Hd()},n.payload=i;return}i=i.return}}function L2(n,i,a){var c=gn();a={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Jl(n)?cv(i,a):(a=Dd(n,i,a,c),a!==null&&(rn(a,n,c),uv(a,i,c)))}function lv(n,i,a){var c=gn();uo(n,i,a,c)}function uo(n,i,a,c){var f={lane:c,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Jl(n))cv(i,f);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var b=i.lastRenderedState,T=m(b,a);if(f.hasEagerState=!0,f.eagerState=T,un(T,b))return Dl(n,i,f,0),He===null&&Nl(),!1}catch{}if(a=Dd(n,i,f,c),a!==null)return rn(a,n,c),uv(a,i,c),!0}return!1}function yf(n,i,a,c){if(c={lane:2,revertLane:Yf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Jl(n)){if(i)throw Error(r(479))}else i=Dd(n,a,c,2),i!==null&&rn(i,n,2)}function Jl(n){var i=n.alternate;return n===Te||i!==null&&i===Te}function cv(n,i){Gr=Ql=!0;var a=n.pending;a===null?i.next=i:(i.next=a.next,a.next=i),n.pending=i}function uv(n,i,a){if((a&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,Kt(n,a)}}var fo={readContext:At,use:Yl,useCallback:nt,useContext:nt,useEffect:nt,useImperativeHandle:nt,useLayoutEffect:nt,useInsertionEffect:nt,useMemo:nt,useReducer:nt,useRef:nt,useState:nt,useDebugValue:nt,useDeferredValue:nt,useTransition:nt,useSyncExternalStore:nt,useId:nt,useHostTransitionStatus:nt,useFormState:nt,useActionState:nt,useOptimistic:nt,useMemoCache:nt,useCacheRefresh:nt};fo.useEffectEvent=nt;var dv={readContext:At,use:Yl,useCallback:function(n,i){return It().memoizedState=[n,i===void 0?null:i],n},useContext:At,useEffect:Gy,useImperativeHandle:function(n,i,a){a=a!=null?a.concat([n]):null,Xl(4194308,4,Wy.bind(null,i,n),a)},useLayoutEffect:function(n,i){return Xl(4194308,4,n,i)},useInsertionEffect:function(n,i){Xl(4,2,n,i)},useMemo:function(n,i){var a=It();i=i===void 0?null:i;var c=n();if(Wi){Pn(!0);try{n()}finally{Pn(!1)}}return a.memoizedState=[c,i],c},useReducer:function(n,i,a){var c=It();if(a!==void 0){var f=a(i);if(Wi){Pn(!0);try{a(i)}finally{Pn(!1)}}}else f=i;return c.memoizedState=c.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},c.queue=n,n=n.dispatch=L2.bind(null,Te,n),[c.memoizedState,n]}
vendor: 9,185 bytes, line 8
8,useRef:function(n){var i=It();return n={current:n},i.memoizedState=n},useState:function(n){n=uf(n);var i=n.queue,a=lv.bind(null,Te,i);return i.dispatch=a,[n.memoizedState,a]},useDebugValue:hf,useDeferredValue:function(n,i){var a=It();return pf(a,n,i)},useTransition:function(){var n=uf(!1);return n=sv.bind(null,Te,n.queue,!0,!1),It().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,a){var c=Te,f=It();if(Ne){if(a===void 0)throw Error(r(407));a=a()}else{if(a=i(),He===null)throw Error(r(349));(Oe&127)!==0||Ny(c,i,a)}f.memoizedState=a;var m={value:a,getSnapshot:i};return f.queue=m,Gy(jy.bind(null,c,m,n),[n]),c.flags|=2048,Kr(9,{destroy:void 0},Dy.bind(null,c,m,a,i),null),a},useId:function(){var n=It(),i=He.identifierPrefix;if(Ne){var a=Xn,c=Kn;a=(c&~(1<<32-zt(c)-1)).toString(32)+a,i="_"+i+"R_"+a,a=Zl++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=O2++,i="_"+i+"r_"+a.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:gf,useFormState:$y,useActionState:$y,useOptimistic:function(n){var i=It();i.memoizedState=i.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=yf.bind(null,Te,!0,a),a.dispatch=i,[n,i]},useMemoCache:of,useCacheRefresh:function(){return It().memoizedState=P2.bind(null,Te)},useEffectEvent:function(n){var i=It(),a={impl:n};return i.memoizedState=a,function(){if((Pe&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},vf={readContext:At,use:Yl,useCallback:ev,useContext:At,useEffect:ff,useImperativeHandle:Jy,useInsertionEffect:Ky,useLayoutEffect:Xy,useMemo:tv,useReducer:Kl,useRef:Zy,useState:function(){return Kl(As)},useDebugValue:hf,useDeferredValue:function(n,i){var a=at();return nv(a,Be.memoizedState,n,i)},useTransition:function(){var n=Kl(As)[0],i=at().memoizedState;return[typeof n=="boolean"?n:co(n),i]},useSyncExternalStore:My,useId:av,useHostTransitionStatus:gf,useFormState:Hy,useActionState:Hy,useOptimistic:function(n,i){var a=at();return Ly(a,Be,n,i)},useMemoCache:of,useCacheRefresh:ov};vf.useEffectEvent=Yy;var fv={readContext:At,use:Yl,useCallback:ev,useContext:At,useEffect:ff,useImperativeHandle:Jy,useInsertionEffect:Ky,useLayoutEffect:Xy,useMemo:tv,useReducer:cf,useRef:Zy,useState:function(){return cf(As)},useDebugValue:hf,useDeferredValue:function(n,i){var a=at();return Be===null?pf(a,n,i):nv(a,Be.memoizedState,n,i)},useTransition:function(){var n=cf(As)[0],i=at().memoizedState;return[typeof n=="boolean"?n:co(n),i]},useSyncExternalStore:My,useId:av,useHostTransitionStatus:gf,useFormState:Qy,useActionState:Qy,useOptimistic:function(n,i){var a=at();return Be!==null?Ly(a,Be,n,i):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:of,useCacheRefresh:ov};fv.useEffectEvent=Yy;function bf(n,i,a,c){i=n.memoizedState,a=a(c,i),a=a==null?i:g({},i,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var xf={enqueueSetState:function(n,i,a){n=n._reactInternals;var c=gn(),f=si(c);f.payload=i,a!=null&&(f.callback=a),i=ii(n,f,c),i!==null&&(rn(i,n,c),ro(i,n,c))},enqueueReplaceState:function(n,i,a){n=n._reactInternals;var c=gn(),f=si(c);f.tag=1,f.payload=i,a!=null&&(f.callback=a),i=ii(n,f,c),i!==null&&(rn(i,n,c),ro(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var a=gn(),c=si(a);c.tag=2,i!=null&&(c.callback=i),i=ii(n,c,a),i!==null&&(rn(i,n,a),ro(i,n,a))}};function hv(n,i,a,c,f,m,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,m,b):i.prototype&&i.prototype.isPureReactComponent?!Xa(a,c)||!Xa(f,m):!0}function pv(n,i,a,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,c),i.state!==n&&xf.enqueueReplaceState(i,i.state,null)}function Ji(n,i){var a=i;if("ref"in i){a={};for(var c in i)c!=="ref"&&(a[c]=i[c])}if(n=n.defaultProps){a===i&&(a=g({},a));for(var f in n)a[f]===void 0&&(a[f]=n[f])}return a}function mv(n){Ml(n)}function gv(n){console.error(n)}function yv(n){Ml(n)}function ec(n,i){try{var a=n.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function vv(n,i,a){try{var c=n.onCaughtError;c(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function wf(n,i,a){return a=si(a),a.tag=3,a.payload={element:null},a.callback=function(){ec(n,i)},a}function bv(n){return n=si(n),n.tag=3,n}function xv(n,i,a,c){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var m=c.value;n.payload=function(){return f(m)},n.callback=function(){vv(i,a,c)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(n.callback=function(){vv(i,a,c),typeof f!="function"&&(ui===null?ui=new Set([this]):ui.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function U2(n,i,a,c,f){if(a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=a.alternate,i!==null&&Ir(i,a,f,!0),a=fn.current,a!==null){switch(a.tag){case 31:case 13:return An===null?fc():a.alternate===null&&st===0&&(st=3),a.flags&=-257,a.flags|=65536,a.lanes=f,c===Bl?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([c]):i.add(c),Qf(n,c,f)),!1;case 22:return a.flags|=65536,c===Bl?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([c]):a.add(c)),Qf(n,c,f)),!1}throw Error(r(435,a.tag))}return Qf(n,c,f),fc(),!1}if(Ne)return i=fn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,c!==Vd&&(n=Error(r(422),{cause:c}),eo(_n(n,a)))):(c!==Vd&&(i=Error(r(423),{cause:c}),eo(_n(i,a))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,c=_n(c,a),f=wf(n.stateNode,c,f),Kd(n,f),st!==4&&(st=2)),!1;var m=Error(r(520),{cause:c});if(m=_n(m,a),xo===null?xo=[m]:xo.push(m),st!==4&&(st=2),i===null)return!0;c=_n(c,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,n=f&-f,a.lanes|=n,n=wf(a.stateNode,c,n),Kd(a,n),!1;case 1:if(i=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ui===null||!ui.has(m))))return a.flags|=65536,f&=-f,a.lanes|=f,f=bv(f),xv(f,n,a,c),Kd(a,f),!1}a=a.return}while(a!==null);return!1}var Sf=Error(r(461)),ct=!1;function kt(n,i,a,c){i.child=n===null?Ty(i,null,a,c):Xi(i,n.child,a,c)}function wv(n,i,a,c,f){a=a.render;var m=i.ref;if("ref"in c){var b={};for(var T in c)T!=="ref"&&(b[T]=c[T])}else b=c;return Zi(i),c=nf(n,i,a,b,m,f),T=sf(),n!==null&&!ct?(rf(n,i,f),ks(n,i,f)):(Ne&&T&&Ld(i),i.flags|=1,kt(n,i,c,f),i.child)}function Sv(n,i,a,c,f){if(n===null){var m=a.type;return typeof m=="function"&&!jd(m)&&m.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=m,_v(n,i,m,c,f)):(n=zl(a.type,null,c,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}if(m=n.child,!Of(n,f)){var b=m.memoizedProps;if(a=a.compare,a=a!==null?a:Xa,a(b,c)&&n.ref===i.ref)return ks(n,i,f)}return i.flags|=1,n=Ss(m,c),n.ref=i.ref,n.return=i,i.child=n}function _v(n,i,a,c,f){if(n!==null){var m=n.memoizedProps;if(Xa(m,c)&&n.ref===i.ref)if(ct=!1,i.pendingProps=c=m,Of(n,f))(n.flags&131072)!==0&&(ct=!0);else return i.lanes=n.lanes,ks(n,i,f)}return _f(n,i,a,c,f)}function Tv(n,i,a,c){var f=c.children,m=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,n!==null){for(c=i.child=n.child,f=0;c!==null;)f=f|c.lanes|c.childLanes,c=c.sibling;c=f&~m}else c=0,i.child=null;return Ev(n,i,m,a,c)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Vl(i,m!==null?m.cachePool:null),m!==null?Ay(i,m):Wd(),ky(i);else return c=i.lanes=536870912,Ev(n,i,m!==null?m.baseLanes|a:a,a,c)}else m!==null?(Vl(i,m.cachePool),Ay(i,m),ai(),i.memoizedState=null):(n!==null&&Vl(i,null),Wd(),ai());return kt(n,i,f,a),i.child}function ho(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Ev(n,i,a,c,f){var m=Qd();return m=m===null?null:{parent:ot._currentValue,pool:m},i.memoizedState={baseLanes:a,cachePool:m},n!==null&&Vl(i,null),Wd(),ky(i),n!==null&&Ir(n,i,c,!0),i.childLanes=f,null}function tc(n,i){return i=sc({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Cv(n,i,a){return Xi(i,n.child,null,a),n=tc(i,i.pendingProps),n.flags|=2,hn(i),i.memoizedState=null,n}function V2(n,i,a){var c=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Ne){if(c.mode==="hidden")return n=tc(i,c),i.lanes=536870912,ho(null,n);if(ef(i),(n=Ze)?(n=U0(n,Cn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Ws!==null?{id:Kn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},a=cy(n),a.return=i,i.child=a,Ct=i,Ze=null)):n=null,n===null)throw ei(i);return i.lanes=536870912,null}return tc(i,c)}var m=n.memoizedState;if(m!==null){var b=m.dehydrated;if(ef(i),f)if(i.flags&256)i.flags&=-257,i=Cv(n,i,a);
vendor: 1,368 bytes, line 8
8else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(r(558));else if(ct||Ir(n,i,a,!1),f=(a&n.childLanes)!==0,ct||f){if(c=He,c!==null&&(b=Xt(c,a),b!==0&&b!==m.retryLane))throw m.retryLane=b,$i(n,b),rn(c,n,b),Sf;fc(),i=Cv(n,i,a)}else n=m.treeContext,Ze=kn(b.nextSibling),Ct=i,Ne=!0,Js=null,Cn=!1,n!==null&&fy(i,n),i=tc(i,c),i.flags|=4096;return i}return n=Ss(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function nc(n,i){var a=i.ref;if(a===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(n===null||n.ref!==a)&&(i.flags|=4194816)}}function _f(n,i,a,c,f){return Zi(i),a=nf(n,i,a,c,void 0,f),c=sf(),n!==null&&!ct?(rf(n,i,f),ks(n,i,f)):(Ne&&c&&Ld(i),i.flags|=1,kt(n,i,a,f),i.child)}function Av(n,i,a,c,f,m){return Zi(i),i.updateQueue=null,a=Oy(i,c,a,f),Ry(n),c=sf(),n!==null&&!ct?(rf(n,i,m),ks(n,i,m)):(Ne&&c&&Ld(i),i.flags|=1,kt(n,i,a,m),i.child)}function kv(n,i,a,c,f){if(Zi(i),i.stateNode===null){var m=Ur,b=a.contextType;typeof b=="object"&&b!==null&&(m=At(b)),m=new a(c,m),i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=xf,i.stateNode=m,m._reactInternals=i,m=i.stateNode,m.props=c,m.state=i.memoizedState,m.refs={},Gd(i),b=a.contextType,m.context=typeof b=="object"&&b!==null?At(b):Ur,m.state=i.memoizedState,b
vendor: 5,204 bytes, line 8
8=a.getDerivedStateFromProps,typeof b=="function"&&(bf(i,a,b,c),m.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&xf.enqueueReplaceState(m,m.state,null),oo(i,c,m,f),ao(),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){m=i.stateNode;var T=i.memoizedProps,R=Ji(a,T);m.props=R;var V=m.context,Q=a.contextType;b=Ur,typeof Q=="object"&&Q!==null&&(b=At(Q));var K=a.getDerivedStateFromProps;Q=typeof K=="function"||typeof m.getSnapshotBeforeUpdate=="function",T=i.pendingProps!==T,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(T||V!==b)&&pv(i,m,c,b),ni=!1;var q=i.memoizedState;m.state=q,oo(i,c,m,f),ao(),V=i.memoizedState,T||q!==V||ni?(typeof K=="function"&&(bf(i,a,K,c),V=i.memoizedState),(R=ni||hv(i,a,R,c,q,V,b))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(i.flags|=4194308)):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=V),m.props=c,m.state=V,m.context=b,c=R):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{m=i.stateNode,Yd(n,i),b=i.memoizedProps,Q=Ji(a,b),m.props=Q,K=i.pendingProps,q=m.context,V=a.contextType,R=Ur,typeof V=="object"&&V!==null&&(R=At(V)),T=a.getDerivedStateFromProps,(V=typeof T=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==K||q!==R)&&pv(i,m,c,R),ni=!1,q=i.memoizedState,m.state=q,oo(i,c,m,f),ao();var $=i.memoizedState;b!==K||q!==$||ni||n!==null&&n.dependencies!==null&&Ll(n.dependencies)?(typeof T=="function"&&(bf(i,a,T,c),$=i.memoizedState),(Q=ni||hv(i,a,Q,c,q,$,R)||n!==null&&n.dependencies!==null&&Ll(n.dependencies))?(V||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,$,R),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,$,R)),typeof m.componentDidUpdate=="function"&&(i.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===n.memoizedProps&&q===n.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&q===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=$),m.props=c,m.state=$,m.context=R,c=Q):(typeof m.componentDidUpdate!="function"||b===n.memoizedProps&&q===n.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&q===n.memoizedState||(i.flags|=1024),c=!1)}return m=c,nc(n,i),c=(i.flags&128)!==0,m||c?(m=i.stateNode,a=c&&typeof a.getDerivedStateFromError!="function"?null:m.render(),i.flags|=1,n!==null&&c?(i.child=Xi(i,n.child,null,f),i.child=Xi(i,null,a,f)):kt(n,i,a,f),i.memoizedState=m.state,n=i.child):n=ks(n,i,f),n}function Rv(n,i,a,c){return Fi(),i.flags|=256,kt(n,i,a,c),i.child}var Tf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ef(n){return{baseLanes:n,cachePool:vy()}}function Cf(n,i,a){return n=n!==null?n.childLanes&~a:0,i&&(n|=mn),n}function Ov(n,i,a){var c=i.pendingProps,f=!1,m=(i.flags&128)!==0,b;if((b=m)||(b=n!==null&&n.memoizedState===null?!1:(rt.current&2)!==0),b&&(f=!0,i.flags&=-129),b=(i.flags&32)!==0,i.flags&=-33,n===null){if(Ne){if(f?ri(i):ai(),(n=Ze)?(n=U0(n,Cn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Ws!==null?{id:Kn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},a=cy(n),a.return=i,i.child=a,Ct=i,Ze=null)):n=null,n===null)throw ei(i);return lh(n)?i.lanes=32:i.lanes=536870912,null}var T=c.children;return c=c.fallback,f?(ai(),f=i.mode,T=sc({mode:"hidden",children:T},f),c=Hi(c,f,a,null),T.return=i,c.return=i,T.sibling=c,i.child=T,c=i.child,c.memoizedState=Ef(a),c.childLanes=Cf(n,b,a),i.memoizedState=Tf,ho(null,c)):(ri(i),Af(i,T))}var R=n.memoizedState;if(R!==null&&(T=R.dehydrated,T!==null)){if(m)i.flags&256?(ri(i),i.flags&=-257,i=kf(n,i,a)):i.memoizedState!==null?(ai(),i.child=n.child,i.flags|=128,i=null):(ai(),T=c.fallback,f=i.mode,c=sc({mode:"visible",children:c.children},f),T=Hi(T,f,a,null),T.flags|=2,c.return=i,T.return=i,c.sibling=T,i.child=c,Xi(i,n.child,null,a),c=i.child,c.memoizedState=Ef(a),c.childLanes=Cf(n,b,a),i.memoizedState=Tf,i=ho(null,c));else if(ri(i),lh(T)){if(b=T.nextSibling&&T.nextSibling.dataset,b)var V=b.dgst;b=V,c=Error(r(419)),c.stack="",c.digest=b,eo({value:c,source:null,stack:null}),i=kf(n,i,a)}else if(ct||Ir(n,i,a,!1),b=(a&n.childLanes)!==0,ct||b){if(b=He,b!==null&&(c=Xt(b,a),c!==0&&c!==R.retryLane))throw R.retryLane=c,$i(n,c),r
vendor: 8,063 bytes, line 8
8n(b,n,c),Sf;oh(T)||fc(),i=kf(n,i,a)}else oh(T)?(i.flags|=192,i.child=n.child,i=null):(n=R.treeContext,Ze=kn(T.nextSibling),Ct=i,Ne=!0,Js=null,Cn=!1,n!==null&&fy(i,n),i=Af(i,c.children),i.flags|=4096);return i}return f?(ai(),T=c.fallback,f=i.mode,R=n.child,V=R.sibling,c=Ss(R,{mode:"hidden",children:c.children}),c.subtreeFlags=R.subtreeFlags&65011712,V!==null?T=Ss(V,T):(T=Hi(T,f,a,null),T.flags|=2),T.return=i,c.return=i,c.sibling=T,i.child=c,ho(null,c),c=i.child,T=n.child.memoizedState,T===null?T=Ef(a):(f=T.cachePool,f!==null?(R=ot._currentValue,f=f.parent!==R?{parent:R,pool:R}:f):f=vy(),T={baseLanes:T.baseLanes|a,cachePool:f}),c.memoizedState=T,c.childLanes=Cf(n,b,a),i.memoizedState=Tf,ho(n.child,c)):(ri(i),a=n.child,n=a.sibling,a=Ss(a,{mode:"visible",children:c.children}),a.return=i,a.sibling=null,n!==null&&(b=i.deletions,b===null?(i.deletions=[n],i.flags|=16):b.push(n)),i.child=a,i.memoizedState=null,a)}function Af(n,i){return i=sc({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function sc(n,i){return n=dn(22,n,null,i),n.lanes=0,n}function kf(n,i,a){return Xi(i,n.child,null,a),n=Af(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Mv(n,i,a){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),Id(n.return,i,a)}function Rf(n,i,a,c,f,m){var b=n.memoizedState;b===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:f,treeForkCount:m}:(b.isBackwards=i,b.rendering=null,b.renderingStartTime=0,b.last=c,b.tail=a,b.tailMode=f,b.treeForkCount=m)}function Nv(n,i,a){var c=i.pendingProps,f=c.revealOrder,m=c.tail;c=c.children;var b=rt.current,T=(b&2)!==0;if(T?(b=b&1|2,i.flags|=128):b&=1,H(rt,b),kt(n,i,c,a),c=Ne?Ja:0,!T&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Mv(n,a,i);else if(n.tag===19)Mv(n,a,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(a=i.child,f=null;a!==null;)n=a.alternate,n!==null&&Fl(n)===null&&(f=a),a=a.sibling;a=f,a===null?(f=i.child,i.child=null):(f=a.sibling,a.sibling=null),Rf(i,!1,f,a,m,c);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&Fl(n)===null){i.child=f;break}n=f.sibling,f.sibling=a,a=f,f=n}Rf(i,!0,a,null,m,c);break;case"together":Rf(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function ks(n,i,a){if(n!==null&&(i.dependencies=n.dependencies),ci|=i.lanes,(a&i.childLanes)===0)if(n!==null){if(Ir(n,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,a=Ss(n,n.pendingProps),i.child=a,a.return=i;n.sibling!==null;)n=n.sibling,a=a.sibling=Ss(n,n.pendingProps),a.return=i;a.sibling=null}return i.child}function Of(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Ll(n)))}function q2(n,i,a){switch(i.tag){case 3:xe(i,i.stateNode.containerInfo),ti(i,ot,n.memoizedState.cache),Fi();break;case 27:case 5:_t(i);break;case 4:xe(i,i.stateNode.containerInfo);break;case 10:ti(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ef(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ri(i),i.flags|=128,null):(a&i.child.childLanes)!==0?Ov(n,i,a):(ri(i),n=ks(n,i,a),n!==null?n.sibling:null);ri(i);break;case 19:var f=(n.flags&128)!==0;if(c=(a&i.childLanes)!==0,c||(Ir(n,i,a,!1),c=(a&i.childLanes)!==0),f){if(c)return Nv(n,i,a);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),H(rt,rt.current),c)break;return null;case 22:return i.lanes=0,Tv(n,i,a,i.pendingProps);case 24:ti(i,ot,n.memoizedState.cache)}return ks(n,i,a)}function Dv(n,i,a){if(n!==null)if(n.memoizedProps!==i.pendingProps)ct=!0;else{if(!Of(n,a)&&(i.flags&128)===0)return ct=!1,q2(n,i,a);ct=(n.flags&131072)!==0}else ct=!1,Ne&&(i.flags&1048576)!==0&&dy(i,Ja,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=Yi(i.elementType),i.type=n,typeof n=="function")jd(n)?(c=Ji(n,c),i.tag=1,i=kv(null,i,n,c,a)):(i.tag=0,i=_f(null,i,n,c,a));else{if(n!=null){var f=n.$$typeof;if(f===D){i.tag=11,i=wv(null,i,n,c,a);break e}else if(f===I){i.tag=14,i=Sv(null,i,n,c,a);break e}}throw i=he(n)||n,Error(r(306,i,""))}}return i;case 0:return _f(n,i,i.type,i.pendingProps,a);case 1:return c=i.type,f=Ji(c,i.pendingProps),kv(n,i,c,f,a);case 3:e:{if(xe(i,i.stateNode.containerInfo),n===null)throw Error(r(387));c=i.pendingProps;var m=i.memoizedState;f=m.element,Yd(n,i),oo(i,c,null,a);var b=i.memoizedState;if(c=b.cache,ti(i,ot,c),c!==m.cache&&$d(i,[ot],a,!0),ao(),c=b.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:b.cache},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){i=Rv(n,i,c,a);break e}else if(c!==f){f=_n(Error(r(424)),i),eo(f),i=Rv(n,i,c,a);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ze=kn(n.firstChild),Ct=i,Ne=!0,Js=null,Cn=!0,a=Ty(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Fi(),c===f){i=ks(n,i,a);break e}kt(n,i,c,a)}i=i.child}return i;case 26:return nc(n,i),n===null?(a=H0(i.type,null,i.pendingProps,null))?i.memoizedState=a:Ne||(a=i.type,n=i.pendingProps,c=bc(ae.current).createElement(a),c[Et]=i,c[Wt]=n,Rt(c,a,n),wt(c),i.stateNode=c):i.memoizedState=H0(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return _t(i),n===null&&Ne&&(c=i.stateNode=B0(i.type,i.pendingProps,ae.current),Ct=i,Cn=!0,f=Ze,pi(i.type)?(ch=f,Ze=kn(c.firstChild)):Ze=f),kt(n,i,i.pendingProps.children,a),nc(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Ne&&((f=c=Ze)&&(c=gC(c,i.type,i.pendingProps,Cn),c!==null?(i.stateNode=c,Ct=i,Ze=kn(c.firstChild),Cn=!1,f=!0):f=!1),f||ei(i)),_t(i),f=i.type,m=i.pendingProps,b=n!==null?n.memoizedProps:null,c=m.children,ih(f,m)?c=null:b!==null&&ih(f,b)&&(i.flags|=32),i.memoizedState!==null&&(f=nf(n,i,M2,null,null,a),ko._currentValue=f),nc(n,i),kt(n,i,c,a),i.child;case 6:return n===null&&Ne&&((n=a=Ze)&&(a=yC(a,i.pendingProps,Cn),a!==null?(i.stateNode=a,Ct=i,Ze=null,n=!0):n=!1),n||ei(i)),null;case 13:return Ov(n,i,a);case 4:return xe(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=Xi(i,null,c,a):kt(n,i,c,a),i.child;case 11:return wv(n,i,i.type,i.pendingProps,a);case 7:return kt(n,i,i.pendingProps,a),i.child;case 8:return kt(n,i,i.pendingProps.children,a),i.child;case 12:return kt(n,i,i.pendingProps.children,a),i.child;case 10:return c=i.pendingProps,ti(i,i.type,c.value),kt(n,i,c.children,a),i.child;case 9:return f=i.type._context,c=i.pendingProps.children,Zi(i),f=At(f),c=c(f),i.flags|=1,kt(n,i,c,a),i.child;case 14:return Sv(n,i,i.type,i.pendingProps,a);case 15:return _v(n,i,i.type,i.pendingProps,a);case 19:return Nv(n,i,a);case 31:return V2(n,i,a);case 22:return Tv(n,i,a,i.pendingProps);case 24:return Zi(i),c=At(ot),n===null?(f=Qd(),f===null&&(f=He,m=Hd(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=a),f=m),i.memoizedState={parent:c,cache:f},Gd(i),ti(i,ot,f)):((n.lanes&a)!==0&&(Yd(n,i),oo(i,null,null,a),ao()),f=n.memoizedState,m=i.memoizedState,f.parent!==c?(f={parent:c,cache:c},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),ti(i,ot,c)):(c=m.cache,ti(i,ot,c),c!==f.cache&&$d(i,[ot],a,!0))),kt(n,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Rs(n){n.flags|=4}function Mf(n,i,a,c,f){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(a0())n.flags|=8192;else throw Ki=Bl,Zd}else n.flags&=-16777217}function jv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Y0(i))if(a0())n.flags|=8192;else throw Ki=Bl,Zd}function ic(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Pt():536870912,n.lanes|=i,ea|=i)}
vendor: 4,219 bytes, line 8
8function po(n,i){if(!Ne)switch(n.tailMode){case"hidden":i=n.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Ge(n){var i=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(i)for(var f=n.child;f!==null;)a|=f.lanes|f.childLanes,c|=f.subtreeFlags&65011712,c|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)a|=f.lanes|f.childLanes,c|=f.subtreeFlags,c|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=c,n.childLanes=a,i}function B2(n,i,a){var c=i.pendingProps;switch(Ud(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(i),null;case 1:return Ge(i),null;case 3:return a=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Es(ot),ve(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(Br(i)?Rs(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,qd())),Ge(i),null;case 26:var f=i.type,m=i.memoizedState;return n===null?(Rs(i),m!==null?(Ge(i),jv(i,m)):(Ge(i),Mf(i,f,null,c,a))):m?m!==n.memoizedState?(Rs(i),Ge(i),jv(i,m)):(Ge(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&Rs(i),Ge(i),Mf(i,f,n,c,a)),null;case 27:if(Dt(i),a=ae.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&Rs(i);else{if(!c){if(i.stateNode===null)throw Error(r(166));return Ge(i),null}n=J.current,Br(i)?hy(i):(n=B0(f,c,a),i.stateNode=n,Rs(i))}return Ge(i),null;case 5:if(Dt(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&Rs(i);else{if(!c){if(i.stateNode===null)throw Error(r(166));return Ge(i),null}if(m=J.current,Br(i))hy(i);else{var b=bc(ae.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?b.createElement("select",{is:c.is}):b.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?b.createElement(f,{is:c.is}):b.createElement(f)}}m[Et]=i,m[Wt]=c;e:for(b=i.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===i)break e;for(;b.sibling===null;){if(b.return===null||b.return===i)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}i.stateNode=m;e:switch(Rt(m,f,c),f){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Rs(i)}}return Ge(i),Mf(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,a),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&Rs(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(r(166));if(n=ae.current,Br(i)){if(n=i.stateNode,a=i.memoizedProps,c=null,f=Ct,f!==null)switch(f.tag){case 27:case 5:c=f.memoizedProps}n[Et]=i,n=!!(n.nodeValue===a||c!==null&&c.suppressHydrationWarning===!0||O0(n.nodeValue,a)),n||ei(i,!0)}else n=bc(n).createTextNode(c),n[Et]=i,i.stateNode=n}return Ge(i),null;case 31:if(a=i.memoizedState,n===null||n.memoizedState!==null){if(c=Br(i),a!==null){if(n===null){if(!c)throw Error(r(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Et]=i}else Fi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ge(i),n=!1}else a=qd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return i.flags&256?(hn(i),i):(hn(i),null);if((i.flags&128)!==0)throw Error(r(558))}return Ge(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=Br(i),c!==null&&c.dehydrated!==null){if(n===null){if(!f)throw Error(r(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));
vendor: 25,071 bytes, line 8
8f[Et]=i}else Fi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ge(i),f=!1}else f=qd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(hn(i),i):(hn(i),null)}return hn(i),(i.flags&128)!==0?(i.lanes=a,i):(a=c!==null,n=n!==null&&n.memoizedState!==null,a&&(c=i.child,f=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(f=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==f&&(c.flags|=2048)),a!==n&&a&&(i.child.flags|=8192),ic(i,i.updateQueue),Ge(i),null);case 4:return ve(),n===null&&Jf(i.stateNode.containerInfo),Ge(i),null;case 10:return Es(i.type),Ge(i),null;case 19:if(Z(rt),c=i.memoizedState,c===null)return Ge(i),null;if(f=(i.flags&128)!==0,m=c.rendering,m===null)if(f)po(c,!1);else{if(st!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(m=Fl(n),m!==null){for(i.flags|=128,po(c,!1),n=m.updateQueue,i.updateQueue=n,ic(i,n),i.subtreeFlags=0,n=a,a=i.child;a!==null;)ly(a,n),a=a.sibling;return H(rt,rt.current&1|2),Ne&&_s(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&qt()>cc&&(i.flags|=128,f=!0,po(c,!1),i.lanes=4194304)}else{if(!f)if(n=Fl(m),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,ic(i,n),po(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!Ne)return Ge(i),null}else 2*qt()-c.renderingStartTime>cc&&a!==536870912&&(i.flags|=128,f=!0,po(c,!1),i.lanes=4194304);c.isBackwards?(m.sibling=i.child,i.child=m):(n=c.last,n!==null?n.sibling=m:i.child=m,c.last=m)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=qt(),n.sibling=null,a=rt.current,H(rt,f?a&1|2:a&1),Ne&&_s(i,c.treeForkCount),n):(Ge(i),null);case 22:case 23:return hn(i),Jd(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(a&536870912)!==0&&(i.flags&128)===0&&(Ge(i),i.subtreeFlags&6&&(i.flags|=8192)):Ge(i),a=i.updateQueue,a!==null&&ic(i,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==a&&(i.flags|=2048),n!==null&&Z(Gi),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),Es(ot),Ge(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function I2(n,i){switch(Ud(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Es(ot),ve(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Dt(i),null;case 31:if(i.memoizedState!==null){if(hn(i),i.alternate===null)throw Error(r(340));Fi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(hn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));Fi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Z(rt),null;case 4:return ve(),null;case 10:return Es(i.type),null;case 22:case 23:return hn(i),Jd(),n!==null&&Z(Gi),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Es(ot),null;case 25:return null;default:return null}}function zv(n,i){switch(Ud(i),i.tag){case 3:Es(ot),ve();break;case 26:case 27:case 5:Dt(i);break;case 4:ve();break;case 31:i.memoizedState!==null&&hn(i);break;case 13:hn(i);break;case 19:Z(rt);break;case 10:Es(i.type);break;case 22:case 23:hn(i),Jd(),n!==null&&Z(Gi);break;case 24:Es(ot)}}function mo(n,i){try{var a=i.updateQueue,c=a!==null?a.lastEffect:null;if(c!==null){var f=c.next;a=f;do{if((a.tag&n)===n){c=void 0;var m=a.create,b=a.inst;c=m(),b.destroy=c}a=a.next}while(a!==f)}}catch(T){Ue(i,i.return,T)}}function oi(n,i,a){try{var c=i.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var m=f.next;c=m;do{if((c.tag&n)===n){var b=c.inst,T=b.destroy;if(T!==void 0){b.destroy=void 0,f=i;var R=a,V=T;try{V()}catch(Q){Ue(f,R,Q)}}}c=c.next}while(c!==m)}}catch(Q){Ue(i,i.return,Q)}}function Pv(n){var i=n.updateQueue;if(i!==null){var a=n.stateNode;try{Cy(i,a)}catch(c){Ue(n,n.return,c)}}}function Lv(n,i,a){a.props=Ji(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(c){Ue(n,i,c)}}function go(n,i){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof a=="function"?n.refCleanup=a(c):a.current=c}}catch(f){Ue(n,i,f)}}function Wn(n,i){var a=n.ref,c=n.refCleanup;if(a!==null)if(typeof c=="function")try{c()}catch(f){Ue(n,i,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Ue(n,i,f)}else a.current=null}function Uv(n){var i=n.type,a=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&c.focus();break e;case"img":a.src?c.src=a.src:a.srcSet&&(c.srcset=a.srcSet)}}catch(f){Ue(n,n.return,f)}}function Nf(n,i,a){try{var c=n.stateNode;uC(c,n.type,a,i),c[Wt]=i}catch(f){Ue(n,n.return,f)}}function Vv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&pi(n.type)||n.tag===4}function Df(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Vv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&pi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function jf(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(n),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=xs));else if(c!==4&&(c===27&&pi(n.type)&&(a=n.stateNode,i=null),n=n.child,n!==null))for(jf(n,i,a),n=n.sibling;n!==null;)jf(n,i,a),n=n.sibling}function rc(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?a.insertBefore(n,i):a.appendChild(n);else if(c!==4&&(c===27&&pi(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(rc(n,i,a),n=n.sibling;n!==null;)rc(n,i,a),n=n.sibling}function qv(n){var i=n.stateNode,a=n.memoizedProps;try{for(var c=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);Rt(i,c,a),i[Et]=n,i[Wt]=a}catch(m){Ue(n,n.return,m)}}var Os=!1,ut=!1,zf=!1,Bv=typeof WeakSet=="function"?WeakSet:Set,St=null;function $2(n,i){if(n=n.containerInfo,nh=Cc,n=Jg(n),Ad(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var b=0,T=-1,R=-1,V=0,Q=0,K=n,q=null;t:for(;;){for(var $;K!==a||f!==0&&K.nodeType!==3||(T=b+f),K!==m||c!==0&&K.nodeType!==3||(R=b+c),K.nodeType===3&&(b+=K.nodeValue.length),($=K.firstChild)!==null;)q=K,K=$;for(;;){if(K===n)break t;if(q===a&&++V===f&&(T=b),q===m&&++Q===c&&(R=b),($=K.nextSibling)!==null)break;K=q,q=K.parentNode}K=$}a=T===-1||R===-1?null:{start:T,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(sh={focusedElem:n,selectionRange:a},Cc=!1,St=i;St!==null;)if(i=St,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,St=n;else for(;St!==null;){switch(i=St,m=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)f=n[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,a=i,f=m.memoizedProps,m=m.memoizedState,c=a.stateNode;try{var le=Ji(a.type,f);n=c.getSnapshotBeforeUpdate(le,m),c.__reactInternalSnapshotBeforeUpdate=n}catch(be){Ue(a,a.return,be)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,a=n.nodeType,a===9)ah(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":ah(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(r(163))}if(n=i.sibling,n!==null){n.return=i.return,St=n;break}St=i.return}}function Iv(n,i,a){var c=a.flags;switch(a.tag){case 0:case 11:case 15:Ns(n,a),c&4&&mo(5,a);break;case 1:if(Ns(n,a),c&4)if(n=a.stateNode,i===null)try{n.componentDidMount()}catch(b){Ue(a,a.return,b)}else{var f=Ji(a.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(b){Ue(a,a.return,b)}}c&64&&Pv(a),c&512&&go(a,a.return);break;case 3:if(Ns(n,a),c&64&&(n=a.updateQueue,n!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{Cy(n,i)}catch(b){Ue(a,a.return,b)}}break;case 27:i===null&&c&4&&qv(a);case 26:case 5:Ns(n,a),i===null&&c&4&&Uv(a),c&512&&go(a,a.return);break;case 12:Ns(n,a);break;case 31:Ns(n,a),c&4&&Fv(n,a);break;case 13:Ns(n,a),c&4&&Qv(n,a),c&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=W2.bind(null,a),vC(n,a))));break;case 22:if(c=a.memoizedState!==null||Os,!c){i=i!==null&&i.memoizedState!==null||ut,f=Os;var m=ut;Os=c,(ut=i)&&!m?Ds(n,a,(a.subtreeFlags&8772)!==0):Ns(n,a),Os=f,ut=m}break;case 30:break;default:Ns(n,a)}}function $v(n){var i=n.alternate;i!==null&&(n.alternate=null,$v(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&ud(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Xe=null,en=!1;function Ms(n,i,a){for(a=a.child;a!==null;)Hv(n,i,a),a=a.sibling}function Hv(n,i,a){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Pi,a)}catch{}switch(a.tag){case 26:ut||Wn(a,i),Ms(n,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ut||Wn(a,i);var c=Xe,f=en;pi(a.type)&&(Xe=a.stateNode,en=!1),Ms(n,i,a),Eo(a.stateNode),Xe=c,en=f;break;case 5:ut||Wn(a,i);case 6:if(c=Xe,f=en,Xe=null,Ms(n,i,a),Xe=c,en=f,Xe!==null)if(en)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(m){Ue(a,i,m)}else try{Xe.removeChild(a.stateNode)}catch(m){Ue(a,i,m)}break;case 18:Xe!==null&&(en?(n=Xe,P0(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),la(n)):P0(Xe,a.stateNode));break;case 4:c=Xe,f=en,Xe=a.stateNode.containerInfo,en=!0,Ms(n,i,a),Xe=c,en=f;break;case 0:case 11:case 14:case 15:oi(2,a,i),ut||oi(4,a,i),Ms(n,i,a);break;case 1:ut||(Wn(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"&&Lv(a,i,c)),Ms(n,i,a);break;case 21:Ms(n,i,a);break;case 22:ut=(c=ut)||a.memoizedState!==null,Ms(n,i,a),ut=c;break;default:Ms(n,i,a)}}function Fv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{la(n)}catch(a){Ue(i,i.return,a)}}}function Qv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{la(n)}catch(a){Ue(i,i.return,a)}}function H2(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Bv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Bv),i;default:throw Error(r(435,n.tag))}}function ac(n,i){var a=H2(n);i.forEach(function(c){if(!a.has(c)){a.add(c);var f=J2.bind(null,n,c);c.then(f,f)}})}function tn(n,i){var a=i.deletions;if(a!==null)for(var c=0;c<a.length;c++){var f=a[c],m=n,b=i,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(pi(T.type)){Xe=T.stateNode,en=!1;break e}break;case 5:Xe=T.stateNode,en=!1;break e;case 3:case 4:Xe=T.stateNode.containerInfo,en=!0;break e}T=T.return}if(Xe===null)throw Error(r(160));Hv(m,b,f),Xe=null,en=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Zv(i,n),i=i.sibling}var Vn=null;function Zv(n,i){var a=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:tn(i,n),nn(n),c&4&&(oi(3,n,n.return),mo(3,n),oi(5,n,n.return));break;case 1:tn(i,n),nn(n),c&512&&(ut||a===null||Wn(a,a.return)),c&64&&Os&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?c:a.concat(c))));break;case 26:var f=Vn;if(tn(i,n),nn(n),c&512&&(ut||a===null||Wn(a,a.return)),c&4){var m=a!==null?a.memoizedState:null;if(c=n.memoizedState,a===null)if(c===null)if(n.stateNode===null){e:{c=n.type,a=n.memoizedProps,f=f.ownerDocument||f;t:switch(c){case"title":m=f.getElementsByTagName("title")[0],(!m||m[Ia]||m[Et]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(c),f.head.insertBefore(m,f.querySelector("head > title"))),Rt(m,c,a),m[Et]=n,wt(m),c=m;break e;case"link":var b=Z0("link","href",f).get(c+(a.href||""));if(b){for(var T=0;T<b.length;T++)if(m=b[T],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(T,1);break t}}m=f.createElement(c),Rt(m,c,a),f.head.appendChild(m);break;case"meta":if(b=Z0("meta","content",f).get(c+(a.content||""))){for(T=0;T<b.length;T++)if(m=b[T],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(T,1);break t}}m=f.createElement(c),Rt(m,c,a),f.head.appendChild(m);break;default:throw Error(r(468,c))}m[Et]=n,wt(m),c=m}n.stateNode=c}else G0(f,n.type,n.stateNode);else n.stateNode=Q0(f,c,n.memoizedProps);else m!==c?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,c===null?G0(f,n.type,n.stateNode):Q0(f,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Nf(n,n.memoizedProps,a.memoizedProps)}break;case 27:tn(i,n),nn(n),c&512&&(ut||a===null||Wn(a,a.return)),a!==null&&c&4&&Nf(n,n.memoizedProps,a.memoizedProps);break;case 5:if(tn(i,n),nn(n),c&512&&(ut||a===null||Wn(a,a.return)),n.flags&32){f=n.stateNode;try{Mr(f,"")}catch(le){Ue(n,n.return,le)}}c&4&&n.stateNode!=null&&(f=n.memoizedProps,Nf(n,f,a!==null?a.memoizedProps:f)),c&1024&&(zf=!0);break;case 6:if(tn(i,n),nn(n),c&4){if(n.stateNode===null)throw Error(r(162));c=n.memoizedProps,a=n.stateNode;try{a.nodeValue=c}catch(le){Ue(n,n.return,le)}}break;case 3:if(Sc=null,f=Vn,Vn=xc(i.containerInfo),tn(i,n),Vn=f,nn(n),c&4&&a!==null&&a.memoizedState.isDehydrated)try{la(i.containerInfo)}catch(le){Ue(n,n.return,le)}zf&&(zf=!1,Gv(n));break;case 4:c=Vn,Vn=xc(n.stateNode.containerInfo),tn(i,n),nn(n),Vn=c;break;case 12:tn(i,n),nn(n);break;case 31:tn(i,n),nn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,ac(n,c)));break;case 13:tn(i,n),nn(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(lc=qt()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,ac(n,c)));break;case 22:f=n.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,V=Os,Q=ut;if(Os=V||f,ut=Q||R,tn(i,n),ut=Q,Os=V,nn(n),c&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(a===null||R||Os||ut||er(n)),a=null,i=n;;){if(i.tag===5||i.tag===26){if(a===null){R=a=i;try{if(m=R.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{T=R.stateNode;var K=R.memoizedProps.style,q=K!=null&&K.hasOwnProperty("display")?K.display:null;T.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(le){Ue(R,R.return,le)}}}else if(i.tag===6){if(a===null){R=i;try{R.stateNode.nodeValue=f?"":R.memoizedProps}catch(le){Ue(R,R.return,le)}}}else if(i.tag===18){if(a===null){R=i;try{var $=R.stateNode;f?L0($,!0):L0(R.stateNode,!1)}catch(le){Ue(R,R.return,le)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=n.updateQueue,c!==null&&(a=c.retryQueue,a!==null&&(c.retryQueue=null,ac(n,a))));break;case 19:tn(i,n),nn(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,ac(n,c)));break;case 30:break;case 21:break;default:tn(i,n),nn(n)}}function nn(n){var i=n.flags;if(i&2){try{for(var a,c=n.return;c!==null;){if(Vv(c)){a=c;break}c=c.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var f=a.stateNode,m=Df(n);rc(n,m,f);break;case 5:var b=a.stateNode;a.flags&32&&(Mr(b,""),a.flags&=-33);var T=Df(n);rc(n,T,b);break;case 3:case 4:var R=a.stateNode.containerInfo,V=Df(n);jf(n,V,R);break;default:throw Error(r(161))}}catch(Q){Ue(n,n.return,Q)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Gv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Gv(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Ns(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Iv(n,i.alternate,i),i=i.sibling}function er(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:oi(4,i,i.return),er(i);break;case 1:Wn(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&Lv(i,i.return,a),er(i);break;case 27:Eo(i.stateNode);case 26:case 5:Wn(i,i.return),er(i);break;case 22:i.memoizedState===null&&er(i);break;case 30:er(i);break;default:er(i)}n=n.sibling}}function Ds(n,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,f=n,m=i,b=m.flags;switch(m.tag){case 0:case 11:case 15:Ds(f,m,a),mo(4,m);break;case 1:if(Ds(f,m,a),c=m,f=c.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(V){Ue(c,c.return,V)}if(c=m,f=c.updateQueue,f!==null){var T=c.stateNode;try{var R=f.shared.hiddenCallbacks;if(R!==null)for(f.shared.hiddenCallbacks=null,f=0;f<R.length;f++)Ey(R[f],T)}catch(V){Ue(c,c.return,V)}}a&&b&64&&Pv(m),go(m,m.return);break;case 27:qv(m);case 26:case 5:Ds(f,m,a),a&&c===null&&b&4&&Uv(m),go(m,m.return);break;case 12:Ds(f,m,a);break;case 31:Ds(f,m,a),a&&b&4&&Fv(f,m);break;case 13:Ds(f,m,a),a&&b&4&&Qv(f,m);break;case 22:m.memoizedState===null&&Ds(f,m,a),go(m,m.return);break;case 30:break;default:Ds(f,m,a)}i=i.sibling}}function Pf(n,i){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&to(a))}function Lf(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&to(n))}function qn(n,i,a,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Yv(n,i,a,c),i=i.sibling}function Yv(n,i,a,c){var f=i.flags;switch(i.tag){case 0:case 11:case 15:qn(n,i,a,c),f&2048&&mo(9,i);break;case 1:qn(n,i,a,c);break;case 3:qn(n,i,a,c),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&to(n)));break;case 12:if(f&2048){qn(n,i,a,c),n=i.stateNode;try{var m=i.memoizedProps,b=m.id,T=m.onPostCommit;typeof T=="function"&&T(b,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(R){Ue(i,i.return,R)}}else qn(n,i,a,c);break;case 31:qn(n,i,a,c);break;case 13:qn(n,i,a,c);break;case 23:break;case 22:m=i.stateNode,b=i.alternate,i.memoizedState!==null?m._visibility&2?qn(n,i,a,c):yo(n,i):m._visibility&2?qn(n,i,a,c):(m._visibility|=2,Xr(n,i,a,c,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Pf(b,i);break;case 24:qn(n,i,a,c),f&2048&&Lf(i.alternate,i);break;default:qn(n,i,a,c)}}function Xr(n,i,a,c,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var m=n,b=i,T=a,R=c,V=b.flags;switch(b.tag){case 0:case 11:case 15:Xr(m,b,T,R,f),mo(8,b);break;case 23:break;case 22:var Q=b.stateNode;b.memoizedState!==null?Q._visibility&2?Xr(m,b,T,R,f):yo(m,b):(Q._visibility|=2,Xr(m,b,T,R,f)),f&&V&2048&&Pf(b.alternate,b);break;case 24:Xr(m,b,T,R,f),f&&V&2048&&Lf(b.alternate,b);break;default:Xr(m,b,T,R,f)}i=i.sibling}}function yo(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=n,c=i,f=c.flags;switch(c.tag){case 22:yo(a,c),f&2048&&Pf(c.alternate,c);break;case 24:yo(a,c),f&2048&&Lf(c.alternate,c);break;default:yo(a,c)}i=i.sibling}}var vo=8192;function Wr(n,i,a){if(n.subtreeFlags&vo)for(n=n.child;n!==null;)Kv(n,i,a),n=n.sibling}function Kv(n,i,a){switch(n.tag){case 26:Wr(n,i,a),n.flags&vo&&n.memoizedState!==null&&OC(a,Vn,n.memoizedState,n.memoizedProps);break;case 5:Wr(n,i,a);break;case 3:case 4:var c=Vn;Vn=xc(n.stateNode.containerInfo),Wr(n,i,a),Vn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=vo,vo=16777216,Wr(n,i,a),vo=c):Wr(n,i,a));break;default:Wr(n,i,a)}}function Xv(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function bo(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var c=i[a];St=c,Jv(c,n)}Xv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Wv(n),n=n.sibling}function Wv(n){switch(n.tag){case 0:case 11:case 15:bo(n),n.flags&2048&&oi(9,n,n.return);break;case 3:bo(n);break;case 12:bo(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,oc(n)):bo(n);break;default:bo(n)}}function oc(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var c=i[a];St=c,Jv(c,n)}Xv(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:oi(8,i,i.return),oc(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,oc(i));break;default:oc(i)}n=n.sibling}}function Jv(n,i){for(;St!==null;){var a=St;switch(a.tag){case 0:case 11:case 15:oi(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var c=a.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:to(a.memoizedState.cache)}if(c=a.child,c!==null)c.return=a,St=c;else e:for(a=n;St!==null;){c=St;var f=c.sibling,m=c.return;if($v(c),c===a){St=null;break e}if(f!==null){f.return=m,St=f;break e}St=m}}}var F2={getCacheForType:function(n){var i=At(ot),a=i.data.get(n);return a===void 0&&(a=n(),i.data.set(n,a)),a},cacheSignal:function(){return At(ot).controller.signal}},Q2=typeof WeakMap=="function"?WeakMap:Map,Pe=0,He=null,ke=null,Oe=0,Le=0,pn=null,li=!1,Jr=!1,Uf=!1,js=0,st=0,ci=0,tr=0,Vf=0,mn=0,ea=0,xo=null,sn=null,qf=!1,lc=0,e0=0,cc=1/0,uc=null,ui=null,mt=0,di=null,ta=null,zs=0,Bf=0,If=null,t0=null,wo=0,$f=null;function gn(){return(Pe&2)!==0&&Oe!==0?Oe&-Oe:j.T!==null?Yf():ld()}function n0(){if(mn===0)if((Oe&536870912)===0||Ne){var n=_r;_r<<=1,(_r&3932160)===0&&(_r=262144),mn=n}else mn=536870912;return n=fn.current,n!==null&&(n.flags|=32),mn}function rn(n,i,a){(n===He&&(Le===2||Le===9)||n.cancelPendingCommit!==null)&&(na(n,0),fi(n,Oe,mn,!1)),Je(n,a),((Pe&2)===0||n!==He)&&(n===He&&((Pe&2)===0&&(tr|=a),st===4&&fi(n,Oe,mn,!1)),Jn(n))}function s0(n,i,a){if((Pe&6)!==0)throw Error(r(327));var c=!a&&(i&127)===0&&(i&n.expiredLanes)===0||Ke(n,i),f=c?Y2(n,i):Ff(n,i,!0),m=c;do{if(f===0){Jr&&!c&&fi(n,i,0,!1);break}else{if(a=n.current.alternate,m&&!Z2(a)){f=Ff(n,i,!1),m=!1;continue}if(f===2){if(m=i,n.errorRecoveryDisabledLanes&m)var b=0;else b=n.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){i=b;e:{var T=n;f=xo;var R=T.current.memoizedState.isDehydrated;if(R&&(na(T,b).flags|=256),b=Ff(T,b,!1),b!==2){if(Uf&&!R){T.errorRecoveryDisabledLanes|=m,tr|=m,f=4;break e}m=sn,sn=f,m!==null&&(sn===null?sn=m:sn.push.apply(sn,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){na(n,0),fi(n,i,0,!0);break}e:{switch(c=n,m=f,m){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:fi(c,i,mn,!li);break e;case 2:sn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(f=lc+300-qt(),10<f)){if(fi(c,i,mn,!li),we(c,0,!0)!==0)break e;zs=i,c.timeoutHandle=j0(i0.bind(null,c,a,sn,uc,qf,i,mn,tr,ea,li,m,"Throttled",-0,0),f);break e}i0(c,a,sn,uc,qf,i,mn,tr,ea,li,m,null,-0,0)}}break}while(!0);Jn(n)}function i0(n,i,a,c,f,m,b,T,R,V,Q,K,q,$){if(n.timeoutHandle=-1,K=i.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xs},Kv(i,m,K);var le=(m&62914560)===m?lc-qt():(m&4194048)===m?e0-qt():0;if(le=MC(K,le),le!==null){zs=m,n.cancelPendingCommit=le(f0.bind(null,n,i,m,a,c,f,b,T,R,Q,K,null,q,$)),fi(n,m,b,!V);return}}f0(n,i,m,a,c,f,b,T,R)}function Z2(n){for(var i=n;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var c=0;c<a.length;c++){var f=a[c],m=f.getSnapshot;f=f.value;try{if(!un(m(),f))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;
vendor: 19,226 bytes, line 8
8i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function fi(n,i,a,c){i&=~Vf,i&=~tr,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var f=i;0<f;){var m=31-zt(f),b=1<<m;c[m]=-1,f&=~b}a!==0&&Ui(n,a,i)}function dc(){return(Pe&6)===0?(So(0),!1):!0}function Hf(){if(ke!==null){if(Le===0)var n=ke.return;else n=ke,Ts=Qi=null,af(n),Qr=null,so=0,n=ke;for(;n!==null;)zv(n.alternate,n),n=n.return;ke=null}}function na(n,i){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,hC(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),zs=0,Hf(),He=n,ke=a=Ss(n.current,null),Oe=i,Le=0,pn=null,li=!1,Jr=Ke(n,i),Uf=!1,ea=mn=Vf=tr=ci=st=0,sn=xo=null,qf=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var f=31-zt(c),m=1<<f;i|=n[f],c&=~m}return js=i,Nl(),a}function r0(n,i){Te=null,j.H=fo,i===Fr||i===ql?(i=wy(),Le=3):i===Zd?(i=wy(),Le=4):Le=i===Sf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,pn=i,ke===null&&(st=1,ec(n,_n(i,n.current)))}function a0(){var n=fn.current;return n===null?!0:(Oe&4194048)===Oe?An===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?n===An:!1}function o0(){var n=j.H;return j.H=fo,n===null?fo:n}function l0(){var n=j.A;return j.A=F2,n}function fc(){st=4,li||(Oe&4194048)!==Oe&&fn.current!==null||(Jr=!0),(ci&134217727)===0&&(tr&134217727)===0||He===null||fi(He,Oe,mn,!1)}function Ff(n,i,a){var c=Pe;Pe|=2;var f=o0(),m=l0();(He!==n||Oe!==i)&&(uc=null,na(n,i)),i=!1;var b=st;e:do try{if(Le!==0&&ke!==null){var T=ke,R=pn;switch(Le){case 8:Hf(),b=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(i=!0);var V=Le;if(Le=0,pn=null,sa(n,T,R,V),a&&Jr){b=0;break e}break;default:V=Le,Le=0,pn=null,sa(n,T,R,V)}}G2(),b=st;break}catch(Q){r0(n,Q)}while(!0);return i&&n.shellSuspendCounter++,Ts=Qi=null,Pe=c,j.H=f,j.A=m,ke===null&&(He=null,Oe=0,Nl()),b}function G2(){for(;ke!==null;)c0(ke)}function Y2(n,i){var a=Pe;Pe|=2;var c=o0(),f=l0();He!==n||Oe!==i?(uc=null,cc=qt()+500,na(n,i)):Jr=Ke(n,i);e:do try{if(Le!==0&&ke!==null){i=ke;var m=pn;t:switch(Le){case 1:Le=0,pn=null,sa(n,i,m,1);break;case 2:case 9:if(by(m)){Le=0,pn=null,u0(i);break}i=function(){Le!==2&&Le!==9||He!==n||(Le=7),Jn(n)},m.then(i,i);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:by(m)?(Le=0,pn=null,u0(i)):(Le=0,pn=null,sa(n,i,m,7));break;case 5:var b=null;switch(ke.tag){case 26:b=ke.memoizedState;case 5:case 27:var T=ke;if(b?Y0(b):T.stateNode.complete){Le=0,pn=null;var R=T.sibling;if(R!==null)ke=R;else{var V=T.return;V!==null?(ke=V,hc(V)):ke=null}break t}}Le=0,pn=null,sa(n,i,m,5);break;case 6:Le=0,pn=null,sa(n,i,m,6);break;case 8:Hf(),st=6;break e;default:throw Error(r(462))}}K2();break}catch(Q){r0(n,Q)}while(!0);return Ts=Qi=null,j.H=c,j.A=f,Pe=a,ke!==null?0:(He=null,Oe=0,Nl(),st)}function K2(){for(;ke!==null&&!Vt();)c0(ke)}function c0(n){var i=Dv(n.alternate,n,js);n.memoizedProps=n.pendingProps,i===null?hc(n):ke=i}function u0(n){var i=n,a=i.alternate;switch(i.tag){case 15:case 0:i=Av(a,i,i.pendingProps,i.type,void 0,Oe);break;case 11:i=Av(a,i,i.pendingProps,i.type.render,i.ref,Oe);break;case 5:af(i);default:zv(a,i),i=ke=ly(i,js),i=Dv(a,i,js)}n.memoizedProps=n.pendingProps,i===null?hc(n):ke=i}function sa(n,i,a,c){Ts=Qi=null,af(i),Qr=null,so=0;var f=i.return;try{if(U2(n,f,i,a,Oe)){st=1,ec(n,_n(a,n.current)),ke=null;return}}catch(m){if(f!==null)throw ke=f,m;st=1,ec(n,_n(a,n.current)),ke=null;return}i.flags&32768?(Ne||c===1?n=!0:Jr||(Oe&536870912)!==0?n=!1:(li=n=!0,(c===2||c===9||c===3||c===6)&&(c=fn.current,c!==null&&c.tag===13&&(c.flags|=16384))),d0(i,n)):hc(i)}function hc(n){var i=n;do{if((i.flags&32768)!==0){d0(i,li);return}n=i.return;var a=B2(i.alternate,i,js);if(a!==null){ke=a;return}if(i=i.sibling,i!==null){ke=i;return}ke=i=n}while(i!==null);st===0&&(st=5)}function d0(n,i){do{var a=I2(n.alternate,n);if(a!==null){a.flags&=32767,ke=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(n=n.sibling,n!==null)){ke=n;return}ke=n=a}while(n!==null);st=6,ke=null}function f0(n,i,a,c,f,m,b,T,R){n.cancelPendingCommit=null;do pc();while(mt!==0);if((Pe&6)!==0)throw Error(r(327));if(i!==null){if(i===n.current)throw Error(r(177));if(m=i.lanes|i.childLanes,m|=Nd,Yt(n,a,m,b,T,R),n===He&&(ke=He=null,Oe=0),ta=i,di=n,zs=a,Bf=m,If=f,t0=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,eC(zi,function(){return y0(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=j.T,j.T=null,f=F.p,F.p=2,b=Pe,Pe|=4;try{$2(n,i,a)}finally{Pe=b,F.p=f,j.T=c}}mt=1,h0(),p0(),m0()}}function h0(){if(mt===1){mt=0;var n=di,i=ta,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=j.T,j.T=null;var c=F.p;F.p=2;var f=Pe;Pe|=4;try{Zv(i,n);var m=sh,b=Jg(n.containerInfo),T=m.focusedElem,R=m.selectionRange;if(b!==T&&T&&T.ownerDocument&&Wg(T.ownerDocument.documentElement,T)){if(R!==null&&Ad(T)){var V=R.start,Q=R.end;if(Q===void 0&&(Q=V),"selectionStart"in T)T.selectionStart=V,T.selectionEnd=Math.min(Q,T.value.length);else{var K=T.ownerDocument||document,q=K&&K.defaultView||window;if(q.getSelection){var $=q.getSelection(),le=T.textContent.length,be=Math.min(R.start,le),$e=R.end===void 0?be:Math.min(R.end,le);!$.extend&&be>$e&&(b=$e,$e=be,be=b);var z=Xg(T,be),N=Xg(T,$e);if(z&&N&&($.rangeCount!==1||$.anchorNode!==z.node||$.anchorOffset!==z.offset||$.focusNode!==N.node||$.focusOffset!==N.offset)){var U=K.createRange();U.setStart(z.node,z.offset),$.removeAllRanges(),be>$e?($.addRange(U),$.extend(N.node,N.offset)):(U.setEnd(N.node,N.offset),$.addRange(U))}}}}for(K=[],$=T;$=$.parentNode;)$.nodeType===1&&K.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<K.length;T++){var Y=K[T];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Cc=!!nh,sh=nh=null}finally{Pe=f,F.p=c,j.T=a}}n.current=i,mt=2}}function p0(){if(mt===2){mt=0;var n=di,i=ta,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=j.T,j.T=null;var c=F.p;F.p=2;var f=Pe;Pe|=4;try{Iv(n,i.alternate,i)}finally{Pe=f,F.p=c,j.T=a}}mt=3}}function m0(){if(mt===4||mt===3){mt=0,Zs();var n=di,i=ta,a=zs,c=t0;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?mt=5:(mt=0,ta=di=null,g0(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(ui=null),Ln(a),i=i.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Pi,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=j.T,f=F.p,F.p=2,j.T=null;try{for(var m=n.onRecoverableError,b=0;b<c.length;b++){var T=c[b];m(T.value,{componentStack:T.stack})}}finally{j.T=i,F.p=f}}(zs&3)!==0&&pc(),Jn(n),f=n.pendingLanes,(a&261930)!==0&&(f&42)!==0?n===$f?wo++:(wo=0,$f=n):wo=0,So(0)}}function g0(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,to(i)))}function pc(){return h0(),p0(),m0(),y0()}function y0(){if(mt!==5)return!1;var n=di,i=Bf;Bf=0;var a=Ln(zs),c=j.T,f=F.p;try{F.p=32>a?32:a,j.T=null,a=If,If=null;var m=di,b=zs;if(mt=0,ta=di=null,zs=0,(Pe&6)!==0)throw Error(r(331));var T=Pe;if(Pe|=4,Wv(m.current),Yv(m,m.current,b,a),Pe=T,So(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Pi,m)}catch{}return!0}finally{F.p=f,j.T=c,g0(n,i)}}function v0(n,i,a){i=_n(a,i),i=wf(n.stateNode,i,2),n=ii(n,i,2),n!==null&&(Je(n,2),Jn(n))}function Ue(n,i,a){if(n.tag===3)v0(n,n,a);else for(;i!==null;){if(i.tag===3){v0(i,n,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ui===null||!ui.has(c))){n=_n(a,n),a=bv(2),c=ii(i,a,2),c!==null&&(xv(a,c,i,n),Je(c,2),Jn(c));break}}i=i.return}}function Qf(n,i,a){var c=n.pingCache;if(c===null){c=n.pingCache=new Q2;var f=new Set;c.set(i,f)}else f=c.get(i),f===void 0&&(f=new Set,c.set(i,f));f.has(a)||(Uf=!0,f.add(a),n=X2.bind(null,n,i,a),i.then(n,n))}function X2(n,i,a){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,He===n&&(Oe&a)===a&&(st===4||st===3&&(Oe&62914560)===Oe&&300>qt()-lc?(Pe&2)===0&&na(n,0):Vf|=a,ea===Oe&&(ea=0)),Jn(n)}function b0(n,i){i===0&&(i=Pt()),n=$i(n,i),n!==null&&(Je(n,i),Jn(n))}function W2(n){var i=n.memoizedState,a=0;i!==null&&(a=i.retryLane),b0(n,a)}function J2(n,i){var a=0;switch(n.tag){case 31:case 13:var c=n.stateNode,f=n.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(i),b0(n,a)}function eC(n,i){return Ua(n,i)}var mc=null,ia=null,Zf=!1,gc=!1,Gf=!1,hi=0;function Jn(n){n!==ia&&n.next===null&&(ia===null?mc=ia=n:ia=ia.next=n),gc=!0,Zf||(Zf=!0,nC())}function So(n,i){if(!Gf&&gc){Gf=!0;do for(var a=!1,c=mc;c!==null;){if(n!==0){var f=c.pendingLanes;if(f===0)var m=0;else{var b=c.suspendedLanes,T=c.pingedLanes;m=(1<<31-zt(42|n)+1)-1,m&=f&~(b&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,_0(c,m))}else m=Oe,m=we(c,c===He?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||Ke(c,m)||(a=!0,_0(c,m));c=c.next}while(a);Gf=!1}}function tC(){x0()}function x0(){gc=Zf=!1;var n=0;hi!==0&&fC()&&(n=hi);for(var i=qt(),a=null,c=mc;c!==null;){var f=c.next,m=w0(c,i);m===0?(c.next=null,a===null?mc=f:a.next=f,f===null&&(ia=a)):(a=c,(n!==0||(m&3)!==0)&&(gc=!0)),c=f}mt!==0&&mt!==5||So(n),hi!==0&&(hi=0)}function w0(n,i){for(var a=n.suspendedLanes,c=n.pingedLanes,f=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var b=31-zt(m),T=1<<b,R=f[b];R===-1?((T&a)===0||(T&c)!==0)&&(f[b]=xt(T,i)):R<=i&&(n.expiredLanes|=T),m&=~T}if(i=He,a=Oe,a=we(n,n===i?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,a===0||n===i&&(Le===2||Le===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Va(c),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Ke(n,a)){if(i=a&-a,i===n.callbackPriority)return i;switch(c!==null&&Va(c),Ln(a)){case 2:case 8:a=bl;break;case 32:a=zi;break;case 268435456:a=vs;break;default:a=zi}return c=S0.bind(null,n),a=Ua(a,c),n.callbackPriority=i,n.callbackNode=a,i}return c!==null&&c!==null&&Va(c),n.callbackPriority=2,n.callbackNode=null,2}function S0(n,i){if(mt!==0&&mt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(pc()&&n.callbackNode!==a)return null;var c=Oe;return c=we(n,n===He?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(s0(n,c,i),w0(n,qt()),n.callbackNode!=null&&n.callbackNode===a?S0.bind(null,n):null)}function _0(n,i){if(pc())return null;s0(n,i,!0)}function nC(){pC(function(){(Pe&6)!==0?Ua(ji,tC):x0()})}function Yf(){if(hi===0){var n=$r;n===0&&(n=Sr,Sr<<=1,(Sr&261888)===0&&(Sr=256)),hi=n}return hi}function T0(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Tl(""+n)}function E0(n,i){var a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,n.id&&a.setAttribute("form",n.id),i.parentNode.insertBefore(a,i),n=new FormData(n),a.parentNode.removeChild(a),n}function sC(n,i,a,c,f){if(i==="submit"&&a&&a.stateNode===f){var m=T0((f[Wt]||null).action),b=c.submitter;b&&(i=(i=b[Wt]||null)?T0(i.formAction):b.getAttribute("formAction"),i!==null&&(m=i,b=null));var T=new kl("action","action",null,c,f);n.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(hi!==0){var R=b?E0(f,b):new FormData(f);mf(a,{pending:!0,data:R,method:f.method,action:m},null,R)}}else typeof m=="function"&&(T.preventDefault(),R=b?E0(f,b):new FormData(f),mf(a,{pending:!0,data:R,method:f.method,action:m},m,R))},currentTarget:f}]})}}for(var Kf=0;Kf<Md.length;Kf++){var Xf=Md[Kf],iC=Xf.toLowerCase(),rC=Xf[0].toUpperCase()+Xf.slice(1);Un(iC,"on"+rC)}Un(ny,"onAnimationEnd"),Un(sy,"onAnimationIteration"),Un(iy,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(w2,"onTransitionRun"),Un(S2,"onTransitionStart"),Un(_2,"onTransitionCancel"),Un(ry,"onTransitionEnd"),Rr("onMouseEnter",["mouseout","mouseover"]),Rr("onMouseLeave",["mouseout","mouseover"]),Rr("onPointerEnter",["pointerout","pointerover"]),Rr("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _o="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(" "),aC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_o));function C0(n,i){i=(i&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],f=c.event;c=c.listeners;e:{var m=void 0;if(i)for(var b=c.length-1;0<=b;b--){var T=c[b],R=T.instance,V=T.currentTarget;if(T=T.listener,R!==m&&f.isPropagationStopped())break e;m=T,f.currentTarget=V;try{m(f)}catch(Q){Ml(Q)}f.currentTarget=null,m=R}else for(b=0;b<c.length;b++){if(T=c[b],R=T.instance,V=T.currentTarget,T=T.listener,R!==m&&f.isPropagationStopped())break e;m=T,f.currentTarget=V;try{m(f)}catch(Q){Ml(Q)}f.currentTarget=null,m=R}}}}function Re(n,i){var a=i[cd];a===void 0&&(a=i[cd]=new Set);var c=n+"__bubble";a.has(c)||(A0(i,n,2,!1),a.add(c))}function Wf(n,i,a){var c=0;i&&(c|=4),A0(a,n,c,i)}var yc="_reactListening"+Math.random().toString(36).slice(2);function Jf(n){if(!n[yc]){n[yc]=!0,xg.forEach(function(a){a!=="selectionchange"&&(aC.has(a)||Wf(a,!1,n),Wf(a,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[yc]||(i[yc]=!0,Wf("selectionchange",!1,i))}}function A0(n,i,a,c){switch(nb(i)){case 2:var f=jC;break;case 8:f=zC;break;default:f=ph}a=f.bind(null,i,a,n),f=void 0,!vd||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),c?f!==void 0?n.addEventListener(i,a,{capture:!0,passive:f}):n.addEventListener(i,a,!0):f!==void 0?n.addEventListener(i,a,{passive:f}):n.addEventListener(i,a,!1)}function eh(n,i,a,c,f){var m=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var b=c.tag;if(b===3||b===4){var T=c.stateNode.containerInfo;if(T===f)break;if(b===4)for(b=c.return;b!==null;){var R=b.tag;if((R===3||R===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;T!==null;){if(b=Cr(T),b===null)return;if(R=b.tag,R===5||R===6||R===26||R===27){c=m=b;continue e}T=T.parentNode}}c=c.return}Ng(function(){var V=m,Q=gd(a),K=[];e:{var q=ay.get(n);if(q!==void 0){var $=kl,le=n;switch(n){case"keypress":if(Cl(a)===0)break e;case"keydown":case"keyup":$=JE;break;case"focusin":le="focus",$=Sd;break;case"focusout":le="blur",$=Sd;break;case"beforeblur":case"afterblur":$=Sd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$=zg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$=BE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$=n2;break;case ny:case sy:case iy:$=HE;break;case ry:$=i2;break;case"scroll":case"scrollend":$=VE;break;case"wheel":$=a2;break;case"copy":case"cut":case"paste":$=QE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$=Lg;break;case"toggle":case"beforetoggle":$=l2}var be=(i&4)!==0,$e=!be&&(n==="scroll"||n==="scrollend"),z=be?q!==null?q+"Capture":null:q;be=[];for(var N=V,U;N!==null;){var Y=N;if(U=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||U===null||z===null||(Y=Ha(N,z),Y!=null&&be.push(To(N,Y,U))),$e)break;N=N.return}0<be.length&&(q=new $(q,le,null,a,Q),K.push({event:q,listeners:be}))}}if((i&7)===0){e:{if(q=n==="mouseover"||n==="pointerover",$=n==="mouseout"||n==="pointerout",q&&a!==md&&(le=a.relatedTarget||a.fromElement)&&(Cr(le)||le[Er]))break e;if(($||q)&&(q=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,$?(le=a.relatedTarget||a.toElement,$=V,le=le?Cr(le):null,le!==null&&($e=l(le),be=le.tag,le!==$e||be!==5&&be!==27&&be!==6)&&(le=null)):($=null,le=V),$!==le)){if(be=zg,Y="onMouseLeave",z="onMouseEnter",N="mouse",(n==="pointerout"||n==="pointerover")&&(be=Lg,Y="onPointerLeave",z="onPointerEnter",N="pointer"),$e=$==null?q:$a($),U=le==null?q:$a(le),q=new be(Y,N+"leave",$,a,Q),q.target=$e,q.relatedTarget=U,Y=null,Cr(Q)===V&&(be=new be(z,N+"enter",le,a,Q),be.target=U,be.relatedTarget=$e,Y=be),$e=Y,$&&le)t:{for(be=oC,z=$,N=le,U=0,Y=z;Y;Y=be(Y))U++;Y=0;for(var ge=N;ge;ge=be(ge))Y++;for(;0<U-Y;)z=be(z),U--;for(;0<Y-U;)N=be(N),Y--;for(;U--;){if(z===N||N!==null&&z===N.alternate){be=z;break t}z=be(z),N=be(N)}be=null}else be=null;$!==null&&k0(K,q,$,be,!1),le!==null&&$e!==null&&k0(K,$e,le,be,!0)}}e:{if(q=V?$a(V):window,$=q.nodeName&&q.nodeName.toLowerCase(),$==="select"||$==="input"&&q.type==="file")var je=Fg;else if($g(q))if(Qg)je=v2;else{je=g2;var pe=m2}else $=q.nodeName,!$||$.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?V&&pd(V.elementType)&&(je=Fg):je=y2;if(je&&(je=je(n,V))){Hg(K,je,a,Q);break e}pe&&pe(n,q,V),n==="focusout"&&V&&q.type==="number"&&V.memoizedProps.value!=null&&hd(q,"number",q.value)}switch(pe=V?$a(V):window,n){case"focusin":($g(pe)||pe.contentEditable==="true")&&(zr=pe,kd=V,Wa=null);break;case"focusout":Wa=kd=zr=null;break;case"mousedown":Rd=!0;break;case"contextmenu":case"mouseup":case"dragend":Rd=!1,ey(K,a,Q);break;case"selectionchange":if(x2)break;case"keydown":case"keyup":ey(K,a,Q)}var Ee;if(Td)e:{switch(n){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else jr?Bg(n,a)&&(Me="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Me="onCompositionStart");Me&&(Ug&&a.locale!=="ko"&&(jr||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&jr&&(Ee=Dg()):(Xs=Q,bd="value"in Xs?Xs.value:Xs.textContent,jr=!0)),pe=vc(V,Me),0<pe.length&&(Me=new Pg(Me,n,null,a,Q),K.push({event:Me,listeners:pe}),Ee?Me.data=Ee:(Ee=Ig(a),Ee!==null&&(Me.data=Ee)))),(Ee=u2?d2(n,a):f2(n,a))&&(Me=vc(V,"onBeforeInput"),0<Me.length&&(pe=new Pg("onBeforeInput","beforeinput",null,a,Q),K.push({event:pe,listeners:Me}),pe.data=Ee)),sC(K,n,V,a,Q)}C0(K,i)})}function To(n,i,a){return{instance:n,listener:i,currentTarget:a}}function vc(n,i){for(var a=i+"Capture",c=[];n!==null;){var f=n,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Ha(n,a),f!=null&&c.unshift(To(n,f,m)),f=Ha(n,i),f!=null&&c.push(To(n,f,m))),n.tag===3)return c;n=n.return}return[]}function oC(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function k0(n,i,a,c,f){for(var m=i._reactName,b=[];a!==null&&a!==c;){var T=a,R=T.alternate,V=T.stateNode;if(T=T.tag,R!==null&&R===c)break;T!==5&&T!==26&&T!==27||V===null||(R=V,f?(V=Ha(a,m),V!=null&&b.unshift(To(a,V,R))):f||(V=Ha(a,m),V!=null&&b.pu
vendor: 5,802 bytes, lines 8-9
8sh(To(a,V,R)))),a=a.return}b.length!==0&&n.push({event:i,listeners:b})}var lC=/\r\n?/g,cC=/\u0000|\uFFFD/g;function R0(n){return(typeof n=="string"?n:""+n).replace(lC,`
9`).replace(cC,"")}function O0(n,i){return i=R0(i),R0(n)===i}function Ie(n,i,a,c,f,m){switch(a){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Mr(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Mr(n,""+c);break;case"className":Sl(n,"class",c);break;case"tabIndex":Sl(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Sl(n,a,c);break;case"style":Og(n,c,m);break;case"data":if(i!=="object"){Sl(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||a!=="href")){n.removeAttribute(a);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=Tl(""+c),n.setAttribute(a,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(a,"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 m=="function"&&(a==="formAction"?(i!=="input"&&Ie(n,i,"name",f.name,f,null),Ie(n,i,"formEncType",f.formEncType,f,null),Ie(n,i,"formMethod",f.formMethod,f,null),Ie(n,i,"formTarget",f.formTarget,f,null)):(Ie(n,i,"encType",f.encType,f,null),Ie(n,i,"method",f.method,f,null),Ie(n,i,"target",f.target,f,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(a);break}c=Tl(""+c),n.setAttribute(a,c);break;case"onClick":c!=null&&(n.onclick=xs);break;case"onScroll":c!=null&&Re("scroll",n);break;case"onScrollEnd":c!=null&&Re("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=a}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}a=Tl(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,""+c):n.removeAttribute(a);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":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":c===!0?n.setAttribute(a,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(a,c):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(a,c):n.removeAttribute(a);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(a):n.setAttribute(a,c);break;case"popover":Re("beforetoggle",n),Re("toggle",n),wl(n,"popover",c);break;case"xlinkActuate":bs(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":bs(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":bs(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":bs(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":bs(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":bs(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":bs(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":bs(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":bs(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":wl(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=LE.get(a)||a,wl(n,a,c))}}function th(n,i,a,c,f,m){switch(a){case"style":Og(n,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(a=c.__html,a!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=a}}break;case"children":typeof c=="string"?Mr(n,c):(typeof c=="number"||typeof c=="bigint")&&Mr(n,""+c);break;case"onScroll":c!=null&&Re("scroll",n);break;case"onScrollEnd":c!=null&&Re("scrollend",n);break;case"onClick":c!=null&&(n.onclick=xs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wg.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),i=a.slice(2,f?a.length-7:void 0),m=n[Wt]||null,m=m!=null?m[a]:null,typeof m=="function"&&n.removeEventListener(i,m,f),typeof c=="function")){typeof m!="function"&&m!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(i,c,f);break e}a in n?n[a]=c:c===!0?n.setAttribute(a,""):wl(n,a,c)}}}function Rt(n,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",n),Re("load",n);var c=!1,f=!1,m;
vendor: 4,357 bytes, line 9
9for(m in a)if(a.hasOwnProperty(m)){var b=a[m];if(b!=null)switch(m){case"src":c=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Ie(n,i,m,b,a,null)}}f&&Ie(n,i,"srcSet",a.srcSet,a,null),c&&Ie(n,i,"src",a.src,a,null);return;case"input":Re("invalid",n);var T=m=b=f=null,R=null,V=null;for(c in a)if(a.hasOwnProperty(c)){var Q=a[c];if(Q!=null)switch(c){case"name":f=Q;break;case"type":b=Q;break;case"checked":R=Q;break;case"defaultChecked":V=Q;break;case"value":m=Q;break;case"defaultValue":T=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,i));break;default:Ie(n,i,c,Q,a,null)}}Cg(n,m,T,R,V,b,f,!1);return;case"select":Re("invalid",n),c=b=m=null;for(f in a)if(a.hasOwnProperty(f)&&(T=a[f],T!=null))switch(f){case"value":m=T;break;case"defaultValue":b=T;break;case"multiple":c=T;default:Ie(n,i,f,T,a,null)}i=m,a=b,n.multiple=!!c,i!=null?Or(n,!!c,i,!1):a!=null&&Or(n,!!c,a,!0);return;case"textarea":Re("invalid",n),m=f=c=null;for(b in a)if(a.hasOwnProperty(b)&&(T=a[b],T!=null))switch(b){case"value":c=T;break;case"defaultValue":f=T;break;case"children":m=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:Ie(n,i,b,T,a,null)}kg(n,c,f,m);return;case"option":for(R in a)a.hasOwnProperty(R)&&(c=a[R],c!=null)&&(R==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":Ie(n,i,R,c,a,null));return;case"dialog":Re("beforetoggle",n),Re("toggle",n),Re("cancel",n),Re("close",n);break;case"iframe":case"object":Re("load",n);break;case"video":case"audio":for(c=0;c<_o.length;c++)Re(_o[c],n);break;case"image":Re("error",n),Re("load",n);break;case"details":Re("toggle",n);break;case"embed":case"source":case"link":Re("error",n),Re("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in a)if(a.hasOwnProperty(V)&&(c=a[V],c!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Ie(n,i,V,c,a,null)}return;default:if(pd(i)){for(Q in a)a.hasOwnProperty(Q)&&(c=a[Q],c!==void 0&&th(n,i,Q,c,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(c=a[T],c!=null&&Ie(n,i,T,c,a,null))}function uC(n,i,a,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,T=null,R=null,V=null,Q=null;for($ in a){var K=a[$];if(a.hasOwnProperty($)&&K!=null)switch($){case"checked":break;case"value":break;case"defaultValue":R=K;default:c.hasOwnProperty($)||Ie(n,i,$,null,c,K)}}for(var q in c){var $=c[q];if(K=a[q],c.hasOwnProperty(q)&&($!=null||K!=null))switch(q){case"type":m=$;break;case"name":f=$;break;case"checked":V=$;break;case"defaultChecked":Q=$;break;case"value":b=$;break;case"defaultValue":T=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,i));break;default:$!==K&&Ie(n,i,q,$,c,K)}}fd(n,b,T,R,V,Q,m,f);return;case"select":$=b=T=q=null;for(m in a)if(R=a[m],a.hasOwnProperty(m)&&R!=null)switch(m){case"value":break;case"multiple":$=R;default:c.hasOwnProperty(m)||Ie(n,i,m,null,c,R)}for(f in c)if(m=c[f],R=a[f],c.hasOwnProperty(f)&&(m!=null||R!=null))switch(f){case"value":q=m;break;case"defaultValue":T=m;break;case"multiple":b=m;default:m!==R&&Ie(n,i,f,m,c,R)}i=T,a=b,c=$,q!=null?Or(n,!!a,q,!1):!!c!=!!a&&(i!=null?Or(n,!!a,i,!0):Or(n,!!a,a?[]:"",!1));return;case"textarea":$=q=null;for(T in a)if(f=a[T],a.hasOwnProperty(T)&&f!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ie(n,i,T,null,c,f)}for(b in c)if(f=c[b],m=a[b],c.hasOwnProperty(b)&&(f!=null||m!=null))switch(b){case"value":q=f;break;case"defaultValue":$=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==m&&Ie(n,i,b,f,c,m)}Ag(n,q,$);return;case"option":for(var le in a)q=a[le],a.hasOwnProperty(le)&&q!=null&&!c.hasOwnProperty(le)&&(le==="selected"?n.selected=!1:Ie(n,i,le,null,c,q));for(R in c)q=c[R],$=a[R],c.hasOwnProperty(R)&&q!==$&&(q!=null||$!=null)&&(R==="selected"?n.selected=q&&typeof q!="function"&&typeof q!="symbol":Ie(n,i,R,q,c,$));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 be in a)q=a[be],a.hasOwnProperty(be)&&q
vendor: 5,709 bytes, line 9
9!=null&&!c.hasOwnProperty(be)&&Ie(n,i,be,null,c,q);for(V in c)if(q=c[V],$=a[V],c.hasOwnProperty(V)&&q!==$&&(q!=null||$!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,i));break;default:Ie(n,i,V,q,c,$)}return;default:if(pd(i)){for(var $e in a)q=a[$e],a.hasOwnProperty($e)&&q!==void 0&&!c.hasOwnProperty($e)&&th(n,i,$e,void 0,c,q);for(Q in c)q=c[Q],$=a[Q],!c.hasOwnProperty(Q)||q===$||q===void 0&&$===void 0||th(n,i,Q,q,c,$);return}}for(var z in a)q=a[z],a.hasOwnProperty(z)&&q!=null&&!c.hasOwnProperty(z)&&Ie(n,i,z,null,c,q);for(K in c)q=c[K],$=a[K],!c.hasOwnProperty(K)||q===$||q==null&&$==null||Ie(n,i,K,q,c,$)}function M0(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dC(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,a=performance.getEntriesByType("resource"),c=0;c<a.length;c++){var f=a[c],m=f.transferSize,b=f.initiatorType,T=f.duration;if(m&&T&&M0(b)){for(b=0,T=f.responseEnd,c+=1;c<a.length;c++){var R=a[c],V=R.startTime;if(V>T)break;var Q=R.transferSize,K=R.initiatorType;Q&&M0(K)&&(R=R.responseEnd,b+=Q*(R<T?1:(T-V)/(R-V)))}if(--c,i+=8*(m+b)/(f.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var nh=null,sh=null;function bc(n){return n.nodeType===9?n:n.ownerDocument}function N0(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function D0(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function ih(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var rh=null;function fC(){var n=window.event;return n&&n.type==="popstate"?n===rh?!1:(rh=n,!0):(rh=null,!1)}var j0=typeof setTimeout=="function"?setTimeout:void 0,hC=typeof clearTimeout=="function"?clearTimeout:void 0,z0=typeof Promise=="function"?Promise:void 0,pC=typeof queueMicrotask=="function"?queueMicrotask:typeof z0<"u"?function(n){return z0.resolve(null).then(n).catch(mC)}:j0;function mC(n){setTimeout(function(){throw n})}function pi(n){return n==="head"}function P0(n,i){var a=i,c=0;do{var f=a.nextSibling;if(n.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(c===0){n.removeChild(f),la(i);return}c--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")c++;else if(a==="html")Eo(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,Eo(a);for(var m=a.firstChild;m;){var b=m.nextSibling,T=m.nodeName;m[Ia]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=b}}else a==="body"&&Eo(n.ownerDocument.body);a=f}while(a);la(i)}function L0(n,i){var a=n;n=0;do{var c=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=c}while(a)}function ah(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ah(a),ud(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function gC(n,i,a,c){for(;n.nodeType===1;){var f=a;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Ia])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=kn(n.nextSibling),n===null)break}return null}function yC(n,i,a){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=kn(n.nextSibling),n===null))return null;return n}function U0(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=kn(n.nextSibling),n===null))return null;return n}function oh(n){return n.data==="$?"||n.data==="$~"}function lh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function vC(n,i){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||a.readyState!=="loading")i();else{var c=function(){i(),a.removeEventListener("DOMContentLoaded",c)};a.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function kn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;
vendor: 4,830 bytes, line 9
9if(i==="/$"||i==="/&")return null}}return n}var ch=null;function V0(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(i===0)return kn(n.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}n=n.nextSibling}return null}function q0(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return n;i--}else a!=="/$"&&a!=="/&"||i++}n=n.previousSibling}return null}function B0(n,i,a){switch(i=bc(a),n){case"html":if(n=i.documentElement,!n)throw Error(r(452));return n;case"head":if(n=i.head,!n)throw Error(r(453));return n;case"body":if(n=i.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function Eo(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);ud(n)}var Rn=new Map,I0=new Set;function xc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Ps=F.d;F.d={f:bC,r:xC,D:wC,C:SC,L:_C,m:TC,X:CC,S:EC,M:AC};function bC(){var n=Ps.f(),i=dc();return n||i}function xC(n){var i=Ar(n);i!==null&&i.tag===5&&i.type==="form"?rv(i):Ps.r(n)}var ra=typeof document>"u"?null:document;function $0(n,i,a){var c=ra;if(c&&typeof i=="string"&&i){var f=wn(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),I0.has(f)||(I0.add(f),n={rel:n,crossOrigin:a,href:i},c.querySelector(f)===null&&(i=c.createElement("link"),Rt(i,"link",n),wt(i),c.head.appendChild(i)))}}function wC(n){Ps.D(n),$0("dns-prefetch",n,null)}function SC(n,i){Ps.C(n,i),$0("preconnect",n,i)}function _C(n,i,a){Ps.L(n,i,a);var c=ra;if(c&&n&&i){var f='link[rel="preload"][as="'+wn(i)+'"]';i==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+wn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+wn(a.imageSizes)+'"]')):f+='[href="'+wn(n)+'"]';var m=f;switch(i){case"style":m=aa(n);break;case"script":m=oa(n)}Rn.has(m)||(n=g({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:n,as:i},a),Rn.set(m,n),c.querySelector(f)!==null||i==="style"&&c.querySelector(Co(m))||i==="script"&&c.querySelector(Ao(m))||(i=c.createElement("link"),Rt(i,"link",n),wt(i),c.head.appendChild(i)))}}function TC(n,i){Ps.m(n,i);var a=ra;if(a&&n){var c=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+wn(c)+'"][href="'+wn(n)+'"]',m=f;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=oa(n)}if(!Rn.has(m)&&(n=g({rel:"modulepreload",href:n},i),Rn.set(m,n),a.querySelector(f)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ao(m)))return}c=a.createElement("link"),Rt(c,"link",n),wt(c),a.head.appendChild(c)}}}function EC(n,i,a){Ps.S(n,i,a);var c=ra;if(c&&n){var f=kr(c).hoistableStyles,m=aa(n);i=i||"default";var b=f.get(m);if(!b){var T={loading:0,preload:null};if(b=c.querySelector(Co(m)))T.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":i},a),(a=Rn.get(m))&&uh(n,a);var R=b=c.createElement("link");wt(R),Rt(R,"link",n),R._p=new Promise(function(V,Q){R.onload=V,R.onerror=Q}),R.addEventListener("load",function(){T.loading|=1}),R.addEventListener("error",function(){T.loading|=2}),T.loading|=4,wc(b,i,c)}b={type:"stylesheet",instance:b,count:1,state:T},f.set(m,b)}}}function CC(n,i){Ps.X(n,i);var a=ra;if(a&&n){var c=kr(a).hoistableScripts,f=oa(n),m=c.get(f);m||(m=a.querySelector(Ao(f)),m||(n=g({src:n,async:!0},i),(i=Rn.get(f))&&dh(n,i),m=a.createElement("script"),wt(m),Rt(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(f,m))}}function AC(n,i){Ps.M(n,i);var a=ra;if(a&&n){var c=kr(a).hoistableScripts,f=oa(n),m=c.get(f);m||(m=a.querySelector(Ao(f)),m||(n=g({src:n,async:!0,type:"module"},i),(i=Rn.get(f))&&dh(n,i),m=a.createElement("script"),wt(m),Rt(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(f,m))}}function H0(n,i,a,c){var f=(f=ae.current)?xc(f):null;if(!f)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=aa(a.href),a=kr(f).hoistableStyles,c=a.get(i),c||(c={type:"style",instance:null,count:0,state:null},a.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=aa(a.href);var m=kr(f).hoistableStyles,b=m.get(n);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,b),(m=f.querySelector(Co(n)))&&!m._p&&(b.instance=m,b.state.loading=5),Rn.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy}
vendor: 5,483 bytes, line 9
9,Rn.set(n,a),m||kC(f,n,a,b.state))),i&&c===null)throw Error(r(528,""));return b}if(i&&c!==null)throw Error(r(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=oa(a),a=kr(f).hoistableScripts,c=a.get(i),c||(c={type:"script",instance:null,count:0,state:null},a.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function aa(n){return'href="'+wn(n)+'"'}function Co(n){return'link[rel="stylesheet"]['+n+"]"}function F0(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function kC(n,i,a,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Rt(i,"link",a),wt(i),n.head.appendChild(i))}function oa(n){return'[src="'+wn(n)+'"]'}function Ao(n){return"script[async]"+n}function Q0(n,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+wn(a.href)+'"]');if(c)return i.instance=c,wt(c),c;var f=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),wt(c),Rt(c,"style",f),wc(c,a.precedence,n),i.instance=c;case"stylesheet":f=aa(a.href);var m=n.querySelector(Co(f));if(m)return i.state.loading|=4,i.instance=m,wt(m),m;c=F0(a),(f=Rn.get(f))&&uh(c,f),m=(n.ownerDocument||n).createElement("link"),wt(m);var b=m;return b._p=new Promise(function(T,R){b.onload=T,b.onerror=R}),Rt(m,"link",c),i.state.loading|=4,wc(m,a.precedence,n),i.instance=m;case"script":return m=oa(a.src),(f=n.querySelector(Ao(m)))?(i.instance=f,wt(f),f):(c=a,(f=Rn.get(m))&&(c=g({},a),dh(c,f)),n=n.ownerDocument||n,f=n.createElement("script"),wt(f),Rt(f,"link",c),n.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,wc(c,a.precedence,n));return i.instance}function wc(n,i,a){for(var c=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=c.length?c[c.length-1]:null,m=f,b=0;b<c.length;b++){var T=c[b];if(T.dataset.precedence===i)m=T;else if(m!==f)break}m?m.parentNode.insertBefore(n,m.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(n,i.firstChild))}function uh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function dh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Sc=null;function Z0(n,i,a){if(Sc===null){var c=new Map,f=Sc=new Map;f.set(a,c)}else f=Sc,c=f.get(a),c||(c=new Map,f.set(a,c));if(c.has(n))return c;for(c.set(n,null),a=a.getElementsByTagName(n),f=0;f<a.length;f++){var m=a[f];if(!(m[Ia]||m[Et]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(i)||"";b=n+b;var T=c.get(b);T?T.push(m):c.set(b,[m])}}return c}function G0(n,i,a){n=n.ownerDocument||n,n.head.insertBefore(a,i==="title"?n.querySelector("head > title"):null)}function RC(n,i,a){if(a===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Y0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function OC(n,i,a,c){if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=aa(c.href),m=i.querySelector(Co(f));if(m){i=m._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=_c.bind(n),i.then(n,n)),a.state.loading|=4,a.instance=m,wt(m);return}m=i.ownerDocument||i,c=F0(c),(f=Rn.get(f))&&uh(c,f),m=m.createElement("link"),wt(m);var b=m;b._p=new Promise(function(T,R){b.onload=T,b.onerror=R}),Rt(m,"link",c),a.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=_c.bind(n),i.addEventListener("load",a),i.addEventListener("error",a))}}var fh=0;function MC(n,i){return n.stylesheets&&n.count===0&&Ec(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var c=setTimeout(function(){if(n.stylesheets&&Ec(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+i);0<n.imgBytes&&fh===0&&(fh=62500*dC());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Ec(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>fh?50:800)+i);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(f)}}:null}function _c(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ec(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Tc=null;function Ec(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Tc=new Map,i.forEac
vendor: 1,454 bytes, line 9
9h(NC,n),Tc=null,_c.call(n))}function NC(n,i){if(!(i.state.loading&4)){var a=Tc.get(n);if(a)var c=a.get(null);else{a=new Map,Tc.set(n,a);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var b=f[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),c=b)}c&&a.set(null,c)}f=i.instance,b=f.getAttribute("data-precedence"),m=a.get(b)||c,m===c&&a.set(null,f),a.set(b,f),this.count++,c=_c.bind(this),f.addEventListener("load",c),f.addEventListener("error",c),m?m.parentNode.insertBefore(f,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var ko={$$typeof:k,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function DC(n,i,a,c,f,m,b,T,R){this.tag=1,this.containerInfo=n,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=Ys(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ys(0),this.hiddenUpdates=Ys(null),this.identifierPrefix=c,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}
vendor: 8,400 bytes, line 9
9function K0(n,i,a,c,f,m,b,T,R,V,Q,K){return n=new DC(n,i,a,b,R,V,Q,K,T),i=1,m===!0&&(i|=24),m=dn(3,null,null,i),n.current=m,m.stateNode=n,i=Hd(),i.refCount++,n.pooledCache=i,i.refCount++,m.memoizedState={element:c,isDehydrated:a,cache:i},Gd(m),n}function X0(n){return n?(n=Ur,n):Ur}function W0(n,i,a,c,f,m){f=X0(f),c.context===null?c.context=f:c.pendingContext=f,c=si(i),c.payload={element:a},m=m===void 0?null:m,m!==null&&(c.callback=m),a=ii(n,c,i),a!==null&&(rn(a,n,i),ro(a,n,i))}function J0(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<i?a:i}}function hh(n,i){J0(n,i),(n=n.alternate)&&J0(n,i)}function eb(n){if(n.tag===13||n.tag===31){var i=$i(n,67108864);i!==null&&rn(i,n,67108864),hh(n,67108864)}}function tb(n){if(n.tag===13||n.tag===31){var i=gn();i=Tr(i);var a=$i(n,i);a!==null&&rn(a,n,i),hh(n,i)}}var Cc=!0;function jC(n,i,a,c){var f=j.T;j.T=null;var m=F.p;try{F.p=2,ph(n,i,a,c)}finally{F.p=m,j.T=f}}function zC(n,i,a,c){var f=j.T;j.T=null;var m=F.p;try{F.p=8,ph(n,i,a,c)}finally{F.p=m,j.T=f}}function ph(n,i,a,c){if(Cc){var f=mh(c);if(f===null)eh(n,i,c,Ac,a),sb(n,c);else if(LC(f,n,i,a,c))c.stopPropagation();else if(sb(n,c),i&4&&-1<PC.indexOf(n)){for(;f!==null;){var m=Ar(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=Yn(m.pendingLanes);if(b!==0){var T=m;for(T.pendingLanes|=2,T.entangledLanes|=2;b;){var R=1<<31-zt(b);T.entanglements[1]|=R,b&=~R}Jn(m),(Pe&6)===0&&(cc=qt()+500,So(0))}}break;case 31:case 13:T=$i(m,2),T!==null&&rn(T,m,2),dc(),hh(m,2)}if(m=mh(c),m===null&&eh(n,i,c,Ac,a),m===f)break;f=m}f!==null&&c.stopPropagation()}else eh(n,i,c,null,a)}}function mh(n){return n=gd(n),gh(n)}var Ac=null;function gh(n){if(Ac=null,n=Cr(n),n!==null){var i=l(n);if(i===null)n=null;else{var a=i.tag;if(a===13){if(n=u(i),n!==null)return n;n=null}else if(a===31){if(n=d(i),n!==null)return n;n=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Ac=n,null}function nb(n){switch(n){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(ad()){case ji:return 2;case bl:return 8;case zi:case qa:return 32;case vs:return 268435456;default:return 32}default:return 32}}var yh=!1,mi=null,gi=null,yi=null,Ro=new Map,Oo=new Map,vi=[],PC="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 sb(n,i){switch(n){case"focusin":case"focusout":mi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Ro.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oo.delete(i.pointerId)}}function Mo(n,i,a,c,f,m){return n===null||n.nativeEvent!==m?(n={blockedOn:i,domEventName:a,eventSystemFlags:c,nativeEvent:m,targetContainers:[f]},i!==null&&(i=Ar(i),i!==null&&eb(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function LC(n,i,a,c,f){switch(i){case"focusin":return mi=Mo(mi,n,i,a,c,f),!0;case"dragenter":return gi=Mo(gi,n,i,a,c,f),!0;case"mouseover":return yi=Mo(yi,n,i,a,c,f),!0;case"pointerover":var m=f.pointerId;return Ro.set(m,Mo(Ro.get(m)||null,n,i,a,c,f)),!0;case"gotpointercapture":return m=f.pointerId,Oo.set(m,Mo(Oo.get(m)||null,n,i,a,c,f)),!0}return!1}function ib(n){var i=Cr(n.target);if(i!==null){var a=l(i);if(a!==null){if(i=a.tag,i===13){if(i=u(a),i!==null){n.blockedOn=i,vg(n.priority,function(){tb(a)});return}}else if(i===31){if(i=d(a),i!==null){n.blockedOn=i,vg(n.priority,function(){tb(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function kc(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var a=mh(n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);md=c,a.target.dispatchEvent(c),md=null}else return i=Ar(a),i!==null&&eb(i),n.blockedOn=a,!1;i.shift()}return!0}function rb(n,i,a){kc(n)&&a.delete(i)}function UC(){yh=!1,mi!==null&&kc(mi)&&(mi=null),gi!==null&&kc(gi)&&(gi=null),yi!==null&&kc(yi)&&(yi=null),Ro.forEach(rb),Oo.forEach(rb)}function Rc(n,i){n.blockedOn===i&&(n.blockedOn=null,yh||(yh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,UC)))}var Oc=null;function ab(n){Oc!==n&&(Oc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Oc===n&&(Oc=null);for(var i=0;i<n.length;i+=3){var a=n[i],c=n[i+1],f=n[i+2];if(typeof c!="function"){if(gh(c||a)===null)continue;break}var m=Ar(a);m!==null&&(n.splice(i,3),i-=3,mf(m,{pending:!0,data:f,method:a.method,action:c},c,f))}}))}function la(n){function i(R){return Rc(R,n)}mi!==null&&Rc(mi,n),gi!==null&&Rc(gi,n),yi!==null&&Rc(yi,n),Ro.forEach(i),Oo.forEach(i);for(var a=0;a<vi.length;a++){var c=vi[a];c.blockedOn===n&&(c.blockedOn=null)}for(;0<vi.length&&(a=vi[0],a.blockedOn===null);)ib(a),a.blockedOn===null&&vi.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(c=0;c<a.length;c+=3){var f=a[c],m=a[c+1],b=f[Wt]||null;if(typeof m=="function")b||ab(a);else if(b){var T=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[Wt]||null)T=b.formAction;else if(gh(f)!==null)continue}else T=b.action;typeof T=="function"?a[c+1]=T:(a.splice(c,3),c-=3),ab(a)}}}function ob(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),c||setTimeout(a,20)}function a(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function vh(n){this._internalRoot=n}Mc.prototype.render=vh.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));var a=i.current,c=gn();W0(a,c,n,i,null,null)},Mc.prototype.unmount=vh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;W0(n.current,2,null,n,null,null),dc(),i[Er]=null}};function Mc(n){this._internalRoot=n}Mc.prototype.unstable_scheduleHydration=function(n){if(n){var i=ld();n={blockedOn:null,target:n,priority:i};for(var a=0;a<vi.length&&i!==0&&i<vi[a].priority;a++);vi.splice(a,0,n),a===0&&ib(n)}};var lb=t.version;if(lb!=="19.2.5")throw Error(r(527,lb,"19.2.5"));F.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=p(i),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var VC={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.5"};
9if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nc.isDisabled&&Nc.supportsFiber)try{Pi=Nc.inject(VC),Bt=Nc}catch{}}return Do.createRoot=function(n,i){if(!o(n))throw Error(r(299));var a=!1,c="",f=mv,m=gv,b=yv;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError)),i=K0(n,1,!1,null,null,a,c,null,f,m,b,ob),n[Er]=i.current,Jf(n),new vh(i)},Do.hydrateRoot=function(n,i,a){if(!o(n))throw Error(r(299));var c=!1,f="",m=mv,b=gv,T=yv,R=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),i=K0(n,1,!0,i,a??null,c,f,R,m,b,T,ob),i.context=X0(null),a=i.current,c=gn(),c=Tr(c),f=si(c),f.callback=null,ii(a,f,c),a=c,i.current.lanes=a,Je(i,a),Jn(i),n[Er]=i.current,Jf(n),new Mc(i)},Do.version="19.2.5",Do}var vb;function YC(){if(vb)return xh.exports;vb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),xh.exports=GC(),xh.exports}var KC=YC(),_=im();const ne=u1(_),XC=BC({__proto__:null,default:ne},[_]);var bb="popstate";function xb(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function WC(e={}){function t(r,o){let l=o.state?.masked,{pathname:u,search:d,hash:h}=l||r.location;return lp("",{pathname:u,search:d,hash:h},o.state&&o.state.usr||null,o.state&&o.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function s(r,o){return typeof o=="string"?o:Yo(o)}return eA(t,s,null,e)}function et(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fs(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JC(){return Math.random().toString(36).substring(2,10)}function wb(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function lp(e,t,s=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ka(t):t,state:s,key:t&&t.key||r||JC(),unstable_mask:o}}function Yo({pathname:e="/",search:t="",hash:s=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function ka(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substring(s),e=e.substring(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function eA(e,t,s,r={}){let{window:o=document.defaultView,v5Compat:l=!1}=r,u=o.history,d="POP",h=null,p=y();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function y(){return(u.state||{idx:null}).idx}function g(){d="POP";let C=y(),A=C==null?null:C-p;p=C,h&&h({action:d,location:E.location,delta:A})}function v(C,A){d="PUSH";let M=xb(C)?C:lp(E.location,C,A);p=y()+1;let k=wb(M,p),D=E.createHref(M.unstable_mask||M);try{u.pushState(k,"",D)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(D)}l&&h&&h({action:d,location:E.location,delta:1})}function x(C,A){d="REPLACE";let M=xb(C)?C:lp(E.location,C,A);p=y();let k=wb(M,p),D=E.createHref(M.unstable_mask||M);u.replaceState(k,"",D),l&&h&&h({action:d,location:E.location,delta:0})}function S(C){return tA(C)}let E={get action(){return d},get location(){return e(o,u)},listen(C){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(bb,g),h=C,()=>{o.removeEventListener(bb,g),h=null}},createHref(C){return t(o,C)},createURL:S,encodeLocation(C){let A=S(C);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:v,replace:x,go(C){return u.go(C)}};return E}function tA(e,t=!1){let s="http://localhost";
9typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),et(s,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Yo(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=s+r),new URL(r,s)}function f1(e,t,s="/"){return nA(e,t,s,!1)}function nA(e,t,s,r){let o=typeof t=="string"?ka(t):t,l=Bs(o.pathname||"/",s);if(l==null)return null;let u=h1(e);sA(u);let d=null;for(let h=0;d==null&&h<u.length;++h){let p=pA(l);d=fA(u[h],p,r)}return d}function h1(e,t=[],s=[],r="",o=!1){let l=(u,d,h=o,p)=>{let y={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&h)return;et(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=cs([r,y.relativePath]),v=s.concat(y);u.children&&u.children.length>0&&(et(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),h1(u.children,t,v,g,h)),!(u.path==null&&!u.index)&&t.push({path:g,score:uA(g,u.index),routesMeta:v})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))l(u,d);else for(let h of p1(u.path))l(u,d,!0,h)}),t}function p1(e){let t=e.split("/");if(t.length===0)return[];let[s,...r]=t,o=s.endsWith("?"),l=s.replace(/\?$/,"");if(r.length===0)return o?[l,""]:[l];let u=p1(r.join("/")),d=[];return d.push(...u.map(h=>h===""?l:[l,h].join("/"))),o&&d.push(...u),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function sA(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:dA(t.routesMeta.map(r=>r.childrenIndex),s.routesMeta.map(r=>r.childrenIndex)))}var iA=/^:[\w-]+$/,rA=3,aA=2,oA=1,lA=10,cA=-2,Sb=e=>e==="*";function uA(e,t){let s=e.split("/"),r=s.length;return s.some(Sb)&&(r+=cA),t&&(r+=aA),s.filter(o=>!Sb(o)).reduce((o,l)=>o+(iA.test(l)?rA:l===""?oA:lA),r)}function dA(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function fA(e,t,s=!1){let{routesMeta:r}=e,o={},l="/",u=[];for(let d=0;d<r.length;++d){let h=r[d],p=d===r.length-1,y=l==="/"?t:t.slice(l.length)||"/",g=fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:p},y),v=h.route;if(!g&&p&&s&&!r[r.length-1].route.index&&(g=fu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},y)),!g)return null;
9Object.assign(o,g.params),u.push({params:o,pathname:cs([l,g.pathname]),pathnameBase:vA(cs([l,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(l=cs([l,g.pathnameBase]))}return u}function fu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,r]=hA(e.path,e.caseSensitive,e.end),o=t.match(s);if(!o)return null;let l=o[0],u=l.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:r.reduce((p,{paramName:y,isOptional:g},v)=>{if(y==="*"){let S=d[v]||"";u=l.slice(0,l.length-S.length).replace(/(.)\/+$/,"$1")}const x=d[v];return g&&!x?p[y]=void 0:p[y]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:u,pattern:e}}function hA(e,t=!1,s=!0){fs(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,h,p,y)=>{if(r.push({paramName:d,isOptional:h!=null}),h){let g=y.charAt(p+u.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function pA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fs(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Bs(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&r!=="/"?null:e.slice(s)||"/"}var mA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function gA(e,t="/"){let{pathname:s,search:r="",hash:o=""}=typeof e=="string"?ka(e):e,l;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?l=_b(s.substring(1),"/"):l=_b(s,t)):l=t,{pathname:l,search:bA(r),hash:xA(o)}}function _b(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?s.length>1&&s.pop():o!=="."&&s.push(o)}),s.length>1?s.join("/"):"/"}function Eh(e,t,s,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yA(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function m1(e){let t=yA(e);return t.map((s,r)=>r===t.length-1?s.pathname:s.pathnameBase)}function rm(e,t,s,r=!1){let o;typeof e=="string"?o=ka(e):(o={...e},et(!o.pathname||!o.pathname.includes("?"),Eh("?","pathname","search",o)),et(!o.pathname||!o.pathname.includes("#"),Eh("#","pathname","hash",o)),et(!o.search||!o.search.includes("#"),Eh("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,d;if(u==null)d=s;else{let g=t.length-1;if(!r&&u.startsWith("..")){let v=u.split("/");for(;v[0]==="..";)v.shift(),g-=1;o.pathname=v.join("/")}d=g>=0?t[g]:"/"}let h=gA(o,d),p=u&&u!=="/"&&u.endsWith("/"),y=(l||u===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(p||y)&&(h.pathname+="/"),h}var cs=e=>e.join("/").replace(/\/\/+/g,"/"),vA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,wA=class{constructor(e,t,s,r=!1){this.status=e,this.statusText=t||"",this.internal=r,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function SA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function _A(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var g1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function y1(e,t){let s=e;
9if(typeof s!="string"||!mA.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let r=s,o=!1;if(g1)try{let l=new URL(window.location.href),u=s.startsWith("//")?new URL(l.protocol+s):new URL(s),d=Bs(u.pathname,t);u.origin===l.origin&&d!=null?s=d+u.search+u.hash:o=!0}catch{fs(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var v1=["POST","PUT","PATCH","DELETE"];new Set(v1);var TA=["GET",...v1];new Set(TA);var Ra=_.createContext(null);Ra.displayName="DataRouter";var Vu=_.createContext(null);Vu.displayName="DataRouterState";var b1=_.createContext(!1);function EA(){return _.useContext(b1)}var x1=_.createContext({isTransitioning:!1});x1.displayName="ViewTransition";var CA=_.createContext(new Map);CA.displayName="Fetchers";var AA=_.createContext(null);AA.displayName="Await";var jn=_.createContext(null);jn.displayName="Navigation";var dl=_.createContext(null);dl.displayName="Location";var Fs=_.createContext({outlet:null,matches:[],isDataRoute:!1});Fs.displayName="Route";var am=_.createContext(null);am.displayName="RouteError";var w1="REACT_ROUTER_ERROR",kA="REDIRECT",RA="ROUTE_ERROR_RESPONSE";function OA(e){if(e.startsWith(`${w1}:${kA}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function MA(e){if(e.startsWith(`${w1}:${RA}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new wA(t.status,t.statusText,t.data)}catch{}}function NA(e,{relative:t}={}){et(fl(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:r}=_.useContext(jn),{hash:o,pathname:l,search:u}=hl(e,{relative:t}),d=l;return s!=="/"&&(d=l==="/"?s:cs([s,l])),r.createHref({pathname:d,search:u,hash:o})}function fl(){return _.useContext(dl)!=null}function ms(){return et(fl(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(dl).location}var S1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _1(e){_.useContext(jn).static||_.useLayoutEffect(e)}function qu(){let{isDataRoute:e}=_.useContext(Fs);return e?FA():DA()}function DA(){et(fl(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Ra),{basename:t,navigator:s}=_.useContext(jn),{matches:r}=_.useContext(Fs),{pathname:o}=ms(),l=JSON.stringify(m1(r)),u=_.useRef(!1);return _1(()=>{u.current=!0}),_.useCallback((h,p={})=>
9{if(fs(u.current,S1),!u.current)return;if(typeof h=="number"){s.go(h);return}let y=rm(h,JSON.parse(l),o,p.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:cs([t,y.pathname])),(p.replace?s.replace:s.push)(y,p.state,p)},[t,s,l,o,e])}_.createContext(null);function hl(e,{relative:t}={}){let{matches:s}=_.useContext(Fs),{pathname:r}=ms(),o=JSON.stringify(m1(s));return _.useMemo(()=>rm(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function jA(e,t){return T1(e,t)}function T1(e,t,s){et(fl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=_.useContext(jn),{matches:o}=_.useContext(Fs),l=o[o.length-1],u=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",p=l&&l.route;{let C=p&&p.path||"";C1(d,!p||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
11Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let y=ms(),g;if(t){let C=typeof t=="string"?ka(t):t;et(h==="/"||C.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${C.pathname}" was given in the \`location\` prop.`),g=C}else g=y;let v=g.pathname||"/",x=v;if(h!=="/"){let C=h.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(C.length).join("/")}let S=f1(e,{pathname:x});fs(p||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),fs(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=VA(S&&S.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:cs([h,r.encodeLocation?r.encodeLocation(C.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?h:cs([h,r.encodeLocation?r.encodeLocation(C.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),o,s);return t&&E?_.createElement(dl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},E):E}function zA(){let e=HA(),t=SA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:l},"ErrorBoundary")," or"," ",_.createElement("code",{style:l},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),s?_.createElement("pre",{style:o},s):null,u)}var PA=_.createElement(zA,null),E1=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const s=MA(e.digest);s&&(e=s)}let t=e!==void 0?_.createElement(Fs.Provider,{value:this.props.routeContext},_.createElement(am.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(LA,{error:e},t):t}};E1.contextType=b1;var Ch=new WeakMap;function LA({children:e,error:t}){let{basename:s}=_.useContext(jn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=OA(t.digest);if(r){let o=Ch.get(t);if(o)throw o;let l=y1(r.location,s);if(g1&&!Ch.get(t))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Ch.set(t,u),u}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function UA({routeContext:e,match:t,children:s}){let r=_.useContext(Ra);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Fs.Provider,{value:e},s)}function VA(e,t=[],s){let r=s?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=r?.errors;if(l!=null){let y=o.findIndex(g=>g.route.id&&l?.[g.route.id]!==void 0);et(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,d=-1;if(s&&r){u=r.renderFallback;for(let y=0;y<o.length;y++){let g=o[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(d=y),g.route.id){let{loaderData:v,errors:x}
11=r,S=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||S){s.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let h=s?.onError,p=r&&h?(y,g)=>{h(y,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:_A(r.matches),errorInfo:g})}:void 0;return o.reduceRight((y,g,v)=>{let x,S=!1,E=null,C=null;r&&(x=l&&g.route.id?l[g.route.id]:void 0,E=g.route.errorElement||PA,u&&(d<0&&v===0?(C1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,C=null):d===v&&(S=!0,C=g.route.hydrateFallbackElement||null)));let A=t.concat(o.slice(0,v+1)),M=()=>{let k;return x?k=E:S?k=C:g.route.Component?k=_.createElement(g.route.Component,null):g.route.element?k=g.route.element:k=y,_.createElement(UA,{match:g,routeContext:{outlet:y,matches:A,isDataRoute:r!=null},children:k})};return r&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?_.createElement(E1,{location:r.location,revalidation:r.revalidation,component:E,error:x,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:p}):M()},null)}function om(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function qA(e){let t=_.useContext(Ra);return et(t,om(e)),t}function BA(e){let t=_.useContext(Vu);return et(t,om(e)),t}function IA(e){let t=_.useContext(Fs);return et(t,om(e)),t}function lm(e){let t=IA(e),s=t.matches[t.matches.length-1];return et(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function $A(){return lm("useRouteId")}function HA(){let e=_.useContext(am),t=BA("useRouteError"),s=lm("useRouteError");return e!==void 0?e:t.errors?.[s]}function FA(){let{router:e}=qA("useNavigate"),t=lm("useNavigate"),s=_.useRef(!1);return _1(()=>{s.current=!0}),_.useCallback(async(o,l={})=>{fs(s.current,S1),s.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var Tb={};function C1(e,t,s){!t&&!Tb[e]&&(Tb[e]=!0,fs(!1,s))}_.memo(QA);function QA({routes:e,future:t,state:s,isStatic:r,onError:o}){return T1(e,void 0,{state:s,isStatic:r,onError:o})}function Lo(e){et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ZA({basename:e="/",children:t=null,location:s,navigationType:r="POP",navigator:o,static:l=!1,unstable_useTransitions:u}){et(!fl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=_.useMemo(()=>({basename:d,navigator:o,static:l,unstable_useTransitions:u,future:{}}),[d,o,l,u]);typeof s=="string"&&(s=ka(s));let{pathname:p="/",search:y="",hash:g="",state:v=null,key:x="default",unstable_mask:S}=s,E=_.useMemo(()=>{let C=Bs(p,d);return C==null?null:{location:{pathname:C,search:y,hash:g,state:v,key:x,unstable_mask:S},navigationType:r}},[d,p,y,g,v,x,r,S]);return fs(E!=null,`<Router basename="${d}"> is not able to match the URL "${p}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:_.createElement(jn.Provider,{value:h},_.createElement(dl.Provider,{children:t,value:E}))}function GA({children:e,location:t}){return jA(cp(e),t)}function cp(e,t=[]){let s=[];return _.Children.forEach(e,(r,o)=>{if(!_.isValidElement(r))return;let l=[...t,o];if(r.type===_.Fragment){s.push.apply(s,cp(r.props.children,l));return}et(r.type===Lo,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),et(!r.props.index||!r.props.children,"An index route cannot have child routes.");let u={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,
11shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(u.children=cp(r.props.children,l)),s.push(u)}),s}var Kc="get",Xc="application/x-www-form-urlencoded";function Bu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function YA(e){return Bu(e)&&e.tagName.toLowerCase()==="button"}function KA(e){return Bu(e)&&e.tagName.toLowerCase()==="form"}function XA(e){return Bu(e)&&e.tagName.toLowerCase()==="input"}function WA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function JA(e,t){return e.button===0&&(!t||t==="_self")&&!WA(e)}var Dc=null;function ek(){if(Dc===null)try{new FormData(document.createElement("form"),0),Dc=!1}catch{Dc=!0}return Dc}var tk=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ah(e){return e!=null&&!tk.has(e)?(fs(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xc}"`),null):e}function nk(e,t){let s,r,o,l,u;if(KA(e)){let d=e.getAttribute("action");r=d?Bs(d,t):null,s=e.getAttribute("method")||Kc,o=Ah(e.getAttribute("enctype"))||Xc,l=new FormData(e)}else if(YA(e)||XA(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(r=h?Bs(h,t):null,s=e.getAttribute("formmethod")||d.getAttribute("method")||Kc,o=Ah(e.getAttribute("formenctype"))||Ah(d.getAttribute("enctype"))||Xc,l=new FormData(d,e),!ek()){let{name:p,type:y,value:g}=e;if(y==="image"){let v=p?`${p}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else p&&l.append(p,g)}}else{if(Bu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Kc,r=null,o=Xc,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:r,method:s.toLowerCase(),encType:o,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function cm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function A1(e,t,s,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&Bs(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function sk(e,t){if(e.id in t)return t[e.id];try{let s=await import(e.module);return t[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ik(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function rk(e,t,s){let r=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await sk(l,s);return u.links?u.links():[]}return[]}));return ck(r.flat(1).filter(ik).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Eb(e,t,s,r,o,l){let u=(h,p)=>s[p]?h.route.id!==s[p].route.id:!0,d=(h,p)=>s[p].pathname!==h.pathname||s[p].route.path?.endsWith("*")&&s[p].params["*"]!==h.params["*"];return l==="assets"?t.filter((h,p)=>u(h,p)||d(h,p)):l==="data"?t.filter((h,p)=>{let y=r.routes[h.route.id];if(!y||!y.hasLoader)return!1;if(u(h,p)||d(h,p))return!0;if(h.route.shouldRevalidate){let g=h.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function ak(e,t,{includeHydrateFallback:s}={}){return ok(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),s&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function ok(e){return[...new Set(e)]}function lk(e){let t={},s=Object.keys(e).sort();for(let r of s)t[r]=e[r];return t}function ck(e,t){let s=new Set;return new Set(t),e.reduce((r,o)=>{let l=JSON.stringify(lk(o));return s.has(l)||(s.add(l),r.push({key:l,link:o})),r},[])}function um(){let e=_.useContext(Ra);return cm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function uk(){let e=_.useContext(Vu);return cm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var dm=_.createContext(void 0);dm.displayName="FrameworkContext";function fm(){let e=_.useContext(dm);return cm(e,"You must render this element inside a <HydratedRouter> element"),e}function dk(e,t){let s=_.useContext(dm),[r,o]=_.useState(!1),[l,u]=_.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:p,onMouseLeave:y,onTouchStart:g}=t,v=_.useRef(null);_.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let E=A=>{A.forEach(M=>{u(M.isIntersecting)})},C=new IntersectionObserver(E,{threshold:.5});return v.current&&C.observe(v.current),()=>{C.disconnect()}}},[e]),_.useEffect(()=>{if(r){let E=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(E)}}},[r]);let x=()=>{o(!0)},S=()=>{o(!1),u(!1)};return s?e!=="intent"?[l,v,{}]:[l,v,{onFocus:jo(d,x),onBlur:jo(h,S),onMouseEnter:jo(p,x),onMouseLeave:jo(y,S),onTouchStart:jo(g,x)}]:[!1,v,{}]}function jo(e,t){return s=>{e&&e(s),s.defaultPrevented||t(s)}}function fk({page:e,...t}){let s=EA(),{router:r}=um(),o=_.useMemo(()=>f1(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?s?_.createElement(pk,{page:e,matches:o,...t}):_.createElement(mk,{page:e,matches:o,...t}):null}function hk(e){let{manifest:t,routeModules:s}=fm(),[r,o]=_.useState([]);return _.useEffect(()=>{let l=!1;return rk(e,t,s).then(u=>{l||o(u)}
11),()=>{l=!0}},[e,t,s]),r}function pk({page:e,matches:t,...s}){let r=ms(),{future:o}=fm(),{basename:l}=um(),u=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=A1(e,l,o.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,p=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?h=!0:p.push(y.route.id);return h&&p.length>0&&d.searchParams.set("_routes",p.join(",")),[d.pathname+d.search]},[l,o.unstable_trailingSlashAwareDataRequests,e,r,t]);return _.createElement(_.Fragment,null,u.map(d=>_.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...s})))}function mk({page:e,matches:t,...s}){let r=ms(),{future:o,manifest:l,routeModules:u}=fm(),{basename:d}=um(),{loaderData:h,matches:p}=uk(),y=_.useMemo(()=>Eb(e,t,p,l,r,"data"),[e,t,p,l,r]),g=_.useMemo(()=>Eb(e,t,p,l,r,"assets"),[e,t,p,l,r]),v=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let E=new Set,C=!1;if(t.forEach(M=>{let k=l.routes[M.route.id];!k||!k.hasLoader||(!y.some(D=>D.route.id===M.route.id)&&M.route.id in h&&u[M.route.id]?.shouldRevalidate||k.hasClientLoader?C=!0:E.add(M.route.id))}),E.size===0)return[];let A=A1(e,d,o.unstable_trailingSlashAwareDataRequests,"data");return C&&E.size>0&&A.searchParams.set("_routes",t.filter(M=>E.has(M.route.id)).map(M=>M.route.id).join(",")),[A.pathname+A.search]},[d,o.unstable_trailingSlashAwareDataRequests,h,r,l,y,t,e,u]),x=_.useMemo(()=>ak(g,l),[g,l]),S=hk(g);return _.createElement(_.Fragment,null,v.map(E=>_.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...s})),x.map(E=>_.createElement("link",{key:E,rel:"modulepreload",href:E,...s})),S.map(({key:E,link:C})=>_.createElement("link",{key:E,nonce:s.nonce,...C,crossOrigin:C.crossOrigin??s.crossOrigin})))}function gk(...e){return t=>{e.forEach(s=>{typeof s=="function"?s(t):s!=null&&(s.current=t)})}}var yk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{yk&&(window.__reactRouterVersion="7.14.0")}catch{}function vk({basename:e,children:t,unstable_useTransitions:s,window:r}){let o=_.useRef();o.current==null&&(o.current=WC({window:r,v5Compat:!0}));let l=o.current,[u,d]=_.useState({action:l.action,location:l.location}),h=_.useCallback(p=>{s===!1?d(p):_.startTransition(()=>d(p))},[s]);return _.useLayoutEffect(()=>l.listen(h),[l,h]),_.createElement(ZA,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l,unstable_useTransitions:s})}var k1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hm=_.forwardRef(function({onClick:t,discover:s="render",prefetch:r="none",relative:o,reloadDocument:l,replace:u,unstable_mask:d,state:h,target:p,to:y,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...S},E){let{basename:C,navigator:A,unstable_useTransitions:M}=_.useContext(jn),k=typeof y=="string"&&k1.test(y),D=y1(y,C);y=D.to;let P=NA(y,{relative:o}),B=ms(),I=null;if(d){let fe=rm(d,[],B.unstable_mask?B.unstable_mask.pathname:"/",!0);C!=="/"&&(fe.pathname=fe.pathname==="/"?C:cs([C,fe.pathname])),I=A.createHref(fe)}let[L,W,ee]=dk(r,S),re=Sk(y,{replace:u,unstable_mask:d,state:h,target:p,preventScrollReset:g,relative:o,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:M});function oe(fe){t&&t(fe),fe.defaultPrevented||re(fe)}let me=!(D.isExternal||l),he=_.createElement("a",{...S,...ee,href:(me?I:void 0)||D.absoluteURL||P,onClick:me?oe:t,ref:gk(E,W),target:p,"data-discover":!k&&s==="render"?"true":void 0});return L&&!k?_.createElement(_.Fragment,null,he,_.createElement(fk,{page:P})):he});hm.displayName="Link";var bk=_.forwardRef(function({"aria-current":t="page",caseSensitive:s=!1,className:r="",end:o=!1,style:l,to:u,viewTransition:d,children:h,...p},y){let g=hl(u,{relative:p.relative}),v=ms(),x=_.useContext(Vu),{navigator:S,basename:E}=_.useContext(jn),C=x!=null&&Ak(g)&&d===!0,A=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,M=v.pathname,k=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;s||(M=M.toLowerCase(),k=k?k.toLowerCase():null,A=A.toLowerCase()),k&&E&&(k=Bs(k,E)||k);const D=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let P=M===A||!o&&M.startsWith(A)&&M.charAt(D)==="/",B=k!=null&&(k===A||!o&&k.startsWith(A)&&k.charAt(A.length)==="/"),I={isActive:P,isPending:B,isTransitioning:C},L=P?t:void 0,W;typeof r=="function"?W=r(I):W=[r,P?"active":null,B?"pending":null,C?"transitioning":null].filter(
11Boolean).join(" ");let ee=typeof l=="function"?l(I):l;return _.createElement(hm,{...p,"aria-current":L,className:W,ref:y,style:ee,to:u,viewTransition:d},typeof h=="function"?h(I):h)});bk.displayName="NavLink";var xk=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:s,reloadDocument:r,replace:o,state:l,method:u=Kc,action:d,onSubmit:h,relative:p,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:v,...x},S)=>{let{unstable_useTransitions:E}=_.useContext(jn),C=Ek(),A=Ck(d,{relative:p}),M=u.toLowerCase()==="get"?"get":"post",k=typeof d=="string"&&k1.test(d),D=P=>{if(h&&h(P),P.defaultPrevented)return;P.preventDefault();let B=P.nativeEvent.submitter,I=B?.getAttribute("formmethod")||u,L=()=>C(B||P.currentTarget,{fetcherKey:t,method:I,navigate:s,replace:o,state:l,relative:p,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:v});E&&s!==!1?_.startTransition(()=>L()):L()};return _.createElement("form",{ref:S,method:M,action:A,onSubmit:r?h:D,...x,"data-discover":!k&&e==="render"?"true":void 0})});xk.displayName="Form";function wk(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function R1(e){let t=_.useContext(Ra);return et(t,wk(e)),t}function Sk(e,{target:t,replace:s,unstable_mask:r,state:o,preventScrollReset:l,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p}={}){let y=qu(),g=ms(),v=hl(e,{relative:u});return _.useCallback(x=>{if(JA(x,t)){x.preventDefault();let S=s!==void 0?s:Yo(g)===Yo(v),E=()=>y(e,{replace:S,unstable_mask:r,state:o,preventScrollReset:l,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:h});p?_.startTransition(()=>E()):E()}},[g,y,v,s,r,o,t,e,l,u,d,h,p])}var _k=0,Tk=()=>`__${String(++_k)}__`;function Ek(){let{router:e}=R1("useSubmit"),{basename:t}=_.useContext(jn),s=$A(),r=e.fetch,o=e.navigate;return _.useCallback(async(l,u={})=>{let{action:d,method:h,encType:p,formData:y,body:g}=nk(l,t);if(u.navigate===!1){let v=u.fetcherKey||Tk();await r(v,s,u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||h,formEncType:u.encType||p,flushSync:u.flushSync})}else await o(u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||h,formEncType:u.encType||p,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[r,o,t,s])}function Ck(e,{relative:t}={}){let{basename:s}=_.useContext(jn),r=_.useContext(Fs);et(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),l={...hl(e||".",{relative:t})},u=ms();if(e==null){l.search=u.search;let d=new URLSearchParams(l.search),h=d.getAll("index");if(h.some(y=>y==="")){d.delete("index"),h.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();l.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(l.pathname=l.pathname==="/"?s:cs([s,l.pathname])),Yo(l)}function Ak(e,{relative:t}={}){let s=_.useContext(x1);et(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=R1("useViewTransitionState"),o=hl(e,{relative:t});if(!s.isTransitioning)return!1;let l=Bs(s.currentLocation.pathname,r)||s.currentLocation.pathname,u=Bs(s.nextLocation.pathname,r)||s.nextLocation.pathname;return fu(o.pathname,u)!=null||fu(o.pathname,l)!=null}var pm=d1();const kk=u1(pm);let Uo=class extends Error{};Uo.prototype.name="InvalidTokenError";function Rk(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,s)=>{let r=s.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Ok(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Rk(t)}catch{return atob(t)}}function Mk(e,t){if(typeof e!="string")throw new Uo("Invalid token specified: must be a string");t||(t={});const s=t.header===!0?0:1,r=e.split(".")[s];if(typeof r!="string")throw new Uo(`Invalid token specified: missing part #${s+1}`);let o;try{o=Ok(r)}
11catch(l){throw new Uo(`Invalid token specified: invalid base64 for part #${s+1} (${l.message})`)}try{return JSON.parse(o)}catch(l){throw new Uo(`Invalid token specified: invalid json for part #${s+1} (${l.message})`)}}var Nk={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},ss,is,hu=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(hu||{});(e=>{function t(){ss=3,is=Nk}e.reset=t;function s(o){if(!(0<=o&&o<=4))throw new Error("Invalid log level");ss=o}e.setLevel=s;function r(o){is=o}e.setLogger=r})(hu||(hu={}));var De=class ns{constructor(t){this._name=t}debug(...t){ss>=4&&is.debug(ns._format(this._name,this._method),...t)}info(...t){ss>=3&&is.info(ns._format(this._name,this._method),...t)}warn(...t){ss>=2&&is.warn(ns._format(this._name,this._method),...t)}error(...t){ss>=1&&is.error(ns._format(this._name,this._method),...t)}throw(t){throw this.error(t),t}create(t){const s=Object.create(this);return s._method=t,s.debug("begin"),s}static createStatic(t,s){const r=new ns(`${t}.${s}`);return r.debug("begin"),r}static _format(t,s){const r=`[${t}]`;return s?`${r} ${s}:`:r}static debug(t,...s){ss>=4&&is.debug(ns._format(t),...s)}static info(t,...s){ss>=3&&is.info(ns._format(t),...s)}static warn(t,...s){ss>=2&&is.warn(ns._format(t),...s)}static error(t,...s){ss>=1&&is.error(ns._format(t),...s)}};hu.reset();var Ko=class{static decode(e){try{return Mk(e)}catch(t){throw De.error("JwtUtils.decode",t),t}}static async generateSignedJwt(e,t,s){const r=pt.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),o=pt.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))),l=`${r}.${o}`,u=await window.crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},s,new TextEncoder().encode(l)),d=pt.encodeBase64Url(new Uint8Array(u));return`${l}.${d}`}static async generateSignedJwtWithHmac(e,t,s){const r=pt.encodeBase64Url(new TextEncoder().encode(JSON.stringify(e))),o=pt.encodeBase64Url(new TextEncoder().encode(JSON.stringify(t))),l=`${r}.${o}`,u=await window.crypto.subtle.sign("HMAC",s,new TextEncoder().encode(l)),d=pt.encodeBase64Url(new Uint8Array(u));return`${l}.${d}`}},Dk="10000000-1000-4000-8000-100000000000",up=e=>btoa([...new Uint8Array(e)].map(t=>String.fromCharCode(t)).join("")),O1=class In{static _randomWord(){const t=new Uint32Array(1);return crypto.getRandomValues(t),t[0]}static generateUUIDv4(){return Dk.replace(/[018]/g,s=>(+s^In._randomWord()&15>>+s/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return In.generateUUIDv4()+In.generateUUIDv4()+In.generateUUIDv4()}static async generateCodeChallenge(t){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{const r=new TextEncoder().encode(t),o=await crypto.subtle.digest("SHA-256",r);return up(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(s){throw De.error("CryptoUtils.generateCodeChallenge",s),s}}static generateBasicAuth(t,s){const o=new TextEncoder().encode([t,s].join(":"));return up(o)}static async hash(t,s){const r=new TextEncoder().encode(s),o=await crypto.subtle.digest(t,r);return new Uint8Array(o)}static async customCalculateJwkThumbprint(t){let s;switch(t.kty){case"RSA":s={e:t.e,kty:t.kty,n:t.n};break;case"EC":s={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":s={crv:t.crv,kty:t.kty,x:t.x};break;case"oct":s={crv:t.k,kty:t.kty};break;default:throw new Error("Unknown jwk type")}const r=await In.hash("SHA-256",JSON.stringify(s));return In.encodeBase64Url(r)}static async generateDPoPProof({url:t,accessToken:s,httpMethod:r,keyPair:o,nonce:l}){let u,d;const h={jti:window.crypto.randomUUID(),htm:r??"GET",htu:t,iat:Math.floor(Date.now()/1e3)};s&&(u=await In.hash("SHA-256",s),d=In.encodeBase64Url(u),h.ath=d),l&&(h.nonce=l);try{const p=await crypto.subtle.exportKey("jwk",o.publicKey),y={alg:"ES256",typ:"dpop+jwt",jwk:{crv:p.crv,kty:p.kty,x:p.x,y:p.y}};return await Ko.generateSignedJwt(y,h,o.privateKey)}catch(p){throw p instanceof TypeError?new Error(`Error exporting dpop public key: ${p.message}`):p}}static async generateDPoPJkt(t){try{const s=await crypto.subtle.exportKey("jwk",t.publicKey);
11return await In.customCalculateJwkThumbprint(s)}catch(s){throw s instanceof TypeError?new Error(`Could not retrieve dpop keys from storage: ${s.message}`):s}}static async generateDPoPKeys(){return await window.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"])}static async generateClientAssertionJwt(t,s,r,o="HS256"){const l=Math.floor(Date.now()/1e3),u={alg:o,typ:"JWT"},d={iss:t,sub:t,aud:r,jti:In.generateUUIDv4(),exp:l+300,iat:l},p={HS256:"SHA-256",HS384:"SHA-384",HS512:"SHA-512"}[o];if(!p)throw new Error(`Unsupported algorithm: ${o}. Supported algorithms are: HS256, HS384, HS512`);const y=new TextEncoder,g=await crypto.subtle.importKey("raw",y.encode(s),{name:"HMAC",hash:p},!1,["sign"]);return await Ko.generateSignedJwtWithHmac(u,d,g)}};O1.encodeBase64Url=e=>up(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_");var pt=O1,_i=class{constructor(e){this._name=e,this._callbacks=[],this._logger=new De(`Event('${this._name}')`)}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)await t(...e)}},Cb=class{static center({...e}){var t,s,r;return e.width==null&&(e.width=(t=[800,720,600,480].find(o=>o<=window.outerWidth/1.618))!=null?t:360),(s=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((r=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,s])=>`${t}=${typeof s!="boolean"?s:s?"yes":"no"}`).join(",")}},Is=class Wc extends _i{constructor(){super(...arguments),this._logger=new De(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const t=this._expiration-Wc.getEpochTime();this._logger.debug("timer completes in",t),this._expiration<=Wc.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){const s=this._logger.create("init");t=Math.max(Math.floor(t),1);const r=Wc.getEpochTime()+t;if(this.expiration===r&&this._timerHandle){s.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),s.debug("using duration",t),this._expiration=r;const o=Math.min(t,5);this._timerHandle=setInterval(this._callback,o*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},dp=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const r=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];
11return new URLSearchParams(r.slice(1))}},xa=";",dr=class extends Error{constructor(e,t){var s,r,o;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw De.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(s=e.error_description)!=null?s:null,this.error_uri=(r=e.error_uri)!=null?r:null,this.state=e.userState,this.session_state=(o=e.session_state)!=null?o:null,this.url_state=e.url_state}},mm=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},jk=class{constructor(e){this._logger=new De("AccessTokenEvents"),this._expiringTimer=new Is("Access token expiring"),this._expiredTimer=new Is("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}async load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const s=e.expires_in;if(t.debug("access token present, remaining duration:",s),s>0){let o=s-this._expiringNotificationTimeInSeconds;o<=0&&(o=1),t.debug("registering expiring timer, raising in",o,"seconds"),this._expiringTimer.init(o)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const r=s+1;t.debug("registering expired timer, raising in",r,"seconds"),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}async unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},zk=class{constructor(e,t,s,r,o){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=o,this._logger=new De("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=u=>{u.origin===this._frame_origin&&u.source===this._frame.contentWindow&&(u.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):u.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(u.data+" message from check session op iframe"))};const l=new URL(s);this._frame_origin=l.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=l.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},M1=class{constructor(){this._logger=new De("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},fp=class extends Error{constructor(e,t){super(t),this.name="ErrorDPoPNonce",this.nonce=e}},gm=class{constructor(e=[],t=null,s={}){this._jwtHandler=t,this._extraHeaders=s,this._logger=new De("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:s,...r}=t;if(!s)return await fetch(e,r);const o=new AbortController,l=setTimeout(()=>
11o.abort(),s*1e3);try{return await fetch(e,{...t,signal:o.signal})}catch(u){throw u instanceof DOMException&&u.name==="AbortError"?new mm("Network timed out"):u}finally{clearTimeout(l)}}async getJson(e,{token:t,credentials:s,timeoutInSeconds:r}={}){const o=this._logger.create("getJson"),l={Accept:this._contentTypes.join(", ")};t&&(o.debug("token passed, setting Authorization header"),l.Authorization="Bearer "+t),this._appendExtraHeaders(l);let u;try{o.debug("url:",e),u=await this.fetchWithTimeout(e,{method:"GET",headers:l,timeoutInSeconds:r,credentials:s})}catch(p){throw o.error("Network Error"),p}o.debug("HTTP response received, status",u.status);const d=u.headers.get("Content-Type");if(d&&!this._contentTypes.find(p=>d.startsWith(p))&&o.throw(new Error(`Invalid response Content-Type: ${d??"undefined"}, from URL: ${e}`)),u.ok&&this._jwtHandler&&d?.startsWith("application/jwt"))return await this._jwtHandler(await u.text());let h;try{h=await u.json()}catch(p){throw o.error("Error parsing JSON response",p),u.ok?p:new Error(`${u.statusText} (${u.status})`)}if(!u.ok)throw o.error("Error from server:",h),h.error?new dr(h):new Error(`${u.statusText} (${u.status}): ${JSON.stringify(h)}`);return h}async postForm(e,{body:t,basicAuth:s,timeoutInSeconds:r,initCredentials:o,extraHeaders:l}){const u=this._logger.create("postForm"),d={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded",...l};s!==void 0&&(d.Authorization="Basic "+s),this._appendExtraHeaders(d);let h;try{u.debug("url:",e),h=await this.fetchWithTimeout(e,{method:"POST",headers:d,body:t,timeoutInSeconds:r,credentials:o})}catch(v){throw u.error("Network error"),v}u.debug("HTTP response received, status",h.status);const p=h.headers.get("Content-Type");if(p&&!this._contentTypes.find(v=>p.startsWith(v)))throw new Error(`Invalid response Content-Type: ${p??"undefined"}, from URL: ${e}`);const y=await h.text();let g={};if(y)try{g=JSON.parse(y)}catch(v){throw u.error("Error parsing JSON response",v),h.ok?v:new Error(`${h.statusText} (${h.status})`)}if(!h.ok){if(u.error("Error from server:",g),h.headers.has("dpop-nonce")){const v=h.headers.get("dpop-nonce");throw new fp(v,`${JSON.stringify(g)}`)}throw g.error?new dr(g,t):new Error(`${h.statusText} (${h.status}): ${JSON.stringify(g)}`)}return g}_appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),s=Object.keys(this._extraHeaders),r=["accept","content-type"],o=["authorization"];s.length!==0&&s.forEach(l=>{if(r.includes(l.toLocaleLowerCase())){t.warn("Protected header could not be set",l,r);return}if(o.includes(l.toLocaleLowerCase())&&Object.keys(e).includes(l)){t.warn("Header could not be overridden",l,o);return}const u=typeof this._extraHeaders[l]=="function"?this._extraHeaders[l]():this._extraHeaders[l];u&&u!==""&&(e[l]=u)})}},Pk=class{constructor(e){this._settings=e,this._logger=new De("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new gm(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},t,this._settings.metadataSeed),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const s=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(s.debug("resolved"),r[e]===void 0){if(t===!0){s.warn("Metadata does not contain optional property");return}s.throw(new Error("Metadata does not contain property "+e))}return r[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const s=await this._jsonService.getJson(t,{timeoutInSeconds:this._settings.requestTimeoutInSeconds});if(e.debug("got key set",s),!Array.isArray(s.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=s.keys,this._signingKeys}},ym=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new De("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let s=0;s<e;s++){const r=await this._store.key(s);r&&r.indexOf(this._prefix)===0&&t.push(r.substr(this._prefix.length))}return t}},Lk="code",Uk="openid",Vk="client_secret_post",qk=900,hp=class{constructor({authority:e,metadataUrl:t,metadata:s,signingKeys:r,metadataSeed:o,client_id:l,client_secret:u,response_type:d=Lk,scope:h=Uk,redirect_uri:p,post_logout_redirect_uri:y,client_authentication:g=Vk,token_endpoint_auth_signing_alg:v="HS256",prompt:x,display:S,max_age:E,ui_locales:C,acr_values:A,resource:M,response_mode:k,filterProtocolClaims:D=!0,loadUserInfo:P=!1,requestTimeoutInSeconds:B,staleStateAgeInSeconds:I=qk,mergeClaimsStrategy:L={array:"replace"},disablePKCE:W=!1,stateStore:ee,revokeTokenAdditionalContentTypes:re,fetchRequestCredentials:oe,refreshTokenAllowedScope:me,extraQueryParams:he={},extraTokenParams:fe={},extraHeaders:j={},dpop:F,omitScopeWhenRequesting:G=!1}){var ie;if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=s,this.metadataSeed=o,this.signingKeys=r,this.client_id=l,this.client_secret=u,this.response_type=d,this.scope=h,this.redirect_uri=p,this.post_logout_redirect_uri=y,this.client_authentication=g,this.token_endpoint_auth_signing_alg=v,this.prompt=x,this.display=S,this.max_age=E,this.ui_locales=C,this.acr_values=A,this.resource=M,this.response_mode=k,this.filterProtocolClaims=D??!0,this.loadUserInfo=!!P,this.staleStateAgeInSeconds=I,this.mergeClaimsStrategy=L,this.omitScopeWhenRequesting=G,this.disablePKCE=!!W,this.revokeTokenAdditionalContentTypes=re,this.fetchRequestCredentials=oe||"same-origin",this.requestTimeoutInSeconds=B,ee)this.stateStore=ee;else{const X=typeof window<"u"?window.localStorage:new M1;this.stateStore=new ym({store:X})}if(this.refreshTokenAllowedScope=me,this.extraQueryParams=he,this.extraTokenParams=fe,this.extraHeaders=j,this.dpop=F,this.dpop&&!((ie=this.dpop)!=null&&ie.store))throw new Error("A DPoPStore is required when dpop is enabled")}},Bk=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new De("UserInfoService"),this._getClaimsFromJwt=async s=>{const r=this._logger.create("_getClaimsFromJwt");try{const o=Ko.decode(s);return r.debug("JWT decoding successful"),o}catch(o){throw r.error("Error parsing JWT response"),o}},this._jsonService=new gm(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const s=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",s);const r=await this._jsonService.getJson(s,{token:e,credentials:this._settings.fetchRequestCredentials,timeoutInSeconds:this._settings.requestTimeoutInSeconds});return t.debug("got claims",r),r}},N1=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new De("TokenClient"),this._jsonService=new gm(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:s=this._settings.client_id,client_secret:r=this._settings.client_secret,extraHeaders:o,...l}){const u=this._logger.create("exchangeCode");s||u.throw(new Error("A client_id is required")),t||u.throw(new Error("A redirect_uri is required")),l.code||u.throw(new Error("A code is required"));const d=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[g,v]of Object.entries(l))v!=null&&d.set(g,v);if((this._settings.client_authentication==="client_secret_basic"||this._settings.client_authentication==="client_secret_jwt")&&r==null)throw u.throw(new Error("A client_secret is required")),null;let h;const p=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case"client_secret_basic":h=pt.generateBasicAuth(s,r);break;case"client_secret_post":d.append("client_id",s),r&&d.append("client_secret",r);break;case"client_secret_jwt":{const g=await pt.generateClientAssertionJwt(s,r,p,this._settings.token_endpoint_auth_signing_alg);d.append("client_id",s),d.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),d.append("client_assertion",g);break}}u.debug("got token endpoint");const y=await this._jsonService.postForm(p,{body:d,basicAuth:h,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:o});return u.debug("got response"),y}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,scope:r=this._settings.scope,...o}){const l=this._logger.create("exchangeCredentials");t||l.throw(new Error("A client_id is required"));const u=new URLSearchParams({grant_type:e});this._settings.omitScopeWhenRequesting||u.set("scope",r);for(const[y,g]of Object.entries(o))g!=null&&u.set(y,g);if((this._settings.client_authentication==="client_secret_basic"||this._settings.client_authentication==="client_secret_jwt")&&s==null)throw l.throw(new Error("A client_secret is required")),null;let d;const h=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case"client_secret_basic":d=pt.generateBasicAuth(t,s);break;case"client_secret_post":u.append("client_id",t),s&&u.append("client_secret",s);break;case"client_secret_jwt":{const y=await pt.generateClientAssertionJwt(t,s,h,this._settings.token_endpoint_auth_signing_alg);u.append("client_id",t),u.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),u.append("client_assertion",y);break}}l.debug("got token endpoint");const p=await this._jsonService.postForm(h,{body:u,basicAuth:d,timeoutInSeconds:this._settings.requestTimeoutInSeconds,initCredentials:this._settings.fetchRequestCredentials});return l.debug("got response"),p}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,timeoutInSeconds:r,extraHeaders:o,...l}){const u=this._logger.create("exchangeRefreshToken");t||u.throw(new Error("A client_id is required")),l.refresh_token||u.throw(new Error("A refresh_token is required"));const d=new URLSearchParams({grant_type:e});for(const[g,v]of Object.entries(l))Array.isArray(v)?v.forEach(x=>d.append(g,x)):v!=null&&d.set(g,v);if((this._settings.client_authentication==="client_secret_basic"||this._settings.client_authentication==="client_secret_jwt")&&s==null)throw u.throw(new Error("A client_secret is required")),null;let h;const p=await this._metadataService.getTokenEndpoint(!1);switch(this._settings.client_authentication){case"client_secret_basic":h=pt.generateBasicAuth(t,s);break;case"client_secret_post":d.append("client_id",t),s&&d.append("client_secret",s);break;case"client_secret_jwt":{const g=await pt.generateClientAssertionJwt(t,s,p,this._settings.token_endpoint_auth_signing_alg);d.append("client_id",t),d.append("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),d.append("client_assertion",g);break}}u.debug("got token endpoint");const y=await this._jsonService.postForm(p,{body:d,basicAuth:h,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials,extraHeaders:o});return u.debug("got response"),y}async revoke(e){var t;const s=this._logger.create("revoke");e.token||s.throw(new Error("A token is required"));const r=await this._metadataService.getRevocationEndpoint(!1);s.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const o=new URLSearchParams;for(const[l,u]of Object.entries(e))u!=null&&o.set(l,u);o.set("client_id",this._settings.client_id),this._settings.client_secret&&o.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(r,{body:o,timeoutInSeconds:this._settings.requestTimeoutInSeconds}),s.debug("got response")}},Ik=class{constructor(e,t,s){this._settings=e,this._metadataService=t,this._claimsService=s,this._logger=new De("ResponseValidator"),this._userInfoService=new Bk(this._settings,this._metadataService),this._tokenClient=new N1(this._settings,this._metadataService)}async validateSigninResponse(e,t,s){const r=this._logger.create("validateSigninResponse");this._processSigninState(e,t),r.debug("state processed"),await this._processCode(e,t,s),r.debug("code processed"),e.isOpenId&&this._val
11idateIdTokenAttributes(e,"",t.nonce),r.debug("tokens validated"),await this._processClaims(e,t?.skipUserInfo,e.isOpenId),r.debug("claims processed")}async validateCredentialsResponse(e,t){const s=this._logger.create("validateCredentialsResponse"),r=e.isOpenId&&!!e.id_token;r&&this._validateIdTokenAttributes(e),s.debug("tokens validated"),await this._processClaims(e,t,r),s.debug("claims processed")}async validateRefreshResponse(e,t){var s,r;const o=this._logger.create("validateRefreshResponse");e.userState=t.data,(s=e.session_state)!=null||(e.session_state=t.session_state),(r=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),o.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const l=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,l),o.debug("claims processed")}validateSignoutResponse(e,t){const s=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&s.throw(new Error("State does not match")),s.debug("state validated"),e.userState=t.data,e.error)throw s.warn("Response was error",e.error),new dr(e)}_processSigninState(e,t){var s;const r=this._logger.create("_processSigninState");if(t.id!==e.state&&r.throw(new Error("State does not match")),t.client_id||r.throw(new Error("No client_id on state")),t.authority||r.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&r.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&r.throw(new Error("client_id mismatch on settings vs. signin state")),r.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(s=e.scope)!=null||(e.scope=t.scope),e.error)throw r.warn("Response was error",e.error),new dr(e);t.code_verifier&&!e.code&&r.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,s=!0){const r=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug("not loading user info");return}r.debug("loading user info");const o=await this._userInfoService.getClaims(e.access_token);r.debug("user info claims received from user info endpoint"),s&&o.sub!==e.profile.sub&&r.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(o)),r.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t,s){const r=this._logger.create("_processCode");if(e.code){r.debug("Validating code");const o=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,extraHeaders:s,...t.extraTokenParams});Object.assign(e,o)}else r.debug("No code to process")}_validateIdTokenAttributes(e,t,s){var r;const o=this._logger.create("_validateIdTokenAttributes");o.debug("decoding ID Token JWT");const l=Ko.decode((r=e.id_token)!=null?r:"");if(l.sub||o.throw(new Error("ID Token is missing a subject claim")),s&&l.nonce!==s&&o.throw(new Error("nonce in id_token does not match nonce in client storage")),t){const u=Ko.decode(t);l.sub!==u.sub&&o.throw(new Error("sub in id_token does not match current sub")),l.auth_time&&l.auth_time!==u.auth_time&&o.throw(new Error("auth_time in id_token does not match original auth_time")),l.azp&&l.azp!==u.azp&&o.throw(new Error("azp in id_token does not match original azp")),!l.azp&&u.azp&&o.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=l}},pu=class pp{constructor(t){this.id=t.id||pt.generateUUIDv4(),this.data=t.data,t.created&&t.created>0?this.created=t.created:this.created=Is.getEpochTime(),this.request_type=t.request_type,this.url_state=t.url_state}toStorageString(){return new De("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return De.createStatic("State","fromStorageString"),Promise.resolve(new pp(JSON.parse(t)))}static async clearStaleState(t,s){const r=De.createStatic("State","clearStaleState"),o=Is.getEpochTime()-s,l=await t.getAllKeys();r.debug("got keys",l);for(let u=0;u<l.length;u++){const d=l[u],h=await t.get(d);let p=!1;
11if(h)try{const y=await pp.fromStorageString(h);r.debug("got item from key:",d,y.created),y.created<=o&&(p=!0)}catch(y){r.error("Error parsing state for key:",d,y),p=!0}else r.debug("no item in storage for key:",d),p=!0;p&&(r.debug("removed item for key:",d),t.remove(d))}}},D1=class mp extends pu{constructor(t){super(t),this.code_verifier=t.code_verifier,this.code_challenge=t.code_challenge,this.authority=t.authority,this.client_id=t.client_id,this.redirect_uri=t.redirect_uri,this.scope=t.scope,this.client_secret=t.client_secret,this.extraTokenParams=t.extraTokenParams,this.response_mode=t.response_mode,this.skipUserInfo=t.skipUserInfo,this.nonce=t.nonce}static async create(t){const s=t.code_verifier===!0?pt.generateCodeVerifier():t.code_verifier||void 0,r=s?await pt.generateCodeChallenge(s):void 0;return new mp({...t,code_verifier:s,code_challenge:r})}toStorageString(){return new De("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo,nonce:this.nonce})}static fromStorageString(t){De.createStatic("SigninState","fromStorageString");const s=JSON.parse(t);return mp.create(s)}},j1=class z1{constructor(t){this.url=t.url,this.state=t.state}static async create({url:t,authority:s,client_id:r,redirect_uri:o,response_type:l,scope:u,state_data:d,response_mode:h,request_type:p,client_secret:y,nonce:g,url_state:v,resource:x,skipUserInfo:S,extraQueryParams:E,extraTokenParams:C,disablePKCE:A,dpopJkt:M,omitScopeWhenRequesting:k,...D}){if(!t)throw this._logger.error("create: No url passed"),new Error("url");if(!r)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!o)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!l)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!u)throw this._logger.error("create: No scope passed"),new Error("scope");if(!s)throw this._logger.error("create: No authority passed"),new Error("authority");const P=await D1.create({data:d,request_type:p,url_state:v,code_verifier:!A,client_id:r,authority:s,redirect_uri:o,response_mode:h,client_secret:y,scope:u,extraTokenParams:C,skipUserInfo:S,nonce:g}),B=new URL(t);B.searchParams.append("client_id",r),B.searchParams.append("redirect_uri",o),B.searchParams.append("response_type",l),k||B.searchParams.append("scope",u),g&&B.searchParams.append("nonce",g),M&&B.searchParams.append("dpop_jkt",M);let I=P.id;v&&(I=`${I}${xa}${v}`),B.searchParams.append("state",I),P.code_challenge&&(B.searchParams.append("code_challenge",P.code_challenge),B.searchParams.append("code_challenge_method","S256")),x&&(Array.isArray(x)?x:[x]).forEach(W=>B.searchParams.append("resource",W));for(const[L,W]of Object.entries({response_mode:h,...D,...E}))W!=null&&B.searchParams.append(L,W.toString());return new z1({url:B.href,state:P})}};j1._logger=new De("SigninRequest");var $k=j1,Hk="openid",kh=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(xa);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(xa))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Is.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+Is.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(Hk))||!!this.id_token}},Fk=class{constructor({url:e,state_data:t,id_token_hint:s,post_logout_redirect_uri:r,extraQueryParams:o,request_type:l,client_id:u,url_state:d}){if(this._logger=new De("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const h=new URL(e);if(s&&h.searchParams.append("id_token_hint",s),u&&h.searchParams.append("client_id",u),r&&(h.searchParams.append("post_logout_redirect_uri",r),t||d)){this.state=new pu({data:t,request_type:l,url_state:d});let p=this.state.id;d&&(p=`${p}${xa}${d}`),h.searchParams.append("state",p)}for(const[p,y]of Object.entries({...o}))y!=null&&h.searchParams.append(p,y.toString());this.url=h.href}},Qk=class{constructor(e){if(this.state=e.get("state"),this.state){const t=decodeURIComponent(this.state).split(xa);this.state=t[0],t.length>
111&&(this.url_state=t.slice(1).join(xa))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},Zk=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],Gk=["sub","iss","aud","exp","iat"],Yk=class{constructor(e){this._settings=e,this._logger=new De("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let s;Array.isArray(this._settings.filterProtocolClaims)?s=this._settings.filterProtocolClaims:s=Zk;for(const r of s)Gk.includes(r)||delete t[r]}return t}mergeClaims(e,t){const s={...e};for(const[r,o]of Object.entries(t))if(s[r]!==o)if(Array.isArray(s[r])||Array.isArray(o))if(this._settings.mergeClaimsStrategy.array=="replace")s[r]=o;else{const l=Array.isArray(s[r])?s[r]:[s[r]];for(const u of Array.isArray(o)?o:[o])l.includes(u)||l.push(u);s[r]=l}else typeof s[r]=="object"&&typeof o=="object"?s[r]=this.mergeClaims(s[r],o):s[r]=o;return s}},P1=class{constructor(e,t){this.keys=e,this.nonce=t}},Kk=class{constructor(e,t){this._logger=new De("OidcClient"),this.settings=e instanceof hp?e:new hp(e),this.metadataService=t??new Pk(this.settings),this._claimsService=new Yk(this.settings),this._validator=new Ik(this.settings,this.metadataService,this._claimsService),this._tokenClient=new N1(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:s,request_type:r,id_token_hint:o,login_hint:l,skipUserInfo:u,nonce:d,url_state:h,response_type:p=this.settings.response_type,scope:y=this.settings.scope,redirect_uri:g=this.settings.redirect_uri,prompt:v=this.settings.prompt,display:x=this.settings.display,max_age:S=this.settings.max_age,ui_locales:E=this.settings.ui_locales,acr_values:C=this.settings.acr_values,resource:A=this.settings.resource,response_mode:M=this.settings.response_mode,extraQueryParams:k=this.settings.extraQueryParams,extraTokenParams:D=this.settings.extraTokenParams,dpopJkt:P,omitScopeWhenRequesting:B=this.settings.omitScopeWhenRequesting}){const I=this._logger.create("createSigninRequest");if(p!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const L=await this.metadataService.getAuthorizationEndpoint();I.debug("Received authorization endpoint",L);const W=await $k.create({url:L,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:g,response_type:p,scope:y,state_data:e,url_state:h,prompt:v,display:x,max_age:S,ui_locales:E,id_token_hint:o,login_hint:l,acr_values:C,dpopJkt:P,resource:A,request:t,request_uri:s,extraQueryParams:k,extraTokenParams:D,request_type:r,response_mode:M,client_secret:this.settings.client_secret,skipUserInfo:u,nonce:d,disablePKCE:this.settings.disablePKCE,omitScopeWhenRequesting:B});await this.clearStaleState();const ee=W.state;return await this.settings.stateStore.set(ee.id,ee.toStorageString()),W}async readSigninResponseState(e,t=!1){const s=this._logger.create("readSigninResponseState"),r=new kh(dp.readParams(e,this.settings.response_mode));if(!r.state)throw s.throw(new Error("No state in response")),null;const o=await this.settings.stateStore[t?"remove":"get"](r.state);if(!o)throw s.throw(new Error("No matching state found in storage")),null;return{state:await D1.fromStorageString(o),response:r}}async processSigninResponse(e,t,s=!0){const r=this._logger.create("processSigninResponse"),{state:o,response:l}=await this.readSigninResponseState(e,s);if(r.debug("received state from storage; validating response"),this.settings.dpop&&this.settings.dpop.store){const u=await this.getDpopProof(this.settings.dpop.store);t={...t,DPoP:u}}try{await this._validator.validateSigninResponse(l,o,t)}catch(u){if(u instanceof fp&&this.settings.dpop){const d=await this.getDpopProof(this.settings.dpop.store,u.nonce);t.DPoP=d,await this._validator.validateSigninResponse(l,o,t)}else throw u}return l}async getDpopProof(e,t){let s,r;return(await e.getAllKeys()).includes(this.settings.client_id)?(r=await e.get(this.settings.client_id),r.nonce!==t&&t&&(r.nonce=t,await e.set(this.settings.client_id,r))):(s=await pt.generateDPoPKeys(),r=new P1(s,t),await e.set(this.settings.client_id,r)),await pt.generateDPoPProof({url:await this.metadataService.getTokenEndpoint(!1),httpMethod:"POST",keyPair:r.keys,nonce:r.nonce})}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s=!1,extraTokenParams:r={}}){const o=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),l=new kh(new URLSearchParams);
11return Object.assign(l,o),await this._validator.validateCredentialsResponse(l,s),l}async useRefreshToken({state:e,redirect_uri:t,resource:s,timeoutInSeconds:r,extraHeaders:o,extraTokenParams:l}){var u;const d=this._logger.create("useRefreshToken");let h;if(this.settings.refreshTokenAllowedScope===void 0)h=e.scope;else{const g=this.settings.refreshTokenAllowedScope.split(" ");h=(((u=e.scope)==null?void 0:u.split(" "))||[]).filter(x=>g.includes(x)).join(" ")}if(this.settings.dpop&&this.settings.dpop.store){const g=await this.getDpopProof(this.settings.dpop.store);o={...o,DPoP:g}}let p;try{p=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:h,redirect_uri:t,resource:s,timeoutInSeconds:r,extraHeaders:o,...l})}catch(g){if(g instanceof fp&&this.settings.dpop)o.DPoP=await this.getDpopProof(this.settings.dpop.store,g.nonce),p=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:h,redirect_uri:t,resource:s,timeoutInSeconds:r,extraHeaders:o,...l});else throw g}const y=new kh(new URLSearchParams);return Object.assign(y,p),d.debug("validating response",y),await this._validator.validateRefreshResponse(y,{...e,scope:h}),y}async createSignoutRequest({state:e,id_token_hint:t,client_id:s,request_type:r,url_state:o,post_logout_redirect_uri:l=this.settings.post_logout_redirect_uri,extraQueryParams:u=this.settings.extraQueryParams}={}){const d=this._logger.create("createSignoutRequest"),h=await this.metadataService.getEndSessionEndpoint();if(!h)throw d.throw(new Error("No end session endpoint")),null;d.debug("Received end session endpoint",h),!s&&l&&!t&&(s=this.settings.client_id);const p=new Fk({url:h,id_token_hint:t,client_id:s,post_logout_redirect_uri:l,state_data:e,extraQueryParams:u,request_type:r,url_state:o});await this.clearStaleState();const y=p.state;return y&&(d.debug("Signout request has state to persist"),await this.settings.stateStore.set(y.id,y.toStorageString())),p}async readSignoutResponseState(e,t=!1){const s=this._logger.create("readSignoutResponseState"),r=new Qk(dp.readParams(e,this.settings.response_mode));if(!r.state){if(s.debug("No state in response"),r.error)throw s.warn("Response was error:",r.error),new dr(r);return{state:void 0,response:r}}const o=await this.settings.stateStore[t?"remove":"get"](r.state);if(!o)throw s.throw(new Error("No matching state found in storage")),null;return{state:await pu.fromStorageString(o),response:r}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:s,response:r}=await this.readSignoutResponseState(e,!0);return s?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(r,s)):t.debug("No state from storage; skipping response validation"),r}clearStaleState(){return this._logger.create("clearStaleState"),pu.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},Xk=class{constructor(e){this._userManager=e,this._logger=new De("SessionMonitor"),this._start=async t=>{const s=t.session_state;if(!s)return;const r=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,r.debug("session_state",s,", sub",this._sub)):(this._sub=void 0,r.debug("session_state",s,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(s);return}try{const o=await this._userManager.metadataService.getCheckSessionIframe();if(o){r.debug("initializing check session iframe");const l=this._userManager.settings.client_id,u=this._userManager.settings.checkSessionIntervalInSeconds,d=this._userManager.settings.stopCheckSessionOnError,h=new zk(this._callback,l,o,u,d);await h.load(),this._checkSessionIFrame=h,h.start(s)}else r.warn("no check session iframe found in the metadata")}catch(o){r.error("Error from getCheckSessionIframe:",o instanceof Error?o.message:o)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const s=setInterval(async()=>{clearInterval(s);try{const r=await this._userManager.querySessionStatus();if(r){const o={session_state:r.session_state,profile:r.sub?{sub:r.sub}:null};this._start(o)}}catch(r){t.error("error from querySessionStatus",r instanceof Error?r.message:r)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const s=await this._userManager.querySessionStatus();let r=!0;s&&this._checkSessionIFrame?s.sub===this._sub?(r=!1,this._checkSessionIFrame.start(s.session_state),t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",s.session_state),await this._userManager.events._raiseUserSessionChanged()):t.debug("different subject signed into OP",s.sub):t.debug("subject no longer signed into OP"),r?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(s){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",s),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const s={session_state:t.session_state,profile:t.sub?{sub:t.sub}:null};this._start(s)}}}},Rh=class L1{constructor(t){var s;this.id_token=t.id_token,this.session_state=(s=t.session_state)!=null?s:null,this.access_token=t.access_token,this.refresh_token=t.refresh_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=t.profile,this.expires_at=t.expires_at,this.state=t.userState,this.url_state=t.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Is.getEpochTime()}set expires_in(t){t!==void 0&&(this.expires_at=Math.floor(t)+Is.getEpochTime())}get expired(){const t=this.expires_in;if(t!==void 0)return t<=0}get scopes(){var t,s;return(s=(t=this.scope)==null?void 0:t.split(" "))!=null?s:[]}toStorageString(){return new De("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return De.createStatic("User","fromStorageString"),new L1(JSON.parse(t))}},Ab="oidc-client",U1=class{constructor(){this._abort=new _i("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:s,keepOpen:r}=await new Promise((o,l)=>{const u=h=>{var p;const y=h.data,g=(p=e.scriptOrigin)!=null?p:window.location.origin;if(!(h.origin!==g||y?.source!==Ab)){try{const v=dp.readParams(y.url,e.response_mode).get("state");if(v||t.warn("no state found in response url"),h.source!==this._window&&v!==e.state)return}catch{this._dispose(),l(new Error("Invalid response from window"))}o(y)}};window.addEventListener("message",u,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",u,!1));const d=new BroadcastChannel(`oidc-client-popup-${e.state}`);d.addEventListener("message",u,!1),this._disposeHandlers.add(()=>d.close()),this._disposeHandlers.add(this._abort.addHandler(h=>{this._dispose(),l(h)}))});return t.debug("got response from window"),this._dispose(),r||this.close(),{url:s}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,s=!1,r=window.location.origin){const o={source:Ab,url:t,keepOpen:s},l=new De("_notifyParent");
11if(e)l.debug("With parent. Using parent.postMessage."),e.postMessage(o,r);else{l.debug("No parent. Using BroadcastChannel.");const u=new URL(t).searchParams.get("state");if(!u)throw new Error("No parent and no state in URL. Can't complete notification.");const d=new BroadcastChannel(`oidc-client-popup-${u}`);d.postMessage(o),d.close()}}},V1={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},q1="_blank",Wk=60,Jk=2,B1=10,eR=class extends hp{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:s=e.post_logout_redirect_uri,popupWindowFeatures:r=V1,popupWindowTarget:o=q1,redirectMethod:l="assign",redirectTarget:u="self",iframeNotifyParentOrigin:d=e.iframeNotifyParentOrigin,iframeScriptOrigin:h=e.iframeScriptOrigin,requestTimeoutInSeconds:p,silent_redirect_uri:y=e.redirect_uri,silentRequestTimeoutInSeconds:g,automaticSilentRenew:v=!0,validateSubOnSilentRenew:x=!0,includeIdTokenInSilentRenew:S=!1,monitorSession:E=!1,monitorAnonymousSession:C=!1,checkSessionIntervalInSeconds:A=Jk,query_status_response_type:M="code",stopCheckSessionOnError:k=!0,revokeTokenTypes:D=["access_token","refresh_token"],revokeTokensOnSignout:P=!1,includeIdTokenInSilentSignout:B=!1,accessTokenExpiringNotificationTimeInSeconds:I=Wk,maxSilentRenewTimeoutRetries:L,userStore:W}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=s,this.popupWindowFeatures=r,this.popupWindowTarget=
11o,this.redirectMethod=l,this.redirectTarget=u,this.iframeNotifyParentOrigin=d,this.iframeScriptOrigin=h,this.silent_redirect_uri=y,this.silentRequestTimeoutInSeconds=g||p||B1,this.automaticSilentRenew=v,this.validateSubOnSilentRenew=x,this.includeIdTokenInSilentRenew=S,this.monitorSession=E,this.monitorAnonymousSession=C,this.checkSessionIntervalInSeconds=A,this.stopCheckSessionOnError=k,this.query_status_response_type=M,this.revokeTokenTypes=D,this.revokeTokensOnSignout=P,this.includeIdTokenInSilentSignout=B,this.accessTokenExpiringNotificationTimeInSeconds=I,this.maxSilentRenewTimeoutRetries=L,W)this.userStore=W;else{const ee=typeof window<"u"?window.sessionStorage:new M1;this.userStore=new ym({store:ee})}}},kb=class I1 extends U1{constructor({silentRequestTimeoutInSeconds:t=B1}){super(),this._logger=new De("IFrameWindow"),this._timeoutInSeconds=t,this._frame=I1.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const t=window.document.createElement("iframe");return t.style.visibility="hidden",t.style.position="fixed",t.style.left="-1000px",t.style.top="0",t.width="0",t.height="0",window.document.body.appendChild(t),t}async navigate(t){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const s=setTimeout(()=>{this._abort.raise(new mm("IFrame timed out without a response"))},this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(s)),await super.navigate(t)}close(){var t;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",s=>{var r;const o=s.target;(r=o.parentNode)==null||r.removeChild(o),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(t=this._frame.contentWindow)==null||t.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(t,s){return super._notifyParent(window.parent,t,!1,s)}},tR=class{constructor(e){this._settings=e,this._logger=new De("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new kb({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),kb.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},nR=500,sR=1e3,Rb=class extends U1{constructor({popupWindowTarget:e=q1,popupWindowFeatures:t={},popupSignal:s,popupAbortOnClose:r}){super(),this._logger=new De("PopupWindow");const o=Cb.center({...V1,...t});this._window=window.open(void 0,e,Cb.serialize(o)),this.abortOnClose=!!r,s&&s.addEventListener("abort",()=>{var l;this._abort.raise(new Error((l=s.reason)!=null?l:"Popup aborted"))}),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*sR)}async navigate(e){var t;(t=this._window)==null||t.focus();const s=setInterval(()=>{(!this._window||this._window.closed)&&(this._logger.debug("Popup closed by user or isolated by redirect"),r(),this._disposeHandlers.delete(r),this.abortOnClose&&this._abort.raise(new Error("Popup closed by user")))},nR),r=()=>clearInterval(s);return this._disposeHandlers.add(r),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){super._notifyParent(window.opener,e,t),!t&&!window.opener&&window.close()}},iR=class{constructor(e){this._settings=e,this._logger=new De("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget,popupSignal:s,popupAbortOnClose:r}){return new Rb({popupWindowFeatures:e,popupWindowTarget:t,popupSignal:s,popupAbortOnClose:r})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),Rb.notifyOpener(e,t)}},rR=class{constructor(e){this._settings=e,this._logger=new De("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var s;this._logger.create("prepare");let r=window.self;t==="top"&&(r=(s=window.top)!=null?s:window.self);const o=r.location[e].bind(r.location);let l;return{navigate:async u=>(this._logger.create("navigate"),await new Promise((h,p)=>{l=p,window.addEventListener("pageshow",()=>h(window.location.href)),o(u.url)})),close:()=>{this._logger.create("close"),l?.(new Error("Redirect aborted")),r.stop()}}}async callback(){}},aR=class extends jk{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new De("UserManagerEvents"),this._userLoaded=new _i("User loaded"),this._userUnloaded=new _i("User unloaded"),this._silentRenewError=ne
11w _i("Silent renew error"),this._userSignedIn=new _i("User signed in"),this._userSignedOut=new _i("User signed out"),this._userSessionChanged=new _i("User session changed")}async load(e,t=!0){await super.load(e),t&&await this._userLoaded.raise(e)}async unload(){await super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},oR=class{constructor(e){this._userManager=e,this._logger=new De("SilentRenewService"),this._isStarted=!1,this._retryTimer=new Is("Retry Silent Renew"),this._timeoutRetryCount=0,this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),this._timeoutRetryCount=0,t.debug("silent token renewal successful")}catch(s){if(s instanceof mm){this._timeoutRetryCount++;const r=this._userManager.settings.maxSilentRenewTimeoutRetries;if(r!==void 0&&this._timeoutRetryCount>r){t.error(`Timeout retry limit reached (${this._timeoutRetryCount} > ${r}), raising silentRenewError:`,s),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(s);return}t.warn(`ErrorTimeout from signinSilent (attempt ${this._timeoutRetryCount}), retry in 5s:`,s),this._retryTimer.init(5);return}t.error("Error from signinSilent:",s),this._timeoutRetryCount=0,await this._userManager.events._raiseSilentRenewError(s)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},lR=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},$1=class{constructor(e,t,s,r){this._logger=new De("UserManager"),this.settings=new eR(e),this._client=new Kk(e),this._redirectNavigator=t??new rR(this.settings),this._popupNavigator=s??new iR(this.settings),this._iframeNavigator=r??new tR(this.settings),this._events=new aR(this.settings),this._silentRenewService=new oR(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new Xk(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(e=!1){const t=this._logger.create("getUser"),s=await this._loadUser();return s?(t.info("user loaded"),await this._events.load(s,e),s):(t.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){var t;this._logger.create("signinRedirect");const{redirectMethod:s,...r}=e;let o;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(o=await this.generateDPoPJkt(this.settings.dpop));const l=await this._redirectNavigator.prepare({redirectMethod:s});await this._signinStart({request_type:"si:r",dpopJkt:o,...r},l)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),s=await this._signinEnd(e);return s.profile&&s.profile.sub?t.info("success, signed in subject",s.profile.sub):t.info("no subject"),s}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:s=!1}){const r=this._logger.create("signinResourceOwnerCredential"),o=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s,extraTokenParams:this.settings.extraTokenParams});r.debug("got signin response");const l=await this._buildUser(o);return l.profile&&l.profile.sub?r.info("success, signed in subject",l.profile.sub):r.info("no subject"),l}async signinPopup(e={}){var t;const s=this._logger.create("signinPopup");let r;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(r=await this.generateDPoPJkt(this.settings.dpop));const{popupWindowFeatures:o,popupWindowTarget:l,popupSignal:u,popupAbortOnClose:d,...h}=e,p=this.settings.popup_redirect_uri;p||s.throw(new Error("No popup_redirect_uri configured"));const y=await this._popupNavigator.prepare({popupWindowFeatures:o,popupWindowTarget:l,popupSignal:u,popupAbortOnClose:d}),g=await this._signin({request_type:"si:p",redirect_uri:p,display:"popup",dpopJkt:r,...h},y);return g&&(g.profile&&g.profile.sub?s.info("success, signed in subject",g.profile.sub):s.info("no subject")),g}async signinPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async signinSilent(e={}){var t,s;const r=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:o,...l}=e;let u=await this._loadUser();if(!e.forceIframeAuth&&u?.refresh_token){r.debug("using refresh token");const g=new lR(u);return await this._useRefreshToken({state:g,redirect_uri:l.redirect_uri,resource:l.resource,extraTokenParams:l.extraTokenParams,timeoutInSeconds:o})}let d;(t=this.settings.dpop)!=null&&t.bind_authorization_code&&(d=await this.generateDPoPJkt(this.settings.dpop));const h=this.settings.silent_redirect_uri;h||r.throw(new Error("No silent_redirect_uri configured"));let p;
11u&&this.settings.validateSubOnSilentRenew&&(r.debug("subject prior to silent renew:",u.profile.sub),p=u.profile.sub);const y=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:o});return u=await this._signin({request_type:"si:s",redirect_uri:h,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?u?.id_token:void 0,dpopJkt:d,...l},y,p),u&&((s=u.profile)!=null&&s.sub?r.info("success, signed in subject",u.profile.sub):r.info("no subject")),u}async _useRefreshToken(e){const t=await this._client.useRefreshToken({timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds,...e}),s=new Rh({...e.state,...t});return await this.storeUser(s),await this._events.load(s),s}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":await this.signinPopupCallback(e);break;case"si:s":await this.signinSilentCallback(e);break;default:throw new Error("invalid request_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:s}=await this._client.readSignoutResponseState(e);if(s)switch(s.request_type){case"so:r":return await this.signoutRedirectCallback(e);case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid request_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:s,...r}=e,o=this.settings.silent_redirect_uri;o||t.throw(new Error("No silent_redirect_uri configured"));const l=await this._loadUser(),u=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:s}),d=await this._signinStart({request_type:"si:s",redirect_uri:o,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?l?.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...r},u);try{const h={},p=await this._client.processSigninResponse(d.url,h);return t.debug("got signin response"),p.session_state&&p.profile.sub?(t.info("success for subject",p.profile.sub),{session_state:p.session_state,sub:p.profile.sub}):(t.info("success, user not authenticated"),null)}catch(h){if(this.settings.monitorAnonymousSession&&h instanceof dr)switch(h.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:h.session_state}}throw h}}async _signin(e,t,s){const r=await this._signinStart(e,t);return await this._signinEnd(r.url,s)}async _signinStart(e,t){const s=this._logger.create("_signinStart");try{const r=await this._client.createSigninRequest(e);return s.debug("got signin request"),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw s.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signinEnd(e,t){const s=this._logger.create("_signinEnd"),r={},o=await this._client.processSigninResponse(e,r);return s.debug("got signin response"),await this._buildUser(o,t)}async _buildUser(e,t){const s=this._logger.create("_buildUser"),r=new Rh(e);if(t){if(t!==r.profile.sub)throw s.debug("current user does not match user returned from signin. sub from signin:",r.profile.sub),new dr({...e,error:"login_required"});s.debug("current user matches user returned from signin")}return await this.storeUser(r),s.debug("user stored"),await this._events.load(r),r}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:s,...r}=e,o=await this._redirectNavigator.prepare({redirectMethod:s});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},o),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),s=await this._signoutEnd(e);return t.info("success"),s}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:s,popupWindowTarget:r,popupSignal:o,...l}=e,u=this.settings.popup_post_logout_redirect_uri,d=await this._popupNavigator.prepare({popupWindowFeatures:s,popupWindowTarget:r,popupSignal:o});await this._signout({request_type:"so:p",post_logout_redirect_uri:u,state:u==null?void 0:{},...l},d),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async _signout(e,t){const s=await this._signoutStart(e,t);return await this._signoutEnd(s.url)}async _signoutStart(e={},t){var s;const r=this._logger.create("_signoutStart");try{const o=await this._loadUser();r.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(o);const l=e.id_token_hint||o&&o.id_token;l&&(r.debug("setting id_token_hint in signout request"),e.id_token_hint=l),await this.removeUser(),r.debug("user removed, creating signout request");
11const u=await this._client.createSignoutRequest(e);return r.debug("got signout request"),await t.navigate({url:u.url,state:(s=u.state)==null?void 0:s.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(o){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),o}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),s=await this._client.processSignoutResponse(e);return t.debug("got signout response"),s}async signoutSilent(e={}){var t;const s=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:r,...o}=e,l=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,u=this.settings.popup_post_logout_redirect_uri,d=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});await this._signout({request_type:"so:s",post_logout_redirect_uri:u,id_token_hint:l,...o},d),s.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const s=this._logger.create("_revokeInternal");if(!e)return;const r=t.filter(o=>typeof e[o]=="string");if(!r.length){s.debug("no need to revoke due to no token(s)");return}for(const o of r)await this._client.revokeToken(e[o],o),s.info(`${o} revoked successfully`),o!=="access_token"&&(e[o]=null);await this.storeUser(e),s.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),Rh.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const s=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,s)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey),this.settings.dpop&&await this.settings.dpop.store.remove(this.settings.client_id)}async clearStaleState(){await this._client.clearStaleState()}async dpopProof(e,t,s,r){var o,l;
11const u=await((l=(o=this.settings.dpop)==null?void 0:o.store)==null?void 0:l.get(this.settings.client_id));if(u)return await pt.generateDPoPProof({url:e,accessToken:t?.access_token,httpMethod:s,keyPair:u.keys,nonce:r})}async generateDPoPJkt(e){let t=await e.store.get(this.settings.client_id);if(!t){const s=await pt.generateDPoPKeys();t=new P1(s),await e.store.set(this.settings.client_id,t)}return await pt.generateDPoPJkt(t.keys)}},vm=ne.createContext(void 0);vm.displayName="AuthContext";var cR={isLoading:!0,isAuthenticated:!1},uR=(e,t)=>{switch(t.type){case"INITIALISED":case"USER_LOADED":return{...e,user:t.user,isLoading:!1,isAuthenticated:t.user?!t.user.expired:!1,error:void 0};case"USER_SIGNED_OUT":case"USER_UNLOADED":return{...e,user:void 0,isAuthenticated:!1};case"NAVIGATOR_INIT":return{...e,isLoading:!0,activeNavigator:t.method};case"NAVIGATOR_CLOSE":return{...e,isLoading:!1,activeNavigator:void 0};case"ERROR":{const s=t.error;return s.toString=()=>`${s.name}: ${s.message}`,{...e,isLoading:!1,error:s}}default:{const s=new TypeError(`unknown type ${t.type}`),r={name:s.name,message:s.message,innerError:s,stack:s.stack,source:"unknown"};return r.toString=()=>`${r.name}: ${r.message}`,{...e,isLoading:!1,error:r}}}},H1=(e=window.location)=>{let t=new URLSearchParams(e.search);return!!((t.get("code")||t.get("error"))&&t.get("state")||(t=new URLSearchParams(e.hash.replace("#","?")),(t.get("code")||t.get("error"))&&t.get("state")))},dR=bm("signinCallback","Sign-in failed"),fR=bm("signoutCallback","Sign-out failed"),hR=bm("renewSilent","Renew silent failed");function F1(e,t){return{name:Oh(e,"name",()=>"Error"),message:Oh(e,"message",()=>t),stack:Oh(e,"stack",()=>new Error().stack),innerError:e}}function bm(e,t){return s=>({...F1(s,t),source:e})}function Oh(e,t,s){if(e&&typeof e=="object"){const r=e[t];if(typeof r=="string")return r}return s()}var pR=["clearStaleState","querySessionStatus","revokeTokens","startSilentRenew","stopSilentRenew"],mR=["signinPopup","signinSilent","signinRedirect","signinResourceOwnerCredentials","signoutPopup","signoutRedirect","signoutSilent"],Ob=e=>()=>{throw new Error(`UserManager#${e} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`)},Mb=typeof window>"u"?null:$1,gR=e=>{const{children:t,onSigninCallback:s,skipSigninCallback:r,matchSignoutCallback:o,onSignoutCallback:l,onRemoveUser:u,userManager:d=null,...h}=e,[p]=ne.useState(()=>d??(Mb?new Mb(h):{settings:h})),[y,g]=ne.useReducer(uR,cR),v=ne.useMemo(()=>Object.assign({settings:p.settings,events:p.events},Object.fromEntries(pR.map(C=>{var A,M;return[C,(M=(A=p[C])==null?void 0:A.bind(p))!=null?M:Ob(C)]})),Object.fromEntries(mR.map(C=>[C,p[C]?async A=>{g({type:"NAVIGATOR_INIT",method:C});try{return await p[C](A)}catch(M){return g({type:"ERROR",error:{...F1(M,`Unknown error while executing ${C}(...).`),source:C,args:A}}),null}finally{g({type:"NAVIGATOR_CLOSE"})}}:Ob(C)]))),[p]),x=ne.useRef(!1);ne.useEffect(()=>{!p||x.current||(x.current=!0,(async()=>{try{let C=null;H1()&&!r&&(C=await p.signinCallback(),s&&await s(C)),C=C||await p.getUser(),g({type:"INITIALISED",user:C})}catch(C){g({type:"ERROR",error:dR(C)})}try{if(o&&o(p.settings)){const C=await p.signoutCallback();l&&await l(C)}}catch(C){g({type:"ERROR",error:fR(C)})}})())},[p,r,s,l,o]),ne.useEffect(()=>{if(!p)return;const C=D=>{g({type:"USER_LOADED",user:D})};p.events.addUserLoaded(C);const A=()=>{g({type:"USER_UNLOADED"})};p.events.addUserUnloaded(A);const M=()=>{g({type:"USER_SIGNED_OUT"})};p.events.addUserSignedOut(M);const k=D=>{g({type:"ERROR",error:hR(D)})};return p.events.addSilentRenewError(k),()=>{p.events.removeUserLoaded(C),p.events.removeUserUnloaded(A),p.events.removeUserSignedOut(M),p.events.removeSilentRenewError(k)}},[p]);const S=ne.useCallback(async()=>{await p.removeUser(),u&&await u()},[p,u]),E=ne.useMemo(()=>({...y,...v,removeUser:S}),[y,v,S]);return ne.createElement(vm.Provider,{value:E},t)},Q1=()=>{const e=ne.useContext(vm);return e||console.warn("AuthProvider context is undefined, please verify you are calling useAuth() as child of a <AuthProvider> component."),e},os=[],Mn=[],yR=Uint8Array,Mh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
11+/";for(var ca=0,vR=Mh.length;ca<vR;++ca)os[ca]=Mh[ca],Mn[Mh.charCodeAt(ca)]=ca;Mn[45]=62;Mn[95]=63;function bR(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=e.indexOf("=");s===-1&&(s=t);var r=s===t?0:4-s%4;return[s,r]}function xR(e,t,s){return(t+s)*3/4-s}function Xo(e){var t,s=bR(e),r=s[0],o=s[1],l=new yR(xR(e,r,o)),u=0,d=o>0?r-4:r,h;for(h=0;h<d;h+=4)t=Mn[e.charCodeAt(h)]<<18|Mn[e.charCodeAt(h+1)]<<12|Mn[e.charCodeAt(h+2)]<<6|Mn[e.charCodeAt(h+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=t&255;return o===2&&(t=Mn[e.charCodeAt(h)]<<2|Mn[e.charCodeAt(h+1)]>>4,l[u++]=t&255),o===1&&(t=Mn[e.charCodeAt(h)]<<10|Mn[e.charCodeAt(h+1)]<<4|Mn[e.charCodeAt(h+2)]>>2,l[u++]=t>>8&255,l[u++]=t&255),l}function wR(e){return os[e>>18&63]+os[e>>12&63]+os[e>>6&63]+os[e&63]}function SR(e,t,s){for(var r,o=[],l=t;l<s;l+=3)r=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(e[l+2]&255),o.push(wR(r));return o.join("")}function Wo(e){for(var t,s=e.length,r=s%3,o=[],l=16383,u=0,d=s-r;u<d;u+=l)o.push(SR(e,u,u+l>d?d:u+l));return r===1?(t=e[s-1],o.push(os[t>>2]+os[t<<4&63]+"==")):r===2&&(t=(e[s-2]<<8)+e[s-1],o.push(os[t>>10]+os[t>>4&63]+os[t<<2&63]+"=")),o.join("")}function Vs(e){if(e===void 0)return{};if(!Z1(e))throw new Error(`The arguments to a Convex function must be an object. Received: ${e}`);return e}function _R(e){if(typeof e>"u")throw new Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");if(typeof e!="string")throw new Error(`Invalid deployment address: found ${e}".`);if(!(e.startsWith("http:")||e.startsWith("https:")))throw new Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);try{new URL(e)}catch{throw new Error(`Invalid deployment address: "${e}" is not a valid URL. If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}if(e.endsWith(".convex.site"))throw new Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}function Z1(e){const t=typeof e=="object",s=Object.getPrototypeOf(e),r=s===null||s===Object.prototype||s?.constructor?.name==="Object";return t&&r}const G1=!0,wa=BigInt("-9223372036854775808"),xm=BigInt("9223372036854775807"),gp=BigInt("0"),TR=BigInt("8"),ER=BigInt("256");function Y1(e){return Number.isNaN(e)||!Number.isFinite(e)||Object.is(e,-0)}function CR(e){e<gp&&(e-=wa+wa);let t=e.toString(16);t.length%2===1&&(t="0"+t);const s=new Uint8Array(new ArrayBuffer(8));let r=0;for(const o of t.match(/.{2}/g).reverse())s.set([parseInt(o,16)],r++),e>>=TR;return Wo(s)}function AR(e){const t=Xo(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);let s=gp,r=gp;for(const o of t)s+=BigInt(o)*ER**r,r++;return s>xm&&(s+=wa+wa),s}function kR(e){if(e<wa||xm<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);const t=new ArrayBuffer(8);return new DataView(t).setBigInt64(0,e,!0),Wo(new Uint8Array(t))}function RR(e){const t=Xo(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);return new DataView(t.buffer).getBigInt64(0,!0)}const OR=DataView.prototype.setBigInt64?kR:CR,MR=DataView.prototype.getBigInt64?RR:AR,Nb=1024;function K1(e){if(e.length>Nb)throw new Error(`Field name ${e} exceeds maximum field name length ${Nb}.`);if(e.startsWith("$"))throw new Error(`Field name ${e} starts with a '$', which is reserved.`);for(let t=0;t<e.length;t+=1){const s=e.charCodeAt(t);if(s<32||s>=127)throw new Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`)}}function Sa(e){if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e))return e.map(r=>Sa(r));if(typeof e!="object")throw new Error(`Unexpected type of ${e}`);const t=Object.entries(e);if(t.length===1){const r=t[0][0];
11if(r==="$bytes"){if(typeof e.$bytes!="string")throw new Error(`Malformed $bytes field on ${e}`);return Xo(e.$bytes).buffer}if(r==="$integer"){if(typeof e.$integer!="string")throw new Error(`Malformed $integer field on ${e}`);return MR(e.$integer)}if(r==="$float"){if(typeof e.$float!="string")throw new Error(`Malformed $float field on ${e}`);const o=Xo(e.$float);if(o.byteLength!==8)throw new Error(`Received ${o.byteLength} bytes, expected 8 for $float`);const u=new DataView(o.buffer).getFloat64(0,G1);if(!Y1(u))throw new Error(`Float ${u} should be encoded as a number`);return u}if(r==="$set")throw new Error("Received a Set which is no longer supported as a Convex type.");if(r==="$map")throw new Error("Received a Map which is no longer supported as a Convex type.")}const s={};for(const[r,o]of Object.entries(e))K1(r),s[r]=Sa(o);return s}const Db=16384;function $o(e){const t=JSON.stringify(e,(s,r)=>r===void 0?"undefined":typeof r=="bigint"?`${r.toString()}n`:r);if(t.length>Db){const s="[...truncated]";let r=Db-s.length;const o=t.codePointAt(r-1);return o!==void 0&&o>65535&&(r-=1),t.substring(0,r)+s}return t}function yp(e,t,s,r){if(e===void 0){const u=s&&` (present at path ${s} in original object ${$o(t)})`;throw new Error(`undefined is not a valid Convex value${u}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(e===null)return e;if(typeof e=="bigint"){if(e<wa||xm<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);return{$integer:OR(e)}}if(typeof e=="number")if(Y1(e)){const u=new ArrayBuffer(8);return new DataView(u).setFloat64(0,e,G1),{$float:Wo(new Uint8Array(u))}}else return e;if(typeof e=="boolean"||typeof e=="string")return e;if(e instanceof ArrayBuffer)return{$bytes:Wo(new Uint8Array(e))};if(Array.isArray(e))return e.map((u,d)=>yp(u,t,s+`[${d}]`));if(e instanceof Set)throw new Error(Nh(s,"Set",[...e],t));if(e instanceof Map)throw new Error(Nh(s,"Map",[...e],t));if(!Z1(e)){const u=e?.constructor?.name,d=u?`${u} `:"";throw new Error(Nh(s,d,e,t))}const o={},l=Object.entries(e);l.sort(([u,d],[h,p])=>u===h?0:u<h?-1:1);for(const[u,d]of l)d!==void 0&&(K1(u),o[u]=yp(d,t,s+`.${u}`));return o}function Nh(e,t,s,r){return e?`${t}${$o(s)} is not a supported Convex type (present at path ${e} in original object ${$o(r)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${t}${$o(s)} is not a supported Convex type.`}function hs(e){return yp(e,e,"")}var NR=Object.defineProperty,DR=(e,t,s)=>t in e?NR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Dh=(e,t,s)=>DR(e,typeof t!="symbol"?t+"":t,s),jb,zb;const jR=Symbol.for("ConvexError");class mu extends(zb=Error,jb=jR,zb){constructor(t){super(typeof t=="string"?t:$o(t)),Dh(this,"name","ConvexError"),Dh(this,"data"),Dh(this,jb,!0),this.data=t}}function te(e,t,s){function r(d,h){if(d._zod||Object.defineProperty(d,"_zod",{value:{def:h,constr:u,traits:new Set},enumerable:!1}),d._zod.traits.has(e))return;d._zod.traits.add(e),t(d,h);const p=u.prototype,y=Object.keys(p);for(let g=0;g<y.length;g++){const v=y[g];v in d||(d[v]=p[v].bind(d))}}const o=s?.Parent??Object;class l extends o{}Object.defineProperty(l,"name",{value:e});function u(d){var h;const p=s?.Parent?new l:this;r(p,d),(h=p._zod).deferred??(h.deferred=[]);for(const y of p._zod.deferred)y();return p}return Object.defineProperty(u,"init",{value:r}),Object.defineProperty(u,Symbol.hasInstance,{value:d=>s?.Parent&&d instanceof s.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}
vendor: 8,285 bytes, line 11
11class va extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class X1 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const W1={};function fr(e){return W1}function J1(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function vp(e,t){return typeof t=="bigint"?t.toString():t}function wm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Sm(e){return e==null}function _m(e){const t=e.startsWith("^")?1:0,s=e.endsWith("$")?e.length-1:e.length;return e.slice(t,s)}const Pb=Symbol("evaluating");function qe(e,t,s){let r;Object.defineProperty(e,t,{get(){if(r!==Pb)return r===void 0&&(r=Pb,r=s()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function yr(e,t,s){Object.defineProperty(e,t,{value:s,writable:!0,enumerable:!0,configurable:!0})}function Ri(...e){const t={};for(const s of e){const r=Object.getOwnPropertyDescriptors(s);Object.assign(t,r)}return Object.defineProperties({},t)}function Lb(e){return JSON.stringify(e)}function zR(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const eS="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function gu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const PR=wm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Jo(e){if(gu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const s=t.prototype;return!(gu(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function tS(e){return Jo(e)?{...e}:Array.isArray(e)?[...e]:e}const LR=new Set(["string","number","symbol"]);function Iu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Oi(e,t,s){const r=new e._zod.constr(t??e._zod.def);return(!t||s?.parent)&&(r._zod.parent=e),r}function Se(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function UR(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function VR(e,t){const s=e._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const l=Ri(e._zod.def,{get shape(){const u={};for(const d in t){if(!(d in s.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(u[d]=s.shape[d])}return yr(this,"shape",u),u},checks:[]});return Oi(e,l)}function qR(e,t){const s=e._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const l=Ri(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const d in t){if(!(d in s.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete u[d]}return yr(this,"shape",u),u},checks:[]});return Oi(e,l)}function BR(e,t){if(!Jo(t))throw new Error("Invalid input to extend: expected a plain object");const s=e._zod.def.checks;if(s&&s.length>0){const l=e._zod.def.shape;for(const u in t)if(Object.getOwnPropertyDescriptor(l,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Ri(e._zod.def,{get shape(){const l={...e._zod.def.shape,...t};return yr(this,"shape",l),l}});return Oi(e,o)}function IR(e,t){if(!Jo(t))throw new Error("Invalid input to safeExtend: expected a plain object");const s=Ri(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return yr(this,"shape",r),r}});return Oi(e,s)}function $R(e,t){const s=Ri(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return yr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Oi(e,s)}function HR(e,t,s){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const u=Ri(t._zod.def,{get shape(){const d=t._zod.def.shape,h={...d};if(s)for(const p in s){if(!(p in d))throw new Error(`Unrecognized key: "${p}"`);s[p]&&(h[p]=e?new e({type:"optional",innerType:d[p]}):d[p])}else for(const p in d)h[p]=e?new e({type:"optional",innerType:d[p]}):d[p];return yr(this,"shape",h),h},checks:[]});return Oi(t,u)}function FR(e,t,s){const r=Ri(t._zod.def,{get shape(){const o=t._zod.def.shape,l={...o};if(s)for(const u in s){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);s[u]&&(l[u]=new e({type:"nonoptional",innerType:o[u]}))}else for(const u in o)l[u]=new e({type:"nonoptional",innerType:o[u]});return yr(this,"shape",l),l}});return Oi(t,r)}function ha(e,t=0){if(e.aborted===!0)return!0;for(let s=t;s<e.issues.length;s++)if(e.issues[s]?.continue!==!0)return!0;return!1}function nS(e,t){return t.map(s=>{var r;return(r=s).path??(r.path=[]),s.path.unshift(e),s})}function jc(e){return typeof e=="string"?e:e?.message}function hr(e,t,s){const r={...e,path:e.path??[]};if(!e.message){const o=jc(e.inst?._zod.def?.error?.(e))??jc(t?.error?.(e))??jc(s.customError?.(e))??jc(s.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Tm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function el(...e){const[t,s,r]=e;return typeof t=="string"?{message:t,code:"custom",input:s,inst:r}:{...t}}const sS=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,vp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},iS=te("$ZodError",sS),rS=te("$ZodError",sS,{Parent:Error});function QR(e,t=s=>s.message){const s={},r=[];for(const o of e.issues)o.path.length>0?(s[o.path[0]]=s[o.path[0]]||[],s[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:s}}function ZR(e,t=s=>s.message){const s={_errors:[]},r=o=>{for(const l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>r({issues:u}));else if(l.code==="invalid_key")r({issues:l.issues});else if(l.code==="invalid_element")r({issues:l.issues});else if(l.path.length===0)s._errors.push(t(l));else{let u=s,d=0;for(;d<l.path.length;){const h=l.path[d];d===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(t(l))):u[h]=u[h]||{_errors:[]},u=u[h],d++}}};return r(e),s}const Em=e=>(t,s,r,o)=>{const l=r?Object.assign(r,{async:!1}):{async:!1},u=t._zod.run({value:s,issues:[]},l);if(u instanceof Promise)throw new va;if(u.issues.length){const d=new(o?.Err??e)(u.issues.map(h=>hr(h,l,fr())));throw eS(d,o?.callee),d}return u.value},Cm=e=>async(t,s,r,o)=>{const l=r?Object.assign(r,{async:!0}):{async:!0};let u=t._zod.run({value:s,issues:[]},l);if(u instanceof Promise&&(u=await u),u.issues.length){const d=new(o?.Err??e)(u.issues.map(h=>hr(h,l,fr())));throw eS(d,o?.callee),d}return u.value},$u=e=>(t,s,r)=>{const o=r?{...r,async:!1}:{async:!1},l=t._zod.run({value:s,issues:[]},o);if(l instanceof Promise)throw new va;return l.issues.length?{success:!1,error:new(e??iS)(l.issues.map(u=>hr(u,o,fr())))}:{success:!0,data:l.value}},GR=$u(rS),Hu=e=>async(t,s,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:s,issues:[]},o);return l instanceof Promise&&(l=await l),l.issues.length?{success:!1,error:new e(l.issues.map(u=>hr(u,o,fr())))}:{success:!0,data:l.value}},YR=Hu(rS),KR=e=>(t,s,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Em(e)(t,s,o)},XR=e=>(t,s,r)=>Em(e)(t,s,r),WR=e=>async(t,s,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Cm(e)(t,s,o)},JR=e=>async(t,s,r)=>Cm(e)(t,s,r),eO=e=>(t,s,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $u(e)(t,s,o)},tO=e=>(t,s,r)=>$u(e)(t,s,r),nO=e=>async(t,s,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Hu(e)(t,s,o)},sO=e=>async(t,s,r)=>Hu(e)(t,s,r),iO=/^[cC][^\s-]{8,}
vendor: 5,346 bytes, line 11
11$/,rO=/^[0-9a-z]+$/,aO=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,oO=/^[0-9a-vA-V]{20}$/,lO=/^[A-Za-z0-9]{27}$/,cO=/^[a-zA-Z0-9_-]{21}$/,uO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dO=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ub=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,fO=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pO(){return new RegExp(hO,"u")}const mO=/^(?:(?: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])$/,gO=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,yO=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,vO=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bO=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,aS=/^[A-Za-z0-9_-]*$/,xO=/^\+[1-9]\d{6,14}$/,oS="(?:(?:\\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])))",wO=new RegExp(`^${oS}$`);function lS(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function SO(e){return new RegExp(`^${lS(e)}$`)}function _O(e){const t=lS({precision:e.precision}),s=["Z"];e.local&&s.push(""),e.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${s.join("|")})`;return new RegExp(`^${oS}T(?:${r})$`)}const TO=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},EO=/^[^A-Z]*$/,CO=/^[^a-z]*$/,gs=te("$ZodCheck",(e,t)=>{var s;e._zod??(e._zod={}),e._zod.def=t,(s=e._zod).onattach??(s.onattach=[])}),AO=te("$ZodCheckMaxLength",(e,t)=>{var s;gs.init(e,t),(s=e._zod.def).when??(s.when=r=>{const o=r.value;return!Sm(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const u=Tm(o);r.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),kO=te("$ZodCheckMinLength",(e,t)=>{var s;gs.init(e,t),(s=e._zod.def).when??(s.when=r=>{const o=r.value;return!Sm(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const u=Tm(o);r.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),RO=te("$ZodCheckLengthEquals",(e,t)=>{var s;gs.init(e,t),(s=e._zod.def).when??(s.when=r=>{const o=r.value;return!Sm(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,l=o.length;if(l===t.length)return;const u=Tm(o),d=l>t.length;r.issues.push({origin:u,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Fu=te("$ZodCheckStringFormat",(e,t)=>{var s,r;gs.init(e,t),e._zod.onattach.push(o=>{const l=o._zod.bag;l.format=t.format,t.pattern&&(l.patterns??(l.patterns=new Set),l.patterns.add(t.pattern))}),t.pattern?(s=e._zod).check??(s.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),OO=te("$ZodCheckRegex",(e,t)=>{Fu.init(e,t),e._zod.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),MO=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=EO),Fu.init(e,t)}),NO=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=CO),Fu.init(e,t)}),DO=te("$ZodCheckIncludes",(e,t)=>{gs.init(e,t);const s=Iu(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${s}`:s);t.pattern=r,e._zod.onattach.push(o=>{const l=o._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input
vendor: 12,131 bytes, lines 11-47
11:o.value,inst:e,continue:!t.abort})}}),jO=te("$ZodCheckStartsWith",(e,t)=>{gs.init(e,t);const s=new RegExp(`^${Iu(t.prefix)}.*`);t.pattern??(t.pattern=s),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(s)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),zO=te("$ZodCheckEndsWith",(e,t)=>{gs.init(e,t);const s=new RegExp(`.*${Iu(t.suffix)}$`);t.pattern??(t.pattern=s),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(s)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),PO=te("$ZodCheckOverwrite",(e,t)=>{gs.init(e,t),e._zod.check=s=>{s.value=t.tx(s.value)}});class LO{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
12`).filter(u=>u),o=Math.min(...r.map(u=>u.length-u.trimStart().length)),l=r.map(u=>u.slice(o)).map(u=>" ".repeat(this.indent*2)+u);for(const u of l)this.content.push(u)}compile(){const t=Function,s=this?.args,o=[...(this?.content??[""]).map(l=>`  ${l}`)];return new t(...s,o.join(`
13`))}}const UO={major:4,minor:3,patch:6},vt=te("$ZodType",(e,t)=>{var s;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=UO;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const l of o._zod.onattach)l(e);if(r.length===0)(s=e._zod).deferred??(s.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(u,d,h)=>{let p=ha(u),y;for(const g of d){if(g._zod.def.when){if(!g._zod.def.when(u))continue}else if(p)continue;const v=u.issues.length,x=g._zod.check(u);if(x instanceof Promise&&h?.async===!1)throw new va;if(y||x instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await x,u.issues.length!==v&&(p||(p=ha(u,v)))});else{if(u.issues.length===v)continue;p||(p=ha(u,v))}}return y?y.then(()=>u):u},l=(u,d,h)=>{if(ha(u))return u.aborted=!0,u;const p=o(d,r,h);if(p instanceof Promise){if(h.async===!1)throw new va;return p.then(y=>e._zod.parse(y,h))}return e._zod.parse(p,h)};e._zod.run=(u,d)=>{if(d.skipChecks)return e._zod.parse(u,d);if(d.direction==="backward"){const p=e._zod.parse({value:u.value,issues:[]},{...d,skipChecks:!0});return p instanceof Promise?p.then(y=>l(y,u,d)):l(p,u,d)}const h=e._zod.parse(u,d);if(h instanceof Promise){if(d.async===!1)throw new va;return h.then(p=>o(p,r,d))}return o(h,r,d)}}qe(e,"~standard",()=>({validate:o=>{try{const l=GR(e,o);return l.success?{value:l.data}:{issues:l.error?.issues}}catch{return YR(e,o).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),Am=te("$ZodString",(e,t)=>{vt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??TO(e._zod.bag),e._zod.parse=(s,r)=>{if(t.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),We=te("$ZodStringFormat",(e,t)=>{Fu.init(e,t),Am.init(e,t)}),VO=te("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=dO),We.init(e,t)}),qO=te("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ub(r))}else t.pattern??(t.pattern=Ub());We.init(e,t)}),BO=te("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=fO),We.init(e,t)}),IO=te("$ZodURL",(e,t)=>{We.init(e,t),e._zod.check=s=>{try{const r=s.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:s.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:s.value,inst:e,continue:!t.abort})),t.normalize?s.value=o.href:s.value=r;return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:e,continue:!t.abort})}}}),$O=te("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=pO()),We.init(e,t)}),HO=te("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cO),We.init(e,t)}),FO=te("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=iO),We.init(e,t)}),QO=te("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rO),We.init(e,t)}),ZO=te("$ZodULID",(e,t)=>{t.pattern??(t.pattern=aO),We.init(e,t)}),GO=te("$ZodXID",(e,t)=>{t.pattern??(t.pattern=oO),We.init(e,t)}),YO=te("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lO),We.init(e,t)}),KO=te("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=_O(t)),We.init(e,t)}),XO=te("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wO),We.init(e,t)}),WO=te("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=SO(t)),We.init(e,t)}),JO=te("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=uO),We.init(e,t)}),eM=te("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mO),We.init(e,t),e._zod.bag.format="ipv4"}),tM=te("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gO),We.init(e,t),e._zod.bag.format="ipv6",e._zod.check=s=>{try{new URL(`http://[${s.value}]`)}catch{s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:e,continue:!t.abort})}}}),nM=te("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=yO),We.init(e,t)}),sM=te("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=vO),We.init(e,t),e._zod.check=s=>{const r=s.value.split("/");try{if(r.length!==2)throw new Error;const[o,l]=r;if(!l)throw new Error;const u=Number(l);if(`${u}`!==l)throw new Error;if(u<0||u>128)throw new Error;new URL(`http://[${o}]`)}catch{s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:e,continue:!t.abort})}}});function cS(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const iM=te("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bO),We.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=s=>{cS(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:e,continue:!t.abort})}});function rM(e){if(!aS.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),s=t.padEnd(Math.ceil(t.length/4)*4,"=");return cS(s)}const aM=te("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=aS),We.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=s=>{rM(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:e,continue:!t.abort})}}),oM=te("$ZodE164",(e,t)=>{t.pattern??(t.pattern=xO),We.init(e,t)});function lM(e,t=null){try{const s=e.split(".");if(s.length!==3)return!1;const[r]=s;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const cM=te("$ZodJWT",(e,t)=>{We.init(e,t),e._zod.check=s=>{lM(s.value,t.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:e,continue:!t.abort})}}),uM=te("$ZodUnknown",(e,t)=>{vt.init(e,t),e._zod.parse=s=>s}),dM=te("$ZodNever",(e,t)=>{vt.init(e,t),e._zod.parse=(s,r)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:e}),s)});function Vb(e,t,s){e.issues.length&&t.issues.push(...nS(s,e.issues)),t.value[s]=e.value}const fM=te("$ZodArray",(e,t)=>{vt.init(e,t),e._zod.parse=(s,r)=>{const o=s.value;if(!Array.isArray(o))return s.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),s;s.value=Array(o.length);const l=[];for(let u=0;u<o.length;u++){const d=o[u],h=t.element._zod.run({value:d,issues:[]},r);h instanceof Promise?l.push(h.then(p=>Vb(p,s,u))):Vb(h,s,u)}return l.length?Promise.all(l).then(()=>s):s}});function yu(e,t,s,r,o){if(e.issues.length){if(o&&!(s in r))return;t.issues.push(...nS(s,e.issues))}e.value===void 0?s in r&&(t.value[s]=void 0):t.value[s]=e.value}function uS(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const s=UR(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(s)}}function dS(e,t,s,r,o,l){const u=[],d=o.keySet,h=o.catchall._zod,p=h.def.type,y=h.optout==="optional";for(const g in t){if(d.has(g))continue;if(p==="never"){u.push(g);continue}const v=h.run({value:t[g],issues:[]},r);v instanceof Promise?e.push(v.then(x=>yu(x,s,g,t,y))):yu(v,s,g,t,y)}return u.length&&s.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:l}),e.length?Promise.all(e).then(()=>s):s}const hM=te("$ZodObject",(e,t)=>{if(vt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const h={...d};return Object.defineProperty(t,"shape",{value:h}),h}})}const r=wm(()=>uS(t));qe(e._zod,"propValues",()=>{const d=t.shape,h={};for(const p in d){const y=d[p]._zod;if(y.values){h[p]??(h[p]=new Set);for(const g of y.values)h[p].add(g)}}return h});const o=gu,l=t.catchall;let u;e._zod.parse=(d,h)=>{u??(u=r.value);const p=d.value;if(!o(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;d.value={};const y=[],g=u.shape;for(const v of u.keys){const x=g[v],S=x._zod.optout==="optional",E=x._zod.run({value:p[v],issues:[]},h);E instanceof Promise?y.push(E.then(C=>yu(C,d,v,p,S))):yu(E,d,v,p,S)}return l?dS(y,p,d,h,r.value,e):y.length?Promise.all(y).then(()=>d):d}}),pM=te("$ZodObjectJIT",(e,t)=>{hM.init(e,t);const s=e._zod.parse,r=wm(()=>uS(t)),o=v=>{const x=new LO(["shape","payload","ctx"]),S=r.value,E=k=>{const D=Lb(k);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};x.write("const input = payload.value;");const C=Object.create(null);let A=0;for(const k of S.keys)C[k]=`key_${A++}`;x.write("const newResult = {};");for(const k of S.keys){const D=C[k],P=Lb(k),I=v[k]?._zod?.optout==="optional";x.write(`const ${D} = ${E(k)};`),I?x.write(`
14        if (${D}.issues.length) {
15          if (${P} in input) {
16            payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
17              ...iss,
18              path: iss.path ? [${P}, ...iss.path] : [${P}]
19            })));
20          }
21        }
22        
23        if (${D}.value === undefined) {
24          if (${P} in input) {
25            newResult[${P}] = undefined;
26          }
27        } else {
28          newResult[${P}] = ${D}.value;
29        }
30        
31      `):x.write(`
32        if (${D}.issues.length) {
33          payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
34            ...iss,
35            path: iss.path ? [${P}, ...iss.path] : [${P}]
36          })));
37        }
38        
39        if (${D}.value === undefined) {
40          if (${P} in input) {
41            newResult[${P}] = undefined;
42          }
43        } else {
44          newResult[${P}] = ${D}.value;
45        }
46        
47      `)}x.write("payload.value = newResult;"),x.write("return payload;");const M=x.compile();return(k,D)=>M(v,k,D)};let l;const u=gu,d=!W1.jitless,p=d&&PR.value,y=t.catchall;let g;e._zod.parse=(v,x)=>{g??(g=r.value);const S=v.value;return u(S)?d&&p&&x?.async===!1&&x.jitless!==!0?(l||(l=o(t.shape)),v=l(v,x),y?dS([],S,v,x,g,e):v):s(v,x):(v.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),v)}});function qb(e,t,s,r){for(const l of e)if(l.issues.length===0)return t.value=l.value,t;const o=e.filter(l=>!ha(l));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:s,errors:e.map(l=>l.issues.map(u=>hr(u,r,fr())))}),t)}const mM=te("$ZodUnion",(e,t)=>{vt.init(e,t),qe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),qe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),qe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),qe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(l=>l._zod.pattern);return new RegExp(`^(${o.map(l=>_m(l.source)).join("|")})$`)}});
vendor: 5,352 bytes, line 47
47const s=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,l)=>{if(s)return r(o,l);let u=!1;const d=[];for(const h of t.options){const p=h._zod.run({value:o.value,issues:[]},l);if(p instanceof Promise)d.push(p),u=!0;else{if(p.issues.length===0)return p;d.push(p)}}return u?Promise.all(d).then(h=>qb(h,o,e,l)):qb(d,o,e,l)}}),gM=te("$ZodIntersection",(e,t)=>{vt.init(e,t),e._zod.parse=(s,r)=>{const o=s.value,l=t.left._zod.run({value:o,issues:[]},r),u=t.right._zod.run({value:o,issues:[]},r);return l instanceof Promise||u instanceof Promise?Promise.all([l,u]).then(([h,p])=>Bb(s,h,p)):Bb(s,l,u)}});function bp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Jo(e)&&Jo(t)){const s=Object.keys(t),r=Object.keys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...t};for(const l of r){const u=bp(e[l],t[l]);if(!u.valid)return{valid:!1,mergeErrorPath:[l,...u.mergeErrorPath]};o[l]=u.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let r=0;r<e.length;r++){const o=e[r],l=t[r],u=bp(o,l);if(!u.valid)return{valid:!1,mergeErrorPath:[r,...u.mergeErrorPath]};s.push(u.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function Bb(e,t,s){const r=new Map;let o;for(const d of t.issues)if(d.code==="unrecognized_keys"){o??(o=d);for(const h of d.keys)r.has(h)||r.set(h,{}),r.get(h).l=!0}else e.issues.push(d);for(const d of s.issues)if(d.code==="unrecognized_keys")for(const h of d.keys)r.has(h)||r.set(h,{}),r.get(h).r=!0;else e.issues.push(d);const l=[...r].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(l.length&&o&&e.issues.push({...o,keys:l}),ha(e))return e;const u=bp(t.value,s.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const yM=te("$ZodEnum",(e,t)=>{vt.init(e,t);const s=J1(t.entries),r=new Set(s);e._zod.values=r,e._zod.pattern=new RegExp(`^(${s.filter(o=>LR.has(typeof o)).map(o=>typeof o=="string"?Iu(o):o.toString()).join("|")})$`),e._zod.parse=(o,l)=>{const u=o.value;return r.has(u)||o.issues.push({code:"invalid_value",values:s,input:u,inst:e}),o}}),vM=te("$ZodTransform",(e,t)=>{vt.init(e,t),e._zod.parse=(s,r)=>{if(r.direction==="backward")throw new X1(e.constructor.name);const o=t.transform(s.value,s);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(u=>(s.value=u,s));if(o instanceof Promise)throw new va;return s.value=o,s}});function Ib(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const fS=te("$ZodOptional",(e,t)=>{vt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qe(e._zod,"pattern",()=>{const s=t.innerType._zod.pattern;return s?new RegExp(`^(${_m(s.source)})?$`):void 0}),e._zod.parse=(s,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(s,r);return o instanceof Promise?o.then(l=>Ib(l,s.value)):Ib(o,s.value)}return s.value===void 0?s:t.innerType._zod.run(s,r)}}),bM=te("$ZodExactOptional",(e,t)=>{fS.init(e,t),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(s,r)=>t.innerType._zod.run(s,r)}),xM=te("$ZodNullable",(e,t)=>{vt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"pattern",()=>{const s=t.innerType._zod.pattern;return s?new RegExp(`^(${_m(s.source)}|null)$`):void 0}),qe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(s,r)=>s.value===null?s:t.innerType._zod.run(s,r)}),wM=te("$ZodDefault",(e,t)=>{vt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(s,r)=>{if(r.direction==="backward")return t.innerType._zod.run(s,r);if(s.value===void 0)return s.value=t.defaultValue,s;const o=t.innerType._zod.run(s,r);return o instanceof Promise?o.then(l=>$b(l,t)):$b(o,t)}});function $b(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const SM=te("$ZodPrefault",(e,t)=>{vt.init(e,t),e._zod.optin="optional",qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(s,r)=>(r.direction==="backward"||s.value===void 0&&(s.value=t.defaultValue),t.innerType._zod.run(s,r))}),_M=te("$ZodNonOptional",(e,t)=>{vt.init(e,t),qe(e._zod,"values",()=>{const s=t.innerType._zod.values;return s?new Set([...s].filter(r=>r!==void 0)):void 0}),e._zod.parse=(s,r)=>{const o=t.innerType._zod.run(s,r);return o instanceof Promise?o.then(l=>Hb(l,e)):Hb(o,e)}});function Hb(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const TM=te("$ZodCatch",(e,t)=>{vt.init(e,t),qe(e._zod,"optin",()=>t.innerType._zod.optin),qe(e._zod,"optout",()=>t.innerType._zod.optout),qe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(s,r)=>{if(r.direction==="backward")return t.innerType._zod.run(s,r);const o=t.innerType._zod.run(s,r);return o instanceof Promise?o.then(l=>(s.value=l.value,l.issues.length&&(s.value=t.catchValue({...s,error:{issues:l.issues.map(u=>hr(u,r,fr()))},input:s.value}),s.issues=[]),s)):(s.value=o.value,o.issues.length&&(s.value=t.catchValue({...s,error:{issues:o.issues.map(l
vendor: 18,171 bytes, lines 47-49
47=>hr(l,r,fr()))},input:s.value}),s.issues=[]),s)}}),EM=te("$ZodPipe",(e,t)=>{vt.init(e,t),qe(e._zod,"values",()=>t.in._zod.values),qe(e._zod,"optin",()=>t.in._zod.optin),qe(e._zod,"optout",()=>t.out._zod.optout),qe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(s,r)=>{if(r.direction==="backward"){const l=t.out._zod.run(s,r);return l instanceof Promise?l.then(u=>zc(u,t.in,r)):zc(l,t.in,r)}const o=t.in._zod.run(s,r);return o instanceof Promise?o.then(l=>zc(l,t.out,r)):zc(o,t.out,r)}});function zc(e,t,s){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},s)}const CM=te("$ZodReadonly",(e,t)=>{vt.init(e,t),qe(e._zod,"propValues",()=>t.innerType._zod.propValues),qe(e._zod,"values",()=>t.innerType._zod.values),qe(e._zod,"optin",()=>t.innerType?._zod?.optin),qe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(s,r)=>{if(r.direction==="backward")return t.innerType._zod.run(s,r);const o=t.innerType._zod.run(s,r);return o instanceof Promise?o.then(Fb):Fb(o)}});function Fb(e){return e.value=Object.freeze(e.value),e}const AM=te("$ZodCustom",(e,t)=>{gs.init(e,t),vt.init(e,t),e._zod.parse=(s,r)=>s,e._zod.check=s=>{const r=s.value,o=t.fn(r);if(o instanceof Promise)return o.then(l=>Qb(l,s,r,e));Qb(o,s,r,e)}});function Qb(e,t,s,r){if(!e){const o={code:"custom",input:s,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(el(o))}}var Zb;class kM{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...s){const r=s[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const s=this._map.get(t);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(t),this}get(t){const s=t._zod.parent;if(s){const r={...this.get(s)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function RM(){return new kM}(Zb=globalThis).__zod_globalRegistry??(Zb.__zod_globalRegistry=RM());const Vo=globalThis.__zod_globalRegistry;function OM(e,t){return new e({type:"string",...Se(t)})}function MM(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Se(t)})}function Gb(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Se(t)})}function NM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Se(t)})}function DM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Se(t)})}function jM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Se(t)})}function zM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Se(t)})}function PM(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Se(t)})}function LM(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Se(t)})}function UM(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Se(t)})}function VM(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Se(t)})}function qM(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Se(t)})}function BM(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Se(t)})}function IM(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Se(t)})}function $M(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Se(t)})}function HM(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Se(t)})}function FM(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Se(t)})}function QM(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Se(t)})}function ZM(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Se(t)})}function GM(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Se(t)})}function YM(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Se(t)})}function KM(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Se(t)})}function XM(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Se(t)})}function WM(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Se(t)})}function JM(e,t){return new e({type:"string",format:"date",check:"string_format",...Se(t)})}function eN(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Se(t)})}function tN(e,t){return new e({type:"string",format:"duration",check:"string_format",...Se(t)})}function nN(e){return new e({type:"unknown"})}function sN(e,t){return new e({type:"never",...Se(t)})}function hS(e,t){return new AO({check:"max_length",...Se(t),maximum:e})}function vu(e,t){return new kO({check:"min_length",...Se(t),minimum:e})}function pS(e,t){return new RO({check:"length_equals",...Se(t),length:e})}function iN(e,t){return new OO({check:"string_format",format:"regex",...Se(t),pattern:e})}function rN(e){return new MO({check:"string_format",format:"lowercase",...Se(e)})}function aN(e){return new NO({check:"string_format",format:"uppercase",...Se(e)})}function oN(e,t){return new DO({check:"string_format",format:"includes",...Se(t),includes:e})}function lN(e,t){return new jO({check:"string_format",format:"starts_with",...Se(t),prefix:e})}function cN(e,t){return new zO({check:"string_format",format:"ends_with",...Se(t),suffix:e})}function Oa(e){return new PO({check:"overwrite",tx:e})}function uN(e){return Oa(t=>t.normalize(e))}function dN(){return Oa(e=>e.trim())}function fN(){return Oa(e=>e.toLowerCase())}function hN(){return Oa(e=>e.toUpperCase())}function pN(){return Oa(e=>zR(e))}function mN(e,t,s){return new e({type:"array",element:t,...Se(s)})}function gN(e,t,s){return new e({type:"custom",check:"custom",fn:t,...Se(s)})}function yN(e){const t=vN(s=>(s.addIssue=r=>{if(typeof r=="string")s.issues.push(el(r,s.value,t._zod.def));else{const o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=s.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),s.issues.push(el(o))}},e(s.value,s)));return t}function vN(e,t){const s=new gs({check:"custom",...Se(t)});return s._zod.check=e,s}function mS(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Vo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Nt(e,t,s={path:[],schemaPath:[]}){var r;const o=e._zod.def,l=t.seen.get(e);if(l)return l.count++,s.schemaPath.includes(e)&&(l.cycle=s.path),l.schema;const u={schema:{},count:1,cycle:void 0,path:s.path};t.seen.set(e,u);const d=e._zod.toJSONSchema?.();if(d)u.schema=d;else{const y={...s,schemaPath:[...s.schemaPath,e],path:s.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,y);else{const v=u.schema,x=t.processors[o.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);x(e,t,v,y)}const g=e._zod.parent;g&&(u.ref||(u.ref=g),Nt(g,t,y),t.seen.get(g).isParent=!0)}const h=t.metadataRegistry.get(e);return h&&Object.assign(u.schema,h),t.io==="input"&&$t(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&u.schema._prefault&&((r=u.schema).default??(r.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function gS(e,t){const s=e.seen.get(t);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const u of e.seen.entries()){const d=e.metadataRegistry.get(u[0])?.id;if(d){const h=r.get(d);if(h&&h!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,u[0])}}const o=u=>{const d=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const g=e.external.registry.get(u[0])?.id,v=e.external.uri??(S=>S);if(g)return{ref:v(g)};const x=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=x,{defId:x,ref:`${v("__shared")}#/${d}/${x}`}}if(u[1]===s)return{ref:"#"};const p=`#/${d}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:p+y}},l=u=>{if(u[1].schema.$ref)return;const d=u[1],{ref:h,defId:p}=o(u);d.def={...d.schema},p&&(d.defId=p);const y=d.schema;for(const g in y)delete y[g];y.$ref=h};if(e.cycles==="throw")for(const u of e.seen.entries()){const d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
48
49Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const d=u[1];if(t===u[0]){l(u);continue}if(e.external){const p=e.external.registry.get(u[0])?.id;if(t!==u[0]&&p){l(u);continue}}if(e.metadataRegistry.get(u[0])?.id){l(u);continue}if(d.cycle){l(u);continue}if(d.count>1&&e.reused==="ref"){l(u);continue}}}function yS(e,t){const s=e.seen.get(t);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const d=e.seen.get(u);if(d.ref===null)return;const h=d.def??d.schema,p={...h},y=d.ref;if(d.ref=null,y){r(y);const v=e.seen.get(y),x=v.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(x)):Object.assign(h,x),Object.assign(h,p),u._zod.parent===y)for(const E in h)E==="$ref"||E==="allOf"||E in p||delete h[E];if(x.$ref&&v.def)for(const E in h)E==="$ref"||E==="allOf"||E in v.def&&JSON.stringify(h[E])===JSON.stringify(v.def[E])&&delete h[E]}const g=u._zod.parent;if(g&&g!==y){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(h.$ref=v.schema.$ref,v.def))for(const x in h)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(h[x])===JSON.stringify(v.def[x])&&delete h[x]}e.override({zodSchema:u,jsonSchema:h,path:d.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,s.def??s.schema);const l=e.external?.defs??{};for(const u of e.seen.entries()){const d=u[1];d.def&&d.defId&&(l[d.defId]=d.def)}e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?o.$defs=l:o.definitions=l);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:bu(t,"input",e.processors),output:bu(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function $t(e,t){const s=t??{seen:new Set};if(s.seen.has(e))return!1;s.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return $t(r.element,s);if(r.type==="set")return $t(r.valueType,s);if(r.type==="lazy")return $t(r.getter(),s);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return $t(r.innerType,s);if(r.type==="intersection")return $t(r.left,s)||$t(r.right,s);if(r.type==="record"||r.type==="map")return $t(r.keyType,s)||$t(r.valueType,s);if(r.type==="pipe")return $t(r.in,s)||$t(r.out,s);if(r.type==="object"){for(const o in r.shape)if($t(r.shape[o],s))return!0;return!1}if(r.type==="union"){for(const o of r.options)if($t(o,s))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if($t(o,s))return!0;return!!(r.rest&&$t(r.rest,s))}return!1}const bN=(e,t={})=>s=>{const r=mS({...s,processors:t});return Nt(e,r),gS(r,e),yS(r,e)},bu=(e,t,s={})=>r=>{const{libraryOptions:o,target:l}=r??{},u=mS({...o??{},target:l,io:t,processors:s});return Nt(e,u),gS(u,e),yS(u,e)},xN={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wN=(e,t,s,r)=>{const o=s;o.type="string";const{minimum:l,maximum:u,format:d,patterns:h,contentEncoding:p}=e._zod.bag;if(typeof l=="number"&&(o.minLength=l),typeof u=="number"&&(o.maxLength=u),d&&(o.format=xN[d]??d,o.format===""&&delete o.format,d==="time"&&delete o.format),p&&(o.contentEncoding=p),h&&h.size>0){const y=[...h];y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},SN=(e,t,s,r)=>{s.not={}},_N=(e,t,s,r)=>{},TN=(e,t,s,r)=>{const o=e._zod.def,l=J1(o.entries);l.every(u=>typeof u=="number")&&(s.type="number"),l.every(u=>typeof u=="string")&&(s.type="string"),s.enum=l},EN=(e,t,s,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},CN=(e,t,s,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},AN=(e,t,s,r)=>{const o=s,l=e._zod.def,{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(o.minItems=u),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=Nt(l.element,t,{...r,path:[...r.path,"items"]})},kN=(e,t,s,r)=>{const o=s,l=e._zod.def;o.type="object",o.properties={};const u=l.shape;for(const p in u)o.properties[p]=Nt(u[p],t,{...r,path:[...r.path,"properties",p]});const d=new Set(Object.keys(u)),h=new Set([...d].filter(p=>{const y=l.shape[p]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));h.size>0&&(o.required=Array.from(h)),l.catchall?._zod.def.type==="never"?o.additionalProperties=!1:l.catchall?l.catchall&&(o.additionalProperties=Nt(l.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},RN=(e,t,s,r)=>{const o=e._zod.def,l=o.inclusive===!1,u=o.options.map((d,h)=>Nt(d,t,{...r,path:[...r.path,l?"oneOf":"anyOf",h]}));l?s.oneOf=u:s.anyOf=u},ON=(e,t,s,r)=>{const o=e._zod.def,l=Nt(o.left,t,{...r,path:[...r.path,"allOf",0]}),u=Nt(o.right,t,{...r,path:[...r.path,"allOf",1]}),d=p=>"allOf"in p&&Object.keys(p).length===1,h=[...d(l)?l.allOf:[l],...d(u)?u.allOf:[u]];s.allOf=h},MN=(e,t,s,r)=>{const o=e._zod.def,l=Nt(o.innerType,t,r),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=o.innerType,s.nullable=!0):s.anyOf=[l,{type:"null"}]},NN=(e,t,s,r)=>{const o=e._zod.def;Nt(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType},DN=(e,t,s,r)=>{const o=e._zod.def;Nt(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,s.default=JSON.parse(JSON.stringify(o.defaultValue))},jN=(e,t,s,r)=>{const o=e._zod.def;Nt(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,t.io==="input"&&(s._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},zN=(e,t,s,r)=>{const o=e._zod.def;Nt(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType;let u;try{u=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}s.default=u},PN=(e,t,s,r)=>{const o=e._zod.def,l=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Nt(l,t,r);const u=t.seen.get(e);u.ref=l},LN=(e,t,s,r)=>{const o=e._zod.def;Nt(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType,s.readOnly=!0},vS=(e,t,s,r)=>{const o=e._zod.def;Nt(o.innerType,t,r);const l=t.seen.get(e);l.ref=o.innerType},UN=te("ZodISODateTime",(e,t)=>{KO.init(e,t),tt.init(e,t)});function VN(e){return WM(UN,e)}const qN=te("ZodISODate",(e,t)=>{XO.init(e,t),tt.init(e,t)});function BN(e){return JM(qN,e)}const IN=te("ZodISOTime",(e,t)=>{WO.init(e,t),tt.init(e,t)});function $N(e){return eN(IN,e)}const HN=te("ZodISODuration",(e,t)=>{JO.init(e,t),tt.init(e,t)});function FN(e){return tN(HN,e)}const QN=(e,t)=>{iS.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:s=>ZR(e,s)},flatten:{value:s=>QR(e,s)},addIssue:{value:s=>{e.issues.push(s),e.message=JSON.stringify(e.issues,vp,2)}},addIssues:{value:s=>{e.issues.push(...s),e.message=JSON.stringify(e.issues,vp,2)}},isEmpty:{get(){return e.issues.length===0}}})},zn=te("ZodError",QN,{Parent:Error}),ZN=Em(zn),GN=Cm(zn),YN=$u(zn),KN=Hu(zn),XN=KR(zn),WN=XR(zn),JN=WR(zn),e3=JR(zn),t3=eO(zn),n3=tO(zn),s3=nO(zn),i3=sO(zn),bt=te("ZodType",(e,t)=>(vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:bu(e,"input"),output:bu(e,"output")}}),e.toJSONSchema=bN(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...s)=>e.clone(Ri(t,{checks:[...t.checks??[],...s.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(s,r)=>Oi(e,s,r),e.brand=()=>e,e.register=((s,r)=>(s.add(e,r),e)),e.parse=(s,r)=>ZN(e,s,r,{callee:e.parse}),e.safeParse=(s,r)=>YN(e,s,r),e.parseAsync=async(s,r)=>GN(e,s,r,{callee:e.parseAsync}),e.safeParseAsync=async(s,r)=>KN(e,s,r),e.spa=e.safeParseAsync,e.encode=(s,r)=>XN(e,s,r),e.decode=(s,r)=>WN(e,s,r),e.encodeAsync=async(s,r)=>JN(e,s,r),e.decodeAsync=async(s,r)=>e3(e,s,r),e.safeEncode=(s,r)=>t3(e,s,r),e.safeDecode=(s,r)=>n3(e,s,r),e.safeEncodeAsync=async(s,r)=>s3(e,s,r),e.safeDecodeAsync=async(s,r)=>i3(e,s,r),e.refine=(s,r)=>e.check(W3(s,r)),e.superRefine=s=>e.check(J3(s)),e.overwrite=s=>e.check(Oa(s)),e.optional=()=>Xb(e),e.exactOptional=()=>V3(e),e.nullable=()=>Wb(e),e.nullish=()=>Xb(Wb(e)),e.nonoptional=s=>F3(e,s),e.array=()=>k3(e),e.or=s=>N3([e,s]),e.and=s=>j3(e,s),e.transform=s=>Jb(e,L3(s)),e.default=s=>I3(e,s),e.prefault=s=>H3(e,s),e.catch=s=>Z3(e,s),e.pipe=s=>Jb(e,s),e.readonly=()=>K3(e),e.describe=s=>{const r=e.clone();return Vo.add(r,{description:s}),r},Object.defineProperty(e,"description",{get(){return Vo.get(e)?.description},configurable:!0}),e.meta=(...s)=>{if(s.length===0)return Vo.get(e);const r=e.clone();return Vo.add(r,s[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>
vendor: 5,173 bytes, line 49
49e.safeParse(null).success,e.apply=s=>s(e),e)),bS=te("_ZodString",(e,t)=>{Am.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,o,l)=>wN(e,r,o);const s=e._zod.bag;e.format=s.format??null,e.minLength=s.minimum??null,e.maxLength=s.maximum??null,e.regex=(...r)=>e.check(iN(...r)),e.includes=(...r)=>e.check(oN(...r)),e.startsWith=(...r)=>e.check(lN(...r)),e.endsWith=(...r)=>e.check(cN(...r)),e.min=(...r)=>e.check(vu(...r)),e.max=(...r)=>e.check(hS(...r)),e.length=(...r)=>e.check(pS(...r)),e.nonempty=(...r)=>e.check(vu(1,...r)),e.lowercase=r=>e.check(rN(r)),e.uppercase=r=>e.check(aN(r)),e.trim=()=>e.check(dN()),e.normalize=(...r)=>e.check(uN(...r)),e.toLowerCase=()=>e.check(fN()),e.toUpperCase=()=>e.check(hN()),e.slugify=()=>e.check(pN())}),r3=te("ZodString",(e,t)=>{Am.init(e,t),bS.init(e,t),e.email=s=>e.check(MM(o3,s)),e.url=s=>e.check(PM(l3,s)),e.jwt=s=>e.check(XM(_3,s)),e.emoji=s=>e.check(LM(c3,s)),e.guid=s=>e.check(Gb(Yb,s)),e.uuid=s=>e.check(NM(Pc,s)),e.uuidv4=s=>e.check(DM(Pc,s)),e.uuidv6=s=>e.check(jM(Pc,s)),e.uuidv7=s=>e.check(zM(Pc,s)),e.nanoid=s=>e.check(UM(u3,s)),e.guid=s=>e.check(Gb(Yb,s)),e.cuid=s=>e.check(VM(d3,s)),e.cuid2=s=>e.check(qM(f3,s)),e.ulid=s=>e.check(BM(h3,s)),e.base64=s=>e.check(GM(x3,s)),e.base64url=s=>e.check(YM(w3,s)),e.xid=s=>e.check(IM(p3,s)),e.ksuid=s=>e.check($M(m3,s)),e.ipv4=s=>e.check(HM(g3,s)),e.ipv6=s=>e.check(FM(y3,s)),e.cidrv4=s=>e.check(QM(v3,s)),e.cidrv6=s=>e.check(ZM(b3,s)),e.e164=s=>e.check(KM(S3,s)),e.datetime=s=>e.check(VN(s)),e.date=s=>e.check(BN(s)),e.time=s=>e.check($N(s)),e.duration=s=>e.check(FN(s))});function a3(e){return OM(r3,e)}const tt=te("ZodStringFormat",(e,t)=>{We.init(e,t),bS.init(e,t)}),o3=te("ZodEmail",(e,t)=>{BO.init(e,t),tt.init(e,t)}),Yb=te("ZodGUID",(e,t)=>{VO.init(e,t),tt.init(e,t)}),Pc=te("ZodUUID",(e,t)=>{qO.init(e,t),tt.init(e,t)}),l3=te("ZodURL",(e,t)=>{IO.init(e,t),tt.init(e,t)}),c3=te("ZodEmoji",(e,t)=>{$O.init(e,t),tt.init(e,t)}),u3=te("ZodNanoID",(e,t)=>{HO.init(e,t),tt.init(e,t)}),d3=te("ZodCUID",(e,t)=>{FO.init(e,t),tt.init(e,t)}),f3=te("ZodCUID2",(e,t)=>{QO.init(e,t),tt.init(e,t)}),h3=te("ZodULID",(e,t)=>{ZO.init(e,t),tt.init(e,t)}),p3=te("ZodXID",(e,t)=>{GO.init(e,t),tt.init(e,t)}),m3=te("ZodKSUID",(e,t)=>{YO.init(e,t),tt.init(e,t)}),g3=te("ZodIPv4",(e,t)=>{eM.init(e,t),tt.init(e,t)}),y3=te("ZodIPv6",(e,t)=>{tM.init(e,t),tt.init(e,t)}),v3=te("ZodCIDRv4",(e,t)=>{nM.init(e,t),tt.init(e,t)}),b3=te("ZodCIDRv6",(e,t)=>{sM.init(e,t),tt.init(e,t)}),x3=te("ZodBase64",(e,t)=>{iM.init(e,t),tt.init(e,t)}),w3=te("ZodBase64URL",(e,t)=>{aM.init(e,t),tt.init(e,t)}),S3=te("ZodE164",(e,t)=>{oM.init(e,t),tt.init(e,t)}),_3=te("ZodJWT",(e,t)=>{cM.init(e,t),tt.init(e,t)}),T3=te("ZodUnknown",(e,t)=>{uM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>_N()});function Kb(){return nN(T3)}const E3=te("ZodNever",(e,t)=>{dM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>SN(e,s,r)});function C3(e){return sN(E3,e)}const A3=te("ZodArray",(e,t)=>{fM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>AN(e,s,r,o),e.element=t.element,e.min=(s,r)=>e.check(vu(s,r)),e.nonempty=s=>e.check(vu(1,s)),e.max=(s,r)=>e.check(hS(s,r)),e.length=(s,r)=>e.check(pS(s,r)),e.unwrap=()=>e.element});function k3(e,t){return mN(A3,e,t)}const R3=te("ZodObject",(e,t)=>{pM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>kN(e,s,r,o),qe(e,"shape",()=>t.shape),e.keyof=()=>z3(Object.keys(e._zod.def.shape)),e.catchall=s=>e.clone({...e._zod.def,catchall:s}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Kb()}),e.loose=()=>e.clone({...e._zod.def,catchall:Kb()}),e.strict=()=>e.clone({...e._zod.def,catchall:C3()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=s=>BR(e,s),e.safeExtend=s=>IR(e,s),e.merge=s=>$R(e,s),e.pick=s=>VR(e,s),e.omit=s=>qR(e,s),e.partial=(...s)=>HR(xS,e,s[0]),e.required=(...s)=>FR(wS,e,s[0])});function O3(e,t){const s={type:"object",shape:e??{},...Se(t)};return new R3(s)}const M3=te("ZodUnion",(e,t)=>{mM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>RN(e,s,r,o),e.options=t.options});function N3(e,t){return new M3({type:"union",options:e,...Se(t)})}const D3=te("ZodIntersection",(e,t)=>{gM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>ON(e,s,r,o)});function j3(e,t){return new D3({type:"intersection",left:e,right:t})}const xp=te("ZodEnum",(e,t)=>{yM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(r,o,l)=>TN(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const s=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const l={};for(const u of r)if(s.has(u))l[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new xp({...t,checks:[],...Se(o),entries:l})},e.exclude=(r,o)=>{const l={...t.entries};for(const u of r)if(s.has(u))delete l[u];else throw new Error(`Key ${u} not found in enum`);return new xp({...t,checks:[],...Se(o),entries:l})}});function z3(e,t){const s=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new xp({type:"enum",entries:s,...Se(t)})}const P3=te("ZodTransform",(e,t)=>{vM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>CN(e,s),e._zod.parse=(s,r)=>{if(r.direction==="backward")throw new X1(e.constructor.name);s.addIssue=l=>
49{if(typeof l=="string")s.issues.push(el(l,s.value,t));else{const u=l;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=s.value),u.inst??(u.inst=e),s.issues.push(el(u))}};const o=t.transform(s.value,s);return o instanceof Promise?o.then(l=>(s.value=l,s)):(s.value=o,s)}});function L3(e){return new P3({type:"transform",transform:e})}const xS=te("ZodOptional",(e,t)=>{fS.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>vS(e,s,r,o),e.unwrap=()=>e._zod.def.innerType});function Xb(e){return new xS({type:"optional",innerType:e})}const U3=te("ZodExactOptional",(e,t)=>{bM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>vS(e,s,r,o),e.unwrap=()=>e._zod.def.innerType});function V3(e){return new U3({type:"optional",innerType:e})}const q3=te("ZodNullable",(e,t)=>{xM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>MN(e,s,r,o),e.unwrap=()=>e._zod.def.innerType});function Wb(e){return new q3({type:"nullable",innerType:e})}const B3=te("ZodDefault",(e,t)=>{wM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>DN(e,s,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function I3(e,t){return new B3({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():tS(t)}})}const $3=te("ZodPrefault",(e,t)=>{SM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>jN(e,s,r,o),e.unwrap=()=>e._zod.def.innerType});function H3(e,t){return new $3({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():tS(t)}})}const wS=te("ZodNonOptional",(e,t)=>{_M.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>NN(e,s,r,o),e.unwrap=()=>e._zod.def.innerType});function F3(e,t){return new wS({type:"nonoptional",innerType:e,...Se(t)})}const Q3=te("ZodCatch",(e,t)=>{TM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>zN(e,s,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Z3(e,t){return new Q3({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const G3=te("ZodPipe",(e,t)=>{EM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>PN(e,s,r,o),e.in=t.in,e.out=t.out});function Jb(e,t){return new G3({type:"pipe",in:e,out:t})}const Y3=te("ZodReadonly",(e,t)=>{CM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>LN(e,s,r,o),e.unwrap=()=>e._zod.def.innerType});function K3(e){return new Y3({type:"readonly",innerType:e})}const X3=te("ZodCustom",(e,t)=>{AM.init(e,t),bt.init(e,t),e._zod.processJSONSchema=(s,r,o)=>EN(e,s)});function W3(e,t={}){return gN(X3,e,t)}function J3(e){return yN(e)}const eD=2e4,tD=O3({message:a3()});function nD(e={}){const{timeoutMs:t=eD,isBackendAuthenticated:s=!0,onSync:r,onSuccess:o,onNoAuthParams:l}=e,{isLoading:u,isAuthenticated:d,error:h,signinRedirect:p}=Q1(),[y,g]=_.useState("processing-oauth"),[v,x]=_.useState(null),S=_.useRef(!0),E=_.useRef(H1()),C=_.useRef(!1);_.useEffect(()=>()=>{S.current=!1},[]),_.useEffect(()=>{if(y==="success"||y==="error")return;const M=setTimeout(()=>{S.current&&(g("error"),x("Authentication timed out. Please try again."))},t);return()=>clearTimeout(M)},[y,t]),_.useEffect(()=>{if(!(y!=="processing-oauth"&&y!=="waiting-backend")){if(h){g("error"),x(h.message||"Authentication failed");return}if(!E.current&&!u&&!d){l?.();return}if(!u&&d&&y==="processing-oauth"){g("waiting-backend");return}if(E.current&&!u&&!d&&!h&&y==="processing-oauth"){const M=setTimeout(()=>{S.current&&!d&&(g("error"),x("Authentication was cancelled or failed. Please try again."))},500);return()=>clearTimeout(M)}}},[u,d,h,y,l]),_.useEffect(()=>{if(y!=="waiting-backend"||!s||C.current)return;C.current=!0;async function M(){if(S.current){g("syncing");try{r&&await r(),S.current&&g("success")}catch(k){if(console.error("Auth callback sync failed:",k),!S.current)return;if(k instanceof mu){const P=tD.safeParse(k.data);if(P.success){g("error"),x(P.data.message);return}}const D=k instanceof Error?k.message:"Failed to complete authentication. Please try again.";g("error"),x(D)}}}M()},[y,s,r]),_.useEffect(()=>{y==="success"&&o?.()},[y,o]);const A=_.useCallback(async()=>{try{await p()}catch(M){console.error("Failed to restart auth:",M)}},[p]);return{status:y,error:v,isLoading:y!=="success"&&y!=="error",isSuccess:y==="success",isError:y==="error",retry:A}}function sD(){window.history.replaceState({},document.title,window.location.pathname)}function iD(){window.location.pathname=""}const rD={onSignoutCallback:iD,onSigninCallback:sD};function aD({children:e,userManagerSettings:t,authority:s,client_id:r,...o}
49){const[l]=_.useState(()=>new $1({...t,authority:t?.authority??s,client_id:t?.client_id??r,prompt:t?.prompt??"select_account",response_type:t?.response_type??"code",scope:t?.scope??"openid profile email offline_access",redirect_uri:t?.redirect_uri??`${window.location.origin}/auth/callback`,post_logout_redirect_uri:t?.post_logout_redirect_uri??window.location.origin,userStore:t?.userStore??new ym({store:window.localStorage})}));return w.jsx(gR,{userManager:l,...rD,...o,children:e})}function oD({children:e}){return w.jsx(aD,{"data-hercules-id":"src/components/providers/auth.tsx:5:4","data-hercules-name":"HerculesAuthProvider",authority:"https://hercules.app",client_id:"sznEcsDGeGqMacYXyBcRjGSQMKBNwozX",userManagerSettings:{prompt:"select_account",response_type:"code",scope:"openid profile email offline_access",redirect_uri:`${window.location.origin}/auth/callback`},children:e})}const ex="1.35.1";var lD=Object.defineProperty,cD=(e,t,s)=>t in e?lD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,tx=(e,t,s)=>cD(e,typeof t!="symbol"?t+"":t,s);const uD="color:rgb(0, 145, 255)";function SS(e){switch(e){case"query":return"Q";case"mutation":return"M";case"action":return"A";case"any":return"?"}}class _S{constructor(t){tx(this,"_onLogLineFuncs"),tx(this,"_verbose"),this._onLogLineFuncs={},this._verbose=t.verbose}addLogLineListener(t){let s=Math.random().toString(36).substring(2,15);for(let r=0;r<10&&this._onLogLineFuncs[s]!==void 0;r++)s=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[s]=t,()=>{delete this._onLogLineFuncs[s]}}logVerbose(...t){if(this._verbose)for(const s of Object.values(this._onLogLineFuncs))s("debug",`${new Date().toISOString()}`,...t)}log(...t){for(const s of Object.values(this._onLogLineFuncs))s("info",...t)}warn(...t){for(const s of Object.values(this._onLogLineFuncs))s("warn",...t)}error(...t){for(const s of Object.values(this._onLogLineFuncs))s("error",...t)}}function TS(e){const t=new _S(e);return t.addLogLineListener((s,...r)=>{switch(s){case"debug":console.debug(...r);break;case"info":console.log(...r);break;case"warn":console.warn(...r);break;case"error":console.error(...r);break;default:console.log(...r)}}),t}function ES(e){return new _S(e)}function xu(e,t,s,r,o){const l=SS(s);if(typeof o=="object"&&(o=`ConvexError ${JSON.stringify(o.errorData,null,2)}`),t==="info"){const u=o.match(/^\[.*?\] /);if(u===null){e.error(`[CONVEX ${l}(${r})] Could not parse console.log`);return}const d=o.slice(1,u[0].length-2),h=o.slice(u[0].length);e.log(`%c[CONVEX ${l}(${r})] [${d}]`,uD,h)}else e.error(`[CONVEX ${l}(${r})] ${o}`)}function dD(e,t){const s=`[CONVEX FATAL ERROR] ${t}`;return e.error(s),new Error(s)}function pa(e,t,s){return`[CONVEX ${SS(e)}(${t})] ${s.errorMessage}
50  Called by client`}function wp(e,t){return t.data=e.errorData,t}function pr(e){const t=e.split(":");let s,r;return t.length===1?(s=t[0],r="default"):(s=t.slice(0,t.length-1).join(":"),r=t[t.length-1]),s.endsWith(".js")&&(s=s.slice(0,-3)),`${s}:${r}`}function lr(e,t){return JSON.stringify({udfPath:pr(e),args:hs(t)})}function nx(e,t,s){const{initialNumItems:r,id:o}=s;return JSON.stringify({type:"paginated",udfPath:pr(e),args:hs(t),options:hs({initialNumItems:r,id:o})})}var fD=Object.defineProperty,hD=(e,t,s)=>t in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,es=(e,t,s)=>hD(e,typeof t!="symbol"?t+"":t,s);class pD{constructor(){es(this,"nextQueryId"),es(this,"querySetVersion"),es(this,"querySet"),es(this,"queryIdToToken"),es(this,"identityVersion"),es(this,"auth"),es(this,"outstandingQueriesOlderThanRestart"),es(this,"outstandingAuthOlderThanRestart"),es(this,"paused"),es(this,"pendingQuerySetModifications"),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return this.outstandingQueriesOlderThanRestart.size===0&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(t,s,r,o){const l=pr(t),u=lr(l,s),d=this.querySet.get(u);if(d!==void 0)return d.numSubscribers+=1,{queryToken:u,modification:null,unsubscribe:()=>this.removeSubscriber(u)};
50{const h=this.nextQueryId++,p={id:h,canonicalizedUdfPath:l,args:s,numSubscribers:1,journal:r,componentPath:o};this.querySet.set(u,p),this.queryIdToToken.set(h,u);const y=this.querySetVersion,g=this.querySetVersion+1,v={type:"Add",queryId:h,udfPath:l,args:[hs(s)],journal:r,componentPath:o};return this.paused?this.pendingQuerySetModifications.set(h,v):this.querySetVersion=g,{queryToken:u,modification:{type:"ModifyQuerySet",baseVersion:y,newVersion:g,modifications:[v]},unsubscribe:()=>this.removeSubscriber(u)}}}transition(t){for(const s of t.modifications)switch(s.type){case"QueryUpdated":case"QueryFailed":{this.outstandingQueriesOlderThanRestart.delete(s.queryId);const r=s.journal;if(r!==void 0){const o=this.queryIdToToken.get(s.queryId);o!==void 0&&(this.querySet.get(o).journal=r)}break}case"QueryRemoved":{this.outstandingQueriesOlderThanRestart.delete(s.queryId);break}default:throw new Error(`Invalid modification ${s.type}`)}}queryId(t,s){const r=pr(t),o=lr(r,s),l=this.querySet.get(o);return l!==void 0?l.id:null}isCurrentOrNewerAuthVersion(t){return t>=this.identityVersion}getAuth(){return this.auth}setAuth(t){this.auth={tokenType:"User",value:t};const s=this.identityVersion;return this.paused||(this.identityVersion=s+1),{type:"Authenticate",baseVersion:s,...this.auth}}setAdminAuth(t,s){const r={tokenType:"Admin",value:t,impersonating:s};this.auth=r;const o=this.identityVersion;return this.paused||(this.identityVersion=o+1),{type:"Authenticate",baseVersion:o,...r}}clearAuth(){this.auth=void 0,this.markAuthCompletion();const t=this.identityVersion;return this.paused||(this.identityVersion=t+1),{type:"Authenticate",tokenType:"None",baseVersion:t}}hasAuth(){return!!this.auth}isNewAuth(t){return this.auth?.value!==t}queryPath(t){const s=this.queryIdToToken.get(t);return s?this.querySet.get(s).canonicalizedUdfPath:null}queryArgs(t){const s=this.queryIdToToken.get(t);return s?this.querySet.get(s).args:null}queryToken(t){return this.queryIdToToken.get(t)??null}queryJournal(t){return this.querySet.get(t)?.journal}restart(){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();const t=[];for(const o of this.querySet.values()){const l={type:"Add",queryId:o.id,udfPath:o.canonicalizedUdfPath,args:[hs(o.args)],journal:o.journal,componentPath:o.componentPath};t.push(l),this.outstandingQueriesOlderThanRestart.add(o.id)}this.querySetVersion=1;const s={type:"ModifyQuerySet",baseVersion:0,newVersion:1,modifications:t};if(!this.auth)return this.identityVersion=0,[s,void 0];this.outstandingAuthOlderThanRestart=!0;const r={type:"Authenticate",baseVersion:0,...this.auth};return this.identityVersion=1,[s,r]}pause(){this.paused=!0}resume(){const t=this.pendingQuerySetModifications.size>0?{type:"ModifyQuerySet",baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,s=this.auth!==void 0?{type:"Authenticate",baseVersion:this.identityVersion++,...this.auth}:void 0;return this.unpause(),[t,s]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(t){const s=this.querySet.get(t);if(s.numSubscribers>1)return s.numSubscribers-=1,null;{this.querySet.delete(t),this.queryIdToToken.delete(s.id),this.outstandingQueriesOlderThanRestart.delete(s.id);const r=this.querySetVersion,o=this.querySetVersion+1,l={type:"Remove",queryId:s.id};return this.paused?this.pendingQuerySetModifications.has(s.id)?this.pendingQuerySetModifications.delete(s.id):this.pendingQuerySetModifications.set(s.id,l):this.querySetVersion=o,{type:"ModifyQuerySet",baseVersion:r,newVersion:o,modifications:[l]}}}}var mD=Object.defineProperty,gD=(e,t,s)=>t in e?mD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Lc=(e,t,s)=>gD(e,typeof t!="symbol"?t+"":t,s);class yD{constructor(t,s){this.logger=t,this.markConnectionStateDirty=s,Lc(this,"inflightRequests"),Lc(this,"requestsOlderThanRestart"),Lc(this,"inflightMutationsCount",0),Lc(this,"inflightActionsCount",0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(t,s){const r=new Promise(o=>{const l=s?"Requested":"NotSent";this.inflightRequests.set(t.requestId,{message:t,status:{status:l,requestedAt:new Date,onResult:o}}),t.type==="Mutation"?this.inflightMutationsCount++:t.type==="Action"&&this.inflightActionsCount++});return this.markConnectionStateDirty(),r}onResponse(t){const s=this.inflightRequests.get(t.requestId);if(s===void 0||s.status.status==="Completed")return null;const r=s.message.type==="Mutation"?"mutation":"action",o=s.message.udfPath;for(const h of t.logLines)xu(this.logger,"info",r,o,h);const l=s.status;let u,d;if(t.success)u={success:!0,logLines:t.logLines,value:Sa(t.result)},d=()=>l.onResult(u);else{const h=t.result,{errorData:p}=t;xu(this.logger,"error",r,o,h),u={success:!1,errorMessage:h,errorData:p!==void 0?Sa(p):void 0,logLines:t.logLines},d=()=>l.onResult(u)}return t.type==="ActionResponse"||!t.success?(d(),this.inflightRequests.delete(t.requestId),this.requestsOlderThanRestart.delete(t.requestId),s.message.type==="Action"?this.inflightActionsCount--:s.message.type==="Mutation"&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:t.requestId,result:u}
50):(s.status={status:"Completed",result:u,ts:t.ts,onResolve:d},null)}removeCompleted(t){const s=new Map;for(const[r,o]of this.inflightRequests.entries()){const l=o.status;l.status==="Completed"&&l.ts.lessThanOrEqual(t)&&(l.onResolve(),s.set(r,l.result),o.message.type==="Mutation"?this.inflightMutationsCount--:o.message.type==="Action"&&this.inflightActionsCount--,this.inflightRequests.delete(r),this.requestsOlderThanRestart.delete(r))}return s.size>0&&this.markConnectionStateDirty(),s}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());const t=[];for(const[s,r]of this.inflightRequests){if(r.status.status==="NotSent"){r.status.status="Requested",t.push(r.message);continue}if(r.message.type==="Mutation")t.push(r.message);else if(r.message.type==="Action"){if(this.inflightRequests.delete(s),this.requestsOlderThanRestart.delete(s),this.inflightActionsCount--,r.status.status==="Completed")throw new Error("Action should never be in 'Completed' state");r.status.onResult({success:!1,errorMessage:"Connection lost while action was in flight",logLines:[]})}}return this.markConnectionStateDirty(),t}resume(){const t=[];for(const[,s]of this.inflightRequests)if(s.status.status==="NotSent"){s.status.status="Requested",t.push(s.message);continue}return t}hasIncompleteRequests(){for(const t of this.inflightRequests.values())if(t.status.status==="Requested")return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return this.requestsOlderThanRestart.size===0}timeOfOldestInflightRequest(){if(this.inflightRequests.size===0)return null;let t=Date.now();for(const s of this.inflightRequests.values())s.status.status!=="Completed"&&s.status.requestedAt.getTime()<t&&(t=s.status.requestedAt.getTime());return new Date(t)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}}const tl=Symbol.for("functionName"),CS=Symbol.for("toReferencePath");function vD(e){return e[CS]??null}function bD(e){return e.startsWith("function://")}function xD(e){let t;if(typeof e=="string")bD(e)?t={functionHandle:e}:t={name:e};else if(e[tl])t={name:e[tl]};else{const s=vD(e);if(!s)throw new Error(`${e} is not a functionReference`);t={reference:s}}return t}function Ft(e){const t=xD(e);if(t.name===void 0)throw t.functionHandle!==void 0?new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`):t.reference!==void 0?new Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`):new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`);if(typeof e=="string")return e;const s=e[tl];if(!s)throw new Error(`${e} is not a functionReference`);return s}function km(e){return{[tl]:e}}function AS(e=[]){const t={get(s,r){if(typeof r=="string"){const o=[...e,r];return AS(o)}else if(r===tl){if(e.length<2){const u=["api",...e].join(".");throw new Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${u}\``)}const o=e.slice(0,-1).join("/"),l=e[e.length-1];return l==="default"?o:o+":"+l}else return r===Symbol.toStringTag?"FunctionReference":void 0}};return new Proxy({},t)}const wD=AS();var SD=Object.defineProperty,_D=(e,t,s)=>t in e?SD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,wu=(e,t,s)=>_D(e,typeof t!="symbol"?t+"":t,s);class nl{constructor(t){wu(this,"queryResults"),wu(this,"modifiedQueries"),this.queryResults=t,this.modifiedQueries=[]}getQuery(t,...s){const r=Vs(s[0]),o=Ft(t),l=this.queryResults.get(lr(o,r));if(l!==void 0)return nl.queryValue(l.result)}getAllQueries(t){const s=[],r=Ft(t);for(const o of this.queryResults.values())o.udfPath===pr(r)&&s.push({args:o.args,value:nl.queryValue(o.result)});return s}setQuery(t,s,r){const o=Vs(s),l=Ft(t),u=lr(l,o);let d;r===void 0?d=void 0:d={success:!0,value:r,logLines:[]};const h={udfPath:l,args:o,result:d};this.queryResults.set(u,h),this.modifiedQueries.push(u)}static queryValue(t){if(t!==void 0)return t.success?t.value:void 0}}class TD{constructor(){wu(this,"queryResults"),wu(this,"optimisticUpdates"),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(t,s){this.optimisticUpdates=this.optimisticUpdates.filter(u=>!s.has(u.mutationId));const r=this.queryResults;this.queryResults=new Map(t);const o=new nl(this.queryResults);for(const u of this.optimisticUpdates)u.update(o);const l=[];for(const[u,d]of this.queryResults){const h=r.get(u);(h===void 0||h.result!==d.result)&&l.push(u)}return l}applyOptimisticUpdate(t,s){this.optimisticUpdates.push({update:t,mutationId:s});const r=new nl(this.queryResults);return t(r),r.modifiedQueries}rawQueryResult(t){const s=this.queryResults.get(t);if(s!==void 0)return s.result}queryResult(t){const s=this.queryResults.get(t);if(s===void 0)return;const r=s.result;if(r!==void 0){if(r.success)return r.value;throw r.errorData!==void 0?wp(r,new mu(pa("query",s.udfPath,r))):new Error(pa("query",s.udfPath,r))}}hasQueryResult(t){return this.queryResults.get(t)!==void 0}queryLogs(t){return this.queryResults.get(t)?.result?.logLines}}var ED=Object.defineProperty,CD=(e,t,s)=>t in e?ED(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,jh=(e,t,s)=>CD(e,typeof t!="symbol"?t+"":t,s);class on{constructor(t,s){jh(this,"low"),jh(this,"high"),jh(this,"__isUnsignedLong__"),this.low=t|0,this.high=s|0,this.__isUnsignedLong__=!0}static isLong(t){return(t&&t.__isUnsignedLong__)===!0}static fromBytesLE(t){return new on(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24)}toBytesLE(){const t=this.high,s=this.low;return[s&255,s>>>8&255,s>>>16&255,s>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}static fromNumber(t){return isNaN(t)||t<0?sx:t>=AD?kD:new on(t%Ho|0,t/Ho|0)}toString(){return(BigInt(this.high)*BigInt(Ho)+BigInt(this.low)).toString()}equals(t){return on.isLong(t)||(t=on.fromValue(t)),this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}notEquals(t){return!this.equals(t)}comp(t){return on.isLong(t)||(t=on.fromValue(t)),this.equals(t)?0:t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(t){return this.comp(t)<=0}static fromValue(t){return typeof t=="number"?on.fromNumber(t):new on(t.low,t.high)}}const sx=new on(0,0),ix=65536,Ho=ix*ix,AD=Ho*Ho,kD=new on(-1,-1);var RD=Object.defineProperty,OD=(e,t,s)=>t in e?RD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Uc=(e,t,s)=>OD(e,typeof t!="symbol"?t+"":t,s);class rx{constructor(t,s){Uc(this,"version"),Uc(this,"remoteQuerySet"),Uc(this,"queryPath"),Uc(this,"logger"),this.version={querySet:0,ts:on.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=t,this.logger=s}transition(t){const s=t.startVersion;if(this.version.querySet!==s.querySet||this.version.ts.notEquals(s.ts)||this.version.identity!==s.identity)throw new Error(`Invalid start version: ${s.ts.toString()}:${s.querySet}:${s.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(const r of t.modifications)switch(r.type){case"QueryUpdated":{const o=this.queryPath(r.queryId);if(o)for(const u of r.logLines)xu(this.logger,"info","query",o,u);const l=Sa(r.value??null);this.remoteQuerySet.set(r.queryId,{success:!0,value:l,logLines:r.logLines});break}case"QueryFailed":{const o=this.queryPath(r.queryId);if(o)for(const u of r.logLines)xu(this.logger,"info","query",o,u);const{errorData:l}=r;this.remoteQuerySet.set(r.queryId,{success:!1,errorMessage:r.errorMessage,errorData:l!==void 0?Sa(l):void 0,logLines:r.logLines});break}case"QueryRemoved":{this.remoteQuerySet.delete(r.queryId);break}default:throw new Error(`Invalid modification ${r.type}`)}this.version=t.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}}function zh(e){const t=Xo(e);return on.fromBytesLE(Array.from(t))}function MD(e){const t=new Uint8Array(e.toBytesLE());return Wo(t)}function ax(e){switch(e.type){case"FatalError":case"AuthError":case"ActionResponse":case"TransitionChunk":case"Ping":return{...e};case"MutationResponse":return e.success?{...e,ts:zh(e.ts)}:{...e};case"Transition":return{...e,startVersion:{...e.startVersion,ts:zh(e.startVersion.ts)},endVersion:{...e.endVersion,ts:zh(e.endVersion.ts)}}}}function ND(e){switch(e.type){case"Authenticate":case"ModifyQuerySet":case"Mutation":case"Action":case"Event":return{...e};case"Connect":return e.maxObservedTimestamp!==void 0?{...e,maxObservedTimestamp:MD(e.maxObservedTimestamp)}:{...e,maxObservedTimestamp:void 0}}}var DD=Object.defineProperty,jD=(e,t,s)=>t in e?DD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,dt=(e,t,s)=>jD(e,typeof t!="symbol"?t+"":t,s);const zD=1e3,PD=1001,LD=1005,UD=4040;let Jc;function ua(){return Jc===void 0&&(Jc=Date.now()),typeof performance>"u"||!performance.now?Date.now():Math.round(Jc+performance.now())}function ox(){return`t=${Math.round((ua()-Jc)/100)/10}s`}const kS={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};function VD(e){if(e===void 0)return"Unknown";
50for(const t of Object.keys(kS))if(e.startsWith(t))return t;return"Unknown"}class qD{constructor(t,s,r,o,l,u){this.markConnectionStateDirty=l,this.debug=u,dt(this,"socket"),dt(this,"connectionCount"),dt(this,"_hasEverConnected",!1),dt(this,"lastCloseReason"),dt(this,"transitionChunkBuffer",null),dt(this,"defaultInitialBackoff"),dt(this,"maxBackoff"),dt(this,"retries"),dt(this,"serverInactivityThreshold"),dt(this,"reconnectDueToServerInactivityTimeout"),dt(this,"scheduledReconnect",null),dt(this,"networkOnlineHandler",null),dt(this,"pendingNetworkRecoveryInfo",null),dt(this,"uri"),dt(this,"onOpen"),dt(this,"onResume"),dt(this,"onMessage"),dt(this,"webSocketConstructor"),dt(this,"logger"),dt(this,"onServerDisconnectError"),this.webSocketConstructor=r,this.socket={state:"disconnected"},this.connectionCount=0,this.lastCloseReason="InitialConnect",this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=t,this.onOpen=s.onOpen,this.onResume=s.onResume,this.onMessage=s.onMessage,this.onServerDisconnectError=s.onServerDisconnectError,this.logger=o,this.setupNetworkListener(),this.connect()}setSocketState(t){this.socket=t,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){typeof window>"u"||typeof window.addEventListener!="function"||this.networkOnlineHandler===null&&(this.networkOnlineHandler=()=>{this._logVerbose("network online event detected"),this.tryReconnectImmediately()},window.addEventListener("online",this.networkOnlineHandler),this._logVerbose("network online event listener registered"))}cleanupNetworkListener(){this.networkOnlineHandler&&typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("online",this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose("network online event listener removed"))}assembleTransition(t){if(t.partNumber<0||t.partNumber>=t.totalParts||t.totalParts===0||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==t.totalParts||this.transitionChunkBuffer.transitionId!==t.transitionId))throw this.transitionChunkBuffer=null,new Error("Invalid TransitionChunk");if(this.transitionChunkBuffer===null&&(this.transitionChunkBuffer={chunks:[],totalParts:t.totalParts,transitionId:t.transitionId}),t.partNumber!==this.transitionChunkBuffer.chunks.length){const s=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,new Error(`TransitionChunk received out of order: expected part ${s}, got ${t.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(t.chunk),this.transitionChunkBuffer.chunks.length===t.totalParts){const s=this.transitionChunkBuffer.chunks.join("");this.transitionChunkBuffer=null;const r=ax(JSON.parse(s));if(r.type!=="Transition")throw new Error(`Expected Transition, got ${r.type} after assembling chunks`);return r}return null}connect(){if(this.socket.state==="terminated")return;if(this.socket.state!=="disconnected"&&this.socket.state!=="stopped")throw new Error("Didn't start connection from disconnected state: "+this.socket.state);const t=new this.webSocketConstructor(this.uri);this._logVerbose("constructed WebSocket"),this.setSocketState({state:"connecting",ws:t,paused:"no"}),this.resetServerInactivityTimeout(),t.onopen=()=>{if(this.logger.logVerbose("begin ws.onopen"),this.socket.state!=="connecting")throw new Error("onopen called with socket not in connecting state");if(this.setSocketState({state:"ready",ws:t,paused:this.socket.paused==="yes"?"uninitialized":"no"}),this.resetServerInactivityTimeout(),this.socket.paused==="no"&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:ua()})),this.lastCloseReason!=="InitialConnect"&&(this.lastCloseReason?this.logger.log("WebSocket reconnected at",ox(),"after disconnect due to",this.lastCloseReason):this.logger.log("WebSocket reconnected at",ox())),this.connectionCount+=1,this.lastCloseReason=null,this.pendingNetworkRecoveryInfo!==null){const{timeSavedMs:s}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:"Event",eventType:"NetworkRecoveryReconnect",event:{timeSavedMs:s}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(s/1e3)}s of waiting`)}},t.onerror=s=>{this.transitionChunkBuffer=null;const r=s.message;r&&this.logger.log(`WebSocket error message: ${r}`)},t.onmessage=s=>{this.resetServerInactivityTimeout();const r=s.data.length;let o=ax(JSON.parse(s.data));if(this._logVerbose(`received ws message with type ${o.type}`),o.type==="Ping")return;if(o.type==="TransitionChunk"){const u=this.assembleTransition(o);if(!u)return;o=u,this._logVerbose(`assembled full ws message of type ${o.type}`)}this.transitionChunkBuffer!==null&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${o.type} while buffering TransitionChunks`)),o.type==="Transition"&&this.reportLargeTransition({messageLength:r,transition:o}),this.onMessage(o).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())},t.onclose=s=>{if(this._logVerbose("begin ws.onclose"),this.transitionChunkBuffer=null,this.lastCloseReason===null&&(this.lastCloseReason=s.reason||`closed with code ${s.code}`),s.code!==zD&&s.code!==PD&&s.code!==LD&&s.code!==UD){let o=`WebSocket closed with code ${s.code}`;s.reason&&(o+=`: ${s.reason}`),this.logger.log(o),this.onServerDisconnectError&&s.reason&&this.onServerDisconnectError(o)}const r=VD(s.reason);this.scheduleReconnect(r)}}socketState(){return this.socket.state}sendMessage(t){const s={type:t.type,...t.type==="Authenticate"&&t.tokenType==="User"?{value:`...${t.value.slice(-7)}`}:{}};if(this.socket.state==="ready"&&this.socket.paused==="no"){const r=ND(t),o=JSON.stringify(r);let l=!1;try{this.socket.ws.send(o),l=!0}catch(u){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${u}`),this.closeAndReconnect("FailedToSendMessage")}return this._logVerbose(`${l?"sent":"failed to send"} message with type ${t.type}: ${JSON.stringify(s)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}): ${JSON.stringify(s)}`),!1}resetServerInactivityTimeout(){this.socket.state!=="terminated"&&(this.reconnectDueToServerInactivityTimeout!==null&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect("InactiveServer")},this.serverInactivityThreshold))}scheduleReconnect(t){this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.socket={state:"disconnected"};const s=this.nextBackoff(t);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(s)}ms`);const r=ua(),o=setTimeout(()=>{this.scheduledReconnect?.timeout===o&&(this.scheduledReconnect=null,this.connect())},s);this.scheduledReconnect={timeout:o,scheduledAt:r,backoffMs:s}}closeAndReconnect(t){switch(this._logVerbose(`begin closeAndReconnect with reason ${t}`),this.socket.state){case"disconnected":case"terminated":case"stopped":return;case"connecting":case"ready":{this.lastCloseReason=t,this.close(),this.scheduleReconnect("client");return}default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case"disconnected":case"terminated":case"stopped":return Promise.resolve();case"connecting":{const t=this.socket.ws;return t.onmessage=s=>{this._logVerbose("Ignoring message received after close")},new Promise(s=>{t.onclose=()=>{this._logVerbose("Closed after connecting"),s()},t.onopen=()=>{this._logVerbose("Opened after connecting"),t.close()}})}case"ready":{this._logVerbose("ws.close called");const t=this.socket.ws;t.onmessage=r=>{this._logVerbose("Ignoring message received after close")};const s=new Promise(r=>{t.onclose=()=>{r()}});return t.close(),s}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.cleanupNetworkListener(),this.socket.state){case"terminated":case"stopped":case"disconnected":case"connecting":case"ready":{const t=this.close();return this.setSocketState({state:"terminated"}),t}default:throw this.socket,new Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case"terminated":return Promise.resolve();case"connecting":case"stopped":case"disconnected":case"ready":{this.cleanupNetworkListener();const t=this.close();return this.socket={state:"stopped"},t}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case"stopped":break;case"terminated":case"connecting":case"ready":case"disconnected":this.logger.logVerbose("Restart called without stopping first");return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case"disconnected":case"stopped":case"terminated":return;case"connecting":case"ready":{this.socket={...this.socket,paused:"yes"};return}default:{this.socket;return}}}tryReconnectImmediately(){if(this._logVerbose("tryReconnectImmediately called"),this.socket.state!=="disconnected"){this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);return}let t=null;if(this.scheduledReconnect){const s=ua()-this.scheduledReconnect.scheduledAt;t=Math.max(0,this.scheduledReconnect.backoffMs-s),this._logVerbose(`would have waited ${Math.round(t)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(s)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose("canceled scheduled reconnect")}this.logger.log("Network recovery detected, reconnecting immediately"),this.pendingNetworkRecoveryInfo=t!==null?{timeSavedMs:t}:null,this.connect()}resume(){switch(this.socket.state){case"connecting":this.socket={...this.socket,paused:"no"};return;case"ready":this.socket.paused==="uninitialized"?(this.socket={...this.socket,paused:"no"},this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:ua()})):this.socket.paused==="yes"&&(this.socket={...this.socket,paused:"no"},this.onResume());return;case"terminated":case"stopped":case"disconnected":return;default:this.socket}this.connect()}connectionState(){return{isConnected:this.socket.state==="ready",hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(t){this.logger.logVerbose(t)}nextBackoff(t){const r=(t==="client"?100:t==="Unknown"?this.defaultInitialBackoff:kS[t].timeout)*Math.pow(2,this.retries);this.retries+=1;const o=Math.min(r,this.maxBackoff),l=o*(Math.random()-.5);return o+l}reportLargeTransition({transition:t,messageLength:s}){if(t.clientClockSkew===void 0||t.serverTs===void 0)return;const r=ua()-t.clientClockSkew-t.serverTs/1e6,o=`${Math.round(r)}ms`,l=`${Math.round(s/1e4)/100}MB`,u=s/(r/1e3),d=`${Math.round(u/1e4)/100}MB per second`;this._logVerbose(`received ${l} transition in ${o} at ${d}`),s>2e7?this.logger.log(`received query results totaling more that 20MB (${l}
50) which will take a long time to download on slower connections`):r>2e4&&this.logger.log(`received query results totaling ${l} which took more than 20s to arrive (${o})`),this.debug&&this.sendMessage({type:"Event",eventType:"ClientReceivedTransition",event:{transitionTransitTime:r,messageLength:s}})}}function BD(){return ID()}function ID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}class qo extends Error{}qo.prototype.name="InvalidTokenError";function $D(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,s)=>{let r=s.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function HD(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return $D(t)}catch{return atob(t)}}function RS(e,t){if(typeof e!="string")throw new qo("Invalid token specified: must be a string");t||(t={});const s=t.header===!0?0:1,r=e.split(".")[s];if(typeof r!="string")throw new qo(`Invalid token specified: missing part #${s+1}`);let o;try{o=HD(r)}catch(l){throw new qo(`Invalid token specified: invalid base64 for part #${s+1} (${l.message})`)}try{return JSON.parse(o)}catch(l){throw new qo(`Invalid token specified: invalid json for part #${s+1} (${l.message})`)}}var FD=Object.defineProperty,QD=(e,t,s)=>t in e?FD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,On=(e,t,s)=>QD(e,typeof t!="symbol"?t+"":t,s);const ZD=480*60*60*1e3,lx=2;class GD{constructor(t,s,r){On(this,"authState",{state:"noAuth"}),On(this,"configVersion",0),On(this,"syncState"),On(this,"authenticate"),On(this,"stopSocket"),On(this,"tryRestartSocket"),On(this,"pauseSocket"),On(this,"resumeSocket"),On(this,"clearAuth"),On(this,"logger"),On(this,"refreshTokenLeewaySeconds"),On(this,"tokenConfirmationAttempts",0),this.syncState=t,this.authenticate=s.authenticate,this.stopSocket=s.stopSocket,this.tryRestartSocket=s.tryRestartSocket,this.pauseSocket=s.pauseSocket,this.resumeSocket=s.resumeSocket,this.clearAuth=s.clearAuth,this.logger=r.logger,this.refreshTokenLeewaySeconds=r.refreshTokenLeewaySeconds}async setConfig(t,s){this.resetAuthState(),this._logVerbose("pausing WS for auth token fetch"),this.pauseSocket();const r=await this.fetchTokenAndGuardAgainstRace(t,{forceRefreshToken:!1});r.isFromOutdatedConfig||(r.value?(this.setAuthState({state:"waitingForServerConfirmationOfCachedToken",config:{fetchToken:t,onAuthChange:s},hasRetried:!1}),this.authenticate(r.value)):(this.setAuthState({state:"initialRefetch",config:{fetchToken:t,onAuthChange:s}}),await this.refetchToken()),this._logVerbose("resuming WS after auth token fetch"),this.resumeSocket())}onTransition(t){if(this.syncState.isCurrentOrNewerAuthVersion(t.endVersion.identity)&&!(t.endVersion.identity<=t.startVersion.identity)){if(this._logVerbose(`auth state is ${this.authState.state} when handling transition`),this.syncState.markAuthCompletion(),this.authState.state==="waitingForServerConfirmationOfCachedToken"){this._logVerbose("server confirmed auth token is valid"),this.refetchToken(),this.authState.config.onAuthChange(!0);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this._logVerbose("server confirmed new auth token is valid"),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(t){if(t.authUpdateAttempted===!1&&(this.authState.state==="waitingForServerConfirmationOfFreshToken"||this.authState.state==="waitingForServerConfirmationOfCachedToken")){this._logVerbose("ignoring non-auth token expired error");return}const{baseVersion:s}=t;if(!this.syncState.isCurrentOrNewerAuthVersion(s+1)){this._logVerbose("ignoring auth error for previous auth attempt");return}this.tryToReauthenticate(t)}async tryToReauthenticate(t){if(this._logVerbose(`attempting to reauthenticate: ${t.error}`),this.authState.state==="noAuth"||this.authState.state==="waitingForServerConfirmationOfFreshToken"&&this.tokenConfirmationAttempts>=lx){this.logger.error(`Failed to authenticate: "${t.error}", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.authState.state!=="noAuth"&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${lx-this.tokenConfirmationAttempts} attempts remaining`)),await this.stopSocket();const s=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});s.isFromOutdatedConfig||(s.value&&this.syncState.isNewAuth(s.value)?(this.authenticate(s.value),this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",config:this.authState.config,token:s.value,hadAuth:this.authState.state==="notRefetching"||this.authState.state==="waitingForScheduledRefetch"})):(this._logVerbose("reauthentication failed, could not fetch a new token"),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if(this.authState.state==="noAuth")return;this._logVerbose("refetching auth token");const t=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});t.isFromOutdatedConfig||(t.value?this.syncState.isNewAuth(t.value)?(this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",hadAuth:this.syncState.hasAuth(),token:t.value,config:this.authState.config}),this.authenticate(t.value)):this.setAuthState({state:"notRefetching",config:this.authState.config}):(this._logVerbose("refetching token failed"),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose("restarting WS after auth token fetch (if currently stopped)"),this.tryRestartSocket())}scheduleTokenRefetch(t){if(this.authState.state==="noAuth")return;const s=this.decodeToken(t);if(!s){this.logger.error("Auth token is not a valid JWT, cannot refetch the token");return}const{iat:r,exp:o}=s;if(!r||!o){this.logger.error("Auth token does not have required fields, cannot refetch the token");return}const l=o-r;if(l<=2){this.logger.error("Auth token does not live long enough, cannot refetch the token");return}let u=Math.min(ZD,(l-this.refreshTokenLeewaySeconds)*1e3);u<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${l}s`),u=0);const d=setTimeout(()=>{this._logVerbose("running scheduled token refetch"),this.refetchToken()},u);this.setAuthState({state:"waitingForScheduledRefetch",refetchTokenTimeoutId:d,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${u}ms`)}async fetchTokenAndGuardAgainstRace(t,s){const r=++this.configVersion;this._logVerbose(`fetching token with config version ${r}`);const o=await t(s);
50return this.configVersion!==r?(this._logVerbose(`stale config version, expected ${r}, got ${this.configVersion}`),{isFromOutdatedConfig:!0}):{isFromOutdatedConfig:!1,value:o}}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(t){t(!1),this.resetAuthState()}resetAuthState(){this.setAuthState({state:"noAuth"})}setAuthState(t){const s=t.state==="waitingForServerConfirmationOfFreshToken"?{hadAuth:t.hadAuth,state:t.state,token:`...${t.token.slice(-7)}`}:{state:t.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(s)}`),t.state){case"waitingForScheduledRefetch":case"notRefetching":case"noAuth":this.tokenConfirmationAttempts=0;break}this.authState.state==="waitingForScheduledRefetch"&&clearTimeout(this.authState.refetchTokenTimeoutId),this.authState=t}decodeToken(t){try{return RS(t)}catch(s){return this._logVerbose(`Error decoding token: ${s instanceof Error?s.message:"Unknown error"}`),null}}_logVerbose(t){this.logger.logVerbose(`${t} [v${this.configVersion}]`)}}const YD=["convexClientConstructed","convexWebSocketOpen","convexFirstMessageReceived"];function KD(e,t){const s={sessionId:t};typeof performance>"u"||!performance.mark||performance.mark(e,{detail:s})}function XD(e){let t=e.name.slice(6);return t=t.charAt(0).toLowerCase()+t.slice(1),{name:t,startTime:e.startTime}}function WD(e){if(typeof performance>"u"||!performance.getEntriesByName)return[];const t=[];for(const s of YD){const r=performance.getEntriesByName(s).filter(o=>o.entryType==="mark").filter(o=>o.detail.sessionId===e);t.push(...r)}return t.map(XD)}var JD=Object.defineProperty,e4=(e,t,s)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ft=(e,t,s)=>e4(e,typeof t!="symbol"?t+"":t,s);class t4{constructor(t,s,r){if(ft(this,"address"),ft(this,"state"),ft(this,"requestManager"),ft(this,"webSocketManager"),ft(this,"authenticationManager"),ft(this,"remoteQuerySet"),ft(this,"optimisticQueryResults"),ft(this,"_transitionHandlerCounter",0),ft(this,"_nextRequestId"),ft(this,"_onTransitionFns",new Map),ft(this,"_sessionId"),ft(this,"firstMessageReceived",!1),ft(this,"debug"),ft(this,"logger"),ft(this,"maxObservedTimestamp"),ft(this,"connectionStateSubscribers",new Map),ft(this,"nextConnectionStateSubscriberId",0),ft(this,"_lastPublishedConnectionState"),ft(this,"markConnectionStateDirty",()=>{Promise.resolve().then(()=>{const x=this.connectionState();if(JSON.stringify(x)!==JSON.stringify(this._lastPublishedConnectionState)){this._lastPublishedConnectionState=x;for(const S of this.connectionStateSubscribers.values())S(x)}})}),ft(this,"mark",x=>{this.debug&&KD(x,this.sessionId)}),typeof t=="object")throw new Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");r?.skipConvexDeploymentUrlCheck!==!0&&_R(t),r={...r};const o=r.authRefreshTokenLeewaySeconds??10;let l=r.webSocketConstructor;if(!l&&typeof WebSocket>"u")throw new Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");l=l||WebSocket,this.debug=r.reportDebugInfoToConvex??!1,this.address=t,this.logger=r.logger===!1?ES({verbose:r.verbose??!1}):r.logger!==!0&&r.logger?r.logger:TS({verbose:r.verbose??!1});const u=t.search("://");if(u===-1)throw new Error("Provided address was not an absolute URL.");const d=t.substring(u+3),h=t.substring(0,u);let p;if(h==="http")p="ws";else if(h==="https")p="wss";else throw new Error(`Unknown parent protocol ${h}`);const y=`${p}://${d}/api/${ex}/sync`;this.state=new pD,this.remoteQuerySet=new rx(x=>this.state.queryPath(x),this.logger),this.requestManager=new yD(this.logger,this.markConnectionStateDirty);const g=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new GD(this.state,{authenticate:x=>{const S=this.state.setAuth(x);return this.webSocketManager.sendMessage(S),S.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:g,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:o}),this.optimisticQueryResults=new TD,this.addOnTransitionHandler(x=>{s(x.queries.map(S=>S.token))}),this._nextRequestId=0,this._sessionId=BD();const{unsavedChangesWarning:v}=r;if(typeof window>"u"||typeof window.addEventListener>"u"){if(v===!0)throw new Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.")}else v!==!1&&window.addEventListener("beforeunload",x=>{if(this.requestManager.hasIncompleteRequests()){x.preventDefault();const S="Are you sure you want to leave? Your changes may not be saved.";return(x||window.event).returnValue=S,S}});this.webSocketManager=new qD(y,{onOpen:x=>{this.mark("convexWebSocketOpen"),this.webSocketManager.sendMessage({...x,type:"C
50onnect",sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp}),this.remoteQuerySet=new rx(C=>this.state.queryPath(C),this.logger);const[S,E]=this.state.restart();E&&this.webSocketManager.sendMessage(E),this.webSocketManager.sendMessage(S);for(const C of this.requestManager.restart())this.webSocketManager.sendMessage(C)},onResume:()=>{const[x,S]=this.state.resume();S&&this.webSocketManager.sendMessage(S),x&&this.webSocketManager.sendMessage(x);for(const E of this.requestManager.resume())this.webSocketManager.sendMessage(E)},onMessage:x=>{switch(this.firstMessageReceived||(this.firstMessageReceived=!0,this.mark("convexFirstMessageReceived"),this.reportMarks()),x.type){case"Transition":{this.observedTimestamp(x.endVersion.ts),this.authenticationManager.onTransition(x),this.remoteQuerySet.transition(x),this.state.transition(x);const S=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(S);break}case"MutationResponse":{x.success&&this.observedTimestamp(x.ts);const S=this.requestManager.onResponse(x);S!==null&&this.notifyOnQueryResultChanges(new Map([[S.requestId,S.result]]));break}case"ActionResponse":{this.requestManager.onResponse(x);break}case"AuthError":{this.authenticationManager.onAuthError(x);break}case"FatalError":{const S=dD(this.logger,x.error);throw this.webSocketManager.terminate(),S}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:r.onServerDisconnectError},l,this.logger,this.markConnectionStateDirty,this.debug),this.mark("convexClientConstructed"),r.expectAuth&&g()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()&&this.state.hasSyncedPastLastReconnect()}observedTimestamp(t){(this.maxObservedTimestamp===void 0||this.maxObservedTimestamp.lessThanOrEqual(t))&&(this.maxObservedTimestamp=t)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(t){const s=this.remoteQuerySet.remoteQueryResults(),r=new Map;for(const[l,u]of s){const d=this.state.queryToken(l);if(d!==null){const h={result:u,udfPath:this.state.queryPath(l),args:this.state.queryArgs(l)};r.set(d,h)}}const o=this.optimisticQueryResults.ingestQueryResultsFromServer(r,new Set(t.keys()));this.handleTransition({queries:o.map(l=>{const u=this.optimisticQueryResults.rawQueryResult(l);return{token:l,modification:{kind:"Updated",result:u}}}),reflectedMutations:Array.from(t).map(([l,u])=>({requestId:l,result:u})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(t){for(const s of this._onTransitionFns.values())s(t)}addOnTransitionHandler(t){const s=this._transitionHandlerCounter++;return this._onTransitionFns.set(s,t),()=>this._onTransitionFns.delete(s)}getCurrentAuthClaims(){const t=this.state.getAuth();let s={};if(t&&t.tokenType==="User")try{s=t?RS(t.value):{}}catch{s={}}else return;return{token:t.value,decoded:s}}setAuth(t,s){this.authenticationManager.setConfig(t,s)}hasAuth(){return this.state.hasAuth()}setAdminAuth(t,s){const r=this.state.setAdminAuth(t,s);this.webSocketManager.sendMessage(r)}clearAuth(){const t=this.state.clearAuth();this.webSocketManager.sendMessage(t)}subscribe(t,s,r){const o=Vs(s),{modification:l,queryToken:u,unsubscribe:d}=this.state.subscribe(t,o,r?.journal,r?.componentPath);return l!==null&&this.webSocketManager.sendMessage(l),{queryToken:u,unsubscribe:()=>{const h=d();h&&this.webSocketManager.sendMessage(h)}}}localQueryResult(t,s){const r=Vs(s),o=lr(t,r);return this.optimisticQueryResults.queryResult(o)}localQueryResultByToken(t){return this.optimisticQueryResults.queryResult(t)}hasLocalQueryResultByToken(t){return this.optimisticQueryResults.hasQueryResult(t)}localQueryLogs(t,s){const r=Vs(s),o=lr(t,r);return this.optimisticQueryResults.queryLogs(o)}queryJournal(t,s){const r=Vs(s),o=lr(t,r);return this.state.queryJournal(o)}connectionState(){const t=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:t.isConnected,hasEverConnected:t.hasEverConnected,connectionCount:t.connectionCount,connectionRetries:t.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(t){const s=this.nextConnectionStateSubscriberId++;
50return this.connectionStateSubscribers.set(s,t),()=>{this.connectionStateSubscribers.delete(s)}}async mutation(t,s,r){const o=await this.mutationInternal(t,s,r);if(!o.success)throw o.errorData!==void 0?wp(o,new mu(pa("mutation",t,o))):new Error(pa("mutation",t,o));return o.value}async mutationInternal(t,s,r,o){const{mutationPromise:l}=this.enqueueMutation(t,s,r,o);return l}enqueueMutation(t,s,r,o){const l=Vs(s);this.tryReportLongDisconnect();const u=this.nextRequestId;if(this._nextRequestId++,r!==void 0){const y=r.optimisticUpdate;if(y!==void 0){const g=S=>{y(S,l)instanceof Promise&&this.logger.warn("Optimistic update handler returned a Promise. Optimistic updates should be synchronous.")},x=this.optimisticQueryResults.applyOptimisticUpdate(g,u).map(S=>{const E=this.localQueryResultByToken(S);return{token:S,modification:{kind:"Updated",result:E===void 0?void 0:{success:!0,value:E,logLines:[]}}}});this.handleTransition({queries:x,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}const d={type:"Mutation",requestId:u,udfPath:t,componentPath:o,args:[hs(l)]},h=this.webSocketManager.sendMessage(d),p=this.requestManager.request(d,h);return{requestId:u,mutationPromise:p}}async action(t,s){const r=await this.actionInternal(t,s);if(!r.success)throw r.errorData!==void 0?wp(r,new mu(pa("action",t,r))):new Error(pa("action",t,r));return r.value}async actionInternal(t,s,r){const o=Vs(s),l=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();const u={type:"Action",requestId:l,udfPath:t,componentPath:r,args:[hs(o)]},d=this.webSocketManager.sendMessage(u);return this.requestManager.request(u,d)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}reportMarks(){if(this.debug){const t=WD(this.sessionId);this.webSocketManager.sendMessage({type:"Event",eventType:"ClientConnect",event:t})}}tryReportLongDisconnect(){if(!this.debug)return;const t=this.connectionState().timeOfOldestInflightRequest;if(t===null||Date.now()-t.getTime()<=60*1e3)return;const s=`${this.address}/api/debug_event`;fetch(s,{method:"POST",headers:{"Content-Type":"application/json","Convex-Client":`npm-${ex}`},body:JSON.stringify({event:"LongWebsocketDisconnect"})}).then(r=>{r.ok||this.logger.warn("Analytics request failed with response:",r.body)}).catch(r=>{this.logger.warn("Analytics response failed with error:",r)})}}function Ph(e){if(typeof e!="object"||e===null||!Array.isArray(e.page)||typeof e.isDone!="boolean"||typeof e.continueCursor!="string")throw new Error(`Not a valid paginated query result: ${e?.toString()}`);return e}var n4=Object.defineProperty,s4=(e,t,s)=>t in e?n4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,cx=(e,t,s)=>s4(e,typeof t!="symbol"?t+"":t,s);class i4{constructor(t,s){this.client=t,this.onTransition=s,cx(this,"paginatedQuerySet",new Map),cx(this,"lastTransitionTs"),this.lastTransitionTs=on.fromNumber(0),this.client.addOnTransitionHandler(r=>this.onBaseTransition(r))}subscribe(t,s,r){const o=pr(t),l=nx(o,s,r),u=()=>this.removePaginatedQuerySubscriber(l),d=this.paginatedQuerySet.get(l);return d?(d.numSubscribers+=1,{paginatedQueryToken:l,unsubscribe:u}):(this.paginatedQuerySet.set(l,{token:l,canonicalizedUdfPath:o,args:s,numSubscribers:1,options:{initialNumItems:r.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:r.id}),this.addPageToPaginatedQuery(l,null,r.initialNumItems),{paginatedQueryToken:l,unsubscribe:u})}localQueryResult(t,s,r){const o=pr(t),l=nx(o,s,r);return this.localQueryResultByToken(l)}localQueryResultByToken(t){const s=this.paginatedQuerySet.get(t);if(!s)return;const r=this.activePageQueryTokens(s);if(r.length===0)return{results:[],status:"LoadingFirstPage",loadMore:h=>this.loadMoreOfPaginatedQuery(t,h)};let o=[],l=!1,u=!1;for(const h of r){const p=this.client.localQueryResultByToken(h);if(p===void 0){l=!0,u=!1;continue}const y=Ph(p);o=o.concat(y.page),u=!!y.isDone}let d;return l?d=o.length===0?"LoadingFirstPage":"LoadingMore":u?d="Exhausted":d="CanLoadMore",{results:o,status:d,loadM
50ore:h=>this.loadMoreOfPaginatedQuery(t,h)}}onBaseTransition(t){const s=t.queries.map(u=>u.token),r=this.queriesContainingTokens(s);let o=[];r.length>0&&(this.processPaginatedQuerySplits(r,u=>this.client.localQueryResultByToken(u)),o=r.map(u=>({token:u,modification:{kind:"Updated",result:this.localQueryResultByToken(u)}})));const l={...t,paginatedQueries:o};this.onTransition(l)}loadMoreOfPaginatedQuery(t,s){this.mustGetPaginatedQuery(t);const r=this.queryTokenForLastPageOfPaginatedQuery(t),o=this.client.localQueryResultByToken(r);if(!o)return!1;const l=Ph(o);if(l.isDone)return!1;this.addPageToPaginatedQuery(t,l.continueCursor,s);const u={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:t,modification:{kind:"Updated",result:this.localQueryResultByToken(t)}}]};return this.onTransition(u),!0}queriesContainingTokens(t){if(t.length===0)return[];const s=[],r=new Set(t);for(const[o,l]of this.paginatedQuerySet)for(const u of this.allQueryTokens(l))if(r.has(u)){s.push(o);break}return s}processPaginatedQuerySplits(t,s){for(const r of t){const o=this.mustGetPaginatedQuery(r),{ongoingSplits:l,pageKeyToQuery:u,pageKeys:d}=o;for(const[h,[p,y]]of l)s(u.get(p).queryToken)!==void 0&&s(u.get(y).queryToken)!==void 0&&this.completePaginatedQuerySplit(o,h,p,y);for(const h of d){if(l.has(h))continue;const p=u.get(h).queryToken,y=s(p);if(!y)continue;const g=Ph(y);g.splitCursor&&(g.pageStatus==="SplitRecommended"||g.pageStatus==="SplitRequired"||g.page.length>o.options.initialNumItems*2)&&this.splitPaginatedQueryPage(o,h,g.splitCursor,g.continueCursor)}}}splitPaginatedQueryPage(t,s,r,o){const l=t.nextPageKey++,u=t.nextPageKey++,d={cursor:o,numItems:t.options.initialNumItems,id:t.id},h=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...d,cursor:null,endCursor:r}});t.pageKeyToQuery.set(l,h);const p=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...d,cursor:r,endCursor:o}});t.pageKeyToQuery.set(u,p),t.ongoingSplits.set(s,[l,u])}addPageToPaginatedQuery(t,s,r){const o=this.mustGetPaginatedQuery(t),l=o.nextPageKey++,u={cursor:s,numItems:r,id:o.id},d={...o.args,paginationOpts:u},h=this.client.subscribe(o.canonicalizedUdfPath,d);return o.pageKeys.push(l),o.pageKeyToQuery.set(l,h),h}removePaginatedQuerySubscriber(t){const s=this.paginatedQuerySet.get(t);if(s&&(s.numSubscribers-=1,!(s.numSubscribers>0))){for(const r of s.pageKeyToQuery.values())r.unsubscribe();this.paginatedQuerySet.delete(t)}}completePaginatedQuerySplit(t,s,r,o){const l=t.pageKeyToQuery.get(s);t.pageKeyToQuery.delete(s);const u=t.pageKeys.indexOf(s);t.pageKeys.splice(u,1,r,o),t.ongoingSplits.delete(s),l.unsubscribe()}activePageQueryTokens(t){return t.pageKeys.map(s=>t.pageKeyToQuery.get(s).queryToken)}allQueryTokens(t){return Array.from(t.pageKeyToQuery.values()).map(s=>s.queryToken)}queryTokenForLastPageOfPaginatedQuery(t){const s=this.mustGetPaginatedQuery(t),r=s.pageKeys[s.pageKeys.length-1];if(r===void 0)throw new Error(`No pages for paginated query ${t}`);return s.pageKeyToQuery.get(r).queryToken}mustGetPaginatedQuery(t){const s=this.paginatedQuerySet.get(t);if(!s)throw new Error("paginated query no longer exists for token "+t);return s}}function r4({getCurrentValue:e,subscribe:t}){const[s,r]=_.useState(()=>({getCurrentValue:e,subscribe:t,value:e()}));let o=s.value;return(s.getCurrentValue!==e||s.subscribe!==t)&&(o=e(),r({getCurrentValue:e,subscribe:t,value:o})),_.useEffect(()=>{let l=!1;const u=()=>{l||r(h=>{if(h.getCurrentValue!==e||h.subscribe!==t)return h;const p=e();return h.value===p?h:{...h,value:p}})},d=t(u);return u(),()=>{l=!0,d()}},[e,t]),o}var a4=Object.defineProperty,o4=(e,t,s)=>t in e?a4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ls=(e,t,s)=>o4(e,typeof t!="symbol"?t+"":t,s);const l4=5e3;if(typeof ne>"u")throw new Error("Required dependency 'react' not found");function OS(e,t,s){function r(o){return m4(o),t.mutation(e,o,{optimisticUpdate:s})}return r.withOptimisticUpdate=function(l){if(s!==void 0)throw new Error(`Already specified optimistic update for mutation ${Ft(e)}`);return OS(e,t,l)},r}function c4(e,t){return function(s){return t.action(e,s)}}
50class u4{constructor(t,s){if(Ls(this,"address"),Ls(this,"cachedSync"),Ls(this,"cachedPaginatedQueryClient"),Ls(this,"listeners"),Ls(this,"options"),Ls(this,"closed",!1),Ls(this,"_logger"),Ls(this,"adminAuth"),Ls(this,"fakeUserIdentity"),t===void 0)throw new Error("No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated.");if(typeof t!="string")throw new Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof t} instead.`);if(!t.includes("://"))throw new Error("Provided address was not an absolute URL.");this.address=t,this.listeners=new Map,this._logger=s?.logger===!1?ES({verbose:s?.verbose??!1}):s?.logger!==!0&&s?.logger?s.logger:TS({verbose:s?.verbose??!1}),this.options={...s,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw new Error("ConvexReactClient has already been closed.");return this.cachedSync?this.cachedSync:(this.cachedSync=new t4(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new i4(this.cachedSync,t=>this.handleTransition(t)),this.cachedSync)}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw new Error("Should already be instantiated")}setAuth(t,s){if(typeof t=="string")throw new Error("Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.");this.sync.setAuth(t,s??(()=>{}))}clearAuth(){this.sync.clearAuth()}setAdminAuth(t,s){if(this.adminAuth=t,this.fakeUserIdentity=s,this.closed)throw new Error("ConvexReactClient has already been closed.");this.cachedSync&&this.sync.setAdminAuth(t,s)}watchQuery(t,...s){const[r,o]=s,l=Ft(t);return{onUpdate:u=>{const{queryToken:d,unsubscribe:h}=this.sync.subscribe(l,r,o),p=this.listeners.get(d);return p!==void 0?p.add(u):this.listeners.set(d,new Set([u])),()=>{if(this.closed)return;const y=this.listeners.get(d);y.delete(u),y.size===0&&this.listeners.delete(d),h()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(l,r)},localQueryLogs:()=>{if(this.cachedSync)return this.cachedSync.localQueryLogs(l,r)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(l,r)}}}prewarmQuery(t){const s=t.extendSubscriptionFor??l4,o=this.watchQuery(t.query,t.args||{}).onUpdate(()=>{});setTimeout(o,s)}watchPaginatedQuery(t,s,r){const o=Ft(t);return{onUpdate:l=>{const{paginatedQueryToken:u,unsubscribe:d}=this.paginatedQueryClient.subscribe(o,s||{},r),h=this.listeners.get(u);return h!==void 0?h.add(l):this.listeners.set(u,new Set([l])),()=>{if(this.closed)return;const p=this.listeners.get(u);p.delete(l),p.size===0&&this.listeners.delete(u),d()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(o,s,r)}}mutation(t,...s){const[r,o]=s,l=Ft(t);return this.sync.mutation(l,r,o)}action(t,...s){const r=Ft(t);return this.sync.action(r,...s)}query(t,...s){const r=this.watchQuery(t,...s),o=r.localQueryResult();return o!==void 0?Promise.resolve(o):new Promise((l,u)=>{const d=r.onUpdate(()=>{d();try{l(r.localQueryResult())}catch(h){u(h)}})})}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(t){return this.sync.subscribeToConnectionState(t)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&(this.cachedPaginatedQueryClient=void 0),this.cachedSync){const t=this.cachedSync;this.cachedSync=void 0,await t.close()}}handleTransition(t){const s=t.queries.map(o=>o.token),r=t.paginatedQueries.map(o=>o.token);this.transition([...s,...r])}transition(t){for(const s of t){const r=this.listeners.get(s);if(r)for(const o of r)o()}}}const Qu=ne.createContext(void 0);function d4(){return _.useContext(Qu)}const f4=({client:e,children:t})=>ne.createElement(Qu.Provider,{value:e},t);function h4(e,...t){const s=t[0]==="skip",r=t[0]==="skip"?{}:Vs(t[0]),o=typeof e=="string"?km(e):e,l=Ft(o),u=_.useMemo(()=>s?{}:{query:{query:o,args:r}},[JSON.stringify(hs(r)),l,s]),h=b4(u).query;if(h instanceof Error)throw h;return h}function eu(e){const t=typeof e=="string"?km(e):e,s=_.useContext(Qu);
50if(s===void 0)throw new Error("Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return _.useMemo(()=>OS(t,s),[s,Ft(t)])}function p4(e){const t=_.useContext(Qu),s=typeof e=="string"?km(e):e;if(t===void 0)throw new Error("Could not find Convex client! `useAction` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return _.useMemo(()=>c4(s,t),[t,Ft(s)])}function m4(e){if(typeof e=="object"&&e!==null&&"bubbles"in e&&"persist"in e&&"isDefaultPrevented"in e)throw new Error("Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler.")}var g4=Object.defineProperty,y4=(e,t,s)=>t in e?g4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Lh=(e,t,s)=>y4(e,typeof t!="symbol"?t+"":t,s);class v4{constructor(t){Lh(this,"createWatch"),Lh(this,"queries"),Lh(this,"listeners"),this.createWatch=t,this.queries={},this.listeners=new Set}setQueries(t){for(const s of Object.keys(t)){const{query:r,args:o,paginationOptions:l}=t[s];if(Ft(r),this.queries[s]===void 0)this.addQuery(s,r,o,l?{paginationOptions:l}:{});else{const u=this.queries[s];(Ft(r)!==Ft(u.query)||JSON.stringify(hs(o))!==JSON.stringify(hs(u.args))||JSON.stringify(l)!==JSON.stringify(u.paginationOptions))&&(this.removeQuery(s),this.addQuery(s,r,o,l?{paginationOptions:l}:{}))}}for(const s of Object.keys(this.queries))t[s]===void 0&&this.removeQuery(s)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getLocalResults(t){const s={};for(const r of Object.keys(t)){const{query:o,args:l}=t[r],u=t[r].paginationOptions;Ft(o);const d=this.createWatch(o,l,u?{paginationOptions:u}:{});let h;try{h=d.localQueryResult()}catch(p){if(p instanceof Error)h=p;else throw p}s[r]=h}return s}setCreateWatch(t){this.createWatch=t;for(const s of Object.keys(this.queries)){const{query:r,args:o,watch:l,paginationOptions:u}=this.queries[s],d="journal"in l?l.journal():void 0;this.removeQuery(s),this.addQuery(s,r,o,{...d?{journal:d}:[],...u?{paginationOptions:u}:{}})}}destroy(){for(const t of Object.keys(this.queries))this.removeQuery(t);this.listeners=new Set}addQuery(t,s,r,{paginationOptions:o,journal:l}){if(this.queries[t]!==void 0)throw new Error(`Tried to add a new query with identifier ${t} when it already exists.`);const u=this.createWatch(s,r,{...l?{journal:l}:[],...o?{paginationOptions:o}:{}}),d=u.onUpdate(()=>this.notifyListeners());this.queries[t]={query:s,args:r,watch:u,unsubscribe:d,...o?{paginationOptions:o}:{}}}removeQuery(t){const s=this.queries[t];if(s===void 0)throw new Error(`No query found with identifier ${t}.`);s.unsubscribe(),delete this.queries[t]}notifyListeners(){for(const t of this.listeners)t()}}function b4(e){const t=d4();if(t===void 0)throw new Error("Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");const s=_.useMemo(()=>(r,o,{journal:l,paginationOptions:u})=>u?t.watchPaginatedQuery(r,o,u):t.watchQuery(r,o,l?{journal:l}:{}),[t]);return x4(e,s)}function x4(e,t){const[s]=_.useState(()=>new v4(t));s.createWatch!==t&&s.setCreateWatch(t),_.useEffect(()=>()=>s.destroy(),[s]);const r=_.useMemo(()=>({getCurrentValue:()=>s.getLocalResults(e),subscribe:o=>(s.setQueries(e),s.subscribe(o))}),[s,e]);return r4(r)}const MS=_.createContext(void 0);function w4(){const e=_.useContext(MS);if(e===void 0)throw new Error("Could not find `ConvexProviderWithAuth` (or `ConvexProviderWithClerk` or `ConvexProviderWithAuth0`) as an ancestor component. This component may be missing, or you might have two instances of the `convex/react` module loaded in your project.");return e}function S4({children:e,client:t,useAuth:s}){const{isLoading:r,isAuthenticated:o,fetchAccessToken:l}=s(),[u,d]=_.useState(null);return r&&u!==null&&d(null),!r&&!o&&u!==!1&&d(!1),ne.createElement(MS.Provider,{value:{isLoading:u===null,isAuthenticated:o&&(u??!1)}},ne.createElement(_4,{authProviderAuthenticated:o,fetchAccessToken:l,authProviderLoading:r,client:t,setIsConvexAuthenticated:d}),ne.createElement(f4,{client:t},e),ne.createElement(T4,{authProviderAuthenticated:o,fetchAccessToken:l,authProviderLoading:r,client:t,setIsConvexAuthenticated:d}))}function _4({authProviderAuthenticated:e,fetchAccessToken:t,authProviderLoading:s,client:r,setIsConvexAuthenticated:o}){return _.useEffect(()=>{let l=!0;if(e)return r.setAuth(t,u=>{l&&o(()=>u)}),()=>{l=!1,o(u=>u?!1:null)}},[e,t,s,r,o]),null}function T4({authProviderAuthenticated:e,fetchAccessToken:t,authProviderLoading:s,client:r,setIsConvexAuthenticated:o}){return _.useEffect(()=>{if(e)return()=>{r.clearAuth(),o(()=>null)}},[e,t,s,r,o]),null}function E4({children:e,client:t}){return w.jsx(S4,{client:t,useAuth:C4,children:e})}function C4(){const{isAuthenticated:e,user:t,isLoading:s,signinSilent:r}=Q1(),o=t?.id_token,l=_.useCallback(async({forceRefreshToken:u})=>{try{return o??null}catch{return null}},[o,r]);return _.useMemo(()=>({isLoading:s,isAuthenticated:e,fetchAccessToken:l}),[s,e,l])}const A4="https://tame-gopher-343.convex.cloud",k4=new u4(A4);function R4({children:e}){return w.jsx(E4,{"data-hercules-id":"src/components/providers/convex.tsx:9:4","data-hercules-name":"ConvexProviderWithHerculesAuth",client:k4,children:e})}var Zu=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(){}},O4=class extends Zu{#e;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 23,988 bytes, line 50
50this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},NS=new O4,M4={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},N4=class{#e=M4;#n=!1;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)}},Sp=new N4;function D4(e){setTimeout(e,0)}var j4=typeof window>"u"||"Deno"in globalThis;function Hn(){}function z4(e,t){return typeof e=="function"?e(t):e}function P4(e){return typeof e=="number"&&e>=0&&e!==1/0}function L4(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _p(e,t){return typeof e=="function"?e(t):e}function U4(e,t){return typeof e=="function"?e(t):e}function ux(e,t){const{type:s="all",exact:r,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(r){if(t.queryHash!==Rm(u,t.options))return!1}else if(!il(t.queryKey,u))return!1}if(s!=="all"){const h=t.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function dx(e,t){const{exact:s,status:r,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(s){if(sl(t.options.mutationKey)!==sl(l))return!1}else if(!il(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Rm(e,t){return(t?.queryKeyHashFn||sl)(e)}function sl(e){return JSON.stringify(e,(t,s)=>Tp(s)?Object.keys(s).sort().reduce((r,o)=>(r[o]=s[o],r),{}):s)}function il(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>il(e[s],t[s])):!1}var V4=Object.prototype.hasOwnProperty;function DS(e,t,s=0){if(e===t)return e;if(s>500)return t;const r=fx(e)&&fx(t);if(!r&&!(Tp(e)&&Tp(t)))return t;const l=(r?e:Object.keys(e)).length,u=r?t:Object.keys(t),d=u.length,h=r?new Array(d):{};let p=0;for(let y=0;y<d;y++){const g=r?y:u[y],v=e[g],x=t[g];if(v===x){h[g]=v,(r?y<l:V4.call(e,g))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[g]=x;continue}const S=DS(v,x,s+1);h[g]=S,S===v&&p++}return l===d&&p===l?e:h}function fx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tp(e){if(!hx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!hx(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hx(e){return Object.prototype.toString.call(e)==="[object Object]"}function q4(e){return new Promise(t=>{Sp.setTimeout(t,e)})}function B4(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?DS(e,t):t}function I4(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function $4(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var Om=Symbol();function jS(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Om?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function H4(e,t,s){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),e}var zS=(()=>{let e=()=>j4;return{isServer(){return e()},setIsServer(t){e=t}}})();function F4(){let e,t;const s=new Promise((o,l)=>{e=o,t=l});s.status="pending",s.catch(()=>{});function r(o){Object.assign(s,o),delete s.resolve,delete s.reject}return s.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},s.reject=o=>{r({status:"rejected",reason:o}),t(o)},s}var Q4=D4;function Z4(){let e=[],t=0,s=d=>{d()},r=d=>{d()},o=Q4;const l=d=>{t?e.push(d):o(()=>{s(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{r(()=>{d.forEach(h=>{s(h)})})})};return{batch:d=>{let h;t++;try{h=d()}finally{t--,t||u()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{r=d},setScheduler:d=>{o=d}}}var Ht=Z4(),G4=class extends Zu{#e=!0;#n;#t;constructor(){super(),this.#t=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#n||this.setEventListener(this.#t)}onUnsubscribe(){this.hasListeners()||(this.#n?.(),this.#n=void 0)}setEventListener(e){this.#t=e,this.#n?.(),this.#n=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Su=new G4;function Y4(e){return Math.min(1e3*2**e,3e4)}function PS(e){return(e??"online")==="online"?Su.isOnline():!0}var Ep=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function LS(e){let t=!1,s=0,r;const o=F4(),l=()=>o.status!=="pending",u=E=>{if(!l()){const C=new Ep(E);v(C),e.onCancel?.(C)}},d=()=>{t=!0},h=()=>{t=!1},p=()=>NS.isFocused()&&(e.networkMode==="always"||Su.isOnline())&&e.canRun(),y=()=>PS(e.networkMode)&&e.canRun(),g=E=>{l()||(r?.(),o.resolve(E))},v=E=>{l()||(r?.(),o.reject(E))},x=()=>new Promise(E=>{r=C=>{(l()||p())&&E(C)},e.onPause?.()}).then(()=>{r=void 0,l()||e.onContinue?.()}),S=()=>{if(l())return;let E;const C=s===0?e.initialPromise:void 0;try{E=C??e.fn()}catch(A){E=Promise.reject(A)}Promise.resolve(E).then(g).catch(A=>{if(l())return;const M=e.retry??(zS.isServer()?0:3),k=e.retryDelay??Y4,D=typeof k=="function"?k(s,A):k,P=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,A);if(t||!P){v(A);return}s++,e.onFail?.(s,A),q4(D).then(()=>p()?void 0:x()).then(()=>{t?v(A):S()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(r?.(),o),cancelRetry:d,continueRetry:h,canStart:y,start:()=>(y()?S():x().then(S),o)}}var US=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),P4(this.gcTime)&&(this.#e=Sp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zS.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Sp.clearTimeout(this.#e),this.#e=void 0)}},K4=class extends US{#e;#n;#t;#i;#s;#r;#a;constructor(e){super(),this.#a=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#t=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=mx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#r,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=mx(this.options);t.data!==void 0&&(this.setState(px(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#t.remove(this)}setData(e,t){const s=B4(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(Hn).catch(Hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>U4(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Om||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>_p(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:!L4(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#t.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.#s&&(this.#a||this.#l()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#t.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const s=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},o=()=>{const d=jS(this.options,t),p=(()=>{const y={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#a=!1,this.options.persister?this.options.persister(d,p,this):d(p)},u=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(d),d})();this.options.behavior?.onFetch(u,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#o({type:"fetch",meta:u.fetchOptions?.meta}),this.#s=LS({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Ep&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(d,h)=>{this.#o({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#s.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#t.config.onSuccess?.(d,this),this.#t.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Ep){if(d.silent)return this.#s.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#o({type:"error",error:d}),this.#t.config.onError?.(d,this),this.#t.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#o(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...X4(s.data,this.options),fetchMeta:e.meta??null};case"success":const r={...s,...px(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Ht.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#t.notify({query:this,type:"updated",action:e})})}};function X4(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:PS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function px(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function gx(e){return{onFetch:(t,s)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},h=0;const p=async()=>{let y=!1;const g=S=>{H4(S,()=>t.signal,()=>y=!0)},v=jS(t.options,t.fetchOptions),x=async(S,E,C)=>{if(y)return Promise.reject();if(E==null&&S.pages.length)return Promise.resolve(S);const M=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:E,direction:C?"backward":"forward",meta:t.options.meta};return g(B),B})(),k=await v(M),{maxPages:D}=t.options,P=C?$4:I4;return{pages:P(S.pages,k,D),pageParams:P(S.pageParams,E,D)}};if(o&&l.length){const S=o==="backward",E=S?W4:yx,C={pages:l,pageParams:u},A=E(r,C);d=await x(C,A,S)}else{const S=e??l.length;do{const E=h===0?u[0]??r.initialPageParam:yx(r,d);if(h>0&&E==null)break;d=await x(d,E),h++}while(h<S)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=p}}}function yx(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function W4(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var J4=class extends US{#e;#n;#t;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#n=[],this.state=e.state||e5(),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.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#s({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=LS({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#s({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const r=this.state.status==="pending",o=!this.#i.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:o}),this.#t.config.onMutate&&await this.#t.config.onMutate(e,this,s);const u=await this.options.onMutate?.(e,s);u!==this.state.context&&this.#s({type:"pending",context:u,variables:e,isPaused:o})}const l=await this.#i.start();return await this.#t.config.onSuccess?.(l,e,this.state.context,this,s),await this.options.onSuccess?.(l,e,this.state.context,s),await this.#t.config.onSettled?.(l,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(l,null,e,this.state.context,s),this.#s({type:"success",data:l}),l}catch(l){try{await this.#t.config.onError?.(l,e,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,s)}catch(u){Promise.reject(u)}try{await this.#t.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,s)}catch(u){Promise.reject(u)}throw this.#s({type:"error",error:l}),l}finally{this.#t.runNext(this)}}#s(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ht.batch(()=>{this.#n.forEach(s=>{s.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function e5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var t5=class extends Zu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#n=new Map,this.#t=0}#e;#n;#t;build(e,t,s){const r=new J4({client:e,mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){this.#e.add(e);const t=Vc(e);if(typeof t=="string"){const s=this.#n.get(t);s?s.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Vc(e);if(typeof t=="string"){const s=this.#n.get(t);if(s)if(s.length>1){const r=s.indexOf(e);r!==-1&&s.splice(r,1)}else s[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Vc(e);if(typeof t=="string"){const r=this.#n.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Vc(e);return typeof t=="string"?this.#n.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ht.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#n.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>dx(t,s))}findAll(e={}){return this.getAll().filter(t=>dx(e,t))}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ht.batch(()=>Promise.all(e.map(t=>t.continue().catch(Hn))))}};function Vc(e){return e.options.scope?.id}var n5=class extends Zu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const r=t.queryKey,o=t.queryHash??Rm(r,t);let l=this.get(o);return l||(l=new K4({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ht.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>ux(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>ux(e,s)):t}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},s5=class{#e;#n;#t;#i;#s;#r;#a;#l;constructor(e={}){this.#e=e.queryCache||new n5,this.#n=e.mutationCache||new t5,this.#t=e.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#a=NS.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=Su.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(_p(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(r.queryHash)?.state.data,u=z4(t,l);if(u!==void 0)return this.#e.build(this,r).setData(u,{...s,manual:!0})}setQueriesData(e,t,s){return Ht.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ht.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return Ht.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=Ht.batch(()=>this.#e.findAll(e).map(o=>o.cancel(s)));return Promise.all(r).then(Hn).catch(Hn)}invalidateQueries(e,t={}){return Ht.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=Ht.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,s);return s.throwOnError||(l=l.catch(Hn)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(Hn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(_p(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Hn).catch(Hn)}fetchInfiniteQuery(e){return e.behavior=gx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Hn).catch(Hn)}ensureInfiniteQueryData(e){return e.behavior=gx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Su.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#n}getDefaultOptions(){return this.#t}setDefaultOptions(e){this.#t=e}setQueryDefaults(e,t){this.#i.set(sl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],s={};return t.forEach(r=>{il(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){this.#s.set(sl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(r=>{il(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#t.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rm(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===Om&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#t.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#n.clear()}},i5=_.createContext(void 0),r5=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),w.jsx(i5.Provider,{value:e,children:t}));const a5=new s5;function o5({children:e}){return w.jsx(r5,{"data-hercules-id":"src/components/providers/query-client.tsx:14:4","data-hercules-name":"ReactQueryClientProvider",client:a5,children:e})}var l5=(e,t,s,r,o,l,u,d)=>{let h=document.documentElement,p=["light","dark"];
50function y(x){(Array.isArray(e)?e:[e]).forEach(S=>{let E=S==="class",C=E&&l?o.map(A=>l[A]||A):o;E?(h.classList.remove(...C),h.classList.add(l&&l[x]?l[x]:x)):h.setAttribute(S,x)}),g(x)}function g(x){d&&p.includes(x)&&(h.style.colorScheme=x)}function v(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)y(r);else try{let x=localStorage.getItem(t)||s,S=u&&x==="system"?v():x;y(S)}catch{}},vx=["light","dark"],VS="(prefers-color-scheme: dark)",c5=typeof window>"u",Mm=_.createContext(void 0),u5={setTheme:e=>{},themes:[]},d5=()=>{var e;return(e=_.useContext(Mm))!=null?e:u5},f5=e=>_.useContext(Mm)?_.createElement(_.Fragment,null,e.children):_.createElement(p5,{...e}),h5=["light","dark"],p5=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:s=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:l=h5,defaultTheme:u=s?"system":"light",attribute:d="data-theme",value:h,children:p,nonce:y,scriptProps:g})=>{let[v,x]=_.useState(()=>g5(o,u)),[S,E]=_.useState(()=>v==="system"?Uh():v),C=h?Object.values(h):l,A=_.useCallback(P=>{let B=P;if(!B)return;P==="system"&&s&&(B=Uh());let I=h?h[B]:B,L=t?y5(y):null,W=document.documentElement,ee=re=>{re==="class"?(W.classList.remove(...C),I&&W.classList.add(I)):re.startsWith("data-")&&(I?W.setAttribute(re,I):W.removeAttribute(re))};if(Array.isArray(d)?d.forEach(ee):ee(d),r){let re=vx.includes(u)?u:null,oe=vx.includes(B)?B:re;W.style.colorScheme=oe}L?.()},[y]),M=_.useCallback(P=>{let B=typeof P=="function"?P(v):P;x(B);try{localStorage.setItem(o,B)}catch{}},[v]),k=_.useCallback(P=>{let B=Uh(P);E(B),v==="system"&&s&&!e&&A("system")},[v,e]);_.useEffect(()=>{let P=window.matchMedia(VS);return P.addListener(k),k(P),()=>P.removeListener(k)},[k]),_.useEffect(()=>{let P=B=>{B.key===o&&(B.newValue?x(B.newValue):M(u))};return window.addEventListener("storage",P),()=>window.removeEventListener("storage",P)},[M]),_.useEffect(()=>{A(e??v)},[e,v]);let D=_.useMemo(()=>({theme:v,setTheme:M,forcedTheme:e,resolvedTheme:v==="system"?S:v,themes:s?[...l,"system"]:l,systemTheme:s?S:void 0}),[v,M,e,S,s,l]);return _.createElement(Mm.Provider,{value:D},_.createElement(m5,{forcedTheme:e,storageKey:o,attribute:d,enableSystem:s,enableColorScheme:r,defaultTheme:u,value:h,themes:l,nonce:y,scriptProps:g}),p)},m5=_.memo(({forcedTheme:e,storageKey:t,attribute:s,enableSystem:r,enableColorScheme:o,defaultTheme:l,value:u,themes:d,nonce:h,scriptProps:p})=>{let y=JSON.stringify([s,t,l,e,d,u,r,o]).slice(1,-1);return _.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?h:"",dangerouslySetInnerHTML:{__html:`(${l5.toString()})(${y})`}})}),g5=(e,t)=>{if(c5)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||t},y5=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Uh=e=>(e||(e=window.matchMedia(VS)),e.matches?"dark":"light");function v5({children:e,...t}){return w.jsx(f5,{"data-hercules-id":"src/components/providers/theme.tsx:8:4","data-hercules-name":"NextThemeProvider",attribute:"class",defaultTheme:"system",enableSystem:!0,...t,children:e})}function b5(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",t.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const x5=e=>{switch(e){case"success":return _5;case"info":return E5;case"warning":return T5;case"error":return C5;default:return null}},w5=Array(12).fill(0),S5=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},w5.map((s,r)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),_5=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),T5=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
50currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),E5=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),C5=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),A5=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),k5=()=>{const[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{const s=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let Cp=1;class R5{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const s=this.subscribers.indexOf(t);this.subscribers.splice(s,1)}),this.publish=t=>{this.subscribers.forEach(s=>s(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var s;const{message:r,...o}=t,l=typeof t?.id=="number"||((s=t.id)==null?void 0:s.length)>0?t.id:Cp++,u=this.toasts.find(h=>h.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:r}),{...h,...t,id:l,dismissible:d,title:r}):h):this.addToast({title:r,...o,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:t,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(r=>r({id:s.id,dismiss:!0}))}),t),this.message=(t,s)=>this.create({...s,message:t}),this.error=(t,s)=>this.create({...s,message:t,type:"error"}),this.success=(t,s)=>this.create({...s,type:"success",message:t}),this.info=(t,s)=>this.create({...s,type:"info",message:t}),this.warning=(t,s)=>this.create({...s,type:"warning",message:t}),this.loading=(t,s)=>this.create({...s,type:"loading",message:t}),this.promise=(t,s)=>{if(!s)return;let r;s.loading!==void 0&&(r=this.create({...s,promise:t,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=r!==void 0,u;const d=o.then(async p=>{if(u=["resolve",p],ne.isValidElement(p))l=!1,this.create({id:r,type:"default",message:p});else if(M5(p)&&!p.ok){l=!1;const g=typeof s.error=="function"?await s.error(`HTTP error! status: ${p.status}`):s.error,v=typeof s.description=="function"?await s.description(`HTTP error! status: ${p.status}`):s.description,S=typeof g=="object"&&!ne.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:v,...S})}else if(p instanceof Error){l=!1;const g=typeof s.error=="function"?await s.error(p):s.error,v=typeof s.description=="function"?await s.description(p):s.description,S=typeof g=="object"&&!ne.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:v,...S})}else if(s.success!==void 0){l=!1;const g=typeof s.success=="function"?await s.success(p):s.success,v=typeof s.description=="function"?await s.description(p):s.description,S=typeof g=="object"&&!ne.isValidElement(g)?g:{message:g};this.create({id:r,type:"success",description:v,...S})}}).catch(async p=>{if(u=["reject",p],s.error!==void 0){l=!1;const y=typeof s.error=="function"?await s.error(p):s.error,g=typeof s.description=="function"?await s.description(p):s.description,x=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:r,type:"error",description:g,...x})}}).finally(()=>{l&&(this.dismiss(r),r=void 0),s.finally==null||s.finally.call(s)}),h=()=>new Promise((p,y)=>d.then(()=>u[0]==="reject"?y(u[1]):p(u[1])).catch(y));return typeof r!="string"&&typeof r!="number"?{unwrap:h}:Object.assign(r,{unwrap:h})},this.custom=(t,s)=>{const r=s?.id||Cp++;return this.create({jsx:t(r),id:r,...s}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const an=new R5,O5=(e,t)=>{const s=t?.id||Cp++;return an.addToast({title:e,...t,id:s}),s},M5=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",N5=O5,D5=()=>an.toasts,j5=()=>an.getActiveToasts(),Bo=Object.assign(N5,{success:an.success,info:an.info,warning:an.warning,error:an.error,custom:an.custom,message:an.message,promise:an.promise,dismiss:an.dismiss,loading:an.loading},{getHistory:D5,getToasts:j5});b5
vendor: 4,787 bytes, line 50
50("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 50
50left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function 
vendor: 1,290 bytes, line 50
50qc(e){return e.label!==void 0}const z5=3,P5="24px",L5="16px",bx=4e3,U5=356,V5=14,q5=45,B5=200;function ts(...e){return e.filter(Boolean).join(" ")}function I5(e){const[t,s]=e.split("-"),r=[];return t&&r.push(t),s&&r.push(s),r}const $5=e=>{var t,s,r,o,l,u,d,h,p;const{invert:y,toast:g,unstyled:v,interacting:x,setHeights:S,visibleToasts:E,heights:C,index:A,toasts:M,expanded:k,removeToast:D,defaultRichColors:P,closeButton:B,style:I,cancelButtonStyle:L,actionButtonStyle:W,className:ee="",descriptionClassName:re="",duration:oe,position:me,gap:he,expandByDefault:fe,classNames:j,icons:F,closeButtonAriaLabel:G="Close toast"}=e,[ie,X]=ne.useState(null),[O,Z]=ne.useState(null),[H,J]=ne.useState(!1),[se,ae]=ne.useState(!1),[ye,xe]=ne.useState(!1),[ve,_t]=ne.useState(!1),[Dt,Tt]=ne.useState(!1),[ln,jt]=ne.useState(0),[Pa,wr]=ne.useState(0),Di=ne.useRef(g.duration||oe||bx),La=ne.useRef(null),cn=ne.useRef(null),Ua=A===0,Va=A+1<=E,Vt=g.type,Zs=g.dismissible!==!1,qt=g.className||"",ad=g.descriptionClassName||"",ji=ne.useMemo(()=>C.findIndex(we=>we.toastId===g.id)||0,[C,g.id]),bl=ne.useMemo(()=>{var we;return(we=g.closeButton)!=null?we:B},[g.closeButton,B]),zi=ne.useMemo(()=>g.duration||oe||bx,[g.duration,oe]),qa=ne.useRef(0),vs=ne.useRef(0),xl=ne.useRef(0),Gs=ne.useRef(null),[Pi,Bt]=me.
vendor: 4,633 bytes, line 50
50split("-"),Pn=ne.useMemo(()=>C.reduce((we,Ke,xt)=>xt>=ji?we:we+Ke.height,0),[C,ji]),zt=k5(),od=g.invert||y,Ba=Vt==="loading";vs.current=ne.useMemo(()=>ji*he+Pn,[ji,Pn]),ne.useEffect(()=>{Di.current=zi},[zi]),ne.useEffect(()=>{J(!0)},[]),ne.useEffect(()=>{const we=cn.current;if(we){const Ke=we.getBoundingClientRect().height;return wr(Ke),S(xt=>[{toastId:g.id,height:Ke,position:g.position},...xt]),()=>S(xt=>xt.filter(Pt=>Pt.toastId!==g.id))}},[S,g.id]),ne.useLayoutEffect(()=>{if(!H)return;const we=cn.current,Ke=we.style.height;we.style.height="auto";const xt=we.getBoundingClientRect().height;we.style.height=Ke,wr(xt),S(Pt=>Pt.find(Je=>Je.toastId===g.id)?Pt.map(Je=>Je.toastId===g.id?{...Je,height:xt}:Je):[{toastId:g.id,height:xt,position:g.position},...Pt])},[H,g.title,g.description,S,g.id,g.jsx,g.action,g.cancel]);const Gn=ne.useCallback(()=>{ae(!0),jt(vs.current),S(we=>we.filter(Ke=>Ke.toastId!==g.id)),setTimeout(()=>{D(g)},B5)},[g,D,S,vs]);ne.useEffect(()=>{if(g.promise&&Vt==="loading"||g.duration===1/0||g.type==="loading")return;let we;return k||x||zt?(()=>{if(xl.current<qa.current){const Pt=new Date().getTime()-qa.current;Di.current=Di.current-Pt}xl.current=new Date().getTime()})():Di.current!==1/0&&(qa.current=new Date().getTime(),we=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Gn()},Di.current)),()=>clearTimeout(we)},[k,x,g,Vt,zt,Gn]),ne.useEffect(()=>{g.delete&&(Gn(),g.onDismiss==null||g.onDismiss.call(g,g))},[Gn,g.delete]);function Sr(){var we;if(F?.loading){var Ke;return ne.createElement("div",{className:ts(j?.loader,g==null||(Ke=g.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":Vt==="loading"},F.loading)}return ne.createElement(S5,{className:ts(j?.loader,g==null||(we=g.classNames)==null?void 0:we.loader),visible:Vt==="loading"})}const _r=g.icon||F?.[Vt]||x5(Vt);var Li,Yn;return ne.createElement("li",{tabIndex:0,ref:cn,className:ts(ee,qt,j?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,j?.default,j?.[Vt],g==null||(s=g.classNames)==null?void 0:s[Vt]),"data-sonner-toast":"","data-rich-colors":(Li=g.richColors)!=null?Li:P,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":H,"data-promise":!!g.promise,"data-swiped":Dt,"data-removed":se,"data-visible":Va,"data-y-position":Pi,"data-x-position":Bt,"data-index":A,"data-front":Ua,"data-swiping":ye,"data-dismissible":Zs,"data-type":Vt,"data-invert":od,"data-swipe-out":ve,"data-swipe-direction":O,"data-expanded":!!(k||fe&&H),"data-testid":g.testId,style:{"--index":A,"--toasts-before":A,"--z-index":M.length-A,"--offset":`${se?ln:vs.current}px`,"--initial-height":fe?"auto":`${Pa}px`,...I,...g.style},onDragEnd:()=>{xe(!1),X(null),Gs.current=null},onPointerDown:we=>{we.button!==2&&(Ba||!Zs||(La.current=new Date,jt(vs.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(xe(!0),Gs.current={x:we.clientX,y:we.clientY})))},onPointerUp:()=>{var we,Ke,xt;if(ve||!Zs)return;Gs.current=null;const Pt=Number(((we=cn.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ys=Number(((Ke=cn.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Je=new Date().getTime()-((xt=La.current)==null?void 0:xt.getTime()),Yt=ie==="x"?Pt:Ys,Ui=Math.abs(Yt)/Je;if(Math.abs(Yt)>=q5||Ui>.11){jt(vs.current),g.onDismiss==null||g.onDismiss.call(g,g),Z(ie==="x"?Pt>0?"right":"left":Ys>0?"down":"up"),Gn(),_t(!0);return}else{var Kt,Xt;(Kt=cn.current)==null||Kt.style.setProperty("--swipe-amount-x","0px"),(Xt=cn.current)==null||Xt.style.setProperty("--swipe-amount-y","0px")}Tt(!1),xe(!1),X(null)},onPointerMove:we=>{var Ke,xt,Pt;if(!Gs.current||!Zs||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const Je=we.clientY-Gs.current.y,Yt=we.clientX-Gs.current.x;var Ui;const Kt=(Ui=e.swipeDirections)!=null?Ui:I5(me);!ie&&(Math.abs(Yt)>1||Math.abs(Je)>1)&&X(Math.abs(Yt)>Math.abs(Je)?"x":"y");let Xt={x:0,y:0};const Tr=Ln=>1/(1.5+Math.abs(Ln)/20);if(ie==="y"){if(Kt.includes("top")||Kt.includes("bottom"))if(Kt.includes("top")&&Je<0||Kt.includes("bottom")&&Je>0)Xt.y=Je;else{const Ln=Je*Tr(Je);Xt.y=Math.abs(Ln)<Math.abs(Je)?Ln:Je}}else if(ie==="x"&&(Kt.includes("left")||Kt.includes("right")))if(Kt.includes("left")&&Yt<0||Kt.includes("right")&&Yt>0)Xt.x=Yt;else{const Ln=Yt*Tr(Yt);Xt.x=Math.abs(Ln)<Math.abs(Yt)?Ln:Yt}(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&Tt(!0),(xt=cn.current)==null||xt.style.setProperty("--swipe-amount-x",`${Xt.x}px`),(Pt=cn.current)==null||Pt.style.setProperty("--swipe-amount-y",`${Xt.y}px`)}},bl&&!g.jsx&&Vt!=="loading"?ne.createElement("button",{"aria-label":G,"data-disabled":
vendor: 9,259 bytes, line 50
50Ba,"data-close-button":!0,onClick:Ba||!Zs?()=>{}:()=>{Gn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:ts(j?.closeButton,g==null||(r=g.classNames)==null?void 0:r.closeButton)},(Yn=F?.close)!=null?Yn:A5):null,(Vt||g.icon||g.promise)&&g.icon!==null&&(F?.[Vt]!==null||g.icon)?ne.createElement("div",{"data-icon":"",className:ts(j?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Sr():null,g.type!=="loading"?_r:null):null,ne.createElement("div",{"data-content":"",className:ts(j?.content,g==null||(l=g.classNames)==null?void 0:l.content)},ne.createElement("div",{"data-title":"",className:ts(j?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?ne.createElement("div",{"data-description":"",className:ts(re,ad,j?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),ne.isValidElement(g.cancel)?g.cancel:g.cancel&&qc(g.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||L,onClick:we=>{qc(g.cancel)&&Zs&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,we),Gn())},className:ts(j?.cancelButton,g==null||(h=g.classNames)==null?void 0:h.cancelButton)},g.cancel.label):null,ne.isValidElement(g.action)?g.action:g.action&&qc(g.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||W,onClick:we=>{qc(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,we),!we.defaultPrevented&&Gn())},className:ts(j?.actionButton,g==null||(p=g.classNames)==null?void 0:p.actionButton)},g.action.label):null)};function xx(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function H5(e,t){const s={};return[e,t].forEach((r,o)=>{const l=o===1,u=l?"--mobile-offset":"--offset",d=l?L5:P5;function h(p){["top","right","bottom","left"].forEach(y=>{s[`${u}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof r=="number"||typeof r=="string"?h(r):typeof r=="object"?["top","right","bottom","left"].forEach(p=>{r[p]===void 0?s[`${u}-${p}`]=d:s[`${u}-${p}`]=typeof r[p]=="number"?`${r[p]}px`:r[p]}):h(d)}),s}const F5=ne.forwardRef(function(t,s){const{id:r,invert:o,position:l="bottom-right",hotkey:u=["altKey","KeyT"],expand:d,closeButton:h,className:p,offset:y,mobileOffset:g,theme:v="light",richColors:x,duration:S,style:E,visibleToasts:C=z5,toastOptions:A,dir:M=xx(),gap:k=V5,icons:D,containerAriaLabel:P="Notifications"}=t,[B,I]=ne.useState([]),L=ne.useMemo(()=>r?B.filter(H=>H.toasterId===r):B.filter(H=>!H.toasterId),[B,r]),W=ne.useMemo(()=>Array.from(new Set([l].concat(L.filter(H=>H.position).map(H=>H.position)))),[L,l]),[ee,re]=ne.useState([]),[oe,me]=ne.useState(!1),[he,fe]=ne.useState(!1),[j,F]=ne.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=ne.useRef(null),ie=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),X=ne.useRef(null),O=ne.useRef(!1),Z=ne.useCallback(H=>{I(J=>{var se;return(se=J.find(ae=>ae.id===H.id))!=null&&se.delete||an.dismiss(H.id),J.filter(({id:ae})=>ae!==H.id)})},[]);return ne.useEffect(()=>an.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{I(J=>J.map(se=>se.id===H.id?{...se,delete:!0}:se))});return}setTimeout(()=>{kk.flushSync(()=>{I(J=>{const se=J.findIndex(ae=>ae.id===H.id);return se!==-1?[...J.slice(0,se),{...J[se],...H},...J.slice(se+1)]:[H,...J]})})})}),[B]),ne.useEffect(()=>{if(v!=="system"){F(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:J})=>{F(J?"dark":"light")})}catch{H.addListener(({matches:se})=>{try{F(se?"dark":"light")}catch(ae){console.error(ae)}})}},[v]),ne.useEffect(()=>{B.length<=1&&me(!1)},[B]),ne.useEffect(()=>{const H=J=>{var se;if(u.every(xe=>J[xe]||J.code===xe)){var ye;me(!0),(ye=G.current)==null||ye.focus()}J.code==="Escape"&&(document.activeElement===G.current||(se=G.current)!=null&&se.contains(document.activeElement))&&me(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[u]),ne.useEffect(()=>{if(G.current)return()=>{X.current&&(X.current.focus({preventScroll:!0}),X.current=null,O.current=!1)}},[G.current]),ne.createElement("section",{ref:s,"aria-label":`${P} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((H,J)=>{var se;const[ae,ye]=H.split("-");return L.length?ne.createElement("ol",{key:H,dir:M==="auto"?xx():M,tabIndex:-1,ref:G,className:p,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":ae,"data-x-position":ye,style:{"--front-toast-height":`${((se=ee[0])==null?void 0:se.height)||0}px`,"--width":`${U5}px`,"--gap":`${k}px`,...E,...H5(y,g)},onBlur:xe=>{O.current&&!xe.currentTarget.contains(xe.relatedTarget)&&(O.current=!1,X.current&&(X.current.focus({preventScroll:!0}),X.current=null))},onFocus:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||O.current||(O.current=!0,X.current=xe.relatedTarget)},onMouseEnter:()=>me(!0),onMouseMove:()=>me(!0),onMouseLeave:()=>{he||me(!1)},onDragEnd:()=>me(!1),onPointerDown:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||fe(!0)},onPointerUp:()=>fe(!1)},L.filter(xe=>!xe.position&&J===0||xe.position===H).map((xe,ve)=>{var _t,Dt;return ne.createElement($5,{key:xe.id,icons:D,index:ve,toast:xe,defaultRichColors:x,duration:(_t=A?.duration)!=null?_t:S,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:o,visibleToasts:C,closeButton:(Dt=A?.closeButton)!=null?Dt:h,interacting:he,position:H,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:Z,toasts:L.filter(Tt=>Tt.position==xe.position),heights:ee.filter(Tt=>Tt.position==xe.position),setHeights:re,expandByDefault:d,gap:k,expanded:oe,swipeDirections:t.swipeDirections})})):null}))}),Q5=({...e})=>{const{theme:t="system"}=d5();return w.jsx(F5,{"data-hercules-id":"src/components/ui/sonner.tsx:8:4","data-hercules-name":"Sonner",theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function qs(e,t,{checkForDefaultPrevented:s=!0}={}){return function(o){if(e?.(o),s===!1||!o.defaultPrevented)return t?.(o)}}function wx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nm(...e){return t=>{let s=!1;const r=e.map(o=>{const l=wx(o,t);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let o=0;o<r.length;o++){const l=r[o];typeof l=="function"?l():wx(e[o],null)}}}}function vr(...e){return _.useCallback(Nm(...e),e)}function qS(e,t=[]){let s=[];function r(l,u){const d=_.createContext(u),h=s.length;s=[...s,u];const p=g=>{const{scope:v,children:x,...S}=g,E=v?.[e]?.[h]||d,C=_.useMemo(()=>S,Object.values(S));return w.jsx(E.Provider,{value:C,children:x})};p.displayName=l+"Provider";function y(g,v){const x=v?.[e]?.[h]||d,S=_.useContext(x);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[p,y]}const o=()=>{const l=s.map(u=>_.createContext(u));return function(d){const h=d?.[e]||l;return _.useMemo(()=>({[`__scope${e}`]:{...d,[e]:h}}),[d,h])}};return o.scopeName=e,[r,Z5(o,...t)]}function Z5(...e){const t=e[0];if(e.length===1)return t;const s=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=r.reduce((d,{useScope:h,scopeName:p})=>{const g=h(l)[`__scope${p}`];return{...d,...g}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return s.scopeName=t.scopeName,s}function G5(e){const t=Y5(e),s=_.forwardRef((r,o)=>{const{children:l,...u}=r,d=_.Children.toArray(l),h=d.find(X5);if(h){const p=h.props.children,y=d.map(g=>g===h?_.Children.count(p)>1?_.Children.only(null):_.isValidElement(p)?p.props.children:null:g);return w.jsx(t,{...u,ref:o,children:_.isValidElement(p)?_.cloneElement(p,void 0,y):null})}return w.jsx(t,{...u,ref:o,children:l})});return s.displayName=`${e}.Slot`,s}function Y5(e){const t=_.forwardRef((s,r)=>{const{children:o,...l}=s;if(_.isValidElement(o)){const u=J5(o),d=W5(l,o.props);return o.type!==_.Fragment&&(d.ref=r?Nm(r,u):u),_.cloneElement(o,d)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BS=Symbol("radix.slottable");function K5(e){const t=({children:s})=>w.jsx(w.Fragment,{children:s});return t.displayName=`${e}.Slottable`,t.__radixId=BS,t}function X5(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BS}function W5(e,t){const s={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?s[r]=(...d)=>{const h=l(...d);return o(...d),h}:o&&(s[r]=o):r==="style"?s[r]={...o,...l}
vendor: 11,633 bytes, line 50
50:r==="className"&&(s[r]=[o,l].filter(Boolean).join(" "))}return{...e,...s}}function J5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var ej=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],br=ej.reduce((e,t)=>{const s=G5(`Primitive.${t}`),r=_.forwardRef((o,l)=>{const{asChild:u,...d}=o,h=u?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(h,{...d,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tj(e,t){e&&pm.flushSync(()=>e.dispatchEvent(t))}function Gu(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...s)=>t.current?.(...s),[])}function nj(e,t=globalThis?.document){const s=Gu(e);_.useEffect(()=>{const r=o=>{o.key==="Escape"&&s(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[s,t])}var sj="DismissableLayer",Ap="dismissableLayer.update",ij="dismissableLayer.pointerDownOutside",rj="dismissableLayer.focusOutside",Sx,IS=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$S=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...h}=e,p=_.useContext(IS),[y,g]=_.useState(null),v=y?.ownerDocument??globalThis?.document,[,x]=_.useState({}),S=vr(t,I=>g(I)),E=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=E.indexOf(C),M=y?E.indexOf(y):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,D=M>=A,P=lj(I=>{const L=I.target,W=[...p.branches].some(ee=>ee.contains(L));!D||W||(o?.(I),u?.(I),I.defaultPrevented||d?.())},v),B=cj(I=>{const L=I.target;[...p.branches].some(ee=>ee.contains(L))||(l?.(I),u?.(I),I.defaultPrevented||d?.())},v);return nj(I=>{M===p.layers.size-1&&(r?.(I),!I.defaultPrevented&&d&&(I.preventDefault(),d()))},v),_.useEffect(()=>{if(y)return s&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Sx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),_x(),()=>{s&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Sx)}},[y,v,s,p]),_.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),_x())},[y,p]),_.useEffect(()=>{const I=()=>x({});return document.addEventListener(Ap,I),()=>document.removeEventListener(Ap,I)},[]),w.jsx(br.div,{...h,ref:S,style:{pointerEvents:k?D?"auto":"none":void 0,...e.style},onFocusCapture:qs(e.onFocusCapture,B.onFocusCapture),onBlurCapture:qs(e.onBlurCapture,B.onBlurCapture),onPointerDownCapture:qs(e.onPointerDownCapture,P.onPointerDownCapture)})});$S.displayName=sj;var aj="DismissableLayerBranch",oj=_.forwardRef((e,t)=>{const s=_.useContext(IS),r=_.useRef(null),o=vr(t,r);return _.useEffect(()=>{const l=r.current;if(l)return s.branches.add(l),()=>{s.branches.delete(l)}},[s.branches]),w.jsx(br.div,{...e,ref:o})});oj.displayName=aj;function lj(e,t=globalThis?.document){const s=Gu(e),r=_.useRef(!1),o=_.useRef(()=>{});return _.useEffect(()=>{const l=d=>{if(d.target&&!r.current){let h=function(){HS(ij,s,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=h,t.addEventListener("click",o.current,{once:!0})):h()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",o.current)}},[t,s]),{onPointerDownCapture:()=>r.current=!0}}function cj(e,t=globalThis?.document){const s=Gu(e),r=_.useRef(!1);return _.useEffect(()=>{const o=l=>{l.target&&!r.current&&HS(rj,s,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,s]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function _x(){const e=new CustomEvent(Ap);document.dispatchEvent(e)}function HS(e,t,s,{discrete:r}){const o=s.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});t&&o.addEventListener(e,t,{once:!0}),r?tj(o,l):o.dispatchEvent(l)}var rl=globalThis?.document?_.useLayoutEffect:()=>{};const uj=["top","right","bottom","left"],Ei=Math.min,yn=Math.max,_u=Math.round,Bc=Math.floor,us=e=>({x:e,y:e}),dj={left:"right",right:"left",bottom:"top",top:"bottom"};function kp(e,t,s){return yn(e,Ei(t,s))}function $s(e,t){return typeof e=="function"?e(t):e}function Hs(e){return e.split("-")[0]}function Ma(e){return e.split("-")[1]}function Dm(e){return e==="x"?"y":"x"}function jm(e){return e==="y"?"height":"width"}function ls(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function zm(e){return Dm(ls(e))}function fj(e,t,s){s===void 0&&(s=!1);const r=Ma(e),o=zm(e),l=jm(o);let u=o==="x"?r===(s?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Tu(u)),[u,Tu(u)]}function hj(e){const t=Tu(e);return[Rp(e),t,Rp(t)]}function Rp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Tx=["left","right"],Ex=["right","left"],pj=["top","bottom"],mj=["bottom","top"];function gj(e,t,s){switch(e){case"top":case"bottom":return s?t?Ex:Tx:t?Tx:Ex;case"left":case"right":return t?pj:mj;default:return[]}}function yj(e,t,s,r){const o=Ma(e);let l=gj(Hs(e),s==="start",r);return o&&(l=l.map(u=>u+"-"+o),t&&(l=l.concat(l.map(Rp)))),l}function Tu(e){const t=Hs(e);return dj[t]+e.slice(t.length)}function vj(e){return{top:0,right:0,bottom:0,left:0,...e}}function FS(e){return typeof e!="number"?vj(e):{top:e,right:e,bottom:e,left:e}}function Eu(e){const{x:t,y:s,width:r,height:o}=e;return{width:r,height:o,top:s,left:t,right:t+r,bottom:s+o,x:t,y:s}}function Cx(e,t,s){let{reference:r,floating:o}=e;const l=ls(t),u=zm(t),d=jm(u),h=Hs(t),p=l==="y",y=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,v=r[d]/2-o[d]/2;let x;switch(h){case"top":x={x:y,y:r.y-o.height};break;case"bottom":x={x:y,y:r.y+r.height};break;case"right":x={x:r.x+r.width,y:g};break;case"left":x={x:r.x-o.width,y:g};break;default:x={x:r.x,y:r.y}}switch(Ma(t)){case"start":x[u]-=v*(s&&p?-1:1);break;case"end":x[u]+=v*(s&&p?-1:1);break}return x}async function bj(e,t){var s;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:u,elements:d,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:v=!1,padding:x=0}=$s(t,e),S=FS(x),C=d[v?g==="floating"?"reference":"floating":g],A=Eu(await l.getClippingRect({element:(s=await(l.isElement==null?void 0:l.isElement(C)))==null||s?C:C.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:p,rootBoundary:y,strategy:h})),M=g==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),D=await(l.isElement==null?void 0:l.isElement(k))?await(l.getScale==null?void 0:l.getScale(k))||{x:1,y:1}:{x:1,y:1},P=Eu(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:M,offsetParent:k,strategy:h}):M);return{top:(A.top-P.top+S.top)/D.y,bottom:(P.bottom-A.bottom+S.bottom)/D.y,left:(A.left-P.left+S.left)/D.x,right:(P.right-A.right+S.right)/D.x}}const xj=50,wj=async(e,t,s)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:u}=s,d=u.detectOverflow?u:{...u,detectOverflow:bj},h=await(u.isRTL==null?void 0:u.isRTL(t));let p=await u.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:g}=Cx(p,r,h),v=r,x=0;const S={};for(let E=0;E<l.length;E++){const C=l[E];if(!C)continue;const{name:A,fn:M}=C,{x:k,y:D,data:P,reset:B}=await M({x:y,y:g,initialPlacement:r,placement:v,strategy:o,middlewareData:S,rects:p,platform:d,elements:{reference:e,floating:t}});y=k??y,g=D??g,S[A]={...S[A],...P},B&&x<xj&&(x++,typeof B=="object"&&(B.placement&&(v=B.placement),B.rects&&(p=B.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:o}):B.rects),{x:y,y:g}=Cx(p,v,h)),E=-1)}return{x:y,y:g,placement:v,strategy:o,middlewareData:S}},Sj=e=>({name:"arrow",options:e,async fn(t){const{x:s,y:r,placement:o,rects:l,platform:u,elements:d,middlewareData:h}=t,{element:p,padding:y=0}=$s(e,t)||{};if(p==null)return{};const g=FS(y),v={x:s,y:r},x=zm(o),S=jm(x),E=await u.getDimensions(p),C=x==="y",A=C?"top":"left",M=C?"bottom":"right",k=C?"clientHeight":"clientWidth",D=l.reference[S]+l.reference[x]-v[x]-l.floating[S],P=v[x]-l.reference[x],B=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let I=B?B[k]:0;(!I||!await(u.isElement==null?void 0:u.isElement(B)))&&(I=d.floating[k]||l.floating[S]);const L=D/2-P/2,W=I/2-E[S]/2-1,ee=Ei(g[A],W),re=Ei(g[M],W),oe=ee,me=I-E[S]-re,he=I/2-E[S]/2+L,fe=kp(oe,he,me),j=!h.arrow&&Ma(o)!=null&&he!==fe&&l.reference[S]/2-(he<oe?ee:re)-E[S]/2<0,F=j?he<oe?he-oe:he-me:0;return{[x]:v[x]+F,data:{[x]:fe,centerOffset:he-fe-F,...j&&{alignmentOffset:F}},reset:j}}}),_j=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var s,r;const{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:h,elements:p}=t,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...C}=$s(e,t);if((s=l.arrow)!=null&&s.alignmentOffset)return{};const A=Hs(o),M=ls(d),k=Hs(d)===d,D=await(h.isRTL==null?void 0:h.isRTL(p.floating)),P=v||(k||!E?[Tu(d)]:hj(d)),B=S!=="none";!v&&B&&P.push(...yj(d,E,S,D));const I=[d,...P],L=await h.detectOverflow(t,C),W=[];let ee=((r=l.flip)==null?void 0:r.overflows)||[];if(y&&W.push(L[A]),g){const he=fj(o,u,D);W.push(L[he[0]],L[he[1]])}if(ee=[...ee,{placement:o,overflows:W}],!W.every(he=>he<=0)){var re,oe;const he=(((re=l.flip)==null?void 0:re.index)||0)+1,fe=I[he];if(fe&&(!(g==="alignment"?M!==ls(fe):!1)||ee.every(G=>ls(G.placement)===M?G.overflows[0]>0:!0)))return{data:{index:he,overflows:ee},reset:{placement:fe}};let j=(oe=ee.filter(F=>F.overflows[0]<=0).sort((F,G)=>F.overflows[1]-G.overflows[1])[0])==null?void 0:oe.placement;if(!j)switch(x){case"bestFit":{var me;const F=(me=ee.filter(G=>{if(B){const ie=ls(G.placement);return ie===M||ie==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(ie=>ie>0).reduce((ie,X)=>ie+X,0)]).sort((G,ie)=>G[1]-ie[1])[0])==null?void 0:me[0];F&&(j=F);break}case"initialPlacement":j=d;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function Ax(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kx(e){return uj.some(t=>e[t]>=0)}const Tj=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s,platform:r}=t,{strategy:o="referenceHidden",...l}=$s(e,t);switch(o){case"referenceHidden":{const u=await r.detectOverflow(t,{...l,elementContext:"reference"}),d=Ax(u,s.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:kx(d)}}}case"escaped":{const u=await r.detectOverflow(t,{...l,altBoundary:!0}),d=Ax(u,s.floating);return{data:{escapedOffsets:d,escaped:kx(d)}}}default:return{}}}}},QS=new Set(["left","top"]);async function Ej(e,t){const{placement:s,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),u=Hs(s),d=Ma(s),h=ls(s)==="y",p=QS.has(u)?-1:1,y=l&&h?-1:1,g=$s(t,e);let{mainAxis:v,crossAxis:x,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}
50:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof S=="number"&&(x=d==="end"?S*-1:S),h?{x:x*y,y:v*p}:{x:v*p,y:x*y}}const Cj=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var s,r;const{x:o,y:l,placement:u,middlewareData:d}=t,h=await Ej(t,e);return u===((s=d.offset)==null?void 0:s.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:o+h.x,y:l+h.y,data:{...h,placement:u}}}}},Aj=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:r,placement:o,platform:l}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:h={fn:A=>{let{x:M,y:k}=A;return{x:M,y:k}}},...p}=$s(e,t),y={x:s,y:r},g=await l.detectOverflow(t,p),v=ls(Hs(o)),x=Dm(v);let S=y[x],E=y[v];if(u){const A=x==="y"?"top":"left",M=x==="y"?"bottom":"right",k=S+g[A],D=S-g[M];S=kp(k,S,D)}if(d){const A=v==="y"?"top":"left",M=v==="y"?"bottom":"right",k=E+g[A],D=E-g[M];E=kp(k,E,D)}const C=h.fn({...t,[x]:S,[v]:E});return{...C,data:{x:C.x-s,y:C.y-r,enabled:{[x]:u,[v]:d}}}}}},kj=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:s,y:r,placement:o,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:h=!0,crossAxis:p=!0}=$s(e,t),y={x:s,y:r},g=ls(o),v=Dm(g);let x=y[v],S=y[g];const E=$s(d,t),C=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(h){const k=v==="y"?"height":"width",D=l.reference[v]-l.floating[k]+C.mainAxis,P=l.reference[v]+l.reference[k]-C.mainAxis;x<D?x=D:x>P&&(x=P)}if(p){var A,M;const k=v==="y"?"width":"height",D=QS.has(Hs(o)),P=l.reference[g]-l.floating[k]+(D&&((A=u.offset)==null?void 0:A[g])||0)+(D?0:C.crossAxis),B=l.reference[g]+l.reference[k]+(D?0:((M=u.offset)==null?void 0:M[g])||0)-(D?C.crossAxis:0);S<P?S=P:S>B&&(S=B)}return{[v]:x,[g]:S}}}},Rj=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var s,r;const{placement:o,rects:l,platform:u,elements:d}=t,{apply:h=()=>{},...p}=$s(e,t),y=await u.detectOverflow(t,p),g=Hs(o),v=Ma(o),x=ls(o)==="y",{width:S,height:E}=l.floating;let C,A;g==="top"||g==="bottom"?(C=g,A=v===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(A=g,C=v==="end"?"top":"bottom");const M=E-y.top-y.bottom,k=S-y.left-y.right,D=Ei(E-y[C],M),P=Ei(S-y[A],k),B=!t.middlewareData.shift;let I=D,L=P;if((s=t.middlewareData.shift)!=null&&s.enabled.x&&(L=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=M),B&&!v){const ee=yn(y.left,0),re=yn(y.right,0),oe=yn(y.top,0),me=yn(y.bottom,0);x?L=S-2*(ee!==0||re!==0?ee+re:yn(y.left,y.right)):I=E-2*(oe!==0||me!==0?oe+me:yn(y.top,y.bottom))}await h({...t,availableWidth:L,availableHeight:I});const W=await u.getDimensions(d.floating);return S!==W.width||E!==W.height?{reset:{rects:!0}}:{}}}};function Yu(){return typeof window<"u"}function Na(e){return ZS(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ys(e){var t;return(t=(ZS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ZS(e){return Yu()?e instanceof Node||e instanceof vn(e).Node:!1}function Qn(e){return Yu()?e instanceof Element||e instanceof vn(e).Element:!1}function Qs(e){return Yu()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function Rx(e){return!Yu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function pl(e){const{overflow:t,overflowX:s,overflowY:r,display:o}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+s)&&o!=="inline"&&o!=="contents"}function Oj(e){return/^(table|td|th)$/.test(Na(e))}function Ku(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Mj=/transform|translate|scale|rotate|perspective|filter/,Nj=/paint|layout|strict|content/,nr=e=>!!e&&e!=="none";let Vh;function Pm(e){const t=Qn(e)?Zn(e):e;return nr(t.transform)||nr(t.translate)||nr(t.scale)||nr(t.rotate)||nr(t.perspective)||!Lm()&&(nr(t.backdropFilter)||nr(t.filter))||Mj.test(t.willChange||"")||Nj.test(t.contain||"")}function Dj(e){let t=Ci(e);for(;Qs(t)&&!_a(t);){if(Pm(t))return t;if(Ku(t))return null;t=Ci(t)}return null}function Lm(){return Vh==null&&(Vh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vh}function _a(e){return/^(html|body|#document)$/.test(Na(e))}function Zn(e){return vn(e).getComputedStyle(e)}function Xu(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ci(e){if(Na(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rx(e)&&e.host||ys(e);return Rx(t)?t.host:t}function GS(e){const t=Ci(e);return _a(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qs(t)&&pl(t)?t:GS(t)}function al(e,t,s){var r;t===void 0&&(t=[]),s===void 0&&(s=!0);const o=GS(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),u=vn(o);if(l){const d=Op(u);
vendor: 4,444 bytes, line 50
50return t.concat(u,u.visualViewport||[],pl(o)?o:[],d&&s?al(d):[])}else return t.concat(o,al(o,[],s))}function Op(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YS(e){const t=Zn(e);let s=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Qs(e),l=o?e.offsetWidth:s,u=o?e.offsetHeight:r,d=_u(s)!==l||_u(r)!==u;return d&&(s=l,r=u),{width:s,height:r,$:d}}function Um(e){return Qn(e)?e:e.contextElement}function ba(e){const t=Um(e);if(!Qs(t))return us(1);const s=t.getBoundingClientRect(),{width:r,height:o,$:l}=YS(t);let u=(l?_u(s.width):s.width)/r,d=(l?_u(s.height):s.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const jj=us(0);function KS(e){const t=vn(e);return!Lm()||!t.visualViewport?jj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zj(e,t,s){return t===void 0&&(t=!1),!s||t&&s!==vn(e)?!1:t}function mr(e,t,s,r){t===void 0&&(t=!1),s===void 0&&(s=!1);const o=e.getBoundingClientRect(),l=Um(e);let u=us(1);t&&(r?Qn(r)&&(u=ba(r)):u=ba(e));const d=zj(l,s,r)?KS(l):us(0);let h=(o.left+d.x)/u.x,p=(o.top+d.y)/u.y,y=o.width/u.x,g=o.height/u.y;if(l){const v=vn(l),x=r&&Qn(r)?vn(r):r;let S=v,E=Op(S);for(;E&&r&&x!==S;){const C=ba(E),A=E.getBoundingClientRect(),M=Zn(E),k=A.left+(E.clientLeft+parseFloat(M.paddingLeft))*C.x,D=A.top+(E.clientTop+parseFloat(M.paddingTop))*C.y;h*=C.x,p*=C.y,y*=C.x,g*=C.y,h+=k,p+=D,S=vn(E),E=Op(S)}}return Eu({width:y,height:g,x:h,y:p})}function Wu(e,t){const s=Xu(e).scrollLeft;return t?t.left+s:mr(ys(e)).left+s}function XS(e,t){const s=e.getBoundingClientRect(),r=s.left+t.scrollLeft-Wu(e,s),o=s.top+t.scrollTop;return{x:r,y:o}}function Pj(e){let{elements:t,rect:s,offsetParent:r,strategy:o}=e;const l=o==="fixed",u=ys(r),d=t?Ku(t.floating):!1;if(r===u||d&&l)return s;let h={scrollLeft:0,scrollTop:0},p=us(1);const y=us(0),g=Qs(r);if((g||!g&&!l)&&((Na(r)!=="body"||pl(u))&&(h=Xu(r)),g)){const x=mr(r);p=ba(r),y.x=x.x+r.clientLeft,y.y=x.y+r.clientTop}const v=u&&!g&&!l?XS(u,h):us(0);return{width:s.width*p.x,height:s.height*p.y,x:s.x*p.x-h.scrollLeft*p.x+y.x+v.x,y:s.y*p.y-h.scrollTop*p.y+y.y+v.y}}function Lj(e){return Array.from(e.getClientRects())}function Uj(e){const t=ys(e),s=Xu(e),r=e.ownerDocument.body,o=yn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=yn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-s.scrollLeft+Wu(e);const d=-s.scrollTop;return Zn(r).direction==="rtl"&&(u+=yn(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:u,y:d}}const Ox=25;function Vj(e,t){const s=vn(e),r=ys(e),o=s.visualViewport;let l=r.clientWidth,u=r.clientHeight,d=0,h=0;if(o){l=o.width,u=o.height;const y=Lm();(!y||y&&t==="fixed")&&(d=o.offsetLeft,h=o.offsetTop)}const p=Wu(r);if(p<=0){const y=r.ownerDocument,g=y.body,v=getComputedStyle(g),x=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(r.clientWidth-g.clientWidth-x);S<=Ox&&(l-=S)}else p<=Ox&&(l+=p);return{width:l,height:u,x:d,y:h}}function qj(e,t){const s=mr(e,!0,t==="fixed"),r=s.top+e.clientTop,o=s.left+e.clientLeft,l=Qs(e)?ba(e):us(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,h=o*l.x,p=r*l.y;return{width:u,height:d,x:h,y:p}}function Mx(e,t,s){let r;if(t==="viewport")r=Vj(e,s);else if(t==="document")r=Uj(ys(e));else if(Qn(t))r=qj(t,s);else{const o=KS(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Eu(r)}function WS(e,t){const s=Ci(e);return s===t||!Qn(s)||_a(s)?!1:Zn(s).position==="fixed"||WS(s,t)}function Bj(e,t){const s=t.get(e);if(s)return s;let r=al(e,[],!1).filter(d=>Qn(d)&&Na(d)!=="body"),o=null;const l=Zn(e).position==="fixed";let u=l?Ci(e):e;for(;Qn(u)&&!_a(u);){const d=Zn(u),h=Pm(u);!h&&d.position==="fixed"&&(o=null),(l?!h&&!o:!h&&d.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||pl(u)&&!h&&WS(e,u))?r=r.filter(y=>y!==u):o=d,u=Ci(u)}return t.set(e,r),r}function Ij(e){let{element:t,boundary:s,rootBoundary:r,strategy:o}=e;const u=[...s==="clippingAncestors"?Ku(t)?[]:Bj(t,this._c):[].concat(s),r],d=Mx(t,u[0],o);let h=d.top,p=d.right,y=d.bottom,g=d.left;for(let v=1;v<u.length;v++){const x=Mx(t,u[v],o);h=yn(x.top,h),p=Ei(x.right,p),y=Ei(x.bottom,y),g=yn(x.left,g)}return{width:p-g,height:y-h,x:g,y:h}}function $j(e){const{width:t,height:s}=YS(e);return{width:t,height:s}}function Hj(e,t,s){const r=Qs(t),o=ys(t),l=s==="fixed",u=mr(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const h=us(0);function p(){h.x=Wu(o)}
vendor: 4,443 bytes, line 50
50if(r||!r&&!l)if((Na(t)!=="body"||pl(o))&&(d=Xu(t)),r){const x=mr(t,!0,l,t);h.x=x.x+t.clientLeft,h.y=x.y+t.clientTop}else o&&p();l&&!r&&o&&p();const y=o&&!r&&!l?XS(o,d):us(0),g=u.left+d.scrollLeft-h.x-y.x,v=u.top+d.scrollTop-h.y-y.y;return{x:g,y:v,width:u.width,height:u.height}}function qh(e){return Zn(e).position==="static"}function Nx(e,t){if(!Qs(e)||Zn(e).position==="fixed")return null;if(t)return t(e);let s=e.offsetParent;return ys(e)===s&&(s=s.ownerDocument.body),s}function JS(e,t){const s=vn(e);if(Ku(e))return s;if(!Qs(e)){let o=Ci(e);for(;o&&!_a(o);){if(Qn(o)&&!qh(o))return o;o=Ci(o)}return s}let r=Nx(e,t);for(;r&&Oj(r)&&qh(r);)r=Nx(r,t);return r&&_a(r)&&qh(r)&&!Pm(r)?s:r||Dj(e)||s}const Fj=async function(e){const t=this.getOffsetParent||JS,s=this.getDimensions,r=await s(e.floating);return{reference:Hj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qj(e){return Zn(e).direction==="rtl"}const Zj={convertOffsetParentRelativeRectToViewportRelativeRect:Pj,getDocumentElement:ys,getClippingRect:Ij,getOffsetParent:JS,getElementRects:Fj,getClientRects:Lj,getDimensions:$j,getScale:ba,isElement:Qn,isRTL:Qj};function e_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Gj(e,t){let s=null,r;const o=ys(e);function l(){var d;clearTimeout(r),(d=s)==null||d.disconnect(),s=null}function u(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),l();const p=e.getBoundingClientRect(),{left:y,top:g,width:v,height:x}=p;if(d||t(),!v||!x)return;const S=Bc(g),E=Bc(o.clientWidth-(y+v)),C=Bc(o.clientHeight-(g+x)),A=Bc(y),k={rootMargin:-S+"px "+-E+"px "+-C+"px "+-A+"px",threshold:yn(0,Ei(1,h))||1};let D=!0;function P(B){const I=B[0].intersectionRatio;if(I!==h){if(!D)return u();I?u(!1,I):r=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!e_(p,e.getBoundingClientRect())&&u(),D=!1}try{s=new IntersectionObserver(P,{...k,root:o.ownerDocument})}catch{s=new IntersectionObserver(P,k)}s.observe(e)}return u(!0),l}function Yj(e,t,s,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,p=Um(e),y=o||l?[...p?al(p):[],...t?al(t):[]]:[];y.forEach(A=>{o&&A.addEventListener("scroll",s,{passive:!0}),l&&A.addEventListener("resize",s)});const g=p&&d?Gj(p,s):null;let v=-1,x=null;u&&(x=new ResizeObserver(A=>{let[M]=A;M&&M.target===p&&x&&t&&(x.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var k;(k=x)==null||k.observe(t)})),s()}),p&&!h&&x.observe(p),t&&x.observe(t));let S,E=h?mr(e):null;h&&C();function C(){const A=mr(e);E&&!e_(E,A)&&s(),E=A,S=requestAnimationFrame(C)}return s(),()=>{var A;y.forEach(M=>{o&&M.removeEventListener("scroll",s),l&&M.removeEventListener("resize",s)}),g?.(),(A=x)==null||A.disconnect(),x=null,h&&cancelAnimationFrame(S)}}const Kj=Cj,Xj=Aj,Wj=_j,Jj=Rj,ez=Tj,Dx=Sj,tz=kj,nz=(e,t,s)=>{const r=new Map,o={platform:Zj,...s},l={...o.platform,_c:r};return wj(e,t,{...o,platform:l})};var sz=typeof document<"u",iz=function(){},tu=sz?_.useLayoutEffect:iz;function Cu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let s,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==t.length)return!1;for(r=s;r--!==0;)if(!Cu(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),s=o.length,s!==Object.keys(t).length)return!1;for(r=s;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=s;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!Cu(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function t_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jx(e,t){const s=t_(e);return Math.round(t*s)/s}function Bh(e){const t=_.useRef(e);return tu(()=>{t.current=e}),t}function rz(e){e===void 0&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:p}=e,[y,g]=_.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[v,x]=_.useState(r);Cu(v,r)||x(r);const[S,E]=_.useState(null),[C,A]=_.useState(null),M=_.useCallback(G=>{G!==B.current&&(B.current=G,E(G))},[]),k=_.useCallback(G=>{G!==I.current&&(I.current=G,A(G))},[]),D=l||S,P=u||C,B=_.useRef(null),I=_.useRef(null),L=_.useRef(y),W=h!=null,ee=Bh(h),re=Bh(o),oe=Bh(p),me=_.useCallback(()=>
vendor: 4,335 bytes, line 50
50{if(!B.current||!I.current)return;const G={placement:t,strategy:s,middleware:v};re.current&&(G.platform=re.current),nz(B.current,I.current,G).then(ie=>{const X={...ie,isPositioned:oe.current!==!1};he.current&&!Cu(L.current,X)&&(L.current=X,pm.flushSync(()=>{g(X)}))})},[v,t,s,re,oe]);tu(()=>{p===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,g(G=>({...G,isPositioned:!1})))},[p]);const he=_.useRef(!1);tu(()=>(he.current=!0,()=>{he.current=!1}),[]),tu(()=>{if(D&&(B.current=D),P&&(I.current=P),D&&P){if(ee.current)return ee.current(D,P,me);me()}},[D,P,me,ee,W]);const fe=_.useMemo(()=>({reference:B,floating:I,setReference:M,setFloating:k}),[M,k]),j=_.useMemo(()=>({reference:D,floating:P}),[D,P]),F=_.useMemo(()=>{const G={position:s,left:0,top:0};if(!j.floating)return G;const ie=jx(j.floating,y.x),X=jx(j.floating,y.y);return d?{...G,transform:"translate("+ie+"px, "+X+"px)",...t_(j.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:ie,top:X}},[s,d,j.floating,y.x,y.y]);return _.useMemo(()=>({...y,update:me,refs:fe,elements:j,floatingStyles:F}),[y,me,fe,j,F])}const az=e=>{function t(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:r,padding:o}=typeof e=="function"?e(s):e;return r&&t(r)?r.current!=null?Dx({element:r.current,padding:o}).fn(s):{}:r?Dx({element:r,padding:o}).fn(s):{}}}},oz=(e,t)=>{const s=Kj(e);return{name:s.name,fn:s.fn,options:[e,t]}},lz=(e,t)=>{const s=Xj(e);return{name:s.name,fn:s.fn,options:[e,t]}},cz=(e,t)=>({fn:tz(e).fn,options:[e,t]}),uz=(e,t)=>{const s=Wj(e);return{name:s.name,fn:s.fn,options:[e,t]}},dz=(e,t)=>{const s=Jj(e);return{name:s.name,fn:s.fn,options:[e,t]}},fz=(e,t)=>{const s=ez(e);return{name:s.name,fn:s.fn,options:[e,t]}},hz=(e,t)=>{const s=az(e);return{name:s.name,fn:s.fn,options:[e,t]}};var pz="Arrow",n_=_.forwardRef((e,t)=>{const{children:s,width:r=10,height:o=5,...l}=e;return w.jsx(br.svg,{...l,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});n_.displayName=pz;var mz=n_;function gz(e){const[t,s]=_.useState(void 0);return rl(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,p=Array.isArray(h)?h[0]:h;u=p.inlineSize,d=p.blockSize}else u=e.offsetWidth,d=e.offsetHeight;s({width:u,height:d})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else s(void 0)},[e]),t}var s_="Popper",[i_,r_]=qS(s_),[gB,a_]=i_(s_),o_="PopperAnchor",l_=_.forwardRef((e,t)=>{const{__scopePopper:s,virtualRef:r,...o}=e,l=a_(o_,s),u=_.useRef(null),d=vr(t,u),h=_.useRef(null);return _.useEffect(()=>{const p=h.current;h.current=r?.current||u.current,p!==h.current&&l.onAnchorChange(h.current)}),r?null:w.jsx(br.div,{...o,ref:d})});l_.displayName=o_;var Vm="PopperContent",[yz,vz]=i_(Vm),c_=_.forwardRef((e,t)=>{const{__scopePopper:s,side:r="bottom",sideOffset:o=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:S,...E}=e,C=a_(Vm,s),[A,M]=_.useState(null),k=vr(t,ye=>M(ye)),[D,P]=_.useState(null),B=gz(D),I=B?.width??0,L=B?.height??0,W=r+(l!=="center"?"-"+l:""),ee=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},re=Array.isArray(p)?p:[p],oe=re.length>0,me={padding:ee,boundary:re.filter(xz),altBoundary:oe},{refs:he,floatingStyles:fe,placement:j,isPositioned:F,middlewareData:G}=rz({strategy:"fixed",placement:W,whileElementsMounted:(...ye)=>Yj(...ye,{animationFrame:x==="always"}),elements:{reference:C.anchor},middleware:[oz({mainAxis:o+L,alignmentAxis:u}),h&&lz({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?cz():void 0,...me}),h&&uz({...me}),dz({...me,apply:({elements:ye,rects:xe,availableWidth:ve,availableHeight:_t})=>{const{width:Dt,height:Tt}=xe.reference,ln=ye.floating.style;ln.setProperty("--radix-popper-available-width",`${ve}px`),ln.setProperty("--radix-popper-available-height",`${_t}px`),ln.setProperty("--radix-popper-anchor-width",`${Dt}px`),ln.setProperty("--radix-popper-anchor-height",`${Tt}px`)}}),D&&hz({element:D,padding:d}),wz({arrowWidth:I,arrowHeight:L}),v&&fz({strategy:"referenceHidden",...me})]}
vendor: 4,224 bytes, line 50
50),[ie,X]=f_(j),O=Gu(S);rl(()=>{F&&O?.()},[F,O]);const Z=G.arrow?.x,H=G.arrow?.y,J=G.arrow?.centerOffset!==0,[se,ae]=_.useState();return rl(()=>{A&&ae(window.getComputedStyle(A).zIndex)},[A]),w.jsx("div",{ref:he.setFloating,"data-radix-popper-content-wrapper":"",style:{...fe,transform:F?fe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[G.transformOrigin?.x,G.transformOrigin?.y].join(" "),...G.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:w.jsx(yz,{scope:s,placedSide:ie,onArrowChange:P,arrowX:Z,arrowY:H,shouldHideArrow:J,children:w.jsx(br.div,{"data-side":ie,"data-align":X,...E,ref:k,style:{...E.style,animation:F?void 0:"none"}})})})});c_.displayName=Vm;var u_="PopperArrow",bz={top:"bottom",right:"left",bottom:"top",left:"right"},d_=_.forwardRef(function(t,s){const{__scopePopper:r,...o}=t,l=vz(u_,r),u=bz[l.placedSide];return w.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:w.jsx(mz,{...o,ref:s,style:{...o.style,display:"block"}})})});d_.displayName=u_;function xz(e){return e!==null}var wz=e=>({name:"transformOrigin",options:e,fn(t){const{placement:s,rects:r,middlewareData:o}=t,u=o.arrow?.centerOffset!==0,d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,y]=f_(s),g={start:"0%",center:"50%",end:"100%"}[y],v=(o.arrow?.x??0)+d/2,x=(o.arrow?.y??0)+h/2;let S="",E="";return p==="bottom"?(S=u?g:`${v}px`,E=`${-h}px`):p==="top"?(S=u?g:`${v}px`,E=`${r.floating.height+h}px`):p==="right"?(S=`${-h}px`,E=u?g:`${x}px`):p==="left"&&(S=`${r.floating.width+h}px`,E=u?g:`${x}px`),{data:{x:S,y:E}}}});function f_(e){const[t,s="center"]=e.split("-");return[t,s]}var Sz=l_,_z=c_,Tz=d_;function Ez(e,t){return _.useReducer((s,r)=>t[s][r]??s,e)}var h_=e=>{const{present:t,children:s}=e,r=Cz(t),o=typeof s=="function"?s({present:r.isPresent}):_.Children.only(s),l=vr(r.ref,Az(o));return typeof s=="function"||r.isPresent?_.cloneElement(o,{ref:l}):null};h_.displayName="Presence";function Cz(e){const[t,s]=_.useState(),r=_.useRef(null),o=_.useRef(e),l=_.useRef("none"),u=e?"mounted":"unmounted",[d,h]=Ez(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const p=Ic(r.current);l.current=d==="mounted"?p:"none"},[d]),rl(()=>{const p=r.current,y=o.current;if(y!==e){const v=l.current,x=Ic(p);e?h("MOUNT"):x==="none"||p?.display==="none"?h("UNMOUNT"):h(y&&v!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,h]),rl(()=>{if(t){let p;const y=t.ownerDocument.defaultView??window,g=x=>{const E=Ic(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&E&&(h("ANIMATION_END"),!o.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",p=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},v=x=>{x.target===t&&(l.current=Ic(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{y.clearTimeout(p),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:_.useCallback(p=>{r.current=p?getComputedStyle(p):null,s(p)},[])}}function Ic(e){return e?.animationName||"none"}function Az(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var kz=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Rz="VisuallyHidden",p_=_.forwardRef((e,t)=>
vendor: 14,691 bytes, line 50
50w.jsx(br.span,{...e,ref:t,style:{...kz,...e.style}}));p_.displayName=Rz;var Oz=p_,[Ju]=qS("Tooltip",[r_]),qm=r_(),m_="TooltipProvider",Mz=700,zx="tooltip.open",[Nz,g_]=Ju(m_),y_=e=>{const{__scopeTooltip:t,delayDuration:s=Mz,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:l}=e,u=_.useRef(!0),d=_.useRef(!1),h=_.useRef(0);return _.useEffect(()=>{const p=h.current;return()=>window.clearTimeout(p)},[]),w.jsx(Nz,{scope:t,isOpenDelayedRef:u,delayDuration:s,onOpen:_.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:_.useCallback(p=>{d.current=p},[]),disableHoverableContent:o,children:l})};y_.displayName=m_;var v_="Tooltip",[yB,ed]=Ju(v_),Mp="TooltipTrigger",Dz=_.forwardRef((e,t)=>{const{__scopeTooltip:s,...r}=e,o=ed(Mp,s),l=g_(Mp,s),u=qm(s),d=_.useRef(null),h=vr(t,d,o.onTriggerChange),p=_.useRef(!1),y=_.useRef(!1),g=_.useCallback(()=>p.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),w.jsx(Sz,{asChild:!0,...u,children:w.jsx(br.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:h,onPointerMove:qs(e.onPointerMove,v=>{v.pointerType!=="touch"&&!y.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),y.current=!0)}),onPointerLeave:qs(e.onPointerLeave,()=>{o.onTriggerLeave(),y.current=!1}),onPointerDown:qs(e.onPointerDown,()=>{o.open&&o.onClose(),p.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:qs(e.onFocus,()=>{p.current||o.onOpen()}),onBlur:qs(e.onBlur,o.onClose),onClick:qs(e.onClick,o.onClose)})})});Dz.displayName=Mp;var jz="TooltipPortal",[vB,zz]=Ju(jz,{forceMount:void 0}),Ta="TooltipContent",Pz=_.forwardRef((e,t)=>{const s=zz(Ta,e.__scopeTooltip),{forceMount:r=s.forceMount,side:o="top",...l}=e,u=ed(Ta,e.__scopeTooltip);return w.jsx(h_,{present:r||u.open,children:u.disableHoverableContent?w.jsx(b_,{side:o,...l,ref:t}):w.jsx(Lz,{side:o,...l,ref:t})})}),Lz=_.forwardRef((e,t)=>{const s=ed(Ta,e.__scopeTooltip),r=g_(Ta,e.__scopeTooltip),o=_.useRef(null),l=vr(t,o),[u,d]=_.useState(null),{trigger:h,onClose:p}=s,y=o.current,{onPointerInTransitChange:g}=r,v=_.useCallback(()=>{d(null),g(!1)},[g]),x=_.useCallback((S,E)=>{const C=S.currentTarget,A={x:S.clientX,y:S.clientY},M=Iz(A,C.getBoundingClientRect()),k=$z(A,M),D=Hz(E.getBoundingClientRect()),P=Qz([...k,...D]);d(P),g(!0)},[g]);return _.useEffect(()=>()=>v(),[v]),_.useEffect(()=>{if(h&&y){const S=C=>x(C,y),E=C=>x(C,h);return h.addEventListener("pointerleave",S),y.addEventListener("pointerleave",E),()=>{h.removeEventListener("pointerleave",S),y.removeEventListener("pointerleave",E)}}},[h,y,x,v]),_.useEffect(()=>{if(u){const S=E=>{const C=E.target,A={x:E.clientX,y:E.clientY},M=h?.contains(C)||y?.contains(C),k=!Fz(A,u);M?v():k&&(v(),p())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[h,y,u,p,v]),w.jsx(b_,{...e,ref:l})}),[Uz,Vz]=Ju(v_,{isInside:!1}),qz=K5("TooltipContent"),b_=_.forwardRef((e,t)=>{const{__scopeTooltip:s,children:r,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:u,...d}=e,h=ed(Ta,s),p=qm(s),{onClose:y}=h;return _.useEffect(()=>(document.addEventListener(zx,y),()=>document.removeEventListener(zx,y)),[y]),_.useEffect(()=>{if(h.trigger){const g=v=>{v.target?.contains(h.trigger)&&y()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[h.trigger,y]),w.jsx($S,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:y,children:w.jsxs(_z,{"data-state":h.stateAttribute,...p,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[w.jsx(qz,{children:r}),w.jsx(Uz,{scope:s,isInside:!0,children:w.jsx(Oz,{id:h.contentId,role:"tooltip",children:o||r})})]})})});Pz.displayName=Ta;var x_="TooltipArrow",Bz=_.forwardRef((e,t)=>{const{__scopeTooltip:s,...r}=e,o=qm(s);return Vz(x_,s).isInside?null:w.jsx(Tz,{...o,...r,ref:t})});Bz.displayName=x_;function Iz(e,t){const s=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(s,r,o,l)){case l:return"left";case o:return"right";case s:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function $z(e,t,s=5){const r=[];switch(t){case"top":r.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":r.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":r.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":r.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s});break}return r}function Hz(e){const{top:t,right:s,bottom:r,left:o}=e;return[{x:o,y:t},{x:s,y:t},{x:s,y:r},{x:o,y:r}]}function Fz(e,t){const{x:s,y:r}=e;let o=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const d=t[l],h=t[u],p=d.x,y=d.y,g=h.x,v=h.y;y>r!=v>r&&s<(g-p)*(r-y)/(v-y)+p&&(o=!o)}return o}function Qz(e){const t=e.slice();return t.sort((s,r)=>s.x<r.x?-1:s.x>r.x?1:s.y<r.y?-1:s.y>r.y?1:0),Zz(t)}function Zz(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))t.pop();else break}t.push(o)}t.pop();const s=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;s.length>=2;){const l=s[s.length-1],u=s[s.length-2];if((l.x-u.x)*(o.y-u.y)>=(l.y-u.y)*(o.x-u.x))s.pop();else break}s.push(o)}return s.pop(),t.length===1&&s.length===1&&t[0].x===s[0].x&&t[0].y===s[0].y?t:t.concat(s)}var Gz=y_;function w_(e){var t,s,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=w_(e[t]))&&(r&&(r+=" "),r+=s)}else for(s in e)e[s]&&(r&&(r+=" "),r+=s);return r}function S_(){for(var e,t,s=0,r="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=w_(e))&&(r&&(r+=" "),r+=t);return r}const Yz=(e,t)=>{const s=new Array(e.length+t.length);for(let r=0;r<e.length;r++)s[r]=e[r];for(let r=0;r<t.length;r++)s[e.length+r]=t[r];return s},Kz=(e,t)=>({classGroupId:e,validator:t}),__=(e=new Map,t=null,s)=>({nextPart:e,validators:t,classGroupId:s}),Au="-",Px=[],Xz="arbitrary..",Wz=e=>{const t=e6(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return Jz(u);const d=u.split(Au),h=d[0]===""&&d.length>1?1:0;return T_(d,h,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=r[u],p=s[u];return h?p?Yz(p,h):h:p||Px}return s[u]||Px}}},T_=(e,t,s)=>{if(e.length-t===0)return s.classGroupId;const o=e[t],l=s.nextPart.get(o);if(l){const p=T_(e,t+1,l);if(p)return p}const u=s.validators;if(u===null)return;const d=t===0?e.join(Au):e.slice(t).join(Au),h=u.length;for(let p=0;p<h;p++){const y=u[p];if(y.validator(d))return y.classGroupId}},Jz=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),s=t.indexOf(":"),r=t.slice(0,s);return r?Xz+r:void 0})(),e6=e=>{const{theme:t,classGroups:s}=e;return t6(s,t)},t6=(e,t)=>{const s=__();for(const r in e){const o=e[r];Bm(o,s,r,t)}return s},Bm=(e,t,s,r)=>{const o=e.length;for(let l=0;l<o;l++){const u=e[l];n6(u,t,s,r)}},n6=(e,t,s,r)=>{if(typeof e=="string"){s6(e,t,s);return}if(typeof e=="function"){i6(e,t,s,r);return}r6(e,t,s,r)},s6=(e,t,s)=>{const r=e===""?t:E_(t,e);r.classGroupId=s},i6=(e,t,s,r)=>{if(a6(e)){Bm(e(r),t,s,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Kz(s,e))},r6=(e,t,s,r)=>{const o=Object.entries(e),l=o.length;for(let u=0;u<l;u++){const[d,h]=o[u];Bm(h,E_(t,d),s,r)}},E_=(e,t)=>{let s=e;const r=t.split(Au),o=r.length;for(let l=0;l<o;l++){const u=r[l];let d=s.nextPart.get(u);d||(d=__(),s.nextPart.set(u,d)),s=d}return s},a6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,o6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),r=Object.create(null);const o=(l,u)=>{s[l]=u,t++,t>e&&(t=0,r=s,s=Object.create(null))};return{get(l){let u=s[l];if(u!==void 0)return u;if((u=r[l])!==void 0)return o(l,u),u},set(l,u){l in s?s[l]=u:o(l,u)}}},Np="!",Lx=":",l6=[],Ux=(e,t,s,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:r,isExternal:o}),c6=e=>{const{prefix:t,experimentalParseClassName:s}=e;let r=o=>{const l=[];let u=0,d=0,h=0,p;const y=o.length;for(let E=0;E<y;E++){const C=o[E];if(u===0&&d===0){if(C===Lx){l.push(o.slice(h,E)),h=E+1;continue}if(C==="/"){p=E;continue}}C==="["?u++:C==="]"?u--:C==="("?d++:C===")"&&d--}const g=l.length===0?o:o.slice(h);let v=g,x=!1;g.endsWith(Np)?(v=g.slice(0,-1),x=!0):g.startsWith(Np)&&(v=g.slice(1),x=!0);const S=p&&p>h?p-h:void 0;return Ux(l,x,v,S)};if(t){const o=t+Lx,l=r;r=u=>u.startsWith(o)?l(u.slice(o.length)):Ux(l6,!1,u,void 0,!0)}if(s){const o=r;r=l=>s({className:l,parseClassName:o})}return r},u6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((s,r)=>{t.set(s,1e6+r)}),s=>{const r=[];let o=[];for(let l=0;l<s.length;l++){const u=s[l],d=u[0]==="[",h=t.has(u);d||h?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(u)):o.push(u)}return o.length>0&&(o.sort(),r.push(...o)),r}},d6=e=>({cache:o6(e.cacheSize),parseClassName:c6(e),sortModifiers:u6(e),...Wz(e)}),f6=/\s+/,h6=(e,t)=>{const{parseClassName:s,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:l}=t,u=[],d=e.trim().split(f6);let h="";for(let p=d.length-1;p>=0;p-=1){const y=d[p],{isExternal:g,modifiers:v,hasImportantModifier:x,baseClassName:S,maybePostfixModifierPosition:E}=s(y);if(g){h=y+(h.length>0?" "+h:h);continue}let C=!!E,A=r(C?S.substring(0,E):S);if(!A){if(!C){h=y+(h.length>0?" "+h:h);continue}if(A=r(S),!A){h=y+(h.length>0?" "+h:h);continue}C=!1}const M=v.length===0?"":v.length===1?v[0]:l(v).join(":"),k=x?M+Np:M,D=k+A;if(u.indexOf(D)>-1)continue;u.push(D);const P=o(A,C);for(let B=0;B<P.length;++B){const I=P[B];u.push(k+I)}h=y+(h.length>0?" "+h:h)}return h},p6=(...e)=>{let t=0,s,r,o="";for(;t<e.length;)(s=e[t++])&&(r=C_(s))&&(o&&(o+=" "),o+=r);return o},C_=e=>{if(typeof e=="string")return e;let t,s="";for(let r=0;r<e.length;r++)e[r]&&(t=C_(e[r]))&&(s&&(s+=" "),s+=t);return s},m6=(e,...t)=>{let s,r,o,l;const u=h=>{const p=t.reduce((y,g)=>g(y),e());return s=d6(p),r=s.cache.get,o=s.cache.set,l=d,d(h)},d=h=>{const p=r(h);if(p)return p;const y=h6(h,s);return o(h,y),y};return l=u,(...h)=>l(p6(...h))},g6=[],gt=e=>{const t=s=>s[e]||g6;return t.isThemeGetter=!0,t},A_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,y6=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,v6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,b6=/\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$/,x6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,w6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xi=e=>y6.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),wi=e=>!!e&&Number.isInteger(Number(e)),Ih=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),Us=e=>v6.test(e),R_=()=>!0,_6=e=>b6.test(e)&&!x6.test(e),Im=()=>!1,T6=e=>w6.test(e),E6=e=>S6.test(e),C6=e=>!ce(e)&&!de(e),A6=e=>Mi(e,N_,Im),ce=e=>A_.test(e),sr=e=>Mi(e,D_,_6),Vx=e=>Mi(e,z6,Ae),k6=e=>Mi(e,z_,R_),R6=e=>Mi(e,j_,Im),qx=e=>Mi(e,O_,Im),O6=e=>Mi(e,M_,E6),$c=e=>Mi(e,P_,T6),de=e=>k_.test(e),zo=e=>xr(e,D_),M6=e=>xr(e,j_),Bx=e=>xr(e,O_),N6=e=>xr(e,N_),D6=e=>xr(e,M_),Hc=e=>xr(e,P_,!0),j6=e=>xr(e,z_,!0),Mi=(e,t,s)=>{const r=A_.exec(e);return r?r[1]?t(r[1]):s(r[2]):!1},xr=(e,t,s=!1)=>{const r=k_.exec(e);return r?r[1]?t(r[1]):s:!1},O_=e=>e==="position"||e==="percentage",M_=e=>e==="image"||e==="url",N_=e=>e==="length"||e==="size"||e==="bg-size",D_=e=>e==="length",z6=e=>e==="number",j_=e=>e==="family-name",z_=e=>e==="number"||e==="weight",P_=e=>e==="shadow",P6=()=>{const e=gt("color"),t=gt("font"),s=gt("text"),r=gt("font-weight"),o=gt("tracking"),l=gt("leading"),u=gt("breakpoint"),d=gt("container"),h=gt("spacing"),p=gt("radius"),y=gt("shadow"),g=gt("inset-shadow"),v=gt("text-shadow"),x=gt("drop-shadow"),S=gt("blur"),E=gt("perspective"),C=gt("aspect"),A=gt("ease"),M=gt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...D(),de,ce],B=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],L=()=>[de,ce,h],W=()=>[xi,"full","auto",...L()],ee=()=>[wi,"none","subgrid",de,ce],re=()=>["auto",{span:["full",wi,de,ce]},wi,de,ce],oe=()=>[wi,"auto",de,ce],me=()=>["auto","min","max","fr",de,ce],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],fe=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...L()],F=()=>[xi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],G=()=>[xi,"screen","full","dvw","lvw","svw","min","max","fit",...L()],ie=()=>[xi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],X=()=>[e,de,ce],O=()=>[...D(),Bx,qx,{position:[de,ce]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",N6,A6,{size:[de,ce]}],J=()=>[Ih,zo,sr],se=()=>["","none","full",p,de,ce],ae=()=>["",Ae,zo,sr],ye=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[Ae,Ih,Bx,qx],_t=()=>["","none",S,de,ce],Dt=()=>["none",Ae,de,ce],Tt=()=>["none",Ae,de,ce],ln=()=>[Ae,de,ce],jt=()=>[xi,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Us],breakpoint:[Us],color:[R_],container:[Us],"drop-shadow":[Us],ease:["in","out","in-out"],font:[C6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Us],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Us],shadow:[Us],spacing:["px",Ae],text:[Us],"text-shadow":[Us],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xi,ce,de,C]}
vendor: 6,113 bytes, line 50
50],container:["container"],columns:[{columns:[Ae,ce,de,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:P()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[wi,"auto",de,ce]}],basis:[{basis:[xi,"full","auto",d,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,xi,"auto","initial","none",ce]}],grow:[{grow:["",Ae,de,ce]}],shrink:[{shrink:["",Ae,de,ce]}],order:[{order:[wi,"first","last","none",de,ce]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":me()}],"auto-rows":[{"auto-rows":me()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...fe(),"normal"]}],"justify-self":[{"justify-self":["auto",...fe()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...fe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...fe(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...fe(),"baseline"]}],"place-self":[{"place-self":["auto",...fe()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[d,"screen",...F()]}],"min-w":[{"min-w":[d,"screen","none",...F()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",s,zo,sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,j6,k6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ih,ce]}],"font-family":[{font:[M6,R6,t]}],"font-features":[{"font-features":[ce]}],"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:[o,de,ce]}],"line-clamp":[{"line-clamp":[Ae,"none",de,Vx]}],leading:[{leading:[l,...L()]}],"list-image":[{"list-image":["none",de,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",de,sr]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[Ae,"auto",de,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,ce]}],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",de,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wi,de,ce],radial:["",de,ce],conic:[wi,de,ce]},D6,O6]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:J()}
vendor: 7,400 bytes, line 50
50],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-bs":[{"border-bs":X()}],"border-color-be":[{"border-be":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,de,ce]}],"outline-w":[{outline:["",Ae,zo,sr]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",y,Hc,$c]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",g,Hc,$c]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[Ae,sr]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",v,Hc,$c]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[Ae,de,ce]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[de,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,ce]}],filter:[{filter:["","none",de,ce]}],blur:[{blur:_t()}],brightness:[{brightness:[Ae,de,ce]}],contrast:[{contrast:[Ae,de,ce]}],"drop-shadow":[{"drop-shadow":["","none",x,Hc,$c]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",Ae,de,ce]}],"hue-rotate":[{"hue-rotate":[Ae,de,ce]}],invert:[{invert:["",Ae,de,ce]}],saturate:[{saturate:[Ae,de,ce]}],sepia:[{sepia:["",Ae,de,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",de,ce]}],"backdrop-blur":[{"backdrop-blur":_t()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,de,ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,de,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,de,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,de,ce]}],"backdrop-invert":[{"backdrop-invert":["",Ae,de,ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,de,ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,de,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,de,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",de,ce]}],ease:[{ease:["linear","initial",A,de,ce]}],delay:[{delay:[Ae,de,ce]}],animate:[{animate:["none",M,de,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,de,ce]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Dt()}],"rotate-x":[{"rotate-x":Dt()}],"rotate-y":[{"rotate-y":Dt()}],"rotate-z":[{"rotate-z":Dt()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:ln()}],"skew-x":[{"skew-x":ln()}],"skew-y":[{"skew-y":ln()}],transform:[{transform:[de,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:jt()}],"translate-x":[{"translate-x":jt()}],"translate-y":[{"translate-y":jt()}],"translate-z":[{"translate-z":jt()}],"translate-none":["translate-none"],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}
vendor: 5,742 bytes, line 50
50],"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-in","zoom-out",de,ce]}],"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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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"]}],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",de,ce]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[Ae,zo,sr,Vx]}],stroke:[{stroke:["none",...X()]}],"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"]}},L6=m6(P6);function Ve(...e){return L6(S_(e))}function U6({delayDuration:e=0,...t}){return w.jsx(Gz,{"data-hercules-id":"src/components/ui/tooltip.tsx:11:4","data-hercules-name":"TooltipPrimitive.Provider","data-slot":"tooltip-provider",delayDuration:e,...t})}function V6({children:e}){return w.jsx(oD,{"data-hercules-id":"src/components/providers/default.tsx:10:4","data-hercules-name":"AuthProvider",children:w.jsx(R4,{"data-hercules-id":"src/components/providers/default.tsx:11:6","data-hercules-name":"ConvexProvider",children:w.jsx(o5,{"data-hercules-id":"src/components/providers/default.tsx:12:8","data-hercules-name":"QueryClientProvider",children:w.jsx(U6,{"data-hercules-id":"src/components/providers/default.tsx:13:10","data-hercules-name":"TooltipProvider",children:w.jsxs(v5,{"data-hercules-id":"src/components/providers/default.tsx:14:12","data-hercules-name":"ThemeProvider",children:[w.jsx(Q5,{"data-hercules-id":"src/components/providers/default.tsx:15:14","data-hercules-name":"Toaster"}),e]})})})})})}
50function L_(e,t){const s={get(r,o){if(typeof o=="string"){const l=[...t,o];return L_(e,l)}else if(o===CS){if(t.length<1){const l=[e,...t].join(".");throw new Error(`API path is expected to be of the form \`${e}.childComponent.functionName\`. Found: \`${l}\``)}return"_reference/childComponent/"+t.join("/")}else return}};return new Proxy({},s)}const q6=()=>L_("components",[]),da=wD;q6();const U_=(...e)=>e.filter((t,s,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===s).join(" ").trim();const B6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const I6=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,r)=>r?r.toUpperCase():s.toLowerCase());const Ix=e=>{const t=I6(e);return t.charAt(0).toUpperCase()+t.slice(1)};var $h={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"};const $6=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},H6=_.createContext({}),F6=()=>_.useContext(H6),Q6=_.forwardRef(({color:e,size:t,strokeWidth:s,absoluteStrokeWidth:r,className:o="",children:l,iconNode:u,...d},h)=>{const{size:p=24,strokeWidth:y=2,absoluteStrokeWidth:g=!1,color:v="currentColor",className:x=""}=F6()??{},S=r??g?Number(s??y)*24/Number(t??p):s??y;return _.createElement("svg",{ref:h,...$h,width:t??p??$h.width,height:t??p??$h.height,stroke:e??v,strokeWidth:S,className:U_("lucide",x,o),...!l&&!$6(d)&&{"aria-hidden":"true"},...d},[...u.map(([E,C])=>_.createElement(E,C)),...Array.isArray(l)?l:[l]])});const Qe=(e,t)=>{const s=_.forwardRef(({className:r,...o},l)=>_.createElement(Q6,{ref:l,iconNode:t,className:U_(`lucide-${B6(Ix(e))}`,`lucide-${e}`,r),...o}));return s.displayName=Ix(e),s};const Z6=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$x=Qe("arrow-left",Z6);const G6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Hh=Qe("arrow-right",G6);const Y6=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],K6=Qe("book-open",Y6);const X6=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Dp=Qe("camera",X6);const W6=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ku=Qe("check",W6);const J6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],V_=Qe("chevron-down",J6);const eP=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tP=Qe("chevron-right",eP);const nP=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],sP=Qe("chevron-up",nP);const iP=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],rP=Qe("circle-alert",iP);const aP=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],oP=Qe("download",aP);const lP=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],cP=Qe("image",lP);const uP=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],dP=Qe("layers",uP);const fP=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],Hx=Qe("layout-template",fP);const hP=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],q_=Qe("loader-circle",hP);const pP=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],mP=Qe("maximize-2",pP);const gP=[["path",{d:"M5 12h14",key:"1ays0h"}]],yP=Qe("minus",gP);const vP=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],bP=Qe("rotate-ccw",vP);const xP=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],wP=Qe("search",xP);const SP=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 4,122 bytes, line 50
50y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],B_=Qe("shield-check",SP);const _P=[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]],TP=Qe("sliders-vertical",_P);const EP=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ea=Qe("sparkles",EP);const CP=[["path",{d:"M8 19H5c-1 0-2-1-2-2V7c0-1 1-2 2-2h3",key:"lubmu8"}],["path",{d:"M16 5h3c1 0 2 1 2 2v10c0 1-1 2-2 2h-3",key:"1ag34g"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],AP=Qe("square-split-horizontal",CP);const kP=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],RP=Qe("star",kP);const OP=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],MP=Qe("upload",OP);const NP=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],DP=Qe("wand-sparkles",NP);const jP=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gr=Qe("x",jP);const zP=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],I_=Qe("zap",zP);function PP({className:e,...t}){return w.jsx(q_,{"data-hercules-id":"src/components/ui/spinner.tsx:6:4","data-hercules-name":"Loader2Icon",role:"status","aria-label":"Loading",className:Ve("size-4 animate-spin",e),...t})}var LP=Symbol.for("react.lazy"),Ru=XC[" use ".trim().toString()];function UP(e){return typeof e=="object"&&e!==null&&"then"in e}function $_(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===LP&&"_payload"in e&&UP(e._payload)}function VP(e){const t=BP(e),s=_.forwardRef((r,o)=>{let{children:l,...u}=r;$_(l)&&typeof Ru=="function"&&(l=Ru(l._payload));const d=_.Children.toArray(l),h=d.find($P);if(h){const p=h.props.children,y=d.map(g=>g===h?_.Children.count(p)>1?_.Children.only(null):_.isValidElement(p)?p.props.children:null:g);return w.jsx(t,{...u,ref:o,children:_.isValidElement(p)?_.cloneElement(p,void 0,y):null})}return w.jsx(t,{...u,ref:o,children:l})});return s.displayName=`${e}.Slot`,s}var qP=VP("Slot");function BP(e){const t=_.forwardRef((s,r)=>{let{children:o,...l}=s;if($_(o)&&typeof Ru=="function"&&(o=Ru(o._payload)),_.isValidElement(o)){const u=FP(o),d=HP(l,o.props);return o.type!==_.Fragment&&(d.ref=r?Nm(r,u):u),_.cloneElement(o,d)}return _.Children.count(o)>1?_.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IP=Symbol("radix.slottable");function $P(e){return _.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===IP}function HP(e,t){const s={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?s[r]=(...d)=>{const h=l(...d);return o(...d),h}:o&&(s[r]=o):r==="style"?s[r]={...o,...l}
50:r==="className"&&(s[r]=[o,l].filter(Boolean).join(" "))}return{...e,...s}}function FP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}const Fx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Qx=S_,QP=(e,t)=>s=>{var r;if(t?.variants==null)return Qx(e,s?.class,s?.className);const{variants:o,defaultVariants:l}=t,u=Object.keys(o).map(p=>{const y=s?.[p],g=l?.[p];if(y===null)return null;const v=Fx(y)||Fx(g);return o[p][v]}),d=s&&Object.entries(s).reduce((p,y)=>{let[g,v]=y;return v===void 0||(p[g]=v),p},{}),h=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,y)=>{let{class:g,className:v,...x}=y;return Object.entries(x).every(S=>{let[E,C]=S;return Array.isArray(C)?C.includes({...l,...d}[E]):{...l,...d}[E]===C})?[...p,g,v]:p},[]);return Qx(e,u,h,s?.class,s?.className)},ZP=QP("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Qt({className:e,variant:t,size:s,asChild:r=!1,...o}){const l=r?qP:"button";return w.jsx(l,{"data-hercules-id":"src/components/ui/button.tsx:51:4","data-hercules-name":"Comp","data-slot":"button",className:Ve(ZP({variant:t,size:s,className:e})),...o})}function GP(){const e=qu(),{isAuthenticated:t}=w4(),s=eu(da.users.updateCurrentUser),r=_.useCallback(async()=>{await s()},[s]),o=_.useCallback(()=>e("/",{replace:!0}),[e]),{status:l,error:u,retry:d}=nD({isBackendAuthenticated:t,onSync:r,onSuccess:o,onNoAuthParams:o});return l==="error"&&u?w.jsxs("div",{"data-hercules-id":"src/pages/auth/Callback.tsx:32:6","data-hercules-name":"div",className:"flex flex-col items-center justify-center h-svh gap-6 px-4",children:[w.jsxs("div",{"data-hercules-id":"src/pages/auth/Callback.tsx:33:8","data-hercules-name":"div",className:"flex flex-col items-center gap-2 text-center",children:[w.jsx("p",{"data-hercules-id":"src/pages/auth/Callback.tsx:34:10","data-hercules-name":"p",className:"text-destructive font-medium",children:"Something went wrong"}),w.jsx("p",{"data-hercules-id":"src/pages/auth/Callback.tsx:35:10","data-hercules-name":"p",className:"text-sm text-muted-foreground max-w-md",children:u})]}),w.jsxs("div",{"data-hercules-id":"src/pages/auth/Callback.tsx:37:8","data-hercules-name":"div",className:"flex gap-3",children:[w.jsx(Qt,{"data-hercules-id":"src/pages/auth/Callback.tsx:38:10","data-hercules-name":"Button",variant:"secondary",onClick:o,children:"Return home"}),w.jsx(Qt,{"data-hercules-id":"src/pages/auth/Callback.tsx:41:10","data-hercules-name":"Button",onClick:d,children:"Try again"})]})]}):w.jsxs("div",{"data-hercules-id":"src/pages/auth/Callback.tsx:48:4","data-hercules-name":"div",className:"flex flex-col items-center justify-center h-svh gap-4",children:[w.jsx(PP,{"data-hercules-id":"src/pages/auth/Callback.tsx:49:6","data-hercules-name":"Spinner",className:"size-8"}),w.jsx("p",{"data-hercules-id":"src/pages/auth/Callback.tsx:50:6","data-hercules-name":"p",className:"text-sm text-muted-foreground",children:"Loading..."})]})}const $m=_.createContext({});function Hm(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}const YP=typeof window<"u",H_=YP?_.useLayoutEffect:_.useEffect,td=_.createContext(null);function Fm(e,t){e.indexOf(t)===-1&&e.push(t)}function Ou(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const ps=(e,t,s)=>s>t?t:s<e?e:s;let Qm=()=>{};const Ai={},F_=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Q_(e){return typeof e=="object"&&e!==null}const Z_=e=>/^0[^.\s]+$/u.test(e);function G_(e){let t;return()=>(t===void 0&&(t=e()),t)}const Dn=e=>e,KP=(e,t)=>
vendor: 13,013 bytes, line 50
50s=>t(e(s)),ml=(...e)=>e.reduce(KP),ol=(e,t,s)=>{const r=t-e;return r===0?1:(s-e)/r};class Zm{constructor(){this.subscriptions=[]}add(t){return Fm(this.subscriptions,t),()=>Ou(this.subscriptions,t)}notify(t,s,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,s,r);else for(let l=0;l<o;l++){const u=this.subscriptions[l];u&&u(t,s,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const bn=e=>e*1e3,Nn=e=>e/1e3;function Y_(e,t){return t?e*(1e3/t):0}const K_=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,XP=1e-7,WP=12;function JP(e,t,s,r,o){let l,u,d=0;do u=t+(s-t)/2,l=K_(u,r,o)-e,l>0?s=u:t=u;while(Math.abs(l)>XP&&++d<WP);return u}function gl(e,t,s,r){if(e===t&&s===r)return Dn;const o=l=>JP(l,0,1,e,s);return l=>l===0||l===1?l:K_(o(l),t,r)}const X_=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,W_=e=>t=>1-e(1-t),J_=gl(.33,1.53,.69,.99),Gm=W_(J_),eT=X_(Gm),tT=e=>e>=1?1:(e*=2)<1?.5*Gm(e):.5*(2-Math.pow(2,-10*(e-1))),Ym=e=>1-Math.sin(Math.acos(e)),nT=W_(Ym),sT=X_(Ym),eL=gl(.42,0,1,1),tL=gl(0,0,.58,1),iT=gl(.42,0,.58,1),nL=e=>Array.isArray(e)&&typeof e[0]!="number",rT=e=>Array.isArray(e)&&typeof e[0]=="number",sL={linear:Dn,easeIn:eL,easeInOut:iT,easeOut:tL,circIn:Ym,circInOut:sT,circOut:nT,backIn:Gm,backInOut:eT,backOut:J_,anticipate:tT},iL=e=>typeof e=="string",Zx=e=>{if(rT(e)){Qm(e.length===4);const[t,s,r,o]=e;return gl(t,s,r,o)}else if(iL(e))return sL[e];return e},Fc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rL(e,t){let s=new Set,r=new Set,o=!1,l=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function h(y){u.has(y)&&(p.schedule(y),e()),y(d)}const p={schedule:(y,g=!1,v=!1)=>{const S=v&&o?s:r;return g&&u.add(y),S.add(y),y},cancel:y=>{r.delete(y),u.delete(y)},process:y=>{if(d=y,o){l=!0;return}o=!0;const g=s;s=r,r=g,s.forEach(h),s.clear(),o=!1,l&&(l=!1,p.process(y))}};return p}const aL=40;function aT(e,t){let s=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>s=!0,u=Fc.reduce((k,D)=>(k[D]=rL(l),k),{}),{setup:d,read:h,resolveKeyframes:p,preUpdate:y,update:g,preRender:v,render:x,postRender:S}=u,E=()=>{const k=Ai.useManualTiming,D=k?o.timestamp:performance.now();s=!1,k||(o.delta=r?1e3/60:Math.max(Math.min(D-o.timestamp,aL),1)),o.timestamp=D,o.isProcessing=!0,d.process(o),h.process(o),p.process(o),y.process(o),g.process(o),v.process(o),x.process(o),S.process(o),o.isProcessing=!1,s&&t&&(r=!1,e(E))},C=()=>{s=!0,r=!0,o.isProcessing||e(E)};return{schedule:Fc.reduce((k,D)=>{const P=u[D];return k[D]=(B,I=!1,L=!1)=>(s||C(),P.schedule(B,I,L)),k},{}),cancel:k=>{for(let D=0;D<Fc.length;D++)u[Fc[D]].cancel(k)},state:o,steps:u}}const{schedule:Fe,cancel:ki,state:Ot,steps:Fh}=aT(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dn,!0);let nu;function oL(){nu=void 0}const Zt={now:()=>(nu===void 0&&Zt.set(Ot.isProcessing||Ai.useManualTiming?Ot.timestamp:performance.now()),nu),set:e=>{nu=e,queueMicrotask(oL)}},oT=e=>t=>typeof t=="string"&&t.startsWith(e),lT=oT("--"),lL=oT("var(--"),Km=e=>lL(e)?cL.test(e.split("/*")[0].trim()):!1,cL=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Gx(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Da={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ll={...Da,transform:e=>ps(0,1,e)},Qc={...Da,default:1},Fo=e=>Math.round(e*1e5)/1e5,Xm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uL(e){return e==null}const dL=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wm=(e,t)=>s=>!!(typeof s=="string"&&dL.test(s)&&s.startsWith(e)||t&&!uL(s)&&Object.prototype.hasOwnProperty.call(s,t)),cT=(e,t,s)=>r=>{if(typeof r!="string")return r;const[o,l,u,d]=r.match(Xm);return{[e]:parseFloat(o),[t]:parseFloat(l),[s]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},fL=e=>ps(0,255,e),Qh={...Da,transform:e=>Math.round(fL(e))},ar={test:Wm("rgb","red"),parse:cT("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:r=1})=>"rgba("+Qh.transform(e)+", "+Qh.transform(t)+", "+Qh.transform(s)+", "+Fo(ll.transform(r))+")"};function hL(e){let t="",s="",r="",o="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,s+=s,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const jp={test:Wm("#"),parse:hL,transform:ar.transform},yl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Si=yl("deg"),ds=yl("%"),ue=yl("px"),pL=yl("vh"),mL=yl("vw"),Yx={...ds,parse:e=>ds.parse(e)/100,transform:e=>ds.transform(e*100)},ma={test:Wm("hsl","hue"),parse:cT("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:r=1})=>"hsla("+Math.round(e)+", "+ds.transform(Fo(t))+", "+ds.transform(Fo(s))+", "+Fo(ll.transform(r))+")"},ht={test:e=>ar.test(e)||jp.test(e)||ma.test(e),parse:e=>ar.test(e)?ar.parse(e):ma.test(e)?ma.parse(e):jp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ar.transform(e):ma.transform(e),getAnimatableNone:e=>{const t=ht.parse(e);return t.alpha=0,ht.transform(t)}},gL=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yL(e){return isNaN(e)&&typeof e=="string"&&(e.match(Xm)?.length||0)+(e.match(gL)?.length||0)>0}const uT="number",dT="color",vL="var",bL="var(",Kx="${}",xL=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ca(e){const t=e.toString(),s=[],r={color:[],number:[],var:[]},o=[];let l=0;const d=t.replace(xL,h=>(ht.test(h)?(r.color.push(l),o.push(dT),s.push(ht.parse(h))):h.startsWith(bL)?(r.var.push(l),o.push(vL),s.push(h)):(r.number.push(l),o.push(uT),s.push(parseFloat(h))),++l,Kx)).split(Kx);return{values:s,split:d,indexes:r,types:o}}function wL(e){return Ca(e).values}function fT({split:e,types:t}){const s=e.length;return r=>{let o="";for(let l=0;l<s;l++)if(o+=e[l],r[l]!==void 0){const u=t[l];u===uT?o+=Fo(r[l]):u===dT?o+=ht.transform(r[l]):o+=r[l]}return o}}function SL(e){return fT(Ca(e))}const _L=e=>typeof e=="number"?0:ht.test(e)?ht.getAnimatableNone(e):e,TL=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:_L(e);function EL(e){const t=Ca(e);return fT(t)(t.values.map((r,o)=>TL(r,t.split[o])))}const Fn={test:yL,parse:wL,createTransformer:SL,getAnimatableNone:EL};function Zh(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function CL({hue:e,saturation:t,lightness:s,alpha:r}){e/=360,t/=100,s/=100;let o=0,l=0,u=0;if(!t)o=l=u=s;else{const d=s<.5?s*(1+t):s+t-s*t,h=2*s-d;o=Zh(h,d,e+1/3),l=Zh(h,d,e),u=Zh(h,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:r}}function Mu(e,t){return s=>s>0?t:e}const Ye=(e,t,s)=>e+(t-e)*s,Gh=(e,t,s)=>{const r=e*e,o=s*(t*t-r)+r;return o<0?0:Math.sqrt(o)},AL=[jp,ar,ma],kL=e=>AL.find(t=>t.test(e));function Xx(e){const t=kL(e);if(!t)return!1;let s=t.parse(e);return t===ma&&(s=CL(s)),s}const Wx=(e,t)=>{const s=Xx(e),r=Xx(t);if(!s||!r)return Mu(e,t);const o={...s};return l=>(o.red=Gh(s.red,r.red,l),o.green=Gh(s.green,r.green,l),o.blue=Gh(s.blue,r.blue,l),o.alpha=Ye(s.alpha,r.alpha,l),ar.transform(o))},zp=new Set(["none","hidden"]);function RL(e,t){return zp.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function OL(e,t){return s=>Ye(e,t,s)}function Jm(e){return typeof e=="number"?OL:typeof e=="string"?Km(e)?Mu:ht.test(e)?Wx:DL:Array.isArray(e)?hT:typeof e=="object"?ht.test(e)?Wx:ML:Mu}function hT(e,t){const s=[...e],r=s.length,o=e.map((l,u)=>Jm(l)(l,t[u]));return l=>{for(let u=0;u<r;u++)s[u]=o[u](l);return s}}function ML(e,t){const s={...e,...t},r={};for(const o in s)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Jm(e[o])(e[o],t[o]));return o=>{for(const l in r)s[l]=r[l](o);return s}}function NL(e,t){const s=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][r[l]],d=e.values[u]??0;s[o]=d,r[l]++}return s}const DL=(e,t)=>{const s=Fn.createTransformer(t),r=Ca(e),o=Ca(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?zp.has(e)&&!o.values.length||zp.has(t)&&!r.values.length?RL(e,t):ml(hT(NL(r,o),o.values),s):Mu(e,t)};function pT(e,t,s){return typeof e=="number"&&typeof t=="number"&&typeof s=="number"?Ye(e,t,s):Jm(e)(e,t)}const jL=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>Fe.update(t,s),stop:()=>ki(t),now:()=>Ot.isProcessing?Ot.timestamp:Zt.now()}},mT=(e,t,s=10)=>{let r="";const o=Math.max(Math.round(t/s),2);for(let l=0;l<o;l++)r+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Nu=2e4;function eg(e){let t=0;const s=50;let r=e.next(t);for(;!r.done&&t<Nu;)t+=s,r=e.next(t);return t>=Nu?1/0:t}function zL(e,t=100,s){const r=s({...e,keyframes:[0,t]}),o=Math.min(eg(r),Nu);return{type:"keyframes",ease:l=>r.next(o*l).value/t,duration:Nn(o)}}const it={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Pp(e,t){return e*Math.sqrt(1-t*t)}const PL=12;function LL(e,t,s){let r=s;for(let o=1;o<PL;o++)r=r-e(r)/t(r);return r}const Yh=.001;function UL({duration:e=it.duration,bounce:t=it.bounce,velocity:s=it.velocity,mass:r=it.mass}){let o,l,u=1-t;u=ps(it.minDamping,it.maxDamping,u),e=ps(it.minDuration,it.maxDuration,Nn(e)),u<1?(o=p=>{const y=p*u,g=y*e,v=y-s,x=Pp(p,u),S=Math.exp(-g);return Yh-v/x*S},l=p=>{const g=p*u*e,v=g*s+s,x=Math.pow(u,2)*Math.pow(p,2)*e,S=Math.exp(-g),E=Pp(Math.pow(p,2),u);return(-o(p)+Yh>0?-1:1)*((v-x)*S)/E}):(o=p=>{const y=Math.exp(-p*e),g=(p-s)*e+1;return-Yh+y*g},l=p=>{const y=Math.exp(-p*e),g=(s-p)*(e*e);return y*g});const d=5/e,h=LL(o,l,d);if(e=bn(e),isNaN(h))return{stiffness:it.stiffness,damping:it.damping,duration:e};{const p=Math.pow(h,2)*r;return{stiffness:p,damping:u*2*Math.sqrt(r*p),duration:e}}}const VL=["duration","bounce"],qL=["stiffness","damping","mass"];function Jx(e,t){return t.some(s=>e[s]!==void 0)}function BL(e){let t={velocity:it.velocity,stiffness:it.stiffness,damping:it.damping,mass:it.mass,isResolvedFromDuration:!1,...e};if(!Jx(e,qL)&&Jx(e,VL))if(t.velocity=0,e.visualDuration){const s=e.visualDuration,r=2*Math.PI/(s*1.2),o=r*r,l=2*ps(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:it.mass,stiffness:o,damping:l}}else{const s=UL({...e,velocity:0});t={...t,...s,mass:it.mass},t.isResolvedFromDuration=!0}return t}function Du(e=it.visualDuration,t=it.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=s;const l=s.keyframes[0],u=s.keyframes[s.keyframes.length-1],d={done:!1,value:l},{stiffness:h,damping:p,mass:y,duration:g,velocity:v,isResolvedFromDuration:x}=BL({...s,velocity:-Nn(s.velocity||0)}),S=v||0,E=p/(2*Math.sqrt(h*y)),C=u-l,A=Nn(Math.sqrt(h/y)),M=Math.abs(C)<5;r||(r=M?it.restSpeed.granular:it.restSpeed.default),o||(o=M?it.restDelta.granular:it.restDelta.default);let k,D,P,B,I,L;if(E<1)P=Pp(A,E),B=(S+E*A*C)/P,k=ee=>{const re=Math.exp(-E*A*ee);return u-re*(B*Math.sin(P*ee)+C*Math.cos(P*ee))},I=E*A*B+C*P,L=E*A*C-B*P,D=ee=>Math.exp(-E*A*ee)*(I*Math.sin(P*ee)+L*Math.cos(P*ee));else if(E===1){k=re=>u-Math.exp(-A*re)*(C+(S+A*C)*re);const ee=S+A*C;D=re=>Math.exp(-A*re)*(A*ee*re-S)}else{const ee=A*Math.sqrt(E*E-1);k=he=>{const fe=Math.exp(-E*A*he),j=Math.min(ee*he,300);return u-fe*((S+E*A*C)*Math.sinh(j)+ee*C*Math.cosh(j))/ee};const re=(S+E*A*C)/ee,oe=E*A*re-C*ee,me=E*A*C-re*ee;D=he=>{const fe=Math.exp(-E*A*he),j=Math.min(ee*he,300);return fe*(oe*Math.sinh(j)+me*Math.cosh(j))}}const W={calculatedDuration:x&&g||null,velocity:ee=>bn(D(ee)),next:ee=>{if(!x&&E<1){const oe=Math.exp(-E*A*ee),me=Math.sin(P*ee),he=Math.cos(P*ee),fe=u-oe*(B*me+C*he),j=bn(oe*(I*me+L*he));return d.done=Math.abs(j)<=r&&Math.abs(u-fe)<=o,d.value=d.done?u:fe,d}const re=k(ee);if(x)d.done=ee>=g;else{const oe=bn(D(ee));d.done=Math.abs(oe)<=r&&Math.abs(u-re)<=o}return d.value=d.done?u:re,d},toString:()=>{const ee=Math.min(eg(W),Nu),re=mT(oe=>W.next(ee*oe).value,ee,30);return ee+"ms "+re},toTransition:()=>{}};return W}Du.applyToOptions=e=>{const t=zL(e,100,Du);return e.ease=t.ease,e.duration=bn(t.duration),e.type="keyframes",e};const IL=5;function gT(e,t,s){const r=Math.max(t-IL,0);return Y_(s-e(r),t-r)}function Lp({keyframes:e,velocity:t=0,power:s=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:h,restDelta:p=.5,restSpeed:y}){const g=e[0],v={done:!1,value:g},x=L=>d!==void 0&&L<d||h!==void 0&&L>h,S=L=>d===void 0?h:h===void 0||Math.abs(d-L)<Math.abs(h-L)?d:h;let E=s*t;
vendor: 1,564 bytes, line 50
50const C=g+E,A=u===void 0?C:u(C);A!==C&&(E=A-g);const M=L=>-E*Math.exp(-L/r),k=L=>A+M(L),D=L=>{const W=M(L),ee=k(L);v.done=Math.abs(W)<=p,v.value=v.done?A:ee};let P,B;const I=L=>{x(v.value)&&(P=L,B=Du({keyframes:[v.value,S(v.value)],velocity:gT(k,L,v.value),damping:o,stiffness:l,restDelta:p,restSpeed:y}))};return I(0),{calculatedDuration:null,next:L=>{let W=!1;return!B&&P===void 0&&(W=!0,D(L),I(L)),P!==void 0&&L>=P?B.next(L-P):(!W&&D(L),v)}}}function $L(e,t,s){const r=[],o=s||Ai.mix||pT,l=e.length-1;for(let u=0;u<l;u++){let d=o(e[u],e[u+1]);if(t){const h=Array.isArray(t)?t[u]||Dn:t;d=ml(h,d)}r.push(d)}return r}function HL(e,t,{clamp:s=!0,ease:r,mixer:o}={}){const l=e.length;if(Qm(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=$L(t,r,o),h=d.length,p=y=>{if(u&&y<e[0])return t[0];let g=0;if(h>1)for(;g<e.length-2&&!(y<e[g+1]);g++);const v=ol(e[g],e[g+1],y);return d[g](v)};return s?y=>p(ps(e[0],e[l-1],y)):p}function FL(e,t){const s=e[e.length-1];for(let r=1;r<=t;r++){const o=ol(0,t,r);e.push(Ye(s,1,o))}}function QL(e){const t=[0];return FL(t,e.length-1),t}function ZL(e,t){return e.map(s=>s*t)}function GL(e,t){return e.map(()=>t||iT).splice(0,e.length-1)}function Qo({duration:e=300,keyframes:t,times:s,ease:r="easeInOut"}){const o=nL(r)?r.map(Zx):Zx(r),l={done:!1,value:t[0]},u=ZL(s&&s.length===t.length?s:QL(t),e),d=HL(u,t,{ease:Array.isArray(o)?o:GL(t,o)});return{calculatedDuration:e,next:h=>(l.value=d(h),l.done=h>=e,l)}}const YL=e=>e!==null;
vendor: 77,963 bytes, line 50
50function nd(e,{repeat:t,repeatType:s="loop"},r,o=1){const l=e.filter(YL),d=o<0||t&&s!=="loop"&&t%2===1?0:l.length-1;return!d||r===void 0?l[d]:r}const KL={decay:Lp,inertia:Lp,tween:Qo,keyframes:Qo,spring:Du};function yT(e){typeof e.type=="string"&&(e.type=KL[e.type])}class tg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,s){return this.finished.then(t,s)}}const XL=e=>e/100;class ju extends tg{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==Zt.now()&&this.tick(Zt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;yT(t);const{type:s=Qo,repeat:r=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=t;let{keyframes:d}=t;const h=s||Qo;h!==Qo&&typeof d[0]!="number"&&(this.mixKeyframes=ml(XL,pT(d[0],d[1])),d=[0,100]);const p=h({...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...d].reverse(),velocity:-u})),p.calculatedDuration===null&&(p.calculatedDuration=eg(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=p}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:r,totalDuration:o,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:d,calculatedDuration:h}=this;if(this.startTime===null)return r.next(0);const{delay:p=0,keyframes:y,repeat:g,repeatType:v,repeatDelay:x,type:S,onUpdate:E,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const A=this.currentTime-p*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?A<0:A>o;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let k=this.currentTime,D=r;if(g){const L=Math.min(this.currentTime,o)/d;let W=Math.floor(L),ee=L%1;!ee&&L>=1&&(ee=1),ee===1&&W--,W=Math.min(W,g+1),W%2&&(v==="reverse"?(ee=1-ee,x&&(ee-=x/d)):v==="mirror"&&(D=u)),k=ps(0,1,ee)*d}let P;M?(this.delayState.value=y[0],P=this.delayState):P=D.next(k),l&&!M&&(P.value=l(P.value));let{done:B}=P;!M&&h!==null&&(B=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return I&&S!==Lp&&(P.value=nd(y,this.options,C,this.speed)),E&&E(P.value),I&&this.finish(),P}then(t,s){return this.finished.then(t,s)}get duration(){return Nn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Nn(t)}get time(){return Nn(this.currentTime)}set time(t){t=bn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const s=this.generator.next(t).value;return gT(r=>this.generator.next(r).value,t,s)}get speed(){return this.playbackSpeed}set speed(t){const s=this.playbackSpeed!==t;s&&this.driver&&this.updateTime(Zt.now()),this.playbackSpeed=t,s&&this.driver&&(this.time=Nn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=jL,startTime:s}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=s??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Zt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function WL(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const or=e=>e*180/Math.PI,Up=e=>{const t=or(Math.atan2(e[1],e[0]));return Vp(t)},JL={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Up,rotateZ:Up,skewX:e=>or(Math.atan(e[1])),skewY:e=>or(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Vp=e=>(e=e%360,e<0&&(e+=360),e),ew=Up,tw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),e8={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tw,scaleY:nw,scale:e=>(tw(e)+nw(e))/2,rotateX:e=>Vp(or(Math.atan2(e[6],e[5]))),rotateY:e=>Vp(or(Math.atan2(-e[2],e[0]))),rotateZ:ew,rotate:ew,skewX:e=>or(Math.atan(e[4])),skewY:e=>or(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function qp(e){return e.includes("scale")?1:0}function Bp(e,t){if(!e||e==="none")return qp(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(s)r=e8,o=s;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=JL,o=d}if(!o)return qp(t);const l=r[t],u=o[1].split(",").map(n8);return typeof l=="function"?l(u):u[l]}const t8=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Bp(s,t)};function n8(e){return parseFloat(e.trim())}const ja=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],za=new Set(ja),sw=e=>e===Da||e===ue,s8=new Set(["x","y","z"]),i8=ja.filter(e=>!s8.has(e));function r8(e){const t=[];return i8.forEach(s=>{const r=e.getValue(s);r!==void 0&&(t.push([s,r.get()]),r.set(s.startsWith("scale")?1:0))}),t}const Ti={width:({x:e},{paddingLeft:t="0",paddingRight:s="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(s)},height:({y:e},{paddingTop:t="0",paddingBottom:s="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(s)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Bp(t,"x"),y:(e,{transform:t})=>Bp(t,"y")};Ti.translateX=Ti.x;Ti.translateY=Ti.y;const cr=new Set;let Ip=!1,$p=!1,Hp=!1;function vT(){if($p){const e=Array.from(cr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),s=new Map;t.forEach(r=>{const o=r8(r);o.length&&(s.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=s.get(r);o&&o.forEach(([l,u])=>{r.getValue(l)?.set(u)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}$p=!1,Ip=!1,cr.forEach(e=>e.complete(Hp)),cr.clear()}function bT(){cr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($p=!0)})}function a8(){Hp=!0,bT(),vT(),Hp=!1}class ng{constructor(t,s,r,o,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=r,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(cr.add(this),Ip||(Ip=!0,Fe.read(bT),Fe.resolveKeyframes(vT))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:r,motionValue:o}=this;if(t[0]===null){const l=o?.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&s){const d=r.readValue(s,u);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=u),o&&l===void 0&&o.set(t[0])}WL(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),cr.delete(this)}cancel(){this.state==="scheduled"&&(cr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const o8=e=>e.startsWith("--");function xT(e,t,s){o8(t)?e.style.setProperty(t,s):e.style[t]=s}const l8={};function wT(e,t){const s=G_(e);return()=>l8[t]??s()}const c8=wT(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ST=wT(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Io=([e,t,s,r])=>`cubic-bezier(${e}, ${t}, ${s}, ${r})`,iw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Io([0,.65,.55,1]),circOut:Io([.55,0,1,.45]),backIn:Io([.31,.01,.66,-.59]),backOut:Io([.33,1.53,.69,.99])};function _T(e,t){if(e)return typeof e=="function"?ST()?mT(e,t):"ease-out":rT(e)?Io(e):Array.isArray(e)?e.map(s=>_T(s,t)||iw.easeOut):iw[e]}function u8(e,t,s,{delay:r=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeOut",times:h}={},p=void 0){const y={[t]:s};h&&(y.offset=h);const g=_T(d,o);Array.isArray(g)&&(y.easing=g);const v={delay:r,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return p&&(v.pseudoElement=p),e.animate(y,v)}function TT(e){return typeof e=="function"&&"applyToOptions"in e}function d8({type:e,...t}){return TT(e)&&ST()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ET extends tg{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:r,keyframes:o,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:d,onComplete:h}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,Qm(typeof t.type!="string");const p=d8(t);this.animation=u8(s,r,o,p,l),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const y=nd(o,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(y),xT(s,r,y),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Nn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Nn(t)}get time(){return Nn(Number(this.animation.currentTime)||0)}set time(t){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=bn(t),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:s,rangeEnd:r,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&c8()?(this.animation.timeline=t,s&&(this.animation.rangeStart=s),r&&(this.animation.rangeEnd=r),Dn):o(this)}}const CT={anticipate:tT,backInOut:eT,circInOut:sT};function f8(e){return e in CT}function h8(e){typeof e.ease=="string"&&f8(e.ease)&&(e.ease=CT[e.ease])}const Kh=10;class p8 extends ET{constructor(t){h8(t),yT(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:r,onComplete:o,element:l,...u}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const d=new ju({...u,autoplay:!1}),h=Math.max(Kh,Zt.now()-this.startTime),p=ps(0,Kh,h-Kh),y=d.sample(h).value,{name:g}=this.options;l&&g&&xT(l,g,y),s.setWithVelocity(d.sample(Math.max(0,h-p)).value,y,p),d.stop()}}const rw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Fn.test(e)||e==="0")&&!e.startsWith("url("));function m8(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function g8(e,t,s,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=rw(o,t),d=rw(l,t);return!u||!d?!1:m8(e)||(s==="spring"||TT(s))&&r}function Fp(e){e.duration=0,e.type="keyframes"}const AT=new Set(["opacity","clipPath","filter","transform"]),y8=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function v8(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&y8.test(e[t]))return!0;return!1}const b8=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),x8=G_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function w8(e){const{motionValue:t,name:s,repeatDelay:r,repeatType:o,damping:l,type:u,keyframes:d}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:y}=t.owner.getProps();return x8()&&s&&(AT.has(s)||b8.has(s)&&v8(d))&&(s!=="transform"||!y)&&!p&&!r&&o!=="mirror"&&l!==0&&u!=="inertia"}const S8=40;class _8 extends tg{constructor({autoplay:t=!0,delay:s=0,type:r="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",keyframes:d,name:h,motionValue:p,element:y,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Zt.now();const v={autoplay:t,delay:s,type:r,repeat:o,repeatDelay:l,repeatType:u,name:h,motionValue:p,element:y,...g},x=y?.KeyframeResolver||ng;this.keyframeResolver=new x(d,(S,E,C)=>this.onKeyframesResolved(S,E,v,!C),h,p,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,s,r,o){this.keyframeResolver=void 0;const{name:l,type:u,velocity:d,delay:h,isHandoff:p,onUpdate:y}=r;this.resolvedAt=Zt.now();let g=!0;g8(t,l,u,d)||(g=!1,(Ai.instantAnimations||!h)&&y?.(nd(t,r,s)),t[0]=t[t.length-1],Fp(r),r.repeat=0);const x={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>S8?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...r,keyframes:t},S=g&&!p&&w8(x),E=x.motionValue?.owner?.current;let C;if(S)try{C=new p8({...x,element:E})}catch{C=new ju(x)}else C=new ju(x);C.finished.then(()=>{this.notifyFinished()}).catch(Dn),this.pendingTimeline&&(this.stopTimeline=C.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=C}get finished(){return this._animation?this.animation.finished:this._finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),a8()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function kT(e,t,s,r=0,o=1){const l=Array.from(e).sort((p,y)=>p.sortNodePosition(y)).indexOf(t),u=e.size,d=(u-1)*r;return typeof s=="function"?s(l,u):o===1?l*r:d-l*r}const T8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function E8(e){const t=T8.exec(e);if(!t)return[,];const[,s,r,o]=t;return[`--${s??r}`,o]}function RT(e,t,s=1){const[r,o]=E8(e);if(!r)return;const l=window.getComputedStyle(t).getPropertyValue(r);if(l){const u=l.trim();return F_(u)?parseFloat(u):u}return Km(o)?RT(o,t,s+1):o}const C8={type:"spring",stiffness:500,damping:25,restSpeed:10},A8=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),k8={type:"keyframes",duration:.8},R8={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},O8=(e,{keyframes:t})=>t.length>2?k8:za.has(e)?e.startsWith("scale")?A8(t[1]):C8:R8;function OT(e,t){if(e?.inherit&&t){const{inherit:s,...r}=e;return{...t,...r}}return e}function sg(e,t){const s=e?.[t]??e?.default??e;return s!==e?OT(s,e):s}const M8=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function N8(e){for(const t in e)if(!M8.has(t))return!0;return!1}const ig=(e,t,s,r={},o,l)=>u=>{const d=sg(r,e)||{},h=d.delay||r.delay||0;let{elapsed:p=0}=r;p=p-bn(h);const y={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-p,onUpdate:v=>{t.set(v),d.onUpdate&&d.onUpdate(v)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:o};N8(d)||Object.assign(y,O8(e,y)),y.duration&&(y.duration=bn(y.duration)),y.repeatDelay&&(y.repeatDelay=bn(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let g=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(Fp(y),y.delay===0&&(g=!0)),(Ai.instantAnimations||Ai.skipAnimations||o?.shouldSkipAnimations)&&(g=!0,Fp(y),y.delay=0),y.allowFlatten=!d.type&&!d.ease,g&&!l&&t.get()!==void 0){const v=nd(y.keyframes,d);if(v!==void 0){Fe.update(()=>{y.onUpdate(v),y.onComplete()});return}}return d.isSync?new ju(y):new _8(y)};function aw(e){const t=[{},{}];return e?.values.forEach((s,r)=>{t[0][r]=s.get(),t[1][r]=s.getVelocity()}),t}function rg(e,t,s,r){if(typeof t=="function"){const[o,l]=aw(r);t=t(s!==void 0?s:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=aw(r);t=t(s!==void 0?s:e.custom,o,l)}return t}function ur(e,t,s){const r=e.getProps();return rg(r,t,s!==void 0?s:r.custom,e)}const MT=new Set(["width","height","top","left","right","bottom",...ja]),ow=30,D8=e=>!isNaN(parseFloat(e));class j8{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Zt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=Zt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=D8(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){this.events[t]||(this.events[t]=new Zm);const r=this.events[t].add(s);return t==="change"?()=>{r(),Fe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,r){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Zt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ow)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,ow);return Y_(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=t(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Aa(e,t){return new j8(e,t)}const Qp=e=>Array.isArray(e);function z8(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,Aa(s))}function P8(e){return Qp(e)?e[e.length-1]||0:e}function L8(e,t){const s=ur(e,t);let{transitionEnd:r={},transition:o={},...l}=s||{};l={...l,...r};for(const u in l){const d=P8(l[u]);z8(e,u,d)}}const Mt=e=>!!(e&&e.getVelocity);function U8(e){return!!(Mt(e)&&e.add)}function Zp(e,t){const s=e.getValue("willChange");if(U8(s))return s.add(t);if(!s&&Ai.WillChange){const r=new Ai.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ag(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const V8="framerAppearId",NT="data-"+ag(V8);function DT(e){return e.props[NT]}function q8({protectedKeys:e,needsAnimating:t},s){const r=e.hasOwnProperty(s)&&t[s]!==!0;return t[s]=!1,r}function jT(e,t,{delay:s=0,transitionOverride:r,type:o}={}){let{transition:l,transitionEnd:u,...d}=t;const h=e.getDefaultTransition();l=l?OT(l,h):h;const p=l?.reduceMotion;r&&(l=r);const y=[],g=o&&e.animationState&&e.animationState.getState()[o];for(const v in d){const x=e.getValue(v,e.latestValues[v]??null),S=d[v];if(S===void 0||g&&q8(g,v))continue;const E={delay:s,...sg(l||{},v)},C=x.get();if(C!==void 0&&!x.isAnimating()&&!Array.isArray(S)&&S===C&&!E.velocity){Fe.update(()=>x.set(S));continue}let A=!1;if(window.MotionHandoffAnimation){const D=DT(e);if(D){const P=window.MotionHandoffAnimation(D,v,Fe);P!==null&&(E.startTime=P,A=!0)}}Zp(e,v);const M=p??e.shouldReduceMotion;x.start(ig(v,x,S,M&&MT.has(v)?{type:!1}:E,e,A));const k=x.animation;k&&y.push(k)}if(u){const v=()=>Fe.update(()=>{u&&L8(e,u)});y.length?Promise.all(y).then(v):v()}return y}function Gp(e,t,s={}){const r=ur(e,t,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};s.transitionOverride&&(o=s.transitionOverride);const l=r?()=>Promise.all(jT(e,r,s)):()=>Promise.resolve(),u=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:p=0,staggerChildren:y,staggerDirection:g}=o;return B8(e,t,h,p,y,g,s)}:()=>Promise.resolve(),{when:d}=o;if(d){const[h,p]=d==="beforeChildren"?[l,u]:[u,l];return h().then(()=>p())}else return Promise.all([l(),u(s.delay)])}function B8(e,t,s=0,r=0,o=0,l=1,u){const d=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),d.push(Gp(h,t,{...u,delay:s+(typeof r=="function"?0:r)+kT(e.variantChildren,h,r,o,l)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(d)}function I8(e,t,s={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(l=>Gp(e,l,s));r=Promise.all(o)}else if(typeof t=="string")r=Gp(e,t,s);else{const o=typeof t=="function"?ur(e,t,s.custom):t;r=Promise.all(jT(e,o,s))}return r.then(()=>{e.notify("AnimationComplete",t)})}const $8={test:e=>e==="auto",parse:e=>e},zT=e=>t=>t.test(e),PT=[Da,ue,ds,Si,mL,pL,$8],lw=e=>PT.find(zT(e));function H8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Z_(e):!0}const F8=new Set(["brightness","contrast","saturate","opacity"]);function Q8(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=s.match(Xm)||[];if(!r)return e;const o=s.replace(r,"");let l=F8.has(t)?1:0;return r!==s&&(l*=100),t+"("+l+o+")"}const Z8=/\b([a-z-]*)\(.*?\)/gu,Yp={...Fn,getAnimatableNone:e=>{const t=e.match(Z8);return t?t.map(Q8).join(" "):e}},Kp={...Fn,getAnimatableNone:e=>{const t=Fn.parse(e);return Fn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},cw={...Da,transform:Math.round},G8={rotate:Si,rotateX:Si,rotateY:Si,rotateZ:Si,scale:Qc,scaleX:Qc,scaleY:Qc,scaleZ:Qc,skew:Si,skewX:Si,skewY:Si,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:ll,originX:Yx,originY:Yx,originZ:ue},og={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,inset:ue,insetBlock:ue,insetBlockStart:ue,insetBlockEnd:ue,insetInline:ue,insetInlineStart:ue,insetInlineEnd:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,paddingBlock:ue,paddingBlockStart:ue,paddingBlockEnd:ue,paddingInline:ue,paddingInlineStart:ue,paddingInlineEnd:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,marginBlock:ue,marginBlockStart:ue,marginBlockEnd:ue,marginInline:ue,marginInlineStart:ue,marginInlineEnd:ue,fontSize:ue,backgroundPositionX:ue,backgroundPositionY:ue,...G8,zIndex:cw,fillOpacity:ll,strokeOpacity:ll,numOctaves:cw},Y8={...og,color:ht,backgroundColor:ht,outlineColor:ht,fill:ht,stroke:ht,borderColor:ht,borderTopColor:ht,borderRightColor:ht,borderBottomColor:ht,borderLeftColor:ht,filter:Yp,WebkitFilter:Yp,mask:Kp,WebkitMask:Kp},LT=e=>Y8[e],K8=new Set([Yp,Kp]);function UT(e,t){let s=LT(e);return K8.has(s)||(s=Fn),s.getAnimatableNone?s.getAnimatableNone(t):void 0}const X8=new Set(["auto","none","0"]);function W8(e,t,s){let r=0,o;for(;r<e.length&&!o;){const l=e[r];typeof l=="string"&&!X8.has(l)&&Ca(l).values.length&&(o=e[r]),r++}if(o&&s)for(const l of t)e[l]=UT(s,o)}class J8 extends ng{constructor(t,s,r,o,l){super(t,s,r,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:r}=this;if(!s||!s.current)return;super.readKeyframes();for(let y=0;y<t.length;y++){let g=t[y];if(typeof g=="string"&&(g=g.trim(),Km(g))){const v=RT(g,s.current);v!==void 0&&(t[y]=v),y===t.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!MT.has(r)||t.length!==2)return;const[o,l]=t,u=lw(o),d=lw(l),h=Gx(o),p=Gx(l);if(h!==p&&Ti[r]){this.needsMeasurement=!0;return}if(u!==d)if(sw(u)&&sw(d))for(let y=0;y<t.length;y++){const g=t[y];typeof g=="string"&&(t[y]=parseFloat(g))}else Ti[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||H8(t[o]))&&r.push(o);r.length&&W8(t,r,s)}measureInitialState(){const{element:t,unresolvedKeyframes:s,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ti[r](t.measureViewportBox(),window.getComputedStyle(t.current)),s[0]=this.measuredOrigin;const o=s[s.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:s,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(s);o&&o.jump(this.measuredOrigin,!1);const l=r.length-1,u=r[l];r[l]=Ti[s](t.measureViewportBox(),window.getComputedStyle(t.current)),u!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=u),this.removedTransforms?.length&&this.removedTransforms.forEach(([d,h])=>{t.getValue(d).set(h)}),this.resolveNoneKeyframes()}}function VT(e,t,s){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=s?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const qT=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function su(e){return Q_(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:lg}=aT(queueMicrotask,!1),$n={x:!1,y:!1};function BT(){return $n.x||$n.y}function eU(e){return e==="x"||e==="y"?$n[e]?null:($n[e]=!0,()=>{$n[e]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}function IT(e,t){const s=VT(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[s,o,()=>r.abort()]}function tU(e){return!(e.pointerType==="touch"||BT())}function nU(e,t,s={}){const[r,o,l]=IT(e,s);return r.forEach(u=>{let d=!1,h=!1,p;const y=()=>{u.removeEventListener("pointerleave",S)},g=C=>{p&&(p(C),p=void 0),y()},v=C=>{d=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),h&&(h=!1,g(C))},x=()=>{d=!0,window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",v,o)},S=C=>{if(C.pointerType!=="touch"){if(d){h=!0;return}g(C)}},E=C=>{if(!tU(C))return;h=!1;const A=t(u,C);typeof A=="function"&&(p=A,u.addEventListener("pointerleave",S,o))};u.addEventListener("pointerenter",E,o),u.addEventListener("pointerdown",x,o)}),l}const $T=(e,t)=>t?e===t?!0:$T(e,t.parentElement):!1,cg=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,sU=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iU(e){return sU.has(e.tagName)||e.isContentEditable===!0}const rU=new Set(["INPUT","SELECT","TEXTAREA"]);function aU(e){return rU.has(e.tagName)||e.isContentEditable===!0}const iu=new WeakSet;function uw(e){return t=>{t.key==="Enter"&&e(t)}}function Xh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const oU=(e,t)=>{const s=e.currentTarget;if(!s)return;const r=uw(()=>{if(iu.has(s))return;Xh(s,"down");const o=uw(()=>{Xh(s,"up")}),l=()=>Xh(s,"cancel");s.addEventListener("keyup",o,t),s.addEventListener("blur",l,t)});s.addEventListener("keydown",r,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",r),t)};function dw(e){return cg(e)&&!BT()}const fw=new WeakSet;function lU(e,t,s={}){const[r,o,l]=IT(e,s),u=d=>{const h=d.currentTarget;if(!dw(d)||fw.has(d))return;iu.add(h),s.stopPropagation&&fw.add(d);const p=t(h,d),y=(x,S)=>{window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",v),iu.has(h)&&iu.delete(h),dw(x)&&typeof p=="function"&&p(x,{success:S})},g=x=>{y(x,h===window||h===document||s.useGlobalTarget||$T(h,x.target))},v=x=>{y(x,!1)};window.addEventListener("pointerup",g,o),window.addEventListener("pointercancel",v,o)};return r.forEach(d=>{(s.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),su(d)&&(d.addEventListener("focus",p=>oU(p,o)),!iU(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function ug(e){return Q_(e)&&"ownerSVGElement"in e}const ru=new WeakMap;let au;const HT=(e,t,s)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:ug(r)&&"getBBox"in r?r.getBBox()[t]:r[s],cU=HT("inline","width","offsetWidth"),uU=HT("block","height","offsetHeight");function dU({target:e,borderBoxSize:t}){ru.get(e)?.forEach(s=>{s(e,{get width(){return cU(e,t)},get height(){return uU(e,t)}})})}function fU(e){e.forEach(dU)}function hU(){typeof ResizeObserver>"u"||(au=new ResizeObserver(fU))}function pU(e,t){au||hU();const s=VT(e);return s.forEach(r=>{let o=ru.get(r);o||(o=new Set,ru.set(r,o)),o.add(t),au?.observe(r)}),()=>{s.forEach(r=>{const o=ru.get(r);o?.delete(t),o?.size||au?.unobserve(r)})}}const ou=new Set;let ga;function mU(){ga=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ou.forEach(t=>t(e))},window.addEventListener("resize",ga)}function gU(e){return ou.add(e),ga||mU(),()=>{ou.delete(e),!ou.size&&typeof ga=="function"&&(window.removeEventListener("resize",ga),ga=void 0)}}function hw(e,t){return typeof e=="function"?gU(e):pU(e,t)}function yU(e){return ug(e)&&e.tagName==="svg"}const vU=[...PT,ht,Fn],bU=e=>vU.find(zT(e)),pw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ya=()=>({x:pw(),y:pw()}),mw=()=>({min:0,max:0}),yt=()=>({x:mw(),y:mw()}),xU=new WeakMap;function sd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function cl(e){return typeof e=="string"||Array.isArray(e)}const dg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],fg=["initial",...dg];function id(e){return sd(e.animate)||fg.some(t=>cl(e[t]))}function FT(e){return!!(id(e)||e.variants)}function wU(e,t,s){for(const r in t){const o=t[r],l=s[r];if(Mt(o))e.addValue(r,o);else if(Mt(l))e.addValue(r,Aa(o,{owner:e}));else if(l!==o)if(e.hasValue(r)){const u=e.getValue(r);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=e.getStaticValue(r);e.addValue(r,Aa(u!==void 0?u:o,{owner:e}))}}for(const r in s)t[r]===void 0&&e.removeValue(r);return t}const Xp={current:null},QT={current:!1},SU=typeof window<"u";function _U(){if(QT.current=!0,!!SU)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xp.current=e.matches;e.addEventListener("change",t),t()}else Xp.current=!1}const gw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let zu={};function ZT(e){zu=e}function TU(){return zu}class EU{scrapeMotionValuesFromProps(t,s,r){return{}}constructor({parent:t,props:s,presenceContext:r,reducedMotionConfig:o,skipAnimations:l,blockInitialAnimation:u,visualState:d},h={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ng,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=Zt.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Fe.render(this.render,!1,!0))};const{latestValues:p,renderState:y}=d;this.latestValues=p,this.baseTarget={...p},this.initialValues=s.initial?{...p}:{},this.renderState=y,this.parent=t,this.props=s,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=l,this.options=h,this.blockInitialAnimation=!!u,this.isControllingVariants=id(s),this.isVariantNode=FT(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...v}=this.scrapeMotionValuesFromProps(s,{},this);for(const x in v){const S=v[x];p[x]!==void 0&&Mt(S)&&S.set(p[x])}}mount(t){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,xU.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,r)=>this.bindToMotionValue(r,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(QT.current||_U(),this.shouldReduceMotion=Xp.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ki(this.notifyUpdate),ki(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const s=this.features[t];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),s.accelerate&&AT.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:d,times:h,ease:p,duration:y}=s.accelerate,g=new ET({element:this.current,name:t,keyframes:d,times:h,ease:p,duration:bn(y)}),v=u(g);this.valueSubscriptions.set(t,()=>{v(),g.cancel()});return}const r=za.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=s.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Fe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{o(),l&&l(),s.owner&&s.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zu){const s=zu[t];if(!s)continue;const{isEnabled:r,Feature:o}=s;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let r=0;r<gw.length;r++){const o=gw[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,u=t[l];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=wU(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(t),()=>s.variantChildren.delete(t)}addValue(t,s){const r=this.values.get(t);s!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s),this.latestValues[t]=s.get())}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&s!==void 0&&(r=Aa(s===null?void 0:s,{owner:this}),this.addValue(t,r)),r}readValue(t,s){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(F_(r)||Z_(r))?r=parseFloat(r):!bU(r)&&Fn.test(s)&&(r=UT(t,s)),this.setBaseTarget(t,Mt(r)?r.get():r)),Mt(r)?r.get():r}setBaseTarget(t,s){this.baseTarget[t]=s}getBaseTarget(t){const{initial:s}=this.props;let r;if(typeof s=="string"||typeof s=="object"){const l=rg(this.props,s,this.presenceContext?.custom);l&&(r=l[t])}if(s&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Mt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,s){return this.events[t]||(this.events[t]=new Zm),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){lg.render(this.render)}}class GT extends EU{constructor(){super(...arguments),this.KeyframeResolver=J8}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){const r=t.style;return r?r[s]:void 0}removeValueFromRenderState(t,{vars:s,style:r}){delete s[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Mt(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Ni{constructor(t){this.isMounted=!1,this.node=t}update(){}}function YT({top:e,left:t,right:s,bottom:r}){return{x:{min:t,max:s},y:{min:e,max:r}}}function CU({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function AU(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:r.y,right:r.x}}function Wh(e){return e===void 0||e===1}function Wp({scale:e,scaleX:t,scaleY:s}){return!Wh(e)||!Wh(t)||!Wh(s)}function rr(e){return Wp(e)||KT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function KT(e){return yw(e.x)||yw(e.y)}function yw(e){return e&&e!=="0%"}function Pu(e,t,s){const r=e-s,o=t*r;return s+o}function vw(e,t,s,r,o){return o!==void 0&&(e=Pu(e,o,r)),Pu(e,s,r)+t}function Jp(e,t=0,s=1,r,o){e.min=vw(e.min,t,s,r,o),e.max=vw(e.max,t,s,r,o)}function XT(e,{x:t,y:s}){Jp(e.x,t.translate,t.scale,t.originPoint),Jp(e.y,s.translate,s.scale,s.originPoint)}const bw=.999999999999,xw=1.0000000000001;function kU(e,t,s,r=!1){const o=s.length;if(!o)return;t.x=t.y=1;let l,u;for(let d=0;d<o;d++){l=s[d],u=l.projectionDelta;const{visualElement:h}=l.options;h&&h.props.style&&h.props.style.display==="contents"||(r&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(as(e.x,-l.scroll.offset.x),as(e.y,-l.scroll.offset.y)),u&&(t.x*=u.x.scale,t.y*=u.y.scale,XT(e,u)),r&&rr(l.latestValues)&&lu(e,l.latestValues,l.layout?.layoutBox))}t.x<xw&&t.x>bw&&(t.x=1),t.y<xw&&t.y>bw&&(t.y=1)}function as(e,t){e.min+=t,e.max+=t}function ww(e,t,s,r,o=.5){const l=Ye(e.min,e.max,o);Jp(e,t,s,l,r)}function Sw(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function lu(e,t,s){const r=s??e;ww(e.x,Sw(t.x,r.x),t.scaleX,t.scale,t.originX),ww(e.y,Sw(t.y,r.y),t.scaleY,t.scale,t.originY)}function WT(e,t){return YT(AU(e.getBoundingClientRect(),t))}function RU(e,t,s){const r=WT(e,s),{scroll:o}=t;return o&&(as(r.x,o.offset.x),as(r.y,o.offset.y)),r}const OU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MU=ja.length;function NU(e,t,s){let r="",o=!0;for(let l=0;l<MU;l++){const u=ja[l],d=e[u];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(u.startsWith("scale")?1:0);else{const p=parseFloat(d);h=u.startsWith("scale")?p===1:p===0}if(!h||s){const p=qT(d,og[u]);if(!h){o=!1;const y=OU[u]||u;r+=`${y}(${p}) `}s&&(t[u]=p)}}return r=r.trim(),s?r=s(t,o?"":r):o&&(r="none"),r}function hg(e,t,s){const{style:r,vars:o,transformOrigin:l}=e;let u=!1,d=!1;for(const h in t){const p=t[h];if(za.has(h)){u=!0;continue}else if(lT(h)){o[h]=p;continue}else{const y=qT(p,og[h]);h.startsWith("origin")?(d=!0,l[h]=y):r[h]=y}}if(t.transform||(u||s?r.transform=NU(t,e.transform,s):r.transform&&(r.transform="none")),d){const{originX:h="50%",originY:p="50%",originZ:y=0}=l;r.transformOrigin=`${h} ${p} ${y}`}}function JT(e,{style:t,vars:s},r,o){const l=e.style;let u;for(u in t)l[u]=t[u];o?.applyProjectionStyles(l,r);for(u in s)l.setProperty(u,s[u])}function _w(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Po={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;const s=_w(e,t.target.x),r=_w(e,t.target.y);return`${s}% ${r}%`}},DU={correct:(e,{treeScale:t,projectionDelta:s})=>{const r=e,o=Fn.parse(e);if(o.length>5)return r;const l=Fn.createTransformer(e),u=typeof o[0]!="number"?1:0,d=s.x.scale*t.x,h=s.y.scale*t.y;o[0+u]/=d,o[1+u]/=h;const p=Ye(d,h,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),l(o)}},em={borderRadius:{...Po,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Po,borderTopRightRadius:Po,borderBottomLeftRadius:Po,borderBottomRightRadius:Po,boxShadow:DU};function eE(e,{layout:t,layoutId:s}){return za.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!em[e]||e==="opacity")}function pg(e,t,s){const r=e.style,o=t?.style,l={};if(!r)return l;for(const u in r)(Mt(r[u])||o&&Mt(o[u])||eE(u,e)||s?.getValue(u)?.liveStyle!==void 0)&&(l[u]=r[u]);return l}function jU(e){return window.getComputedStyle(e)}class zU extends GT{constructor(){super(...arguments),this.type="html",this.renderInstance=JT}readValueFromInstance(t,s){if(za.has(s))return this.projection?.isProjecting?qp(s):t8(t,s);{const r=jU(t),o=(lT(s)?r.getPropertyValue(s):r[s])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:s}){return WT(t,s)}build(t,s,r){hg(t,s,r.transformTemplate)}scrapeMotionValuesFromProps(t,s,r){return pg(t,s,r)}}const PU={offset:"stroke-dashoffset",array:"stroke-dasharray"},LU={offset:"strokeDashoffset",array:"strokeDasharray"};function UU(e,t,s=1,r=0,o=!0){e.pathLength=1;const l=o?PU:LU;e[l.offset]=`${-r}`,e[l.array]=`${t} ${s}`}const VU=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tE(e,{attrX:t,attrY:s,attrScale:r,pathLength:o,pathSpacing:l=1,pathOffset:u=0,...d},h,p,y){if(hg(e,d,p),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=y?.transformBox??"fill-box",delete g.transformBox);for(const x of VU)g[x]!==void 0&&(v[x]=g[x],delete g[x]);t!==void 0&&(g.x=t),s!==void 0&&(g.y=s),r!==void 0&&(g.scale=r),o!==void 0&&UU(g,o,l,u,!1)}const nE=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),sE=e=>typeof e=="string"&&e.toLowerCase()==="svg";function qU(e,t,s,r){JT(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(nE.has(o)?o:ag(o),t.attrs[o])}function iE(e,t,s){const r=pg(e,t,s);for(const o in e)if(Mt(e[o])||Mt(t[o])){const l=ja.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[l]=e[o]}return r}class BU extends GT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,s){return t[s]}readValueFromInstance(t,s){if(za.has(s)){const r=LT(s);return r&&r.default||0}return s=nE.has(s)?s:ag(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,r){return iE(t,s,r)}build(t,s,r){tE(t,s,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,s,r,o){qU(t,s,r,o)}mount(t){this.isSVGTag=sE(t.tagName),super.mount(t)}}const IU=fg.length;function rE(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?rE(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const t={};for(let s=0;s<IU;s++){const r=fg[s],o=e.props[r];(cl(o)||o===!1)&&(t[r]=o)}return t}function aE(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let r=0;r<s;r++)if(t[r]!==e[r])return!1;return!0}const $U=[...dg].reverse(),HU=dg.length;function FU(e){return t=>Promise.all(t.map(({animation:s,options:r})=>I8(e,s,r)))}function QU(e){let t=FU(e),s=Tw(),r=!0,o=!1;const l=p=>(y,g)=>{const v=ur(e,g,p==="exit"?e.presenceContext?.custom:void 0);if(v){const{transition:x,transitionEnd:S,...E}=v;y={...y,...E,...S}}return y};function u(p){t=p(e)}function d(p){const{props:y}=e,g=rE(e.parent)||{},v=[],x=new Set;let S={},E=1/0;for(let A=0;A<HU;A++){const M=$U[A],k=s[M],D=y[M]!==void 0?y[M]:g[M],P=cl(D),B=M===p?k.isActive:null;B===!1&&(E=A);let I=D===g[M]&&D!==y[M]&&P;if(I&&(r||o)&&e.manuallyAnimateOnMount&&(I=!1),k.protectedKeys={...S},!k.isActive&&B===null||!D&&!k.prevProp||sd(D)||typeof D=="boolean")continue;if(M==="exit"&&k.isActive&&B!==!0){k.prevResolvedValues&&(S={...S,...k.prevResolvedValues});continue}const L=ZU(k.prevProp,D);let W=L||M===p&&k.isActive&&!I&&P||A>E&&P,ee=!1;const re=Array.isArray(D)?D:[D];let oe=re.reduce(l(M),{});B===!1&&(oe={});const{prevResolvedValues:me={}}=k,he={...me,...oe},fe=G=>{W=!0,x.has(G)&&(ee=!0,x.delete(G)),k.needsAnimating[G]=!0;const ie=e.getValue(G);ie&&(ie.liveStyle=!1)};for(const G in he){const ie=oe[G],X=me[G];if(S.hasOwnProperty(G))continue;let O=!1;Qp(ie)&&Qp(X)?O=!aE(ie,X):O=ie!==X,O?ie!=null?fe(G):x.add(G):ie!==void 0&&x.has(G)?fe(G):k.protectedKeys[G]=!0}k.prevProp=D,k.prevResolvedValues=oe,k.isActive&&(S={...S,...oe}),(r||o)&&e.blockInitialAnimation&&(W=!1);const j=I&&L;W&&(!j||ee)&&v.push(...re.map(G=>{const ie={type:M};if(typeof G=="string"&&(r||o)&&!j&&e.manuallyAnimateOnMount&&e.parent){const{parent:X}=e,O=ur(X,G);if(X.enteringChildren&&O){const{delayChildren:Z}=O.transition||{};ie.delay=kT(X.enteringChildren,e,Z)}}return{animation:G,options:ie}}))}if(x.size){const A={};if(typeof y.initial!="boolean"){const M=ur(e,Array.isArray(y.initial)?y.initial[0]:y.initial);M&&M.transition&&(A.transition=M.transition)}x.forEach(M=>{const k=e.getBaseTarget(M),D=e.getValue(M);D&&(D.liveStyle=!0),A[M]=k??null}),v.push({animation:A})}let C=!!v.length;return r&&(y.initial===!1||y.initial===y.animate)&&!e.manuallyAnimateOnMount&&(C=!1),r=!1,o=!1,C?t(v):Promise.resolve()}function h(p,y){if(s[p].isActive===y)return Promise.resolve();e.variantChildren?.forEach(v=>v.animationState?.setActive(p,y)),s[p].isActive=y;const g=d(p);for(const v in s)s[v].protectedKeys={};return g}return{animateChanges:d,setActive:h,setAnimateFunction:u,getState:()=>s,reset:()=>{s=Tw(),o=!0}}}function ZU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!aE(t,e):!1}function ir(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tw(){return{animate:ir(!0),whileInView:ir(),whileHover:ir(),whileTap:ir(),whileDrag:ir(),whileFocus:ir(),exit:ir()}}function tm(e,t){e.min=t.min,e.max=t.max}function Bn(e,t){tm(e.x,t.x),tm(e.y,t.y)}function Ew(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const oE=1e-4,GU=1-oE,YU=1+oE,lE=.01,KU=0-lE,XU=0+lE;function Gt(e){return e.max-e.min}function WU(e,t,s){return Math.abs(e-t)<=s}function Cw(e,t,s,r=.5){e.origin=r,e.originPoint=Ye(t.min,t.max,e.origin),e.scale=Gt(s)/Gt(t),e.translate=Ye(s.min,s.max,e.origin)-e.originPoint,(e.scale>=GU&&e.scale<=YU||isNaN(e.scale))&&(e.scale=1),(e.translate>=KU&&e.translate<=XU||isNaN(e.translate))&&(e.translate=0)}function Zo(e,t,s,r){Cw(e.x,t.x,s.x,r?r.originX:void 0),Cw(e.y,t.y,s.y,r?r.originY:void 0)}function Aw(e,t,s,r=0){const o=r?Ye(s.min,s.max,r):s.min;e.min=o+t.min,e.max=e.min+Gt(t)}function JU(e,t,s,r){Aw(e.x,t.x,s.x,r?.x),Aw(e.y,t.y,s.y,r?.y)}function kw(e,t,s,r=0){const o=r?Ye(s.min,s.max,r):s.min;e.min=t.min-o,e.max=e.min+Gt(t)}function Lu(e,t,s,r){kw(e.x,t.x,s.x,r?.x),kw(e.y,t.y,s.y,r?.y)}function Rw(e,t,s,r,o){return e-=t,e=Pu(e,1/s,r),o!==void 0&&(e=Pu(e,1/o,r)),e}function eV(e,t=0,s=1,r=.5,o,l=e,u=e){if(ds.test(t)&&(t=parseFloat(t),t=Ye(u.min,u.max,t/100)-u.min),typeof t!="number")return;let d=Ye(l.min,l.max,r);e===l&&(d-=t),e.min=Rw(e.min,t,s,d,o),e.max=Rw(e.max,t,s,d,o)}function Ow(e,t,[s,r,o],l,u){eV(e,t[s],t[r],t[o],t.scale,l,u)}const tV=["x","scaleX","originX"],nV=["y","scaleY","originY"];function Mw(e,t,s,r){Ow(e.x,t,tV,s?s.x:void 0,r?r.x:void 0),Ow(e.y,t,nV,s?s.y:void 0,r?r.y:void 0)}function Nw(e){return e.translate===0&&e.scale===1}function cE(e){return Nw(e.x)&&Nw(e.y)}function Dw(e,t){return e.min===t.min&&e.max===t.max}function sV(e,t){return Dw(e.x,t.x)&&Dw(e.y,t.y)}function jw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uE(e,t){return jw(e.x,t.x)&&jw(e.y,t.y)}function zw(e){return Gt(e.x)/Gt(e.y)}function Pw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function rs(e){return[e("x"),e("y")]}function iV(e,t,s){let r="";const o=e.x.translate/t.x,l=e.y.translate/t.y,u=s?.z||0;if((o||l||u)&&(r=`translate3d(${o}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:p,rotate:y,rotateX:g,rotateY:v,skewX:x,skewY:S}=s;p&&(r=`perspective(${p}px) ${r}`),y&&(r+=`rotate(${y}deg) `),g&&(r+=`rotateX(${g}deg) `),v&&(r+=`rotateY(${v}deg) `),x&&(r+=`skewX(${x}deg) `),S&&(r+=`skewY(${S}deg) `)}const d=e.x.scale*t.x,h=e.y.scale*t.y;return(d!==1||h!==1)&&(r+=`scale(${d}, ${h})`),r||"none"}const dE=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],rV=dE.length,Lw=e=>typeof e=="string"?parseFloat(e):e,Uw=e=>typeof e=="number"||ue.test(e);function aV(e,t,s,r,o,l){o?(e.opacity=Ye(0,s.opacity??1,oV(r)),e.opacityExit=Ye(t.opacity??1,0,lV(r))):l&&(e.opacity=Ye(t.opacity??1,s.opacity??1,r));for(let u=0;u<rV;u++){const d=dE[u];let h=Vw(t,d),p=Vw(s,d);if(h===void 0&&p===void 0)continue;h||(h=0),p||(p=0),h===0||p===0||Uw(h)===Uw(p)?(e[d]=Math.max(Ye(Lw(h),Lw(p),r),0),(ds.test(p)||ds.test(h))&&(e[d]+="%")):e[d]=p}(t.rotate||s.rotate)&&(e.rotate=Ye(t.rotate||0,s.rotate||0,r))}function Vw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const oV=fE(0,.5,nT),lV=fE(.5,.95,Dn);function fE(e,t,s){return r=>r<e?0:r>t?1:s(ol(e,t,r))}function cV(e,t,s){const r=Mt(e)?e:Aa(e);return r.start(ig("",r,t,s)),r.animation}function ul(e,t,s,r={passive:!0}){return e.addEventListener(t,s,r),()=>e.removeEventListener(t,s)}const uV=(e,t)=>e.depth-t.depth;class dV{constructor(){this.children=[],this.isDirty=!1}add(t){Fm(this.children,t),this.isDirty=!0}remove(t){Ou(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uV),this.isDirty=!1,this.children.forEach(t)}}function fV(e,t){const s=Zt.now(),r=({timestamp:o})=>{const l=o-s;l>=t&&(ki(r),e(l-t))};return Fe.setup(r,!0),()=>ki(r)}function cu(e){return Mt(e)?e.get():e}class hV{constructor(){this.members=[]}add(t){Fm(this.members,t);for(let s=this.members.length-1;s>=0;s--){const r=this.members[s];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;(!o||o.isConnected===!1)&&!r.snapshot&&(Ou(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Ou(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){for(let s=this.members.indexOf(t)-1;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(t,s){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:l}=t.options;(o===void 0||o!==l)&&(t.resumeFrom=r,s&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const uu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Jh=["","X","Y","Z"],pV=1e3;let mV=0;function ep(e,t,s,r){const{latestValues:o}=t;o[e]&&(s[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function hE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=DT(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",Fe,!(o||l))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hE(r)}function pE({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(u={},d=t?.()){this.id=mV++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vV),this.nodes.forEach(TV),this.nodes.forEach(EV),this.nodes.forEach(bV)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new dV)}addEventListener(u,d){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Zm),this.eventHandlers.get(u).add(d)}notifyListeners(u,...d){const h=this.eventHandlers.get(u);h&&h.notify(...d)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=ug(u)&&!yU(u),this.instance=u;const{layoutId:d,layout:h,visualElement:p}=this.options;if(p&&!p.current&&p.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||d)&&(this.isLayoutDirty=!0),e){let y,g=0;const v=()=>this.root.updateBlockedByResize=!1;Fe.read(()=>{g=window.innerWidth}),e(u,()=>{const x=window.innerWidth;x!==g&&(g=x,this.root.updateBlockedByResize=!0,y&&y(),y=fV(v,250),uu.hasAnimatedSinceResize&&(uu.hasAnimatedSinceResize=!1,this.nodes.forEach(Iw)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&p&&(d||h)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||p.getDefaultTransition()||OV,{onLayoutAnimationStart:E,onLayoutAnimationComplete:C}=p.getProps(),A=!this.targetLayout||!uE(this.targetLayout,x),M=!g&&v;if(this.options.layoutRoot||this.resumeFrom||M||g&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...sg(S,"layout"),onPlay:E,onComplete:C};(p.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(y,M)}else g||Iw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ki(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(CV),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const g=this.path[y];g.shouldResetTransform=!0,(typeof g.latestValues.x=="string"||typeof g.latestValues.y=="string")&&(g.isLayoutDirty=!0),g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:d,layout:h}=this.options;if(d===void 0&&!h)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(wV),this.nodes.forEach(qw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(SV),this.nodes.forEach(_V),this.nodes.forEach(gV),this.nodes.forEach(yV)):this.nodes.forEach(Bw),this.clearAllSnapshots();const d=Zt.now();Ot.delta=ps(0,1e3/60,d-Ot.timestamp),Ot.timestamp=d,Ot.isProcessing=!0,Fh.update.process(Ot),Fh.preRender.process(Ot),Fh.render.process(Ot),Ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xV),this.sharedNodes.forEach(AV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Gt(this.snapshot.measuredBox.x)&&!Gt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=yt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(d=!1),d&&this.instance){const h=r(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!o)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!cE(this.projectionDelta),h=this.getTransformTemplate(),p=h?h(this.latestValues,""):void 0,y=p!==this.prevTransformTemplateValue;u&&this.instance&&(d||rr(this.latestValues)||y)&&(o(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const d=this.measurePageBox();let h=this.removeElementScroll(d);return u&&(h=this.removeTransform(h)),MV(h),{animationId:this.root.animationId,measuredBox:d,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:u}=this.options;if(!u)return yt();const d=u.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(NV))){const{scroll:p}=this.root;p&&(as(d.x,p.offset.x),as(d.y,p.offset.y))}return d}removeElementScroll(u){const d=yt();if(Bn(d,u),this.scroll?.wasRoot)return d;for(let h=0;h<this.path.length;h++){const p=this.path[h],{scroll:y,options:g}=p;p!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&Bn(d,u),as(d.x,y.offset.x),as(d.y,y.offset.y))}return d}applyTransform(u,d=!1,h){const p=h||yt();Bn(p,u);for(let y=0;y<this.path.length;y++){const g=this.path[y];!d&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(as(p.x,-g.scroll.offset.x),as(p.y,-g.scroll.offset.y)),rr(g.latestValues)&&lu(p,g.latestValues,g.layout?.layoutBox)}return rr(this.latestValues)&&lu(p,this.latestValues,this.layout?.layoutBox),p}removeTransform(u){const d=yt();Bn(d,u);for(let h=0;h<this.path.length;h++){const p=this.path[h];if(!rr(p.latestValues))continue;let y;p.instance&&(Wp(p.latestValues)&&p.updateSnapshot(),y=yt(),Bn(y,p.measurePageBox())),Mw(d,p.latestValues,p.snapshot?.layoutBox,y)}return rr(this.latestValues)&&Mw(d,this.latestValues),d}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==d;if(!(u||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:g}=this.options;if(!this.layout||!(y||g))return;this.resolvedRelativeTargetAt=Ot.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JU(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Bn(this.target,this.layout.layoutBox),XT(this.target,this.targetDelta)):Bn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Wp(this.parent.latestValues)||KT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,d,h){this.relativeParent=u,this.linkedParentVersion=u.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Lu(this.relativeTargetOrigin,d,h,this.options.layoutAnchor||void 0),Bn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const u=this.getLead(),d=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Ot.timestamp&&(h=!1),h)return;const{layout:p,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||y))return;Bn(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;kU(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=yt());const{target:x}=u;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ew(this.prevProjectionDelta.x,this.projectionDelta.x),Ew(this.prevProjectionDelta.y,this.projectionDelta.y)),Zo(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!Pw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Pw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){if(this.options.visualElement?.scheduleRender(),u){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ya(),this.projectionDelta=ya(),this.projectionDeltaWithTransform=ya()}setAnimationOrigin(u,d=!1){const h=this.snapshot,p=h?h.latestValues:{},y={...this.latestValues},g=ya();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const v=yt(),x=h?h.source:void 0,S=this.layout?this.layout.source:void 0,E=x!==S,C=this.getStack(),A=!C||C.members.length<=1,M=!!(E&&!A&&this.options.crossfade===!0&&!this.path.some(RV));this.animationProgress=0;let k;this.mixTargetDelta=D=>{const P=D/1e3;$w(g.x,u.x,P),$w(g.y,u.y,P),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lu(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),kV(this.relativeTarget,this.relativeTargetOrigin,v,P),k&&sV(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=yt()),Bn(k,this.relativeTarget)),E&&(this.animationValues=y,aV(y,p,this.latestValues,P,M,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ki(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Fe.update(()=>{uu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Aa(0)),this.motionValue.jump(0,!1),this.currentAnimation=cV(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onStop:()=>{},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pV),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:h,layout:p,latestValues:y}=u;if(!(!d||!h||!p)){if(this!==u&&this.layout&&p&&mE(this.options.animationType,this.layout.layoutBox,p.layoutBox)){h=this.target||yt();const g=Gt(this.layout.layoutBox.x);h.x.min=u.target.x.min,h.x.max=h.x.min+g;const v=Gt(this.layout.layoutBox.y);h.y.min=u.target.y.min,h.y.max=h.y.min+v}Bn(d,h),lu(d,y),Zo(this.projectionDeltaWithTransform,this.layoutCorrected,d,y)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new hV),this.sharedNodes.get(u).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:h}={}){const p=this.getStack();p&&p.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(d=!0),!d)return;const p={};h.z&&ep("z",u,p,this.animationValues);for(let y=0;y<Jh.length;y++)ep(`rotate${Jh[y]}`,u,p,this.animationValues),ep(`skew${Jh[y]}`,u,p,this.animationValues);u.render();for(const y in p)u.setStaticValue(y,p[y]),this.animationValues&&(this.animationValues[y]=p[y]);u.scheduleRender()}applyProjectionStyles(u,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=cu(d?.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=cu(d?.pointerEvents)||""),this.hasProjected&&!rr(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=p.animationValues||p.latestValues;this.applyTransformsToTarget();let g=iV(this.projectionDeltaWithTransform,this.treeScale,y);h&&(g=h(y,g)),u.transform=g;const{x:v,y:x}=this.projectionDelta;u.transformOrigin=`${v.origin*100}% ${x.origin*100}% 0`,p.animationValues?u.opacity=p===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:u.opacity=p===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const S in em){if(y[S]===void 0)continue;const{correct:E,applyTo:C,isCSSVariable:A}=em[S],M=g==="none"?y[S]:E(y[S],p);if(C){const k=C.length;for(let D=0;D<k;D++)u[C[D]]=M}else A?this.options.visualElement.renderState.vars[S]=M:u[S]=M}this.options.layoutId&&(u.pointerEvents=p===this?cu(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>u.currentAnimation?.stop()),this.root.nodes.forEach(qw),this.root.sharedNodes.clear()}}}function gV(e){e.updateLayout()}function yV(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:r}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;if(o==="size")rs(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=Gt(g);g.min=s[y].min,g.max=g.min+v});else if(o==="x"||o==="y"){const y=o==="x"?"y":"x";tm(l?t.measuredBox[y]:t.layoutBox[y],s[y])}else mE(o,t.layoutBox,s)&&rs(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=Gt(s[y]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+v)});const u=ya();Zo(u,s,t.layoutBox);const d=ya();l?Zo(d,e.applyTransform(r,!0),t.measuredBox):Zo(d,s,t.layoutBox);const h=!cE(u);let p=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:v}=y;if(g&&v){const x=e.options.layoutAnchor||void 0,S=yt();Lu(S,t.layoutBox,g.layoutBox,x);const E=yt();Lu(E,s,v.layoutBox,x),uE(S,E)||(p=!0),y.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=S,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:p})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function vV(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function bV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xV(e){e.clearSnapshot()}function qw(e){e.clearMeasurements()}function wV(e){e.isLayoutDirty=!0,e.updateLayout()}function Bw(e){e.isLayoutDirty=!1}function SV(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function _V(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Iw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function TV(e){e.resolveTargetDelta()}function EV(e){e.calcProjection()}
vendor: 12,757 bytes, lines 50-58
50function CV(e){e.resetSkewAndRotation()}function AV(e){e.removeLeadSnapshot()}function $w(e,t,s){e.translate=Ye(t.translate,0,s),e.scale=Ye(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function Hw(e,t,s,r){e.min=Ye(t.min,s.min,r),e.max=Ye(t.max,s.max,r)}function kV(e,t,s,r){Hw(e.x,t.x,s.x,r),Hw(e.y,t.y,s.y,r)}function RV(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const OV={duration:.45,ease:[.4,0,.1,1]},Fw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Qw=Fw("applewebkit/")&&!Fw("chrome/")?Math.round:Dn;function Zw(e){e.min=Qw(e.min),e.max=Qw(e.max)}function MV(e){Zw(e.x),Zw(e.y)}function mE(e,t,s){return e==="position"||e==="preserve-aspect"&&!WU(zw(t),zw(s),.2)}function NV(e){return e!==e.root&&e.scroll?.wasRoot}const DV=pE({attachResizeListener:(e,t)=>ul(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),tp={current:void 0},gE=pE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!tp.current){const e=new DV({});e.mount(window),e.setOptions({layoutScroll:!0}),tp.current=e}return tp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),mg=_.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Gw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jV(...e){return t=>{let s=!1;const r=e.map(o=>{const l=Gw(o,t);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let o=0;o<r.length;o++){const l=r[o];typeof l=="function"?l():Gw(e[o],null)}}}}function zV(...e){return _.useCallback(jV(...e),e)}class PV extends _.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(su(s)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=s.offsetParent,o=su(r)&&r.offsetWidth||0,l=su(r)&&r.offsetHeight||0,u=getComputedStyle(s),d=this.props.sizeRef.current;d.height=parseFloat(u.height),d.width=parseFloat(u.width),d.top=s.offsetTop,d.left=s.offsetLeft,d.right=o-d.width-d.left,d.bottom=l-d.height-d.top}return null}componentDidUpdate(){}render(){return this.props.children}}function LV({children:e,isPresent:t,anchorX:s,anchorY:r,root:o,pop:l}){const u=_.useId(),d=_.useRef(null),h=_.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:p}=_.useContext(mg),y=e.props?.ref??e?.ref,g=zV(d,y);return _.useInsertionEffect(()=>{const{width:v,height:x,top:S,left:E,right:C,bottom:A}=h.current;if(t||l===!1||!d.current||!v||!x)return;const M=s==="left"?`left: ${E}`:`right: ${C}`,k=r==="bottom"?`bottom: ${A}`:`top: ${S}`;d.current.dataset.motionPopId=u;const D=document.createElement("style");p&&(D.nonce=p);const P=o??document.head;return P.appendChild(D),D.sheet&&D.sheet.insertRule(`
51          [data-motion-pop-id="${u}"] {
52            position: absolute !important;
53            width: ${v}px !important;
54            height: ${x}px !important;
55            ${M}px !important;
56            ${k}px !important;
57          }
58        `),()=>{d.current?.removeAttribute("data-motion-pop-id"),P.contains(D)&&P.removeChild(D)}},[t]),w.jsx(PV,{isPresent:t,childRef:d,sizeRef:h,pop:l,children:l===!1?e:_.cloneElement(e,{ref:g})})}const UV=({children:e,initial:t,isPresent:s,onExitComplete:r,custom:o,presenceAffectsLayout:l,mode:u,anchorX:d,anchorY:h,root:p})=>{const y=Hm(VV),g=_.useId();let v=!0,x=_.useMemo(()=>(v=!1,{id:g,initial:t,isPresent:s,custom:o,onExitComplete:S=>{y.set(S,!0);for(const E of y.values())if(!E)return;r&&r()},register:S=>(y.set(S,!1),()=>y.delete(S))}),[s,y,r]);return l&&v&&(x={...x}),_.useMemo(()=>{y.forEach((S,E)=>y.set(E,!1))},[s]),_.useEffect(()=>{!s&&!y.size&&r&&r()},[s]),e=w.jsx(LV,{pop:u==="popLayout",isPresent:s,anchorX:d,anchorY:h,root:p,children:e}),w.jsx(td.Provider,{value:x,children:e})};function VV(){return new Map}function yE(e=!0){const t=_.useContext(td);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:r,register:o}=t,l=_.useId();_.useEffect(()=>{if(e)return o(l)},[e]);const u=_.useCallback(()=>e&&r&&r(l),[l,r,e]);return!s&&r?[!1,u]:[!0]}const Zc=e=>e.key||"";function Yw(e){const t=[];return _.Children.forEach(e,s=>{_.isValidElement(s)&&t.push(s)}),t}const Ut=({children:e,custom:t,initial:s=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:l="sync",propagate:u=!1,anchorX:d="left",anchorY:h="top",root:p})=>{const[y,g]=yE(u),v=_.useMemo(()=>Yw(e),[e]),x=u&&!y?[]:v.map(Zc),S=_.useRef(!0),E=_.useRef(v),C=Hm(()=>new Map),A=_.useRef(new Set),[M,k]=_.useState(v),[D,P]=_.useState(v);H_(()=>{S.current=!1,E.current=v;for(let L=0;L<D.length;L++){const W=Zc(D[L]);x.includes(W)?(C.delete(W),A.current.delete(W)):C.get(W)!==!0&&C.set(W,!1)}},[D,x.length,x.join("-")]);const B=[];if(v!==M){let L=[...v];for(let W=0;W<D.length;W++){const ee=D[W],re=Zc(ee);x.includes(re)||(L.splice(W,0,ee),B.push(ee))}return l==="wait"&&B.length&&(L=B),P(Yw(L)),k(v),null}const{forceRender:I}=_.useContext($m);return w.jsx(w.Fragment,{children:D.map(L=>{const W=Zc(L),ee=u&&!y?!1:v===D||x.includes(W),re=()=>{if(A.current.has(W))return;if(C.has(W))A.current.add(W),C.set(W,!0);else return;let oe=!0;C.forEach(me=>{me||(oe=!1)}),oe&&(I?.(),P(E.current),u&&g?.(),r&&r())};return w.jsx(UV,{isPresent:ee,initial:!S.current||s?void 0:!1,custom:t,presenceAffectsLayout:o,mode:l,root:p,onExitComplete:ee?void 0:re,anchorX:d,anchorY:h,children:L},W)})})},vE=_.createContext({strict:!1}),Kw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Xw=!1;function qV(){if(Xw)return;const e={};for(const t in Kw)e[t]={isEnabled:s=>Kw[t].some(r=>!!s[r])};ZT(e),Xw=!0}function bE(){return qV(),TU()}function BV(e){const t=bE();for(const s in e)t[s]={...t[s],...e[s]};ZT(t)}const IV=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Uu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||IV.has(e)}let xE=e=>!Uu(e);function $V(e){typeof e=="function"&&(xE=t=>t.startsWith("on")?!Uu(t):e(t))}try{$V(require("@emotion/is-prop-valid").default)}catch{}function HV(e,t,s){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||Mt(e[o])||(xE(o)||s===!0&&Uu(o)||!t&&!Uu(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const rd=_.createContext({});function FV(e,t){if(id(e)){const{initial:s,animate:r}=e;return{initial:s===!1||cl(s)?s:void 0,animate:cl(r)?r:void 0}}return e.inherit!==!1?t:{}}function QV(e){const{initial:t,animate:s}=FV(e,_.useContext(rd));return _.useMemo(()=>({initial:t,animate:s}),[Ww(t),Ww(s)])}function Ww(e){return Array.isArray(e)?e.join(" "):e}const gg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wE(e,t,s){for(const r in t)!Mt(t[r])&&!eE(r,s)&&(e[r]=t[r])}function ZV({transformTemplate:e},t){return _.useMemo(()=>{const s=gg();return hg(s,t,e),Object.assign({},s.vars,s.style)},[t])}function GV(e,t){const s=e.style||{},r={};return wE(r,s,e),Object.assign(r,ZV(e,t)),r}function YV(e,t){const s={},r=GV(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=r,s}const SE=()=>({...gg(),attrs:{}});function KV(e,t,s,r){const o=_.useMemo(()=>{const l=SE();return tE(l,t,sE(r),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};wE(l,e.style,e),o.style={...l,...o.style}}return o}const XV=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yg(e){return typeof e!="string"||e.includes("-")?!1:!!(XV.indexOf(e)>-1||/[A-Z]/u.test(e))}function WV(e,t,s,{latestValues:r},o,l=!1,u){const h=(u??yg(e)?KV:YV)(t,r,o,e),p=HV(t,typeof e=="string",l),y=e!==_.Fragment?{...p,...h,ref:s}:{},{children:g}=t,v=_.useMemo(()=>Mt(g)?g.get():g,[g]);return _.createElement(e,{...y,children:v})}function JV({scrapeMotionValuesFromProps:e,createRenderState:t},s,r,o){return{latestValues:eq(s,r,o,e),renderState:t()}}function eq(e,t,s,r){const o={},l=r(e,{});for(const v in l)o[v]=cu(l[v]);let{initial:u,animate:d}=e;const h=id(e),p=FT(e);t&&p&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let y=s?s.initial===!1:!1;y=y||u===!1;const g=y?d:u;if(g&&typeof g!="boolean"&&!sd(g)){const v=Array.isArray(g)?g:[g];for(let x=0;x<v.length;x++){const S=rg(e,v[x]);if(S){const{transitionEnd:E,transition:C,...A}=S;for(const M in A){let k=A[M];if(Array.isArray(k)){const D=y?k.length-1:0;k=k[D]}k!==null&&(o[M]=k)}for(const M in E)o[M]=E[M]}}}return o}const _E=e=>(t,s)=>{const r=_.useContext(rd),o=_.useContext(td),l=()=>JV(e,t,r,o);return s?l():Hm(l)},tq=_E({scrapeMotionValuesFromProps:pg,createRenderState:gg}),nq=_E({scrapeMotionValuesFromProps:iE,createRenderState:SE}),sq=Symbol.for("motionComponentSymbol");function iq(e,t,s){const r=_.useRef(s);_.useInsertionEffect(()=>{r.current=s});const o=_.useRef(null);return _.useCallback(l=>{l&&e.onMount?.(l);const u=r.current;if(typeof u=="function")if(l){const d=u(l);typeof d=="function"&&(o.current=d)}else o.current?(o.current(),o.current=null):u(l);else u&&(u.current=l);t&&(l?t.mount(l):t.unmount())},[t])}const TE=_.createContext({});function fa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function rq(e,t,s,r,o,l){const{visualElement:u}=_.useContext(rd),d=_.useContext(vE),h=_.useContext(td),p=_.useContext(mg),y=p.reducedMotion,g=p.skipAnimations,v=_.useRef(null),x=_.useRef(!1);r=r||d.renderer,!v.current&&r&&(v.current=r(e,{visualState:t,parent:u,props:s,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:y,skipAnimations:g,isSVG:l}),x.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const S=v.current,E=_.useContext(TE);S&&!S.projection&&o&&(S.type==="html"||S.type==="svg")&&aq(v.current,s,o,E);const C=_.useRef(!1);_.useInsertionEffect(()=>{S&&C.current&&S.update(s,h)});const A=s[NT],M=_.useRef(!!A&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return H_(()=>{x.current=!0,S&&(C.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),M.current&&S.animationState&&S.animationState.animateChanges())}),_.useEffect(()=>{S&&(!M.current&&S.animationState&&S.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),M.current=!1),S.enteringChildren=void 0)}),S}function aq(e,t,s,r){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:h,layoutRoot:p,layoutAnchor:y,layoutCrossfade:g}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:EE(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&fa(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:r,crossfade:g,layoutScroll:h,layoutRoot:p,layoutAnchor:y})}function EE(e){if(e)return e.options.allowProjection!==!1?e.projection:EE(e.parent)}function np(e,{forwardMotionProps:t=!1,type:s}={},r,o){r&&BV(r);const l=s?s==="svg":yg(e),u=l?nq:tq;function d(p,y){let g;const v={..._.useContext(mg),...p,layoutId:oq(p)},{isStatic:x}=v,S=QV(p),E=u(p,x);if(!x&&typeof window<"u"){lq();const C=cq(v);g=C.MeasureLayout,S.visualElement=rq(e,E,v,o,C.ProjectionNode,l)}return w.jsxs(rd.Provider,{value:S,children:[g&&S.visualElement?w.jsx(g,{visualElement:S.visualElement,...v}):null,WV(e,p,iq(E,S.visualElement,y),E,x,t,l)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=_.forwardRef(d);return h[sq]=e,h}function oq({layoutId:e}){const t=_.useContext($m).id;return t&&e!==void 0?t+"-"+e:e}
vendor: 18,380 bytes, line 58
58function lq(e,t){_.useContext(vE).strict}function cq(e){const t=bE(),{drag:s,layout:r}=t;if(!s&&!r)return{};const o={...s,...r};return{MeasureLayout:s?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function uq(e,t){if(typeof Proxy>"u")return np;const s=new Map,r=(l,u)=>np(l,u,e,t),o=(l,u)=>r(l,u);return new Proxy(o,{get:(l,u)=>u==="create"?r:(s.has(u)||s.set(u,np(u,void 0,e,t)),s.get(u))})}const dq=(e,t)=>t.isSVG??yg(e)?new BU(t):new zU(t,{allowProjection:e!==_.Fragment});class fq extends Ni{constructor(t){super(t),t.animationState||(t.animationState=QU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();sd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let hq=0;class pq extends Ni{constructor(){super(...arguments),this.id=hq++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:s}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:l,custom:u}=this.node.getProps();if(typeof l=="string"){const d=ur(this.node,l,u);if(d){const{transition:h,transitionEnd:p,...y}=d;for(const g in y)this.node.getValue(g)?.jump(y[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);s&&!t&&o.then(()=>{this.isExitComplete=!0,s(this.id)})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mq={animation:{Feature:fq},exit:{Feature:pq}};function vl(e){return{point:{x:e.pageX,y:e.pageY}}}const gq=e=>t=>cg(t)&&e(t,vl(t));function Go(e,t,s,r){return ul(e,t,gq(s),r)}const CE=({current:e})=>e?e.ownerDocument.defaultView:null,Jw=(e,t)=>Math.abs(e-t);function yq(e,t){const s=Jw(e.x,t.x),r=Jw(e.y,t.y);return Math.sqrt(s**2+r**2)}const e1=new Set(["auto","scroll"]);class AE{constructor(t,s,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3,element:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=x=>{this.handleScroll(x.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Gc(this.lastRawMoveEventInfo,this.transformPagePoint));const x=sp(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,E=yq(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!E)return;const{point:C}=x,{timestamp:A}=Ot;this.history.push({...C,timestamp:A});const{onStart:M,onMove:k}=this.handlers;S||(M&&M(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,x)},this.handlePointerMove=(x,S)=>{this.lastMoveEvent=x,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=Gc(S,this.transformPagePoint),Fe.update(this.updatePoint,!0)},this.handlePointerUp=(x,S)=>{this.end();const{onEnd:E,onSessionEnd:C,resumeAnimation:A}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=sp(x.type==="pointercancel"?this.lastMoveEventInfo:Gc(S,this.transformPagePoint),this.history);this.startEvent&&E&&E(x,M),C&&C(x,M)},!cg(t))return;this.dragSnapToOrigin=l,this.handlers=s,this.transformPagePoint=r,this.distanceThreshold=u,this.contextWindow=o||window;const h=vl(t),p=Gc(h,this.transformPagePoint),{point:y}=p,{timestamp:g}=Ot;this.history=[{...y,timestamp:g}];const{onSessionStart:v}=s;v&&v(t,sp(p,this.history)),this.removeListeners=ml(Go(this.contextWindow,"pointermove",this.handlePointerMove),Go(this.contextWindow,"pointerup",this.handlePointerUp),Go(this.contextWindow,"pointercancel",this.handlePointerUp)),d&&this.startScrollTracking(d)}startScrollTracking(t){let s=t.parentElement;for(;s;){const r=getComputedStyle(s);(e1.has(r.overflowX)||e1.has(r.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:o.x-s.x,y:o.y-s.y};l.x===0&&l.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,o),Fe.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ki(this.updatePoint)}}function Gc(e,t){return t?{point:t(e.point)}:e}function t1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sp({point:e},t){return{point:e,delta:t1(e,kE(t)),offset:t1(e,vq(t)),velocity:bq(t,.1)}}function vq(e){return e[0]}function kE(e){return e[e.length-1]}function bq(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,r=null;const o=kE(e);for(;s>=0&&(r=e[s],!(o.timestamp-r.timestamp>bn(t)));)s--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>bn(t)*2&&(r=e[1]);const l=Nn(o.timestamp-r.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-r.x)/l,y:(o.y-r.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function xq(e,{min:t,max:s},r){return t!==void 0&&e<t?e=r?Ye(t,e,r.min):Math.max(e,t):s!==void 0&&e>s&&(e=r?Ye(s,e,r.max):Math.min(e,s)),e}function n1(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function wq(e,{top:t,left:s,bottom:r,right:o}){return{x:n1(e.x,s,o),y:n1(e.y,t,r)}}function s1(e,t){let s=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,r]=[r,s]),{min:s,max:r}}function Sq(e,t){return{x:s1(e.x,t.x),y:s1(e.y,t.y)}}function _q(e,t){let s=.5;const r=Gt(e),o=Gt(t);return o>r?s=ol(t.min,t.max-r,e.min):r>o&&(s=ol(e.min,e.max-o,t.min)),ps(0,1,s)}function Tq(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const nm=.35;function Eq(e=nm){return e===!1?e=0:e===!0&&(e=nm),{x:i1(e,"left","right"),y:i1(e,"top","bottom")}}function i1(e,t,s){return{min:r1(e,t),max:r1(e,s)}}function r1(e,t){return typeof e=="number"?e:e[t]||0}const Cq=new WeakMap;class Aq{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=g=>{s&&this.snapToCursor(vl(g).point),this.stopAnimation()},u=(g,v)=>{const{drag:x,dragPropagation:S,onDragStart:E}=this.getProps();if(x&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=eU(x),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rs(A=>{let M=this.getAxisMotionValue(A).get()||0;if(ds.test(M)){const{projection:k}=this.visualElement;if(k&&k.layout){const D=k.layout.layoutBox[A];D&&(M=Gt(D)*(parseFloat(M)/100))}}this.originPoint[A]=M}),E&&Fe.update(()=>E(g,v),!1,!0),Zp(this.visualElement,"transform");const{animationState:C}=this.visualElement;C&&C.setActive("whileDrag",!0)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:x,dragDirectionLock:S,onDirectionLock:E,onDrag:C}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:A}=v;if(S&&this.currentDirection===null){this.currentDirection=Rq(A),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",v.point,A),this.updateAxis("y",v.point,A),this.visualElement.render(),C&&Fe.update(()=>C(g,v),!1,!0)},h=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new AE(t,{onSessionStart:l,onStart:u,onMove:d,onSessionEnd:h,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:r,contextWindow:CE(this.visualElement),element:this.visualElement.current})}stop(t,s){const r=t||this.latestPointerEvent,o=s||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!r)return;const{velocity:u}=o;this.startAnimation(u);const{onDragEnd:d}=this.getProps();d&&Fe.postRender(()=>d(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,r){const{drag:o}=this.getProps();if(!r||!Yc(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(u=xq(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){const{dragConstraints:t,dragElastic:s}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&fa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=wq(r.layoutBox,t):this.constraints=!1,this.elastic=Eq(s),o!==this.constraints&&!fa(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&rs(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=Tq(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!fa(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=RU(r,o.root,this.visualElement.getTransformPagePoint());let u=Sq(o.layout.layoutBox,l);if(s){const d=s(CU(u));this.hasMutatedConstraints=!!d,d&&(u=YT(d))}return u}startAnimation(t){const{drag:s,dragMomentum:r,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),h=this.constraints||{},p=rs(y=>{if(!Yc(y,s,this.currentDirection))return;let g=h&&h[y]||{};(u===!0||u===y)&&(g={min:0,max:0});const v=o?200:1e6,x=o?40:1e7,S={type:"inertia",velocity:r?t[y]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...l,...g};return this.startAxisValueAnimation(y,S)});return Promise.all(p).then(d)}startAxisValueAnimation(t,s){const r=this.getAxisMotionValue(t);return Zp(this.visualElement,t),r.start(ig(t,r,0,s,this.visualElement,!1))}stopAnimation(){rs(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[s];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rs(s=>{const{drag:r}=this.getProps();if(!Yc(s,r,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(s);if(o&&o.layout){const{min:u,max:d}=o.layout.layoutBox[s],h=l.get()||0;l.set(t[s]-Ye(u,d,.5)+h)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:r}=this.visualElement;if(!fa(s)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};rs(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const h=d.get();o[u]=_q({min:h,max:h},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),rs(u=>{if(!Yc(u,t,null))return;const d=this.getAxisMotionValue(u),{min:h,max:p}=this.constraints[u];d.set(Ye(h,p,o[u]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Cq.set(this.visualElement,this);const t=this.visualElement.current,s=Go(t,"pointerdown",p=>{const{drag:y,dragListener:g=!0}=this.getProps(),v=p.target,x=v!==t&&aU(v);y&&g&&!x&&this.start(p)});let r;const o=()=>{const{dragConstraints:p}=this.getProps();fa(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),r||(r=kq(t,p.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,u=l.addEventListener("measure",o);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Fe.read(o);const d=ul(window,"resize",()=>this.scalePositionWithinConstraints()),h=l.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:y})=>{this.isDragging&&y&&(rs(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=p[g].translate,v.set(v.get()+p[g].translate))}),this.visualElement.render())}));return()=>{d(),s(),u(),h&&h(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=nm,dragMomentum:d=!0}=t;return{...t,drag:s,dragDirectionLock:r,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function a1(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function kq(e,t,s){const r=hw(e,a1(s)),o=hw(t,a1(s));return()=>{r(),o()}}function Yc(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function Rq(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class Oq extends Ni{constructor(t){super(t),this.removeGroupControls=Dn,this.removeListeners=Dn,this.controls=new Aq(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ip=e=>(t,s)=>{e&&Fe.update(()=>e(t,s),!1,!0)};class Mq extends Ni{constructor(){super(...arguments),this.removePointerDownListener=Dn}onPointerDown(t){this.session=new AE(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:CE(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ip(t),onStart:ip(s),onMove:ip(r),onEnd:(l,u)=>{delete this.session,o&&Fe.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=Go(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let rp=!1;class Nq extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:r,layoutId:o}=this.props,{projection:l}=t;l&&(s.group&&s.group.add(l),r&&r.register&&o&&r.register(l),rp&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),uu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:r,drag:o,isPresent:l}=this.props,{projection:u}=r;return u&&(u.isPresent=l,t.layoutDependency!==s&&u.setOptions({...u.options,layoutDependency:s}),rp=!0,o||t.layoutDependency!==s||s===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||Fe.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:s}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=s,r.root.didUpdate(),lg.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:r}=this.props,{projection:o}=t;rp=!0,o&&(o.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function RE(e){const[t,s]=yE(),r=_.useContext($m);return w.jsx(Nq,{...e,layoutGroup:r,switchLayoutGroup:_.useContext(TE),isPresent:t,safeToRemove:s})}const Dq={pan:{Feature:Mq},drag:{Feature:Oq,ProjectionNode:gE,MeasureLayout:RE}};function o1(e,t,s){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",s==="Start");const o="onHover"+s,l=r[o];l&&Fe.postRender(()=>l(t,vl(t)))}class jq extends Ni{mount(){const{current:t}=this.node;t&&(this.unmount=nU(t,(s,r)=>(o1(this.node,r,"Start"),o=>o1(this.node,o,"End"))))}unmount(){}}class zq extends Ni{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ml(ul(this.node.current,"focus",()=>this.onFocus()),ul(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function l1(e,t,s){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",s==="Start");
58const o="onTap"+(s==="End"?"":s),l=r[o];l&&Fe.postRender(()=>l(t,vl(t)))}class Pq extends Ni{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:s,propagate:r}=this.node.props;this.unmount=lU(t,(o,l)=>(l1(this.node,l,"Start"),(u,{success:d})=>l1(this.node,u,d?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:r?.tap===!1})}unmount(){}}const sm=new WeakMap,ap=new WeakMap,Lq=e=>{const t=sm.get(e.target);t&&t(e)},Uq=e=>{e.forEach(Lq)};function Vq({root:e,...t}){const s=e||document;ap.has(s)||ap.set(s,{});const r=ap.get(s),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Uq,{root:e,...t})),r[o]}function qq(e,t,s){const r=Vq(t);return sm.set(e,s),r.observe(e),()=>{sm.delete(e),r.unobserve(e)}}const Bq={some:0,all:1};class Iq extends Ni{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:s,margin:r,amount:o="some",once:l}=t,u={root:s?s.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Bq[o]},d=h=>{const{isIntersecting:p}=h;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:y,onViewportLeave:g}=this.node.getProps(),v=p?y:g;v&&v(h)};this.stopObserver=qq(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some($q(t,s))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function $q({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const Hq={inView:{Feature:Iq},tap:{Feature:Pq},focus:{Feature:zq},hover:{Feature:jq}},Fq={layout:{ProjectionNode:gE,MeasureLayout:RE}},Qq={...mq,...Hq,...Dq,...Fq},Ce=uq(Qq,dq),Zq=[{icon:I_,title:"Clean Shot Engine",description:"One-click deblur and sharpening via latent diffusion models. ESRGAN-powered restoration that eliminates noise without uncanny valley artifacts.",badge:"AI-Powered"},{icon:dP,title:"Context-Aware Background Swap",description:"Pixel-perfect subject masking — hair strands, clothing textures, fine edges. Replace backgrounds with prompts or from our curated template library.",badge:"Precision Masking"},{icon:B_,title:"Identity Lock",description:"A strict pipeline constraint ensuring facial features, body proportions, and skin textures remain untouched during every generation pass.",badge:"Zero Distortion"},{icon:Ea,title:"Global Illumination",description:"Automatically blends ambient light from newly generated backgrounds onto the subject — so they never look 'pasted on'.",badge:"Photorealistic"}],Gq=[{name:"Golden Hour Studio",tags:["Warm tones","Soft bokeh"],color:"from-amber-900/60 to-orange-900/40",img:"https://images.unsplash.com/photo-1771072426488-87e6bbcc0cf7?w=400&q=80"},{name:"Nordic Minimalist",tags:["Cool whites","Crisp edges"],color:"from-slate-800/60 to-blue-900/40",img:"https://images.unsplash.com/photo-1768818653161-0ad28dede131?w=400&q=80"},{name:"Industrial Loft",tags:["Dramatic shadows","Cinematic"],color:"from-zinc-900/60 to-neutral-800/40",img:"https://images.unsplash.com/photo-1772987273687-4866382c146f?w=400&q=80"}],Yq=[{value:"100%",label:"Facial Integrity"},{value:"0.8s",label:"Avg. Process Time"},{value:"40+",label:"Background Templates"},{value:"8K",label:"Max Output Resolution"}];function Kq(){const e=qu();return w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:78:4","data-hercules-name":"div",className:"min-h-screen bg-background text-foreground overflow-x-hidden",children:[w.jsxs("nav",{"data-hercules-id":"src/pages/Index.tsx:80:6","data-hercules-name":"nav",className:"fixed top-0 left-0 right-0 z-50 flex items-center justify-between px-6 md:px-12 py-4 bg-background/80 backdrop-blur-xl border-b border-border",children:[w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:81:8","data-hercules-name":"div",className:"flex items-center gap-2",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:82:10","data-hercules-name":"div",className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:w.jsx(Dp,{"data-hercules-id":"src/pages/Index.tsx:83:12","data-hercules-name":"Camera",className:"w-4 h-4 text-primary-foreground"})}),w.jsx("span",{"data-hercules-id":"src/pages/Index.tsx:85:10","data-hercules-name":"span",className:"font-serif text-lg font-bold tracking-wide",children:"Luminary"}),w.jsx("span",{"data-hercules-id":"src/pages/Index.tsx:88:10","data-hercules-name":"span",className:"text-muted-foreground text-sm font-light hidden sm:block",children:"AI Studio"})]}),w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:92:8","data-hercules-name":"div",className:"hidden md:flex items-center gap-8 text-sm text-muted-foreground",children:[w.jsx("a",{"data-hercules-id":"src/pages/Index.tsx:93:10","data-hercules-name":"a",href:"#features",className:"hover:text-foreground transition-colors cursor-pointer",children:"Features"}),w.jsx("a",{"data-hercules-id":"src/pages/Index.tsx:94:10","data-hercules-name":"a",href:"#templates",className:"hover:text-foreground transition-colors cursor-pointer",children:"Templates"}),w.jsx("a",{"data-hercules-id":"src/pages/Index.tsx:95:10","data-hercules-name":"a",href:"#workflow",className:"hover:text-foreground transition-colors cursor-pointer",children:"Workflow"})]}),w.jsxs(Qt,{"data-hercules-id":"src/pages/Index.tsx:97:8","data-hercules-name":"Button",size:"sm",className:"cursor-pointer",onClick:()=>e("/studio"),children:["Open Studio ",w.jsx(Hh,{"data-hercules-id":"src/pages/Index.tsx:102:22","data-hercules-name":"ArrowRight",className:"w-3 h-3 ml-1"})]})]}),w.jsxs("section",{"data-hercules-id":"src/pages/Index.tsx:107:6","data-hercules-name":"section",className:"relative min-h-screen flex items-center justify-center pt-20 overflow-hidden",children:[w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:109:8","data-hercules-name":"div",className:"absolute inset-0",children:[w.jsx("img",{"data-hercules-id":"src/pages/Index.tsx:110:10","data-hercules-name":"img",src:"https://hercules-cdn.com/file_lrYOJ57aUUDvK6OaoGB38wGc",alt:"Studio atmosphere",className:"w-full h-full object-cover opacity-30"}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:115:10","data-hercules-name":"div",className:"absolute inset-0 bg-gradient-to-b from-background/40 via-background/60 to-background"}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:117:10","data-hercules-name":"div",className:"absolute inset-0 opacity-20",style:{background:"radial-gradient(ellipse 60% 40% at 50% 30%, oklch(0.75 0.15 65 / 0.4), transparent 70%)"}})]}),w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:126:8","data-hercules-name":"div",className:"relative z-10 text-center px-6 max-w-5xl mx-auto",children:[w.jsx(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:127:10","data-hercules-name":"motion.div",initial:{opacity:0,y:20}
58,animate:{opacity:1,y:0},transition:{duration:.6},children:w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:132:12","data-hercules-name":"div",className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full border border-primary/30 bg-primary/10 text-primary text-xs font-medium mb-8",children:[w.jsx(Ea,{"data-hercules-id":"src/pages/Index.tsx:133:14","data-hercules-name":"Sparkles",className:"w-3 h-3"}),"Lossless Transformation Technology"]})}),w.jsxs(Ce.h1,{"data-hercules-id":"src/pages/Index.tsx:138:10","data-hercules-name":"motion.h1",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.1},className:"text-5xl md:text-7xl font-serif font-bold text-balance leading-tight mb-6",children:["Your subject."," ",w.jsx("span",{"data-hercules-id":"src/pages/Index.tsx:145:12","data-hercules-name":"span",className:"italic",style:{color:"oklch(0.75 0.15 65)"},children:"Any world."})]}),w.jsx(Ce.p,{"data-hercules-id":"src/pages/Index.tsx:153:10","data-hercules-name":"motion.p",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,delay:.2},className:"text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto mb-10 text-balance",children:"The AI studio built for photographers who refuse to compromise. Transform environments and restore quality — while your subject's face, form, and skin remain mathematically untouched."}),w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:164:10","data-hercules-name":"motion.div",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"flex flex-col sm:flex-row gap-4 justify-center",children:[w.jsxs(Qt,{"data-hercules-id":"src/pages/Index.tsx:170:12","data-hercules-name":"Button",size:"lg",className:"cursor-pointer text-base px-8 py-6 gap-2 shadow-lg",style:{boxShadow:"0 0 40px oklch(0.75 0.15 65 / 0.3)"},onClick:()=>e("/studio"),children:["Start Creating Free",w.jsx(Hh,{"data-hercules-id":"src/pages/Index.tsx:177:14","data-hercules-name":"ArrowRight",className:"w-4 h-4"})]}),w.jsx(Qt,{"data-hercules-id":"src/pages/Index.tsx:179:12","data-hercules-name":"Button",size:"lg",variant:"ghost",className:"cursor-pointer text-base px-8 py-6 border border-border hover:bg-secondary",onClick:()=>e("/studio"),children:"View Demo"})]}),w.jsx(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:190:10","data-hercules-name":"motion.div",initial:{opacity:0}
58,animate:{opacity:1},transition:{duration:.8,delay:.5},className:"grid grid-cols-2 md:grid-cols-4 gap-6 mt-20 pt-10 border-t border-border/50",children:Yq.map((t,s)=>w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:197:14","data-hercules-name":"motion.div",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.5+s*.1},className:"text-center",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:204:16","data-hercules-name":"div",className:"text-3xl font-bold",style:{color:"oklch(0.75 0.15 65)"},children:t.value}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:207:16","data-hercules-name":"div",className:"text-xs text-muted-foreground mt-1",children:t.label})]},t.label))})]})]}),w.jsxs("section",{"data-hercules-id":"src/pages/Index.tsx:215:6","data-hercules-name":"section",id:"features",className:"py-24 px-6 max-w-6xl mx-auto",children:[w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:216:8","data-hercules-name":"motion.div",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-16",children:[w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:223:10","data-hercules-name":"p",className:"text-primary text-sm font-medium uppercase tracking-widest mb-4",children:"Core Technology"}),w.jsx("h2",{"data-hercules-id":"src/pages/Index.tsx:226:10","data-hercules-name":"h2",className:"text-4xl md:text-5xl font-serif font-bold text-balance",children:"Precision at every layer"})]}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:231:8","data-hercules-name":"div",className:"grid md:grid-cols-2 gap-6",children:Zq.map((t,s)=>w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:233:12","data-hercules-name":"motion.div",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:s*.1},className:"group relative p-6 rounded-2xl border border-border bg-card hover:border-primary/40 transition-all duration-300 overflow-hidden",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:241:14","data-hercules-name":"div",className:"absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500",style:{background:"radial-gradient(ellipse 80% 60% at 0% 100%, oklch(0.75 0.15 65 / 0.06), transparent)"}}),w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:248:14","data-hercules-name":"div",className:"relative z-10",children:[w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:249:16","data-hercules-name":"div",className:"flex items-start justify-between mb-4",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:250:18","data-hercules-name":"div",className:"w-10 h-10 rounded-xl bg-primary/15 flex items-center justify-center",children:w.jsx(t.icon,{"data-hercules-id":"src/pages/Index.tsx:251:20","data-hercules-name":"feat.icon",className:"w-5 h-5 text-primary"})}),w.jsx("span",{"data-hercules-id":"src/pages/Index.tsx:253:18","data-hercules-name":"span",className:"text-xs px-2.5 py-1 rounded-full border border-primary/30 text-primary bg-primary/10",children:t.badge})]}),w.jsx("h3",{"data-hercules-id":"src/pages/Index.tsx:257:16","data-hercules-name":"h3",className:"text-lg font-semibold mb-2",children:t.title}),w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:258:16","data-hercules-name":"p",className:"text-sm text-muted-foreground leading-relaxed",children:t.description})]})]},t.title))})]}),w.jsx("section",{"data-hercules-id":"src/pages/Index.tsx:268:6","data-hercules-name":"section",id:"templates",className:"py-24 px-6 bg-card/30",children:w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:269:8","data-hercules-name":"div",className:"max-w-6xl mx-auto",children:[w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:270:10","data-hercules-name":"motion.div",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:276:12","data-hercules-name":"p",className:"text-primary text-sm font-medium uppercase tracking-widest mb-4",children:"Template Gallery"}),w.jsx("h2",{"data-hercules-id":"src/pages/Index.tsx:279:12","data-hercules-name":"h2",className:"text-4xl md:text-5xl font-serif font-bold",children:"Curated environments"}),w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:282:12","data-hercules-name":"p",className:"text-muted-foreground mt-4 max-w-xl mx-auto",children:"40+ professionally designed scenes — from intimate studio lighting to sweeping outdoor vistas. Each paired with pre-tuned atmospheric prompts."})]}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:288:10","data-hercules-name":"div",className:"grid md:grid-cols-3 gap-6",children:Gq.map((t,s)=>w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:290:14","data-hercules-name":"motion.div",initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.5,delay:s*.1},className:"group relative rounded-2xl overflow-hidden border border-border aspect-[3/4] cursor-pointer",onClick:()=>e("/studio"),children:[w.jsx("img",{"data-hercules-id":"src/pages/Index.tsx:299:16","data-hercules-name":"img",src:t.img,alt:t.name,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:304:16","data-hercules-name":"div",className:`absolute inset-0 bg-gradient-to-t ${t.color} to-transparent`}),w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:305:16","data-hercules-name":"div",className:"absolute inset-x-0 bottom-0 p-5",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:306:18","data-hercules-name":"div",className:"flex items-center gap-1 mb-2",children:[0,1,2,3,4].map(r=>w.jsx(RP,{"data-hercules-id":"src/pages/Index.tsx:308:22","data-hercules-name":"Star",className:"w-3 h-3 fill-primary text-primary"},r))}),w.jsx("h3",{"data-hercules-id":"src/pages/Index.tsx:311:18","data-hercules-name":"h3",className:"font-semibold text-white text-lg",children:t.name}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:312:18","data-hercules-name":"div",className:"flex gap-2 mt-2 flex-wrap",children:t.tags.map(r=>w.jsx("span",{"data-hercules-id":"src/pages/Index.tsx:314:22","data-hercules-name":"span",className:"text-xs px-2 py-0.5 rounded-full bg-white/15 text-white/80 backdrop-blur-sm",children:r},r))})]}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:323:16","data-hercules-name":"div",className:"absolute top-4 right-4 opacity-0 group-hover:opacity-100 transition-opacity",children:w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:324:18","data-hercules-name":"div",className:"w-8 h-8 rounded-full bg-primary flex items-center justify-center",children:w.jsx(tP,{"data-hercules-id":"src/pages/Index.tsx:325:20","data-hercules-name":"ChevronRight",className:"w-4 h-4 text-primary-foreground"})})})]},t.name))})]})}),w.jsx("section",{"data-hercules-id":"src/pages/Index.tsx:335:6","data-hercules-name":"section",id:"workflow",className:"py-24 px-6",children:w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:336:8","data-hercules-name":"div",className:"max-w-4xl mx-auto",children:[w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:337:10","data-hercules-name":"motion.div",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"text-center mb-16",children:[w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:343:12","data-hercules-name":"p",className:"text-primary text-sm font-medium uppercase tracking-widest mb-4",children:"How It Works"}),w.jsx("h2",{"data-hercules-id":"src/pages/Index.tsx:346:12","data-hercules-name":"h2",className:"text-4xl md:text-5xl font-serif font-bold",children:"Five steps. One perfect shot."})]}),w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:351:10","data-hercules-name":"div",className:"space-y-4",children:[{step:"01",title:"Upload",desc:"Drop any RAW or JPEG file into the workspace. Luminary reads EXIF data to inform the lighting model."},{step:"02",title:"Analysis",desc:"AI segments foreground (subject) from background using semantic instance segmentation — preserving every hair strand."},{step:"03",title:"Enhance",desc:"Optional Clean Shot pass applies ESRGAN de-noise and sharpening to the subject layer only."},{step:"04",title:"Generation",desc:"Prompt-driven or template-based diffusion creates a new background that respects the original depth map."},{step:"05",title:"Composition",desc:"Global Illumination pass repaints ambient light from the new scene onto the subject — seamless, photorealistic blending."}].map((t,s)=>w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:379:14","data-hercules-name":"motion.div",initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:s*.08},className:"flex gap-6 p-5 rounded-xl border border-border bg-card hover:border-primary/30 transition-colors group",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:387:16","data-hercules-name":"div",className:"text-3xl font-serif font-bold text-primary/40 group-hover:text-primary/60 transition-colors min-w-[3rem]",children:t.step}),w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:390:16","data-hercules-name":"div",children:[w.jsx("h3",{"data-hercules-id":"src/pages/Index.tsx:391:18","data-hercules-name":"h3",className:"font-semibold mb-1",children:t.title}),w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:392:18","data-hercules-name":"p",className:"text-sm text-muted-foreground",children:t.desc})]})]},t.step))})]})}),w.jsx("section",{"data-hercules-id":"src/pages/Index.tsx:401:6","data-hercules-name":"section",className:"py-24 px-6",children:w.jsxs(Ce.div,{"data-hercules-id":"src/pages/Index.tsx:402:8","data-hercules-name":"motion.div",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"max-w-3xl mx-auto text-center relative",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:408:10","data-hercules-name":"div",className:"absolute inset-0 -z-10 rounded-3xl",style:{background:"radial-gradient(ellipse 80% 80% at 50% 50%, oklch(0.75 0.15 65 / 0.08), transparent)"}}),w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:415:10","data-hercules-name":"div",className:"p-12 rounded-3xl border border-primary/20 bg-card/50 backdrop-blur-sm",children:[w.jsx(Ea,{"data-hercules-id":"src/pages/Index.tsx:416:12","data-hercules-name":"Sparkles",className:"w-10 h-10 text-primary mx-auto mb-6"}),w.jsx("h2",{"data-hercules-id":"src/pages/Index.tsx:417:12","data-hercules-name":"h2",className:"text-4xl font-serif font-bold mb-4",children:"Ready to transform?"}),w.jsx("p",{"data-hercules-id":"src/pages/Index.tsx:420:12","data-hercules-name":"p",className:"text-muted-foreground mb-8 text-lg",children:"Open the studio and experience lossless transformation firsthand."}),w.jsxs(Qt,{"data-hercules-id":"src/pages/Index.tsx:423:12","data-hercules-name":"Button",size:"lg",onClick:()=>e("/studio"),className:"cursor-pointer px-10 py-6 text-base gap-2",style:{boxShadow:"0 0 40px oklch(0.75 0.15 65 / 0.3)"},children:["Open Luminary Studio",w.jsx(Hh,{"data-hercules-id":"src/pages/Index.tsx:430:14","data-hercules-name":"ArrowRight",className:"w-4 h-4"})]})]})]})}),w.jsx("footer",{"data-hercules-id":"src/pages/Index.tsx:437:6","data-hercules-name":"footer",className:"border-t border-border py-8 px-6",children:w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:438:8","data-hercules-name":"div",className:"max-w-6xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-4",children:[w.jsxs("div",{"data-hercules-id":"src/pages/Index.tsx:439:10","data-hercules-name":"div",className:"flex items-center gap-2",children:[w.jsx("div",{"data-hercules-id":"src/pages/Index.tsx:440:12","data-hercules-name":"div",className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center",children:w.jsx(Dp,{"data-hercules-id":"src/pages/Index.tsx:441:14","data-hercules-name":"Camera",className:"w-3 h-3 text-primary-foreground"})}),w.jsx("span",{"data-hercules-id":"src/pages/Index.tsx:443:12","data-hercules-name":"span",className:"font-serif font-bold",children:"Luminary AI Studio"})]}),w.jsxs("p",{"data-hercules-id":"src/pages/Index.tsx:445:10","data-hercules-name":"p",className:"text-sm text-muted-foreground",children:["© ",new Date().getFullYear()," Luminary AI Studio. All rights reserved."]})]})})]})}function Xq({onImageLoaded:e}){const t=_.useRef(null),[s,r]=_.useState(!1),[o,l]=_.useState(null),u=_.useCallback(p=>{if(l(null),!["image/jpeg","image/png","image/webp","image/tiff"].includes(p.type)&&!p.name.match(/\.(raw|cr2|nef|arw)$/i)){l("Please upload a JPEG, PNG, WebP, TI
58FF, or RAW file.");return}const g=new FileReader;g.onload=v=>{const x=v.target?.result;x&&e(x,p.name)},g.readAsDataURL(p)},[e]),d=_.useCallback(p=>{p.preventDefault(),r(!1);const y=p.dataTransfer.files[0];y&&u(y)},[u]),h=p=>{const y=p.target.files?.[0];y&&u(y)};return w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:49:4","data-hercules-name":"div",className:"flex items-center justify-center h-full p-8",children:w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:50:6","data-hercules-name":"motion.div",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.4},className:Ve("w-full max-w-xl border-2 border-dashed rounded-2xl p-12 flex flex-col items-center justify-center gap-5 transition-all duration-200 cursor-pointer select-none",s?"border-primary bg-primary/10 scale-[1.02]":"border-border hover:border-primary/50 hover:bg-card/50 bg-card/30"),onDragOver:p=>{p.preventDefault(),r(!0)},onDragLeave:()=>r(!1),onDrop:d,onClick:()=>t.current?.click(),children:[w.jsx("input",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:65:8","data-hercules-name":"input",ref:t,type:"file",accept:"image/*,.raw,.cr2,.nef,.arw",className:"hidden",onChange:h}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:72:8","data-hercules-name":"div",className:Ve("w-16 h-16 rounded-2xl flex items-center justify-center transition-colors",s?"bg-primary/20":"bg-muted"),children:s?w.jsx(cP,{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:79:12","data-hercules-name":"ImageIcon",className:"w-8 h-8 text-primary"}):w.jsx(MP,{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:81:12","data-hercules-name":"Upload",className:"w-8 h-8 text-muted-foreground"})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:85:8","data-hercules-name":"div",className:"text-center",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:86:10","data-hercules-name":"p",className:"font-semibold text-lg mb-1",children:s?"Drop to upload":"Upload your image"}),w.jsxs("p",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:89:10","data-hercules-name":"p",className:"text-sm text-muted-foreground",children:["Drag ","&"," drop or click to browse"]}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:92:10","data-hercules-name":"p",className:"text-xs text-muted-foreground/70 mt-2",children:"RAW, JPEG, PNG, WebP, TIFF supported"})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:97:8","data-hercules-name":"AnimatePresence",children:o&&w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:99:12","data-hercules-name":"motion.div",initial:{opacity:0,y:-5},animate:{opacity:1,y:0},exit:{opacity:0},className:"flex items-center gap-2 text-destructive text-sm bg-destructive/10 px-3 py-2 rounded-lg",children:[w.jsx(gr,{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:105:14","data-hercules-name":"X",className:"w-3 h-3"}),o]})}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/upload-zone.tsx:112:8","data-hercules-name":"p",className:"text-xs text-muted-foreground/50",children:"or try a sample image below"})]})})}function Wq({before:e,after:t,isProcessing:s=!1}){const[r,o]=_.useState(50),[l,u]=_.useState(!1),d=_.useRef(null),h=_.useCallback(g=>{const v=d.current;if(!v)return;const x=v.getBoundingClientRect(),S=Math.max(0,Math.min(g-x.left,x.width));o(S/x.width*100)},[]),p=g=>{u(!0),h(g.clientX)},y=g=>{u(!0),h(g.touches[0].clientX)};return _.useEffect(()=>{const g=S=>{l&&h(S.clientX)},v=S=>{l&&h(S.touches[0].clientX)},x=()=>u(!1);return window.addEventListener("mousemove",g),window.addEventListener("mouseup",x),window.addEventListener("touchmove",v),window.addEventListener("touchend",x),()=>{window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",x),window.removeEventListener("touchmove",v),window.removeEventListener("touchend",x)}},[l,h]),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:59:4","data-hercules-name":"div",ref:d,className:"relative w-full h-full overflow-hidden rounded-xl select-none",onMouseDown:p,onTouchStart:y,style:{cursor:l?"ew-resize":"col-resize"},children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:67:6","data-hercules-name":"div",className:"absolute inset-0",children:s?w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:69:10","data-hercules-name":"div",className:"w-full h-full bg-card flex items-center justify-center",children:w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:70:12","data-hercules-name":"motion.div",animate:{o
58pacity:[.3,1,.3]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"},className:"text-center space-y-3",children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:75:14","data-hercules-name":"div",className:"w-12 h-12 rounded-full border-2 border-primary border-t-transparent animate-spin mx-auto"}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:76:14","data-hercules-name":"p",className:"text-sm text-muted-foreground",children:"Processing..."})]})}):w.jsx("img",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:80:10","data-hercules-name":"img",src:t,alt:"After",className:"w-full h-full object-contain"})}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:85:6","data-hercules-name":"div",className:"absolute inset-0 overflow-hidden",style:{width:`${r}%`},children:w.jsx("img",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:89:8","data-hercules-name":"img",src:e,alt:"Before",className:"absolute inset-0 w-full h-full object-contain",style:{width:d.current?.clientWidth??"100%"}})}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:98:6","data-hercules-name":"div",className:"absolute top-3 left-3 px-2 py-1 rounded-md bg-black/60 text-white text-xs font-medium backdrop-blur-sm pointer-events-none",children:"BEFORE"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:101:6","data-hercules-name":"div",className:"absolute top-3 right-3 px-2 py-1 rounded-md bg-primary/80 text-primary-foreground text-xs font-medium backdrop-blur-sm pointer-events-none",children:"AFTER"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:106:6","data-hercules-name":"div",className:"absolute top-0 bottom-0 w-0.5 bg-white/90 pointer-events-none",style:{left:`${r}%`}}),w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:112:6","data-hercules-name":"motion.div",className:"absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-9 h-9 rounded-full bg-white shadow-xl flex items-center justify-center pointer-events-none z-10",style:{left:`${r}%`},animate:{scale:l?1.2:1},transition:{type:"spring",stiffness:400,damping:25},children:w.jsxs("svg",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:118:8","data-hercules-name":"svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[w.jsx("path",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:119:10","data-hercules-name":"path",d:"M5 4L1 8L5 12",stroke:"#1a1a2e",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),w.jsx("path",{"data-hercules-id":"src/pages/studio/_components/before-after-slider.tsx:120:10","data-hercules-name":"path",d:"M11 4L15 8L11 12",stroke:"#1a1a2e",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}const du=[{id:"85mm",label:"85mm Lens",category:"lens"},{id:"35mm",label:"35mm Lens",category:"lens"},{id:"50mm",label:"50mm Lens",category:"lens"},{id:"wide-angle",label:"Wide Angle",category:"lens"},{id:"tilt-shift",label:"Tilt-Shift",category:"lens"},{id:"anamorphic",label:"Anamorphic",category:"lens"},{id:"soft-bokeh",label:"Soft Bokeh",category:"lighting"},{id:"cinematic-lighting",label:"Cinematic Lighting",category:"lighting"},{id:"golden-hour",label:"Golden Hour",category:"lighting"},{id:"rim-light",label:"Rim Light",category:"lighting"},{id:"chiaroscuro",label:"Chiaroscuro",category:"lighting"},{id:"rembrandt",label:"Rembrandt Lighting",category:"lighting"},{id:"split-light",label:"Split Lighting",category:"lighting"},{id:"butterfly-light",label:"Butterfly Lighting",category:"lighting"},{id:"high-key",label:"High Key",category:"lighting"},{id:"low-key",label:"Low Key",category:"lighting"},{id:"moody",label:"Moody",category:"mood"},{id:"ethereal",label:"Ethereal",category:"mood"},{id:"dramatic",label:"Dramatic",category:"mood"},{id:"serene",label:"Serene",category:"mood"}
58,{id:"melancholic",label:"Melancholic",category:"mood"},{id:"energetic",label:"Energetic",category:"mood"},{id:"intimate",label:"Intimate",category:"mood"},{id:"epic",label:"Epic",category:"mood"},{id:"film-grain",label:"Film Grain",category:"style"},{id:"kodachrome",label:"Kodachrome",category:"style"},{id:"fuji-400h",label:"Fuji 400H",category:"style"},{id:"editorial",label:"Editorial",category:"style"},{id:"vogue",label:"Vogue Style",category:"style"},{id:"documentary",label:"Documentary",category:"style"},{id:"fine-art",label:"Fine Art",category:"style"},{id:"hyperrealistic",label:"Hyperrealistic",category:"style"}],Jq={lens:"bg-blue-500/15 text-blue-300 border-blue-500/30 hover:bg-blue-500/25",lighting:"bg-amber-500/15 text-amber-300 border-amber-500/30 hover:bg-amber-500/25",mood:"bg-purple-500/15 text-purple-300 border-purple-500/30 hover:bg-purple-500/25",style:"bg-green-500/15 text-green-300 border-green-500/30 hover:bg-green-500/25"},c1={lens:"bg-blue-500/30 text-blue-200 border-blue-400/50",lighting:"bg-amber-500/30 text-amber-200 border-amber-400/50",mood:"bg-purple-500/30 text-purple-200 border-purple-400/50",style:"bg-green-500/30 text-green-200 border-green-400/50"},eB=[{key:"lens",label:"Lens"},{key:"lighting",label:"Lighting"},{key:"mood",label:"Mood"},{key:"style",label:"Style"}];function tB({selectedTemplate:e,prompt:t,activeTags:s,onPromptChange:r,onTagsChange:o}){const[l,u]=_.useState(!0),[d,h]=_.useState("lighting");_.useEffect(()=>{e&&r(e.promptSeed)},[e,r]);const p=S=>{o(s.includes(S)?s.filter(E=>E!==S):[...s,S])},y=()=>{r(""),o([])},g=()=>{const S=s.map(C=>du.find(A=>A.id===C)?.label).filter(Boolean);return[t,...S].filter(Boolean).join(", ")},v=du.filter(S=>S.category===d),x=t.length>0||s.length>0;return w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:71:4","data-hercules-name":"div",className:"flex flex-col gap-3",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:73:6","data-hercules-name":"div",className:"flex items-center justify-between px-1",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:74:8","data-hercules-name":"p",className:"text-xs text-muted-foreground uppercase tracking-wider font-medium",children:"Prompt Command Center"}),x&&w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:78:10","data-hercules-name":"button",onClick:y,className:"text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer flex items-center gap-1",children:[w.jsx(gr,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:82:12","data-hercules-name":"X",className:"w-3 h-3"})," Clear"]})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:88:6","data-hercules-name":"AnimatePresence",children:e&&w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:90:10","data-hercules-name":"motion.div",initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},className:"flex items-center gap-2 px-2.5 py-1.5 rounded-lg bg-primary/10 border border-primary/25 text-xs",children:[w.jsx(Ea,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:96:12","data-hercules-name":"Sparkles",className:"w-3 h-3 text-primary shrink-0"}),w.jsxs("span",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:97:12","data-hercules-name":"span",className:"text-primary font-medium truncate",children:["Base: ",e.name]})]})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:105:6","data-hercules-name":"div",className:"relative",children:[w.jsx("textarea",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:106:8","data-hercules-name":"textarea",value:t,onChange:S=>r(S.target.value),placeholder:e?"Refine the template prompt…":"Describe the scene, environment, or mood…",rows:3,className:"w-full px-3 py-2.5 text-xs rounded-xl border border-border bg-muted/30 focus:outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground
58/50 resize-none leading-relaxed"}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:117:8","data-hercules-name":"div",className:"absolute bottom-2 right-2 text-[10px] text-muted-foreground/50",children:[t.length,"/500"]})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:123:6","data-hercules-name":"AnimatePresence",children:s.length>0&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:125:10","data-hercules-name":"motion.div",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex flex-wrap gap-1.5",children:s.map(S=>{const E=du.find(C=>C.id===S);return E?w.jsxs(Ce.button,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:135:16","data-hercules-name":"motion.button",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},onClick:()=>p(S),className:Ve("flex items-center gap-1 px-2 py-0.5 rounded-full border text-[11px] font-medium cursor-pointer transition-all",c1[E.category]),children:[E.label,w.jsx(gr,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:147:18","data-hercules-name":"X",className:"w-2.5 h-2.5"})]},S):null})})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:156:6","data-hercules-name":"div",className:"border border-border rounded-xl overflow-hidden",children:[w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:157:8","data-hercules-name":"button",onClick:()=>u(!l),className:"w-full flex items-center justify-between px-3 py-2.5 bg-muted/30 hover:bg-muted/50 transition-colors cursor-pointer",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:161:10","data-hercules-name":"div",className:"flex items-center gap-2",children:[w.jsx(K6,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:162:12","data-hercules-name":"BookOpen",className:"w-3.5 h-3.5 text-muted-foreground"}),w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:163:12","data-hercules-name":"span",className:"text-xs font-medium",children:"Atmospheric Tags"}),s.length>0&&w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:165:14","data-hercules-name":"span",className:"text-[10px] px-1.5 py-0.5 rounded-full bg-primary/20 text-primary font-medium",children:s.length})]}),l?w.jsx(sP,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:171:12","data-hercules-name":"ChevronUp",className:"w-3.5 h-3.5 text-muted-foreground"}):w.jsx(V_,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:173:12","data-hercules-name":"ChevronDown",className:"w-3.5 h-3.5 text-muted-foreground"})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:177:8","data-hercules-name":"AnimatePresence",children:l&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:179:12","data-hercules-name":"motion.div",initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden",children:w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:185:14","data-hercules-name":"div",className:"p-2.5 space-y-2.5",children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:187:16","data-hercules-name":"div",className:"flex gap-1",children:eB.map(({key:S,label:E})=>w.jsx("button",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:189:20","data-hercules-name":"button",onClick:()=>h(S),className:Ve("flex-1 py-1 rounded-md text-[11px] font-medium transition-all cursor-pointer",d===S?"bg-primary/20 text-primary":"text-muted-foreground hover:text-foreground"),children:E},S))}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:205:16","data-hercules-name":"div",className:"flex flex-wrap gap-1.5",children:v.map(S=>{const E=s.includes(S.id);return w.jsx("button",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:209:22","data-hercules-name":"button",onClick:()=>p(S.id),className:Ve("px-2 py-1 rounded-full border text-[11px] font-medium transition-all cursor-pointer",E?c1[S.category]:Jq[S.category]),children:S.label},S.id)})})]})})})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:231:6","data-hercules-name":"AnimatePresence",children:x&&w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:233:10","data-hercules-name":"motion.div",initial:{opacity:0}
58,animate:{opacity:1},exit:{opacity:0},className:"px-2.5 py-2 rounded-lg bg-card/60 border border-border/60",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:239:12","data-hercules-name":"p",className:"text-[10px] text-muted-foreground uppercase tracking-wider mb-1 font-medium",children:"Full Prompt"}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/prompt-command-center.tsx:242:12","data-hercules-name":"p",className:"text-[11px] text-muted-foreground/80 leading-relaxed line-clamp-3",children:g()})]})})]})}const nB={pending:w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:18:4","data-hercules-name":"div",className:"w-2 h-2 rounded-full bg-muted-foreground/30"}),running:w.jsx(q_,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:21:4","data-hercules-name":"Loader2",className:"w-3.5 h-3.5 text-primary animate-spin"}),done:w.jsx(ku,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:24:4","data-hercules-name":"Check",className:"w-3 h-3 text-primary-foreground"}),skipped:w.jsx(yP,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:27:4","data-hercules-name":"Minus",className:"w-3 h-3 text-muted-foreground"})};function sB({stages:e,errorMessage:t}){return w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:33:4","data-hercules-name":"div",className:"space-y-1.5",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:34:6","data-hercules-name":"p",className:"text-xs text-muted-foreground uppercase tracking-wider font-medium px-1 mb-2",children:"Pipeline Progress"}),e.map((s,r)=>w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:39:8","data-hercules-name":"motion.div",initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:r*.04},className:Ve("flex items-center gap-2.5 px-3 py-2 rounded-lg border transition-all",s.status==="running"&&"border-primary/40 bg-primary/8",s.status==="done"&&"border-border/50 bg-transparent opacity-70",s.status==="pending"&&"border-border/30 bg-transparent opacity-40",s.status==="skipped"&&"border-border/30 bg-transparent opacity-30"),children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:53:10","data-hercules-name":"div",className:Ve("w-5 h-5 rounded-full flex items-center justify-center shrink-0 transition-colors",s.status==="done"&&"bg-primary",s.status==="running"&&"bg-transparent",(s.status==="pending"||s.status==="skipped")&&"bg-transparent"),children:w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:61:12","data-hercules-name":"AnimatePresence",mode:"wait",children:w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:62:14","data-hercules-name":"motion.div",initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.15},children:nB[s.status]},s.status)})}),w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:74:10","data-hercules-name":"span",className:Ve("text-xs font-medium transition-colors",s.status==="running"&&"text-foreground",s.status==="done"&&"text-muted-foreground",s.status==="pending"&&"text-muted-foreground/50",s.status==="skipped"&&"text-muted-foreground/40 line-through"),children:s.label}),s.status==="running"&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:87:12","data-hercules-name":"motion.div",className:"ml-auto flex gap-0.5",initial:{opacity:0}
58,animate:{opacity:1},children:[0,1,2].map(o=>w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:93:16","data-hercules-name":"motion.div",className:"w-1 h-1 rounded-full bg-primary",animate:{opacity:[.3,1,.3]},transition:{duration:.8,repeat:1/0,delay:o*.2,ease:"easeInOut"}},o))})]},s.id)),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:111:6","data-hercules-name":"AnimatePresence",children:t&&w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:113:10","data-hercules-name":"motion.div",initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0},className:"flex items-start gap-2 px-3 py-2 rounded-lg border border-destructive/40 bg-destructive/10 mt-2",children:[w.jsx(rP,{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:119:12","data-hercules-name":"AlertCircle",className:"w-3.5 h-3.5 text-destructive shrink-0 mt-0.5"}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/pipeline-progress.tsx:120:12","data-hercules-name":"p",className:"text-xs text-destructive leading-relaxed",children:t})]})})]})}const op=[{value:"standard",label:"Standard",desc:"Fast · 2MP"},{value:"high",label:"High",desc:"Balanced · 4MP"},{value:"ultra",label:"Ultra",desc:"Best · 8MP"}];function iB({hasImage:e,hasResult:t,isProcessing:s,pipelineStages:r,pipelineError:o,options:l,onOptionsChange:u,onProcess:d,onReset:h,onDownload:p,fileName:y,selectedTemplate:g,prompt:v,activeTags:x,onPromptChange:S,onTagsChange:E}){const[C,A]=_.useState(!1),M=k=>{u({...l,[k]:!l[k]})};return w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:82:4","data-hercules-name":"div",className:"flex flex-col gap-3",children:[w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:84:6","data-hercules-name":"AnimatePresence",children:y&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:86:10","data-hercules-name":"motion.div",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"px-3 py-2 rounded-lg bg-muted/50 border border-border",children:w.jsxs("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:92:12","data-hercules-name":"p",className:"text-xs text-muted-foreground truncate",children:[w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:93:14","data-hercules-name":"span",className:"text-foreground font-medium",children:"File:"})," ",y]})})}),w.jsx(tB,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:100:6","data-hercules-name":"PromptCommandCenter",selectedTemplate:g,prompt:v,activeTags:x,onPromptChange:S,onTagsChange:E}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:109:6","data-hercules-name":"div",className:"border-t border-border"}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:112:6","data-hercules-name":"div",className:"space-y-2",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:113:8","data-hercules-name":"p",className:"text-xs text-muted-foreground uppercase tracking-wider font-medium px-1",children:"Processing Options"}),w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:118:8","data-hercules-name":"button",onClick:()=>M("cleanShot"),className:Ve("w-full flex items-center gap-3 p-3 rounded-xl border transition-all cursor-pointer",l.cleanShot?"border-primary/50 bg-primary/10":"border-border bg-card/40 hover:border-border/80"),children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:127:10","data-hercules-name":"div",className:Ve("w-8 h-8 rounded-lg flex items-center justify-center shrink-0",l.cleanShot?"bg-primary/20":"bg-muted"),children:w.jsx(I_,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:133:12","data-hercules-name":"Zap",className:Ve("w-4 h-4",l.cleanShot?"text-primary":"text-muted-foreground")})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:135:10","data-hercules-name":"div",className:"text-left flex-1 min-w-0",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:136:12","data-hercules-name":"p",className:Ve("text-sm font-medium",l.cleanShot?"text-foreground":"text-muted-foreground"),children:"Clean Shot"}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:139:12","data-hercules-name":"p",className:"text-xs text-muted-foreground
58/70",children:"ESRGAN deblur + sharpen"})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:141:10","data-hercules-name":"div",className:Ve("w-4 h-4 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors",l.cleanShot?"bg-primary border-primary":"border-muted-foreground/40"),children:l.cleanShot&&w.jsx(ku,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:147:34","data-hercules-name":"Check",className:"w-2.5 h-2.5 text-primary-foreground"})})]}),w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:152:8","data-hercules-name":"button",onClick:()=>M("identityLock"),className:Ve("w-full flex items-center gap-3 p-3 rounded-xl border transition-all cursor-pointer",l.identityLock?"border-primary/50 bg-primary/10":"border-border bg-card/40 hover:border-border/80"),children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:161:10","data-hercules-name":"div",className:Ve("w-8 h-8 rounded-lg flex items-center justify-center shrink-0",l.identityLock?"bg-primary/20":"bg-muted"),children:w.jsx(B_,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:167:12","data-hercules-name":"ShieldCheck",className:Ve("w-4 h-4",l.identityLock?"text-primary":"text-muted-foreground")})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:169:10","data-hercules-name":"div",className:"text-left flex-1 min-w-0",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:170:12","data-hercules-name":"p",className:Ve("text-sm font-medium",l.identityLock?"text-foreground":"text-muted-foreground"),children:"Identity Lock"}),w.jsxs("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:173:12","data-hercules-name":"p",className:"text-xs text-muted-foreground/70",children:["Protect face ","&"," form"]})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:175:10","data-hercules-name":"div",className:Ve("w-4 h-4 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors",l.identityLock?"bg-primary border-primary":"border-muted-foreground/40"),children:l.identityLock&&w.jsx(ku,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:181:37","data-hercules-name":"Check",className:"w-2.5 h-2.5 text-primary-foreground"})})]})]}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:187:6","data-hercules-name":"div",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:188:8","data-hercules-name":"p",className:"text-xs text-muted-foreground uppercase tracking-wider font-medium px-1 mb-2",children:"Output Quality"}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:191:8","data-hercules-name":"div",className:"relative",children:[w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:192:10","data-hercules-name":"button",onClick:()=>A(!C),className:"w-full flex items-center justify-between p-3 rounded-xl border border-border bg-card/40 hover:border-border/80 transition-all cursor-pointer",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:196:12","data-hercules-name":"div",className:"flex items-center gap-2",children:[w.jsx(TP,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:197:14","data-hercules-name":"Sliders",className:"w-4 h-4 text-muted-foreground"}),w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:198:14","data-hercules-name":"span",className:"text-sm font-medium",children:op.find(k=>k.value===l.quality)?.label}),w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:201:14","data-hercules-name":"span",className:"text-xs text-muted-foreground",children:op.find(k=>k.value===l.quality)?.desc})]}),w.jsx(V_,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:205:12","data-hercules-name":"ChevronDown",className:Ve("w-4 h-4 text-muted-foreground transition-transform",C&&"rotate-180")}
58)]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:210:10","data-hercules-name":"AnimatePresence",children:C&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:212:14","data-hercules-name":"motion.div",initial:{opacity:0,y:-6,scaleY:.9},animate:{opacity:1,y:0,scaleY:1},exit:{opacity:0,y:-6,scaleY:.9},transition:{duration:.15},className:"absolute bottom-full left-0 right-0 mb-1 rounded-xl border border-border bg-popover shadow-xl overflow-hidden z-20",style:{transformOrigin:"bottom"},children:op.map(k=>w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:221:18","data-hercules-name":"button",onClick:()=>{u({...l,quality:k.value}),A(!1)},className:Ve("w-full flex items-center justify-between px-3 py-2.5 text-sm transition-colors cursor-pointer hover:bg-accent",l.quality===k.value&&"text-primary"),children:[w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:232:20","data-hercules-name":"span",className:"font-medium",children:k.label}),w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:233:20","data-hercules-name":"span",className:"text-xs text-muted-foreground",children:k.desc})]},k.value))})})]})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:243:6","data-hercules-name":"div",className:"border-t border-border"}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:246:6","data-hercules-name":"AnimatePresence",children:(s||o)&&r&&r.length>0&&w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:248:10","data-hercules-name":"motion.div",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[w.jsx(sB,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:253:12","data-hercules-name":"PipelineProgress",stages:r,errorMessage:o}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:254:12","data-hercules-name":"div",className:"border-t border-border mt-3"})]})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:260:6","data-hercules-name":"div",className:"space-y-2",children:[w.jsx(Qt,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:261:8","data-hercules-name":"Button",className:"w-full gap-2 cursor-pointer",disabled:!e||s,onClick:d,style:e&&!s?{boxShadow:"0 0 20px oklch(0.75 0.15 65 / 0.25)"}:void 0,children:s?w.jsxs(w.Fragment,{children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:269:14","data-hercules-name":"div",className:"w-4 h-4 rounded-full border-2 border-primary-foreground border-t-transparent animate-spin"}),"Processing…"]}):w.jsxs(w.Fragment,{children:[w.jsx(Ea,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:274:14","data-hercules-name":"Sparkles",className:"w-4 h-4"}),"Apply AI Transform"]})}),t&&w.jsxs(Qt,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:281:10","data-hercules-name":"Button",variant:"secondary",className:"w-full gap-2 cursor-pointer",onClick:p,children:[w.jsx(oP,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:286:12","data-hercules-name":"Download",className:"w-4 h-4"}),"Download Result"]}),e&&w.jsxs(Qt,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:292:10","data-hercules-name":"Button",variant:"ghost",className:"w-full gap-2 cursor-pointer text-muted-foreground hover:text-foreground",onClick:()=>{h(),Bo.info("Workspace cleared")},children:[w.jsx(bP,{"data-hercules-id":"src/pages/studio/_components/studio-toolbar.tsx:300:12","data-hercules-name":"RotateCcw",className:"w-3.5 h-3.5"}),"Reset"]})]})]})}const rB=[{id:"all",label:"All"},{id:"studio",label:"Studio"},{id:"outdoor",label:"Outdoor"},{id:"architectural",label:"Architectural"},{id:"editorial",label:"Editorial"}],aB=[{id:"golden-hour-studio",name:"Golden Hour Studio",category:"studio",description:"Warm amber wash with a soft gradient sweep across a seamless paper backdrop",thumb:"https://images.unsplash.com/photo-1771072426488-87e6bbcc0cf7?w=400&q=80",tags:["Warm tones","Soft bokeh","85mm lens"],promptSeed:"golden hour studio, warm amber light, seamless paper backdrop, soft shadow",accent:"from-
58amber-950/80 to-orange-900/50"},{id:"nordic-minimalist",name:"Nordic Minimalist",category:"studio",description:"Cool white overcast diffusion on a crisp off-white cyclorama",thumb:"https://images.unsplash.com/photo-1768818653161-0ad28dede131?w=400&q=80",tags:["Cool whites","Crisp edges","Flat key"],promptSeed:"nordic minimal studio, overcast white diffusion, clean cyclorama, cool tones",accent:"from-slate-900/70 to-blue-950/50"},{id:"neon-noir",name:"Neon Noir",category:"studio",description:"Deep black void background with electric magenta and cyan accent lights",thumb:"https://images.unsplash.com/photo-1762274674115-a511e3d3c688?w=400&q=80",tags:["Neon glow","High contrast","Cinematic"],promptSeed:"neon noir studio, black void background, electric magenta cyan lights, dramatic",accent:"from-purple-950/80 to-fuchsia-900/50"},{id:"moody-velvet",name:"Moody Velvet",category:"studio",description:"Rich burgundy and deep forest green draped velvet backdrop, Hollywood era",thumb:"https://images.unsplash.com/photo-1776111885208-c7f243c0c9dc?w=400&q=80",tags:["Deep shadows","Velvet texture","Hollywood"],promptSeed:"moody velvet backdrop, deep burgundy, forest green, Hollywood glamour lighting",accent:"from-rose-950/80 to-stone-900/60"},{id:"misty-forest",name:"Misty Forest",category:"outdoor",description:"Ancient redwood forest at dawn, shafts of gold through ground fog",thumb:"https://images.unsplash.com/photo-1448375240586-882707db888b?w=400&q=80",tags:["Atmospheric fog","Nature","Dawn light"],promptSeed:"misty redwood forest dawn, golden light shafts, ground fog, emerald green",accent:"from-green-950/80 to-emerald-900/50"},{id:"rooftop-sunset",name:"Rooftop Sunset",category:"outdoor",description:"City skyline at magic hour from a rooftop, warm pink and gold sky",thumb:"https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=400&q=80",tags:["Magic hour","Urban","Skyline"],promptSeed:"rooftop city skyline sunset, pink gold sky, urban environment, magic hour",accent:"from-orange-950/70 to-rose-900/50"},{id:"coastal-overcast",name:"Coastal Overcast",category:"outdoor",description:"Rocky Atlantic coastline with dramatic grey sky and crashing surf",thumb:"https://images.unsplash.com/photo-1505118380757-91f5f5632de0?w=400&q=80",tags:["Dramatic sky","Ocean","Editorial"],promptSeed:"rocky coastal overcast, dramatic grey sky, crashing waves, moody editorial",accent:"from-slate-950/80 to-cyan-950/50"},{id:"desert-mesa",name:"Desert Mesa",category:"outdoor",description:"Red rock mesa at golden hour, long shadows and ochre dust haze",thumb:"https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=400&q=80",tags:["Arid","Golden hour","Vast space"],promptSeed:"desert red rock mesa golden hour, ochre dust, long shadows, expansive sky",accent:"from-red-950/70 to-amber-900/50"},{id:"industrial-loft",name:"Industrial Loft",category:"architectural",description:"Converted warehouse with exposed brick, steel beams and side-window raking light",thumb:"https://images.unsplash.com/photo-1772987273687-4866382c146f?w=400&q=80",tags:["Raking light","Texture","Industrial"],promptSeed:"industrial loft interior, exposed brick, steel beams, raking window light, cinematic",accent:"from-zinc-950/80 to-neutral-800/60"},{id:"marble-atelier",name:"Marble Atelier",category:"architectural",description:"Luxury Parisian atelier, Carrara marble floors, tall arched windows",thumb:"https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=400&q=80",tags:["Luxury","Natural light","Classic"],promptSeed:"Parisian atelier marble floor, arched windows, soft natural light, luxury interior",accent:"from-stone-900/70 to-slate-800/50"},{id:"brutalist-concrete",name:"Brutalist Concrete",category:"architectural",description:"Raw poured-concrete brutalist facade with geometric shadow patterns",thumb:"https://images.unsplash.com/photo-1486325212027-8081e485255e?w=400&q=80",tags:["Geometric","Harsh shadows","Modern"],promptSeed:"brutalist concrete architecture, geometric shadows, raw texture, high contrast",accent:"from-gray-950/80 to-zinc-900/60"},{id:"cinematic-rain",name:"Cinematic Rain",category:"editorial",description:"Rain-slicked midnight street with neon reflections, film still aesthetic",thumb:"https://images.unsplash.com/photo-1428908728789-d2de25dbd4e2?w=400&q=80",tags:["Neon reflections","Film still","Night"],promptSeed:"rain slicked midnight street, neon reflections, bokeh lights, cinematic film still",accent:"from-blue-950/80 to-indigo-900/50"},{id:"editorial-white",name:"High-Key White",category:"editorial",description:"Ultra-clean overexposed white infinity cove, high-fashion editorial look",thumb:"https://images.unsplash.com/photo-1598300042247-d088f8ab3a91?w=400&q=80",tags:["High-key","Fashion","Clean"],promptSeed:"high-key white infinity cove, overexposed fashion editorial, ultra clean",accent:"from-neutral-900/60 to-gray-800/40"}];function oB({selectedTemplate:e,onSelectTemplate:t}){const[s,r]=_.useState("all"),[o,l]=_.useState(""),u=_.useMemo(()=>aB.filter(d=>{const h=s==="all"||d.category===s,p=o.toLowerCase(),y=!p||d.name.toLowerCase().includes(p)||d.description.toLowerCase().includes(p)||d.tags.some(g=>g.toLowerCase().includes(p));return h&&y}),[s,o]);return w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:37:4","data-hercules-name":"div",className:"flex flex-col h-full overflow-hidden",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:39:6","data-hercules-name":"div",className:"px-3 pt-3 pb-2 shrink-0",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:40:8","data-hercules-name":"p",className:"text-xs text-muted-foreground uppercase tracking-wider font-medium mb-2 px-1",children:"Template Gallery"}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:45:8","data-hercules-name":"div",className:"relative mb-2",children:[w.jsx(wP,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:46:10","data-hercules-name":"Search",className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground pointer-events-none"}),w.jsx("input",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:47:10","data-hercules-name":"input",type:"text",placeholder:"Search templates…",value:o,onChange:d=>l(d.target.value),className:"w-full pl-8 pr-3 py-2 text-xs rounded-lg border border-border bg-muted/30 focus:outline-none focus:ring-1 focus:ring-ring placeholder:text-muted-foreground
58/60"}),o&&w.jsx("button",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:55:12","data-hercules-name":"button",onClick:()=>l(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 cursor-pointer",children:w.jsx(gr,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:59:14","data-hercules-name":"X",className:"w-3 h-3 text-muted-foreground hover:text-foreground"})})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:65:8","data-hercules-name":"div",className:"flex gap-1.5 flex-wrap",children:rB.map(d=>w.jsx("button",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:67:12","data-hercules-name":"button",onClick:()=>r(d.id),className:Ve("px-2.5 py-1 rounded-full text-xs font-medium border transition-all cursor-pointer",s===d.id?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:border-border/80 hover:text-foreground"),children:d.label},d.id))})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:84:6","data-hercules-name":"AnimatePresence",children:e&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:86:10","data-hercules-name":"motion.div",initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"px-3 pb-1 shrink-0",children:w.jsxs("button",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:92:12","data-hercules-name":"button",onClick:()=>t(null),className:"w-full flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-primary/10 border border-primary/30 text-xs cursor-pointer group",children:[w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:96:14","data-hercules-name":"span",className:"text-primary font-medium truncate mr-2",children:e.name}),w.jsx(gr,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:99:14","data-hercules-name":"X",className:"w-3 h-3 text-primary shrink-0 group-hover:text-primary/70"})]})})}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:106:6","data-hercules-name":"div",className:"flex-1 overflow-y-auto px-3 pb-3",children:u.length===0?w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:108:10","data-hercules-name":"div",className:"text-center py-8 text-muted-foreground text-xs",children:"No templates match your search"}):w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:112:10","data-hercules-name":"div",className:"grid grid-cols-2 gap-2",children:u.map((d,h)=>w.jsxs(Ce.button,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:114:14","data-hercules-name":"motion.button",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:h*.03},onClick:()=>t(e?.id===d.id?null:d),className:Ve("group relative aspect-[3/4] rounded-xl overflow-hidden border transition-all cursor-pointer text-left",e?.id===d.id?"border-primary ring-1 ring-primary":"border-border hover:border-primary/50"),children:[w.jsx("img",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:131:16","data-hercules-name":"img",src:d.thumb,alt:d.name,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:136:16","data-hercules-name":"div",className:Ve("absolute inset-0 bg-gradient-to-t",d.accent,"to-transparent")}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:143:16","data-hercules-name":"div",className:"absolute inset-x-0 bottom-0 p-2",children:w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:144:18","data-hercules-name":"p",className:"text-white text-xs font-semibold leading-tight",children:d.name})}),e?.id===d.id&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:151:18","data-hercules-name":"motion.div",initial:{scale:0},animate:{scale:1},className:"absolute top-2 right-2 w-5 h-5 rounded-full bg-primary flex items-center justify-center",children:w.jsx(ku,{"data-hercules-id":"src/pages/studio/_components/template-gallery.tsx:156:20","data-hercules-name":"Check",className:"w-3 h-3 text-primary-foreground"})})]},d.id))})})]})}const lB=[{id:"cinematic-portrait",label:"Cinematic Portrait",description:"Dramatic film lighting with deep shadows",prompt:"cinematic portrait lighting, dramatic shadows, film noir aesthetic, shallow depth of field, 85mm lens, high contrast",emoji:"🎬",accent:"from-
58amber-900/40 to-amber-800/20 border-amber-700/40 hover:border-amber-500/60"},{id:"golden-hour",label:"Golden Hour Glow",description:"Warm sunset light, soft and ethereal",prompt:"golden hour photography, warm sunset light, soft bokeh background, ethereal glow, skin warmth enhancement, dreamy atmosphere",emoji:"🌅",accent:"from-orange-900/40 to-yellow-800/20 border-orange-700/40 hover:border-orange-500/60"},{id:"editorial-fashion",label:"Editorial Fashion",description:"High-fashion Vogue-style finish",prompt:"editorial fashion photography, Vogue style, high-key studio lighting, crisp details, professional retouching, luxury aesthetic",emoji:"✨",accent:"from-slate-800/60 to-slate-700/30 border-slate-600/40 hover:border-slate-400/60"},{id:"film-analog",label:"Analog Film",description:"Kodachrome grain with vintage color",prompt:"analog film photography, Kodachrome color grading, fine film grain, vintage warmth, slightly desaturated highlights, nostalgic mood",emoji:"📷",accent:"from-amber-950/50 to-yellow-900/20 border-amber-800/40 hover:border-amber-600/60"},{id:"moody-dark",label:"Moody & Dark",description:"Low-key, brooding atmosphere",prompt:"low key photography, moody atmosphere, deep shadows, chiaroscuro lighting, dramatic contrast, dark background vignette",emoji:"🌑",accent:"from-purple-950/50 to-indigo-900/20 border-purple-800/40 hover:border-purple-600/60"},{id:"clean-studio",label:"Clean Studio",description:"Professional white backdrop look",prompt:"professional studio photography, clean white background, butterfly lighting, commercial retouching, sharp details, magazine quality",emoji:"⬜",accent:"from-zinc-800/40 to-zinc-700/20 border-zinc-600/40 hover:border-zinc-400/60"},{id:"neon-night",label:"Neon Night",description:"Urban neon reflections and glow",prompt:"neon light photography, urban night scene, colorful neon reflections, bokeh city lights, cyberpunk aesthetic, vivid color grading",emoji:"🌆",accent:"from-pink-900/40 to-purple-800/20 border-pink-700/40 hover:border-pink-500/60"},{id:"fine-art",label:"Fine Art",description:"Painterly, museum-quality rendering",prompt:"fine art photography, painterly quality, soft diffused light, timeless elegance, museum-grade retouching, classical composition",emoji:"🖼️",accent:"from-rose-900/40 to-pink-800/20 border-rose-700/40 hover:border-rose-500/60"}];function cB({open:e,onClose:t,onSelect:s}){return w.jsx(Ut,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:90:4","data-hercules-name":"AnimatePresence",children:e&&w.jsxs(w.Fragment,{children:[w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:94:10","data-hercules-name":"motion.div",initial:{opacity:0}
58,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/70 backdrop-blur-sm z-50",onClick:t}),w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:103:10","data-hercules-name":"motion.div",initial:{opacity:0,scale:.94,y:16},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.94,y:16},transition:{type:"spring",stiffness:400,damping:30},className:"fixed inset-x-4 top-1/2 -translate-y-1/2 z-50 max-w-2xl mx-auto",children:w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:110:12","data-hercules-name":"div",className:"rounded-2xl border border-border bg-card shadow-2xl overflow-hidden",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:112:14","data-hercules-name":"div",className:"flex items-center justify-between px-5 py-4 border-b border-border bg-muted/30",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:113:16","data-hercules-name":"div",className:"flex items-center gap-2.5",children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:114:18","data-hercules-name":"div",className:"w-7 h-7 rounded-lg bg-primary/20 flex items-center justify-center",children:w.jsx(DP,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:115:20","data-hercules-name":"Wand2",className:"w-3.5 h-3.5 text-primary"})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:117:18","data-hercules-name":"div",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:118:20","data-hercules-name":"p",className:"text-sm font-semibold text-foreground",children:"Choose a Transform Style"}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:119:20","data-hercules-name":"p",className:"text-xs text-muted-foreground",children:"Pick a preset to instantly begin AI transformation"})]})]}),w.jsx("button",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:122:16","data-hercules-name":"button",onClick:t,className:"w-7 h-7 rounded-lg flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",children:w.jsx(gr,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:126:18","data-hercules-name":"X",className:"w-4 h-4"})})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:131:14","data-hercules-name":"div",className:"p-4 grid grid-cols-2 sm:grid-cols-4 gap-2.5 max-h-[60vh] overflow-y-auto",children:lB.map((r,o)=>w.jsxs(Ce.button,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:133:18","data-hercules-name":"motion.button",initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:o*.035},onClick:()=>s(r.prompt),className:Ve("group relative flex flex-col items-start gap-1.5 p-3 rounded-xl border bg-gradient-to-b text-left transition-all cursor-pointer",r.accent),children:[w.jsx("span",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:144:20","data-hercules-name":"span",className:"text-xl leading-none",children:r.emoji}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:145:20","data-hercules-name":"div",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:146:22","data-hercules-name":"p",className:"text-xs font-semibold text-foreground leading-tight",children:r.label}),w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:147:22","data-hercules-name":"p",className:"text-[10px] text-muted-foreground mt-0.5 leading-snug",children:r.description})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:149:20","data-hercules-name":"div",className:"absolute inset-0 rounded-xl ring-2 ring-primary/0 group-hover:ring-primary/30 transition-all"})]},r.id))}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:155:14","data-hercules-name":"div",className:"px-5 py-3 border-t border-border bg-muted/20 flex items-center justify-between gap-3",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:156:16","data-hercules-name":"p",className:"text-xs text-muted-foreground",children:"You can also type a custom prompt in the sidebar"}),w.jsxs(Qt,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:159:16","data-hercules-name":"Button",variant:"ghost",size:"sm",onClick:t,className:"cursor-pointer text-xs shrink-0",children:[w.jsx(Ea,{"data-hercules-id":"src/pages/studio/_components/quick-prompt-picker.tsx:160:18","data-hercules-name":"Sparkles",className:"w-3 h-3 mr-1"}),"Skip for now"]})]})]})})]})})}const uB=[{label:"Portrait",src:"https://images.unsplash.com/photo-1772987273687-4866382c146f?w=800&q=80"},{label:"Studio",src:"https://images.unsplash.com/photo-1771072426488-87e6bbcc0cf7?w=800&q=80"},{label:"Fashion",src:"https://images.unsplash.com/photo-1762274674115-a511e3d3c688?w=800&q=80"}],dB=`session_${Math.random().toString(36).slice(2)}`;function fB(){const e=qu(),[t,s]=_.useState(null),[r,o]=_.useState(void 0),[l,u]=_.useState(!1),[d,h]=_.useState("split"),[p,y]=_.useState({cleanShot:!0,identityLock:!0,qual
58ity:"high"}),[g,v]=_.useState(null),[x,S]=_.useState(""),[E,C]=_.useState([]),[A,M]=_.useState(!0),[k,D]=_.useState(!1),[P,B]=_.useState(null),[I,L]=_.useState(null),[W,ee]=_.useState(void 0),re=eu(da.generations.create),oe=eu(da.generations.startProcessing);eu(da.generations.generateUploadUrl);const me=p4(da.pipeline.runPipeline),he=h4(da.generations.get,P?{generationId:P}:"skip"),fe=_.useCallback((H,J)=>{s(H),L(null),B(null),ee(void 0),o(J),Bo.success("Image loaded — ready to transform")},[]),j=_.useCallback(()=>{const H=E.map(J=>du.find(se=>se.id===J)?.label).filter(J=>!!J);return[x,...H].filter(Boolean).join(", ")},[x,E]),F=_.useCallback(async()=>{if(!t||l)return;const H=j();if(!H&&!g){D(!0);return}await G(H)},[t,l,j,g]),G=_.useCallback(async H=>{u(!0),L(null),ee(void 0);try{const{generationId:J,uploadUrl:se}=await re({sessionId:dB,prompt:H||g?.promptSeed||"",templateId:g?.id,templateName:g?.name,cleanShot:p.cleanShot,identityLock:p.identityLock,quality:p.quality});B(J);const ae=await fetch(t).then(_t=>_t.blob()),ye=await fetch(se,{method:"POST",headers:{"Content-Type":ae.type||"image/jpeg"},body:ae});if(!ye.ok)throw new Error("Image upload failed");const{storageId:xe}=await ye.json();await oe({generationId:J,originalStorageId:xe});const{resultUrl:ve}=await me({generationId:J});L(ve),h("split"),Bo.success("Transformation complete!")}catch(J){const se=J instanceof Error?J.message:"Processing failed";ee(se),Bo.error("AI transform failed — see pipeline for details")}finally{u(!1)}},[t,g,re,oe,me,p]),ie=_.useCallback(()=>{s(null),L(null),B(null),ee(void 0),o(void 0),u(!1),h("split")},[]),X=_.useCallback(()=>{const H=I??he?.resultUrl;if(!H)return;const J=document.createElement("a");J.href=H,J.download=`luminary-${r??"result"}.png`,J.click(),Bo.success("Downloading your result…")},[I,he,r]),O=I??he?.resultUrl??null,Z=he?.stages??[];return w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:194:4","data-hercules-name":"div",className:"h-screen flex flex-col bg-background overflow-hidden",children:[w.jsx(cB,{"data-hercules-id":"src/pages/studio/page.tsx:195:6","data-hercules-name":"QuickPromptPicker",open:k,onClose:()=>D(!1),onSelect:H=>{D(!1),S(H),G(H)}}),w.jsxs("header",{"data-hercules-id":"src/pages/studio/page.tsx:206:6","data-hercules-name":"header",className:"flex items-center justify-between px-4 md:px-6 py-3 border-b border-border bg-card/50 backdrop-blur-xl shrink-0 z-10",children:[w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:207:8","data-hercules-name":"div",className:"flex items-center gap-3",children:[w.jsxs(Qt,{"data-hercules-id":"src/pages/studio/page.tsx:208:10","data-hercules-name":"Button",variant:"ghost",size:"sm",className:"gap-2 cursor-pointer text-muted-foreground hover:text-foreground",onClick:()=>e("/"),children:[w.jsx($x,{"data-hercules-id":"src/pages/studio/page.tsx:214:12","data-hercules-name":"ArrowLeft",className:"w-4 h-4"}),w.jsx("span",{"data-hercules-id":"src/pages/studio/page.tsx:215:12","data-hercules-name":"span",className:"hidden sm:block",children:"Back"})]}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:217:10","data-hercules-name":"div",className:"w-px h-5 bg-border"}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:218:10","data-hercules-name":"div",className:"flex items-center gap-2",children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:219:12","data-hercules-name":"div",className:"w-6 h-6 rounded-full bg-primary flex items-center justify-center",children:w.jsx(Dp,{"data-hercules-id":"src/pages/studio/page.tsx:220:14","data-hercules-name":"Camera",className:"w-3 h-3 text-primary-foreground"})}),w.jsx("span",{"data-hercules-id":"src/pages/studio/page.tsx:222:12","data-hercules-name":"span",className:"font-serif font-bold text-sm hidden sm:block",children:"Luminary Studio"})]}),w.jsxs("button",{"data-hercules-id":"src/pages/studio/page.tsx:224:10","data-hercules-name":"button",onClick:()=>M(!A),className:Ve("hidden md:flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-xs font-medium transition-all cursor-pointer",A?"border-primary/40 bg-primary/10 text-primary":"border-border text-muted-foreground hover:text-foreground"),children:[w.jsx(Hx,{"data-hercules-id":"src/pages/studio/page.tsx:233:12","data-hercules-name":"LayoutTemplate",className:"w-3.5 h-3.5"}),"Templates"]})]}),w.jsx(Ut,{"data-hercules-id":"src/pages/studio/page.tsx:239:8","data-hercules-name":"AnimatePresence",children:t&&w.jsx(Ce.div,{"data-hercules-id":"src/pages/studio/page.tsx:241:12","data-hercules-name":"motion.div",initial:{opacity:0,scale:.9}
58,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"flex items-center gap-1 bg-muted rounded-lg p-1",children:[{mode:"split",icon:AP,label:"Split"},{mode:"before",icon:$x,label:"Before"},{mode:"after",icon:mP,label:"After"}].map(({mode:H,icon:J,label:se})=>w.jsxs("button",{"data-hercules-id":"src/pages/studio/page.tsx:254:16","data-hercules-name":"button",onClick:()=>h(H),className:Ve("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-all cursor-pointer",d===H?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[w.jsx(J,{"data-hercules-id":"src/pages/studio/page.tsx:264:18","data-hercules-name":"Icon",className:"w-3 h-3"}),w.jsx("span",{"data-hercules-id":"src/pages/studio/page.tsx:265:18","data-hercules-name":"span",className:"hidden sm:block",children:se})]},H))})}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:272:8","data-hercules-name":"div",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:273:10","data-hercules-name":"div",className:Ve("w-2 h-2 rounded-full",l?"bg-amber-400 animate-pulse":"bg-green-500 animate-pulse")}),w.jsx("span",{"data-hercules-id":"src/pages/studio/page.tsx:277:10","data-hercules-name":"span",className:"hidden sm:block",children:l?"Processing…":"AI Ready"})]})]}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:282:6","data-hercules-name":"div",className:"flex flex-1 overflow-hidden",children:[w.jsx(Ut,{"data-hercules-id":"src/pages/studio/page.tsx:284:8","data-hercules-name":"AnimatePresence",initial:!1,children:A&&w.jsx(Ce.aside,{"data-hercules-id":"src/pages/studio/page.tsx:286:12","data-hercules-name":"motion.aside",initial:{width:0,opacity:0},animate:{width:220,opacity:1},exit:{width:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},className:"shrink-0 border-r border-border bg-card/30 overflow-hidden hidden md:flex flex-col",style:{minWidth:0},children:w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:294:14","data-hercules-name":"div",className:"w-[220px] h-full flex flex-col overflow-hidden",children:w.jsx(oB,{"data-hercules-id":"src/pages/studio/page.tsx:295:16","data-hercules-name":"TemplateGallery",selectedTemplate:g,onSelectTemplate:v})})})}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:305:8","data-hercules-name":"div",className:"flex-1 flex flex-col overflow-hidden min-w-0",children:w.jsx(Ut,{"data-hercules-id":"src/pages/studio/page.tsx:306:10","data-hercules-name":"AnimatePresence",mode:"wait",children:t?w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/page.tsx:343:14","data-hercules-name":"motion.div",initial:{opacity:0}
58,animate:{opacity:1},exit:{opacity:0},className:"flex-1 p-4 overflow-hidden relative",children:[w.jsx(Ut,{"data-hercules-id":"src/pages/studio/page.tsx:351:16","data-hercules-name":"AnimatePresence",children:g&&w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/page.tsx:353:20","data-hercules-name":"motion.div",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},className:"absolute top-6 left-1/2 -translate-x-1/2 z-20 flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/90 text-primary-foreground text-xs font-medium shadow-lg backdrop-blur-sm",children:[w.jsx(Hx,{"data-hercules-id":"src/pages/studio/page.tsx:359:22","data-hercules-name":"LayoutTemplate",className:"w-3 h-3"}),g.name,w.jsx("button",{"data-hercules-id":"src/pages/studio/page.tsx:361:22","data-hercules-name":"button",onClick:()=>v(null),className:"ml-1 cursor-pointer opacity-70 hover:opacity-100",children:w.jsx(gr,{"data-hercules-id":"src/pages/studio/page.tsx:365:24","data-hercules-name":"X",className:"w-3 h-3"})})]})}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:371:16","data-hercules-name":"div",className:"w-full h-full",children:d==="split"?w.jsx(Wq,{"data-hercules-id":"src/pages/studio/page.tsx:373:20","data-hercules-name":"BeforeAfterSlider",before:t,after:O??t,isProcessing:l}):d==="before"?w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:379:20","data-hercules-name":"div",className:"w-full h-full rounded-xl overflow-hidden border border-border bg-card/40 flex items-center justify-center relative",children:[w.jsx("img",{"data-hercules-id":"src/pages/studio/page.tsx:380:22","data-hercules-name":"img",src:t,alt:"Original",className:"max-w-full max-h-full object-contain"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:385:22","data-hercules-name":"div",className:"absolute top-3 left-3 px-2 py-1 rounded-md bg-black/60 text-white text-xs font-medium",children:"BEFORE"})]}):w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:390:20","data-hercules-name":"div",className:"w-full h-full rounded-xl overflow-hidden border border-border bg-card/40 flex items-center justify-center relative",children:l?w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:392:24","data-hercules-name":"div",className:"text-center space-y-3",children:[w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:393:26","data-hercules-name":"div",className:"w-12 h-12 rounded-full border-2 border-primary border-t-transparent animate-spin mx-auto"}),w.jsx("p",{"data-hercules-id":"src/pages/studio/page.tsx:394:26","data-hercules-name":"p",className:"text-sm text-muted-foreground",children:"AI is working…"})]}):O?w.jsxs(w.Fragment,{children:[w.jsx("img",{"data-hercules-id":"src/pages/studio/page.tsx:398:26","data-hercules-name":"img",src:O,alt:"Result",className:"max-w-full max-h-full object-contain"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:403:26","data-hercules-name":"div",className:"absolute top-3 right-3 px-2 py-1 rounded-md bg-primary/80 text-primary-foreground text-xs font-medium",children:"AFTER"})]}):w.jsx("p",{"data-hercules-id":"src/pages/studio/page.tsx:408:24","data-hercules-name":"p",className:"text-muted-foreground text-sm",children:"Apply a transform to see the result"})})})]},"workspace"):w.jsxs(Ce.div,{"data-hercules-id":"src/pages/studio/page.tsx:308:14","data-hercules-name":"motion.div",initial:{opacity:0}
58,animate:{opacity:1},exit:{opacity:0},className:"flex-1 flex flex-col",children:[w.jsx(Xq,{"data-hercules-id":"src/pages/studio/page.tsx:315:16","data-hercules-name":"UploadZone",onImageLoaded:fe}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:316:16","data-hercules-name":"div",className:"px-6 pb-6",children:[w.jsx("p",{"data-hercules-id":"src/pages/studio/page.tsx:317:18","data-hercules-name":"p",className:"text-xs text-muted-foreground text-center mb-3",children:"Try a sample image"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:320:18","data-hercules-name":"div",className:"flex gap-3 justify-center",children:uB.map(H=>w.jsxs("button",{"data-hercules-id":"src/pages/studio/page.tsx:322:22","data-hercules-name":"button",onClick:()=>fe(H.src,`${H.label.toLowerCase()}-sample.jpg`),className:"group relative w-20 h-20 md:w-24 md:h-24 rounded-xl overflow-hidden border border-border hover:border-primary/50 transition-all cursor-pointer",children:[w.jsx("img",{"data-hercules-id":"src/pages/studio/page.tsx:329:24","data-hercules-name":"img",src:H.src,alt:H.label,className:"w-full h-full object-cover transition-transform group-hover:scale-110 duration-300"}),w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:334:24","data-hercules-name":"div",className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-center pb-1",children:w.jsx("span",{"data-hercules-id":"src/pages/studio/page.tsx:335:26","data-hercules-name":"span",className:"text-white text-xs font-medium",children:H.label})})]},H.label))})]})]},"upload")})}),w.jsx("aside",{"data-hercules-id":"src/pages/studio/page.tsx:421:8","data-hercules-name":"aside",className:"w-72 xl:w-80 shrink-0 border-l border-border bg-card/30 p-4 overflow-y-auto hidden md:block",children:w.jsx(iB,{"data-hercules-id":"src/pages/studio/page.tsx:422:10","data-hercules-name":"StudioToolbar",hasImage:!!t,hasResult:!!O,isProcessing:l,pipelineStages:Z,pipelineError:W,options:p,onOptionsChange:y,onProcess:F,onReset:ie,onDownload:X,fileName:r,selectedTemplate:g,prompt:x,activeTags:E,onPromptChange:S,onTagsChange:C})})]}),w.jsxs("div",{"data-hercules-id":"src/pages/studio/page.tsx:444:6","data-hercules-name":"div",className:"md:hidden border-t border-border bg-card/50 p-3 flex gap-2 shrink-0",children:[w.jsx(Qt,{"data-hercules-id":"src/pages/studio/page.tsx:445:8","data-hercules-name":"Button",className:"flex-1 gap-2 cursor-pointer",disabled:!t||l,onClick:F,size:"sm",children:l?w.jsx("div",{"data-hercules-id":"src/pages/studio/page.tsx:452:12","data-hercules-name":"div",className:"w-3 h-3 rounded-full border-2 border-primary-foreground border-t-transparent animate-spin"}):"Apply Transform"}),O&&w.jsx(Qt,{"data-hercules-id":"src/pages/studio/page.tsx:458:10","data-hercules-name":"Button",variant:"secondary",size:"sm",className:"gap-2 cursor-pointer",onClick:X,children:"Download"}),t&&w.jsx(Qt,{"data-hercules-id":"src/pages/studio/page.tsx:468:10","data-hercules-name":"Button",variant:"ghost",size:"sm",className:"cursor-pointer",onClick:ie,children:"Reset"})]})]})}function hB(){const e=ms();return _.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),w.jsx("div",{"data-hercules-id":"src/pages/NotFound.tsx:16:4","data-hercules-name":"div",className:"min-h-screen flex items-center justify-center bg-background",children:w.jsxs("div",{"data-hercules-id":"src/pages/NotFound.tsx:17:6","data-hercules-name":"div",className:"text-center space-y-6",children:[w.jsxs("div",{"data-hercules-id":"src/pages/NotFound.tsx:18:8","data-hercules-name":"div",className:"space-y-2",children:[w.jsx("h1",{"data-hercules-id":"src/pages/NotFound.tsx:19:10","data-hercules-name":"h1",className:"text-6xl font-bold text-muted-foreground",children:"404"}),w.jsx("h2",{"data-hercules-id":"src/pages/NotFound.tsx:20:10","data-hercules-name":"h2",className:"text-2xl font-semibold",children:"Page Not Found"})]}),w.jsx("p",{"data-hercules-id":"src/pages/NotFound.tsx:22:8","data-hercules-name":"p",className:"text-lg text-muted-foreground max-w-md mx-auto",children:"This page does not exist."}),w.jsx("div",{"data-hercules-id":"src/pages/NotFound.tsx:25:8","data-hercules-name":"div",className:"pt-4",children:w.jsx(Qt,{"data-hercules-id":"src/pages/NotFound.tsx:26:10","data-hercules-name":"Button",asChild:!0,children:w.jsx(hm,{"data-hercules-id":"src/pages/NotFound.tsx:27:12","data-hercules-name":"Link",to:"/",children:"Return to Home"})})})]})})}function pB(){return w.jsx(V6,{"data-hercules-id":"src/App.tsx:10:4","data-hercules-name":"DefaultProviders",children:w.jsx(vk,{"data-hercules-id":"src/App.tsx:11:6","data-hercules-name":"BrowserRouter",children:w.jsxs(GA,{"data-hercules-id":"src/App.tsx:12:8","data-hercules-name":"Routes",children:[w.jsx(Lo,{"data-hercules-id":"src/App.tsx:13:10","data-hercules-name":"Route",path:"/",element:w.jsx(Kq,{"data-hercules-id":"src/App.tsx:13:35","data-hercules-name":"Index"})}),w.jsx(Lo,{"data-hercules-id":"src/App.tsx:14:10","data-hercules-name":"Route",path:"/studio",element:w.jsx(fB,{"data-hercules-id":"src/App.tsx:14:41","data-hercules-name":"StudioPage"})}),w.jsx(Lo,{"data-hercules-id":"src/App.tsx:15:10","data-hercules-name":"Route",path:"/auth/callback",element:w.jsx(GP,{"data-hercules-id":"src/App.tsx:15:48","data-hercules-name":"AuthCallback"})}),w.jsx(Lo,{"data-hercules-id":"src/App.tsx:17:10","data-hercules-name":"Route",path:"*",element:w.jsx(hB,{"data-hercules-id":"src/App.tsx:17:35","data-hercules-name":"NotFound"})})]})})})}KC.createRoot(document.getElementById("root")).render(w.jsx(pB,{"data-hercules-id":"src/main.tsx:4:52","data-hercules-name":"App"}));

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.