vendor: 4,866 bytes, lines 1-9
1var XP=Object.defineProperty;var px=e=>{throw TypeError(e)};var JP=(e,t,n)=>t in e?XP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var zr=(e,t,n)=>JP(e,typeof t!="symbol"?t+"":t,n),Jh=(e,t,n)=>t.has(e)||px("Cannot "+n);var P=(e,t,n)=>(Jh(e,t,"read from private field"),n?n.call(e):t.get(e)),ce=(e,t,n)=>t.has(e)?px("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Z=(e,t,n,r)=>(Jh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Se=(e,t,n)=>(Jh(e,t,"access private method"),n);var zc=(e,t,n,r)=>({set _(s){Z(e,t,s,n)},get _(){return P(e,t,r)}});function ZP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function eA(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var n1={exports:{}},Bd={},r1={exports:{}},_e={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var yc=Symbol.for("react.element"),tA=Symbol.for("react.portal"),nA=Symbol.for("react.fragment"),rA=Symbol.for("react.strict_mode"),sA=Symbol.for("react.profiler"),iA=Symbol.for("react.provider"),oA=Symbol.for("react.context"),aA=Symbol.for("react.forward_ref"),lA=Symbol.for("react.suspense"),cA=Symbol.for("react.memo"),uA=Symbol.for("react.lazy"),mx=Symbol.iterator;function dA(e){return e===null||typeof e!="object"?null:(e=mx&&e[mx]||e["@@iterator"],typeof e=="function"?e:null)}var s1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},i1=Object.assign,o1={};function Ra(e,t,n){this.props=e,this.context=t,this.refs=o1,this.updater=n||s1}Ra.prototype.isReactComponent={};Ra.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ra.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function a1(){}a1.prototype=Ra.prototype;function Cg(e,t,n){this.props=e,this.context=t,this.refs=o1,this.updater=n||s1}var _g=Cg.prototype=new a1;_g.constructor=Cg;i1(_g,Ra.prototype);_g.isPureReactComponent=!0;var gx=Array.isArray,l1=Object.prototype.hasOwnProperty,Eg={current:null},c1={key:!0,ref:!0,__self:!0,__source:!0};function u1(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)l1.call(t,r)&&!c1.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:yc,type:e,key:i,ref:o,props:s,_owner:Eg.current}}function hA(e,t){return{$$typeof:yc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ng(e){return typeof e=="object"&&e!==null&&e.$$typeof===yc}function fA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vx=/\/+/g;function Zh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?fA(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function ju(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case yc:case tA:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Zh(o,0):r,gx(s)?(n="",e!=null&&(n=e.replace(vx,"$&/")+"/"),ju(s,t,n,"",function(u){return u})):s!=null&&(Ng(s)&&(s=hA(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(vx,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",gx(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+Zh(i,l);o+=ju(i,t,n,c,s)}else if(c=dA(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+Zh(i,l++),o+=ju(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Bc(e,t,n){if(e==null)return e;var r=[],s=0;return ju(e,r,"","",function(i){return t.call(n,i,s++)}),r}function pA(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Kt={current:null},Cu={transition:null},mA={ReactCurrentDispatcher:Kt,ReactCurrentBatchConfig:Cu,ReactCurrentOwner:Eg};function d1(){throw Error("act(...) is not supported in production builds of React.")}_e.Children={map:Bc,forEach:function(e,t,n){Bc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Bc(e,function(){t++}),t},toArray:function(e){return Bc(e,function(t){return t})||[]},only:function(e){if(!Ng(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_e.Component=Ra;_e.Fragment=nA;_e.Profiler=sA;_e.PureComponent=Cg;_e.StrictMode=rA;_e.Suspense=lA;_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mA;_e.act=d1;_e.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=i1({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Eg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)l1.call(t,c)&&!c1.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:yc,type:e.type,key:s,ref:i,props:r,_owner:o}};_e.createContext=function(e){return e={$$typeof:oA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:iA,_context:e},e.Consumer=e};_e.createElement=u1;_e.createFactory=function(e){var t=u1.bind(null,e);return t.type=e,t};_e.createRef=function(){return{current:null}};_e.forwardRef=function(e){return{$$typeof:aA,render:e}};_e.isValidElement=Ng;_e.lazy=function(e){return{$$typeof:uA,_payload:{_status:-1,_result:e},_init:pA}};_e.memo=function(e,t){return{$$typeof:cA,type:e,compare:t===void 0?null:t}};_e.startTransition=function(e){var t=Cu.transition;Cu.transition={};try{e()}finally{Cu.transition=t}};_e.unstable_act=d1;_e.useCallback=function(e,t){return Kt.current.useCallback(e,t)};_e.useContext=function(e){return Kt.current.useContext(e)};_e.useDebugValue=function(){};_e.useDeferredValue=function(e){return Kt.current.useDeferredValue(e)};_e.useEffect=function(e,t){return Kt.current.useEffect(e,t)};_e.useId=function(){return Kt.current.useId()};_e.useImperativeHandle=function(e,t,n){return Kt.current.useImperativeHandle(e,t,n)};_e.useInsertionEffect=function(e,t){return Kt.current.useInsertionEffect(e,t)};_e.useLayoutEffect=function(e,t){return Kt.current.useLayoutEffect(e,t)};_e.useMemo=function(e,t){return Kt.current.useMemo(e,t)};_e.useReducer=function(e,t,n){return Kt.current.useReducer(e,t,n)};_e.useRef=function(e){return Kt.current.useRef(e)};_e.useState=function(e){return Kt.current.useState(e)};_e.useSyncExternalStore=function(e,t,n){return Kt.current.useSyncExternalStore(e,t,n)};_e.useTransition=function(){return Kt.current.useTransition()};_e.version="18.3.1";r1.exports=_e;var m=r1.exports;const B=Xi(m),Tg=ZP({__proto__:null,default:B},[m]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var gA=m,vA=Symbol.for("react.element"),yA=Symbol.for("react.fragment"),xA=Object.prototype.hasOwnProperty,wA=gA.__SECRET_INT
vendor: 8,821 bytes, lines 17-33
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bA={key:!0,ref:!0,__self:!0,__source:!0};function h1(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)xA.call(t,r)&&!bA.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:vA,type:e,key:i,ref:o,props:s,_owner:wA.current}}Bd.Fragment=yA;Bd.jsx=h1;Bd.jsxs=h1;n1.exports=Bd;var a=n1.exports,f1={exports:{}},Nn={},p1={exports:{}},m1={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(O,R){var C=O.length;O.push(R);e:for(;0<C;){var X=C-1>>>1,Q=O[X];if(0<s(Q,R))O[X]=R,O[C]=Q,C=X;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var R=O[0],C=O.pop();if(C!==R){O[0]=C;e:for(var X=0,Q=O.length,T=Q>>>1;X<T;){var U=2*(X+1)-1,ne=O[U],se=U+1,H=O[se];if(0>s(ne,C))se<Q&&0>s(H,ne)?(O[X]=H,O[se]=C,X=se):(O[X]=ne,O[U]=C,X=U);else if(se<Q&&0>s(H,C))O[X]=H,O[se]=C,X=se;else break e}}return R}function s(O,R){var C=O.sortIndex-R.sortIndex;return C!==0?C:O.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,v=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(O){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=O)r(u),R.sortIndex=R.expirationTime,t(c,R);else break;R=n(u)}}function S(O){if(y=!1,w(O),!v)if(n(c)!==null)v=!0,z(j);else{var R=n(u);R!==null&&Y(S,R.startTime-O)}}function j(O,R){v=!1,y&&(y=!1,g(A),A=-1),f=!0;var C=p;try{for(w(R),h=n(c);h!==null&&(!(h.expirationTime>R)||O&&!D());){var X=h.callback;if(typeof X=="function"){h.callback=null,p=h.priorityLevel;var Q=X(h.expirationTime<=R);R=e.unstable_now(),typeof Q=="function"?h.callback=Q:h===n(c)&&r(c),w(R)}else r(c);h=n(c)}if(h!==null)var T=!0;else{var U=n(u);U!==null&&Y(S,U.startTime-R),T=!1}return T}finally{h=null,p=C,f=!1}}var k=!1,E=null,A=-1,I=5,_=-1;function D(){return!(e.unstable_now()-_<I)}function N(){if(E!==null){var O=e.unstable_now();_=O;var R=!0;try{R=E(!0,O)}finally{R?F():(k=!1,E=null)}}else k=!1}var F;if(typeof x=="function")F=function(){x(N)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,$=M.port2;M.port1.onmessage=N,F=function(){$.postMessage(null)}}else F=function(){b(N,0)};function z(O){E=O,k||(k=!0,F())}function Y(O,R){A=b(function(){O(e.unstable_now())},R)}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(O){O.callback=null},e.unstable_continueExecution=function(){v||f||(v=!0,z(j))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var R=3;break;default:R=p}var C=p;p=R;try{return O()}finally{p=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,R){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var C=p;p=O;try{return R()}finally{p=C}},e.unstable_scheduleCallback=function(O,R,C){var X=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?X+C:X):C=X,O){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=C+Q,O={id:d++,callback:R,priorityLevel:O,startTime:C,expirationTime:Q,sortIndex:-1},C>X?(O.sortIndex=C,t(u,O),n(c)===null&&O===n(u)&&(y?(g(A),A=-1):y=!0,Y(S,C-X))):(O.sortIndex=Q,t(c,O),v||f||(v=!0,z(j))),O},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(O){var R=p;return function(){var C=p;p=R;try{return O.apply(this,arguments)}finally{p=C}}}})(m1);p1.exports=m1;var SA=p1.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var kA=m,_n=SA;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g1=new Set,$l={};function Ji(e,t){wa(e,t),wa(e+"Capture",t)}function wa(e,t){for($l[e]=t,e=0;e<t.length;e++)g1.add(t[e])}var ns=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sp=Object.prototype.hasOwnProperty,jA=/^[: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]*$/,yx={},xx={};function CA(e){return Sp.call(xx,e)?!0:Sp.call(yx,e)?!1:jA.test(e)?xx[e]=!0:(yx[e]=!0,!1)}function _A(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function EA(e,t,n,r){if(t===null||typeof t>"u"||_A(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Gt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Gt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Gt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new Gt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){kt[e]=new Gt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Gt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new Gt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new Gt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new Gt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pg=/[\-:]([a-z])/g;function Ag(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
33-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Pg,Ag);kt[t]=new Gt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Pg,Ag);kt[t]=new Gt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pg,Ag);kt[t]=new Gt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new Gt(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new Gt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new Gt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rg(e,t,n,r){var s=kt.hasOwnProperty(t)?kt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(EA(t,n,s,r)&&(n=null),r||s===null?CA(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ls=kA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Uc=Symbol.for("react.element"),Ao=Symbol.for("react.portal"),Ro=Symbol.for("react.fragment"),Ig=Symbol.for("react.strict_mode"),kp=Symbol.for("react.profiler"),v1=Symbol.for("react.provider"),y1=Symbol.for("react.context"),Og=Symbol.for("react.forward_ref"),jp=Symbol.for("react.suspense"),Cp=Symbol.for("react.suspense_list"),Dg=Symbol.for("react.memo"),Ss=Symbol.for("react.lazy"),x1=Symbol.for("react.offscreen"),wx=Symbol.iterator;function Xa(e){return e===null||typeof e!="object"?null:(e=wx&&e[wx]||e["@@iterator"],typeof e=="function"?e:null)}var Je=Object.assign,ef;function fl(e){if(ef===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ef=t&&t[1]||""}return` 34`+ef+e}var tf=!1;function nf(e,t){if(!e||tf)return"";tf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var c=` 37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{tf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fl(e):""}function NA(e){switch(e.tag){case 5:return fl(e.type);case 16:return fl("Lazy");case 13:return fl("Suspense");case 19:return fl("SuspenseList");case 0:case 2:case 15:return e=nf(e.type,!1),e;case 11:return e=nf(e.type.render,!1),e;case 1:return e=nf(e.type,!0),e;default:return""}}function _p(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ro:return"Fragment";case Ao:return"Portal";case kp:return"Profiler";case Ig:return"StrictMode";case jp:return"Suspense";case Cp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case y1:return(e.displayName||"Context")+".Consumer";case v1:return(e._context.displayName||"Context")+".Provider";case Og:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dg:return t=e.displayName||null,t!==null?t:_p(e.type)||"Memo";case Ss:t=e._payload,e=e._init;try{return _p(e(t))}catch{}}return null}function TA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _p(t);case 8:return t===Ig?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function w1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function PA(e){var t=w1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hc(e){e._valueTracker||(e._valueTracker=PA(e))}function b1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=w1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ku(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ep(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Xs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function S1(e,t){t=t.checked,t!=null&&Rg(e,"checked",t,!1)}function Np(e,t){S1(e,t);var n=Xs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Tp(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tp(e,t.type,Xs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Tp(e,t,n){(t!=="number"||Ku(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pl=Array.isArray;function Vo(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Xs(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Pp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return Je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function kx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if(pl(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Xs(n)}}function k1(e,t){var n=Xs(t.value),r=Xs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function jx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function j1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ap(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?j1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wc,C1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wc=Wc||document.createElement("div"),Wc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zl(e,t){if(t){var n=e.firstChild;
vendor: 8,937 bytes, line 37
37if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var kl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},AA=["Webkit","ms","Moz","O"];Object.keys(kl).forEach(function(e){AA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kl[t]=kl[e]})});function _1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||kl.hasOwnProperty(e)&&kl[e]?(""+t).trim():t+"px"}function E1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=_1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var RA=Je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rp(e,t){if(t){if(RA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function Ip(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Op=null;function Mg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dp=null,qo=null,Ko=null;function Cx(e){if(e=bc(e)){if(typeof Dp!="function")throw Error(V(280));var t=e.stateNode;t&&(t=qd(t),Dp(e.stateNode,e.type,t))}}function N1(e){qo?Ko?Ko.push(e):Ko=[e]:qo=e}function T1(){if(qo){var e=qo,t=Ko;if(Ko=qo=null,Cx(e),t)for(e=0;e<t.length;e++)Cx(t[e])}}function P1(e,t){return e(t)}function A1(){}var rf=!1;function R1(e,t,n){if(rf)return e(t,n);rf=!0;try{return P1(e,t,n)}finally{rf=!1,(qo!==null||Ko!==null)&&(A1(),T1())}}function Bl(e,t){var n=e.stateNode;if(n===null)return null;var r=qd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var Mp=!1;if(ns)try{var Ja={};Object.defineProperty(Ja,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",Ja,Ja),window.removeEventListener("test",Ja,Ja)}catch{Mp=!1}function IA(e,t,n,r,s,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var jl=!1,Gu=null,Yu=!1,Lp=null,OA={onError:function(e){jl=!0,Gu=e}};function DA(e,t,n,r,s,i,o,l,c){jl=!1,Gu=null,IA.apply(OA,arguments)}function MA(e,t,n,r,s,i,o,l,c){if(DA.apply(this,arguments),jl){if(jl){var u=Gu;jl=!1,Gu=null}else throw Error(V(198));Yu||(Yu=!0,Lp=u)}}function Zi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function I1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _x(e){if(Zi(e)!==e)throw Error(V(188))}function LA(e){var t=e.alternate;if(!t){if(t=Zi(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return _x(s),e;if(i===r)return _x(s),t;i=i.sibling}throw Error(V(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(V(189))}}if(n.alternate!==r)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function O1(e){return e=LA(e),e!==null?D1(e):null}function D1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=D1(e);if(t!==null)return t;e=e.sibling}return null}var M1=_n.unstable_scheduleCallback,Ex=_n.unstable_cancelCallback,FA=_n.unstable_shouldYield,$A=_n.unstable_requestPaint,st=_n.unstable_now,zA=_n.unstable_getCurrentPriorityLevel,Lg=_n.unstable_ImmediatePriority,L1=_n.unstable_UserBlockingPriority,Qu=_n.unstable_NormalPriority,BA=_n.unstable_LowPriority,F1=_n.unstable_IdlePriority,Ud=null,Pr=null;function UA(e){if(Pr&&typeof Pr.onCommitFiberRoot=="function")try{Pr.onCommitFiberRoot(Ud,e,void 0,(e.current.flags&128)===128)}catch{}}var cr=Math.clz32?Math.clz32:VA,HA=Math.log,WA=Math.LN2;function VA(e){return e>>>=0,e===0?32:31-(HA(e)/WA|0)|0}var Vc=64,qc=4194304;function ml(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=ml(l):(i&=o,i!==0&&(r=ml(i)))}else o=n&~s,o!==0?r=ml(o):i!==0&&(r=ml(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-cr(t),s=1<<n,r|=e[n],t&=~s;return r}function qA(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function KA(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-cr(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=qA(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function Fp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $1(){var e=Vc;return Vc<<=1,!(Vc&4194240)&&(Vc=64),e}function sf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-cr(t),e[t]=n}function GA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-cr(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Fg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-cr(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Oe=0;function z1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var B1,$g,U1,H1,W1,$p=!1,Kc=[],zs=null,Bs=null,Us=null,Ul=new Map,Hl=new Map,js=[],YA="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 submit".split(" ");function Nx(e,t){switch(e){case"focusin":case"focusout":zs=null;break;case"dragenter":case"dragleave":Bs=null;break;case"mouseover":case"mouseout":Us=null;break;case"pointerover":case"pointerout":Ul.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hl.delete(t.pointerId)}}function Za(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=bc(t),t!==null&&$g(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function QA(e,t,n,r,s){switch(t){case"focusin":return zs=Za(zs,e,t,n,r,s
vendor: 11,635 bytes, line 37
37),!0;case"dragenter":return Bs=Za(Bs,e,t,n,r,s),!0;case"mouseover":return Us=Za(Us,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ul.set(i,Za(Ul.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Hl.set(i,Za(Hl.get(i)||null,e,t,n,r,s)),!0}return!1}function V1(e){var t=Si(e.target);if(t!==null){var n=Zi(t);if(n!==null){if(t=n.tag,t===13){if(t=I1(n),t!==null){e.blockedOn=t,W1(e.priority,function(){U1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function _u(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Op=r,n.target.dispatchEvent(r),Op=null}else return t=bc(n),t!==null&&$g(t),e.blockedOn=n,!1;t.shift()}return!0}function Tx(e,t,n){_u(e)&&n.delete(t)}function XA(){$p=!1,zs!==null&&_u(zs)&&(zs=null),Bs!==null&&_u(Bs)&&(Bs=null),Us!==null&&_u(Us)&&(Us=null),Ul.forEach(Tx),Hl.forEach(Tx)}function el(e,t){e.blockedOn===t&&(e.blockedOn=null,$p||($p=!0,_n.unstable_scheduleCallback(_n.unstable_NormalPriority,XA)))}function Wl(e){function t(s){return el(s,e)}if(0<Kc.length){el(Kc[0],e);for(var n=1;n<Kc.length;n++){var r=Kc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zs!==null&&el(zs,e),Bs!==null&&el(Bs,e),Us!==null&&el(Us,e),Ul.forEach(t),Hl.forEach(t),n=0;n<js.length;n++)r=js[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<js.length&&(n=js[0],n.blockedOn===null);)V1(n),n.blockedOn===null&&js.shift()}var Go=ls.ReactCurrentBatchConfig,Ju=!0;function JA(e,t,n,r){var s=Oe,i=Go.transition;Go.transition=null;try{Oe=1,zg(e,t,n,r)}finally{Oe=s,Go.transition=i}}function ZA(e,t,n,r){var s=Oe,i=Go.transition;Go.transition=null;try{Oe=4,zg(e,t,n,r)}finally{Oe=s,Go.transition=i}}function zg(e,t,n,r){if(Ju){var s=zp(e,t,n,r);if(s===null)mf(e,t,r,Zu,n),Nx(e,r);else if(QA(s,e,t,n,r))r.stopPropagation();else if(Nx(e,r),t&4&&-1<YA.indexOf(e)){for(;s!==null;){var i=bc(s);if(i!==null&&B1(i),i=zp(e,t,n,r),i===null&&mf(e,t,r,Zu,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else mf(e,t,r,null,n)}}var Zu=null;function zp(e,t,n,r){if(Zu=null,e=Mg(r),e=Si(e),e!==null)if(t=Zi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=I1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zu=e,null}function q1(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zA()){case Lg:return 1;case L1:return 4;case Qu:case BA:return 16;case F1:return 536870912;default:return 16}default:return 16}}var Ls=null,Bg=null,Eu=null;function K1(){if(Eu)return Eu;var e,t=Bg,n=t.length,r,s="value"in Ls?Ls.value:Ls.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return Eu=s.slice(e,1<r?1-r:void 0)}function Nu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Gc(){return!0}function Px(){return!1}function Tn(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Gc:Px,this.isPropagationStopped=Px,this}return Je(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gc)},persist:function(){},isPersistent:Gc}),t}var Ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ug=Tn(Ia),wc=Je({},Ia,{view:0,detail:0}),eR=Tn(wc),of,af,tl,Hd=Je({},wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tl&&(tl&&e.type==="mousemove"?(of=e.screenX-tl.screenX,af=e.screenY-tl.screenY):af=of=0,tl=e),of)},movementY:function(e){return"movementY"in e?e.movementY:af}}),Ax=Tn(Hd),tR=Je({},Hd,{dataTransfer:0}),nR=Tn(tR),rR=Je({},wc,{relatedTarget:0}),lf=Tn(rR),sR=Je({},Ia,{animationName:0,elapsedTime:0,pseudoElement:0}),iR=Tn(sR),oR=Je({},Ia,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),aR=Tn(oR),lR=Je({},Ia,{data:0}),Rx=Tn(lR),cR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uR={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"},dR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dR[e])?!!t[e]:!1}function Hg(){return hR}var fR=Je({},wc,{key:function(e){if(e.key){var t=cR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Nu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hg,charCode:function(e){return e.type==="keypress"?Nu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Nu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pR=Tn(fR),mR=Je({},Hd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ix=Tn(mR),gR=Je({},wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hg}),vR=Tn(gR),yR=Je({},Ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),xR=Tn(yR),wR=Je({},Hd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),bR=Tn(wR),SR=[9,13,27,32],Wg=ns&&"CompositionEvent"in window,Cl=null;ns&&"documentMode"in document&&(Cl=document.documentMode);var kR=ns&&"TextEvent"in window&&!Cl,G1=ns&&(!Wg||Cl&&8<Cl&&11>=Cl),Ox=" ",Dx=!1;function Y1(e,t){switch(e){case"keyup":return SR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Io=!1;function jR(e,t){switch(e){case"compositionend":return Q1(t);case"keypress":return t.which!==32?null:(Dx=!0,Ox);case"textInput":return e=t.data,e===Ox&&Dx?null:e;default:return null}}function CR(e,t){if(Io)return e==="compositionend"||!Wg&&Y1(e,t)?(e=K1(),Eu=Bg=Ls=null,Io=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return G1&&t.locale!=="ko"?null:t.data;default:return null}}var _R={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 Mx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_R[e.type]:t==="textarea"}function X1(e,t,n,r){N1(r),t=ed(t,"onChange"),0<t.length&&(n=new Ug("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var _l=null,Vl=null;function ER(e){lS(e,0)}function Wd(e){var t=Mo(e);if(b1(t))return e}function NR(e,t){if(e==="change")return t}var J1=!1;if(ns){var cf;if(ns){var uf="oninput"in document;if(!uf){var Lx=document.createElement("div");Lx.setAttribute("oninput","return;"),uf=typeof Lx.oninput=="function"}cf=uf}else cf=!1;J1=cf&&(!document.documentMode||9<document.documentMode)}function Fx(){_l&&(_l.detachEvent("onpropertychange",Z1),Vl=_l=null)}function Z1(e){if(e.propertyName==="value"&&Wd(Vl)){var t=[];X1(t,Vl,e,Mg(e)),R1(ER,t)}}function TR(e,t,n){e==="focusin"?(Fx(),_l=t,Vl=n,_l.attachEvent("onpropertychange",Z1)):e==="focusout"&&Fx()}function PR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wd(Vl)}function AR(e,t){if(e==="click")return Wd(t)}function RR(e,t){if(e==="input"||e==="change")return Wd(t)}function IR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fr=typeof Object.is=="function"?Object.is:IR;function ql(e,t){if(fr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Sp.call(t,s)||!fr(e[s],t[s]))return!1}return!0}function $x(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zx(e,t){var n=$x(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=$x(n)}}function eS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tS(){for(var e=window,t=Ku();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ku(e.document)}return t}function Vg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function OR(e){var t=tS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eS(n.ownerDocument.documentElement,n)){if(r!==null&&Vg(n)){if
vendor: 4,319 bytes, line 37
37(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=zx(n,i);var o=zx(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var DR=ns&&"documentMode"in document&&11>=document.documentMode,Oo=null,Bp=null,El=null,Up=!1;function Bx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Up||Oo==null||Oo!==Ku(r)||(r=Oo,"selectionStart"in r&&Vg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),El&&ql(El,r)||(El=r,r=ed(Bp,"onSelect"),0<r.length&&(t=new Ug("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oo)))}function Yc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Do={animationend:Yc("Animation","AnimationEnd"),animationiteration:Yc("Animation","AnimationIteration"),animationstart:Yc("Animation","AnimationStart"),transitionend:Yc("Transition","TransitionEnd")},df={},nS={};ns&&(nS=document.createElement("div").style,"AnimationEvent"in window||(delete Do.animationend.animation,delete Do.animationiteration.animation,delete Do.animationstart.animation),"TransitionEvent"in window||delete Do.transitionend.transition);function Vd(e){if(df[e])return df[e];if(!Do[e])return e;var t=Do[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in nS)return df[e]=t[n];return e}var rS=Vd("animationend"),sS=Vd("animationiteration"),iS=Vd("animationstart"),oS=Vd("transitionend"),aS=new Map,Ux="abort auxClick 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(" ");function ni(e,t){aS.set(e,t),Ji(t,[e])}for(var hf=0;hf<Ux.length;hf++){var ff=Ux[hf],MR=ff.toLowerCase(),LR=ff[0].toUpperCase()+ff.slice(1);ni(MR,"on"+LR)}ni(rS,"onAnimationEnd");ni(sS,"onAnimationIteration");ni(iS,"onAnimationStart");ni("dblclick","onDoubleClick");ni("focusin","onFocus");ni("focusout","onBlur");ni(oS,"onTransitionEnd");wa("onMouseEnter",["mouseout","mouseover"]);wa("onMouseLeave",["mouseout","mouseover"]);wa("onPointerEnter",["pointerout","pointerover"]);wa("onPointerLeave",["pointerout","pointerover"]);Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gl="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(" "),FR=new Set("cancel close invalid load scroll toggle".split(" ").concat(gl));
vendor: 4,979 bytes, line 37
37function Hx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,MA(r,t,void 0,e),e.currentTarget=null}function lS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;Hx(s,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;Hx(s,l,u),i=c}}}if(Yu)throw e=Lp,Yu=!1,Lp=null,e}function He(e,t){var n=t[Kp];n===void 0&&(n=t[Kp]=new Set);var r=e+"__bubble";n.has(r)||(cS(t,e,2,!1),n.add(r))}function pf(e,t,n){var r=0;t&&(r|=4),cS(n,e,r,t)}var Qc="_reactListening"+Math.random().toString(36).slice(2);function Kl(e){if(!e[Qc]){e[Qc]=!0,g1.forEach(function(n){n!=="selectionchange"&&(FR.has(n)||pf(n,!1,e),pf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qc]||(t[Qc]=!0,pf("selectionchange",!1,t))}}function cS(e,t,n,r){switch(q1(t)){case 1:var s=JA;break;case 4:s=ZA;break;default:s=zg}n=s.bind(null,t,n,e),s=void 0,!Mp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function mf(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=Si(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}R1(function(){var u=i,d=Mg(n),h=[];e:{var p=aS.get(e);if(p!==void 0){var f=Ug,v=e;switch(e){case"keypress":if(Nu(n)===0)break e;case"keydown":case"keyup":f=pR;break;case"focusin":v="focus",f=lf;break;case"focusout":v="blur",f=lf;break;case"beforeblur":case"afterblur":f=lf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=Ax;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=nR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=vR;break;case rS:case sS:case iS:f=iR;break;case oS:f=xR;break;case"scroll":f=eR;break;case"wheel":f=bR;break;case"copy":case"cut":case"paste":f=aR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Ix}var y=(t&4)!==0,b=!y&&e==="scroll",g=y?p!==null?p+"Capture":null:p;y=[];for(var x=u,w;x!==null;){w=x;var S=w.stateNode;if(w.tag===5&&S!==null&&(w=S,g!==null&&(S=Bl(x,g),S!=null&&y.push(Gl(x,S,w)))),b)break;x=x.return}0<y.length&&(p=new f(p,v,null,n,d),h.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&n!==Op&&(v=n.relatedTarget||n.fromElement)&&(Si(v)||v[rs]))break e;if((f||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(v=n.relatedTarget||n.toElement,f=u,v=v?Si(v):null,v!==null&&(b=Zi(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(f=null,v=u),f!==v)){if(y=Ax,S="onMouseLeave",g="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=Ix,S="onPointerLeave",g="onPointerEnter",x="pointer"),b=f==null?p:Mo(f),w=v==null?p:Mo(v),p=new y(S,x+"leave",f,n,d),p.target=b,p.relatedTarget=w,S=null,Si(d)===u&&(y=new y(g,x+"enter",v,n,d),y.target=w,y.relatedTarget=b,S=y),b=S,f&&v)t:{for(y=f,g=v,x=0,w=y;w;w=ho(w))x++;for(w=0,S=g;S;S=ho(S))w++;for(;0<x-w;)y=ho(y),x--;for(;0<w-x;)g=ho(g),w--;for(;x--;){if(y===g||g!==null&&y===g.alternate)break t;y=ho(y),g=ho(g)}y=null}else y=null;f!==null&&Wx(h,p,f,y,!1),v!==null&&b!==null&&Wx(h,b,v,y,!0)}}e:{if(p=u?Mo(u):window,f=p.nodeName&&p.nodeName.toLowerCase(),f==="select"||f==="input"&&p.type==="file")var j=NR;else if(Mx(p))if(J1)j=RR;else{j=PR;var k=TR}else(f=p.nodeName)&&f.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=AR);if(j&&(j=j(e,u))){X1(h,j,n,d);break e}k&&k(e,p,u),e==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&Tp(p,"number",p.value)}switch(k=u?Mo(u):window,e){case"focusin":(Mx(k)||k.contentEditable==="true")&&(Oo=k,Bp=u,El=null);break;case"focusout":El=Bp=Oo=null;break;case"mousedown":Up=!0;break;case"contextmenu":case"mouseup":case"dragend":Up=!1,Bx(h,n,d);break;case"selectionchange":if(DR)break;case"keydown":case"keyup":Bx(h,n,d)}var E;if(Wg)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Io?Y1(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");
vendor: 4,318 bytes, lines 37-38
37A&&(G1&&n.locale!=="ko"&&(Io||A!=="onCompositionStart"?A==="onCompositionEnd"&&Io&&(E=K1()):(Ls=d,Bg="value"in Ls?Ls.value:Ls.textContent,Io=!0)),k=ed(u,A),0<k.length&&(A=new Rx(A,e,null,n,d),h.push({event:A,listeners:k}),E?A.data=E:(E=Q1(n),E!==null&&(A.data=E)))),(E=kR?jR(e,n):CR(e,n))&&(u=ed(u,"onBeforeInput"),0<u.length&&(d=new Rx("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=E))}lS(h,t)})}function Gl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ed(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Bl(e,n),i!=null&&r.unshift(Gl(e,i,s)),i=Bl(e,t),i!=null&&r.push(Gl(e,i,s))),e=e.return}return r}function ho(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Wx(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Bl(n,i),c!=null&&o.unshift(Gl(n,c,l))):s||(c=Bl(n,i),c!=null&&o.push(Gl(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $R=/\r\n?/g,zR=/\u0000|\uFFFD/g;function Vx(e){return(typeof e=="string"?e:""+e).replace($R,` 38`).replace(zR,"")}function Xc(e,t,n){if(t=Vx(t),Vx(e)!==t&&n)throw Error(V(425))}function td(){}var Hp=null,Wp=null;function Vp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qp=typeof setTimeout=="function"?setTimeout:void 0,BR=typeof clearTimeout=="function"?clearTimeout:void 0,qx=typeof Promise=="function"?Promise:void 0,UR=typeof queueMicrotask=="function"?queueMicrotask:typeof qx<"u"?function(e){return qx.resolve(null).then(e).catch(HR)}:qp;function HR(e){setTimeout(function(){throw e})}function gf(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Wl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Wl(t)}function Hs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Kx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Oa=Math.random().toString(36).slice(2),_r="__reactFiber$"+Oa,Yl="__reactProps$"+Oa,rs="__reactContainer$"+Oa,Kp="__reactEvents$"+Oa,WR="__reactListeners$"+Oa,VR="__reactHandles$"+Oa;function Si(e){var t=e[_r];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rs]||n[_r]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Kx(e);e!==null;){if(n=e[_r])return n;e=Kx(e)}return t}e=n,n=e.parentNode}return null}function bc(e){return e=e[_r]||e[rs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Mo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function qd(e){return e[Yl]||null}var Gp=[],Lo=-1;function ri(e){return{current:e}}function We(e){0>Lo||(e.current=Gp[Lo],Gp[Lo]=null,Lo--)}function ze(e,t){Lo++,Gp[Lo]=e.current,e.current=t}var Js={},Lt=ri(Js),an=ri(!1),Fi=Js;function ba(e,t){var n=e.type.contextTypes;if(!n)return Js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ln(e){return e=e.childContextTypes,e!=null}function nd(){We(an),We(Lt)}function Gx(e,t,n){if(Lt.current!==Js)throw Error(V(168));ze(Lt,t),ze(an,n)}function uS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(V(108,TA(e)||"Unknown",s));return Je({},n,r)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Js,Fi=Lt.current,ze(Lt,e),ze(an,an.current),!0}function Yx(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=uS(e,t,Fi),r.__reactInternalMemoizedMergedChildContext=e,We(an),We(Lt),ze(Lt,e)):We(an),ze(an,n)}var qr=null,Kd=!1,vf=!1;function dS(e){qr===null?qr=[e]:qr.push(e)}
vendor: 26,012 bytes, lines 38-40
38function qR(e){Kd=!0,dS(e)}function si(){if(!vf&&qr!==null){vf=!0;var e=0,t=Oe;try{var n=qr;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}qr=null,Kd=!1}catch(s){throw qr!==null&&(qr=qr.slice(e+1)),M1(Lg,si),s}finally{Oe=t,vf=!1}}return null}var Fo=[],$o=0,sd=null,id=0,On=[],Dn=0,$i=null,Yr=1,Qr="";function gi(e,t){Fo[$o++]=id,Fo[$o++]=sd,sd=e,id=t}function hS(e,t,n){On[Dn++]=Yr,On[Dn++]=Qr,On[Dn++]=$i,$i=e;var r=Yr;e=Qr;var s=32-cr(r)-1;r&=~(1<<s),n+=1;var i=32-cr(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Yr=1<<32-cr(t)+s|n<<s|r,Qr=i+e}else Yr=1<<i|n<<s|r,Qr=e}function qg(e){e.return!==null&&(gi(e,1),hS(e,1,0))}function Kg(e){for(;e===sd;)sd=Fo[--$o],Fo[$o]=null,id=Fo[--$o],Fo[$o]=null;for(;e===$i;)$i=On[--Dn],On[Dn]=null,Qr=On[--Dn],On[Dn]=null,Yr=On[--Dn],On[Dn]=null}var xn=null,yn=null,Ge=!1,ar=null;function fS(e,t){var n=Ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Qx(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,xn=e,yn=Hs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,xn=e,yn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=$i!==null?{id:Yr,overflow:Qr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,xn=e,yn=null,!0):!1;default:return!1}}function Yp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qp(e){if(Ge){var t=yn;if(t){var n=t;if(!Qx(e,t)){if(Yp(e))throw Error(V(418));t=Hs(n.nextSibling);var r=xn;t&&Qx(e,t)?fS(r,n):(e.flags=e.flags&-4097|2,Ge=!1,xn=e)}}else{if(Yp(e))throw Error(V(418));e.flags=e.flags&-4097|2,Ge=!1,xn=e}}}function Xx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xn=e}function Jc(e){if(e!==xn)return!1;if(!Ge)return Xx(e),Ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vp(e.type,e.memoizedProps)),t&&(t=yn)){if(Yp(e))throw pS(),Error(V(418));for(;t;)fS(e,t),t=Hs(t.nextSibling)}if(Xx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){yn=Hs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}yn=null}}else yn=xn?Hs(e.stateNode.nextSibling):null;return!0}function pS(){for(var e=yn;e;)e=Hs(e.nextSibling)}function Sa(){yn=xn=null,Ge=!1}function Gg(e){ar===null?ar=[e]:ar.push(e)}var KR=ls.ReactCurrentBatchConfig;function nl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(V(309));var r=n.stateNode}if(!r)throw Error(V(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=s.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(V(284));if(!n._owner)throw Error(V(290,e))}return e}function Zc(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Jx(e){var t=e._init;return t(e._payload)}function mS(e){function t(g,x){if(e){var w=g.deletions;w===null?(g.deletions=[x],g.flags|=16):w.push(x)}}function n(g,x){if(!e)return null;for(;x!==null;)t(g,x),x=x.sibling;return null}function r(g,x){for(g=new Map;x!==null;)x.key!==null?g.set(x.key,x):g.set(x.index,x),x=x.sibling;return g}function s(g,x){return g=Ks(g,x),g.index=0,g.sibling=null,g}function i(g,x,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<x?(g.flags|=2,x):w):(g.flags|=2,x)):(g.flags|=1048576,x)}function o(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,x,w,S){return x===null||x.tag!==6?(x=jf(w,g.mode,S),x.return=g,x):(x=s(x,w),x.return=g,x)}function c(g,x,w,S){var j=w.type;return j===Ro?d(g,x,w.props.children,S,w.key):x!==null&&(x.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ss&&Jx(j)===x.type)?(S=s(x,w.props),S.ref=nl(g,x,w),S.return=g,S):(S=Du(w.type,w.key,w.props,null,g.mode,S),S.ref=nl(g,x,w),S.return=g,S)}function u(g,x,w,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==w.containerInfo||x.stateNode.implementation!==w.implementation?(x=Cf(w,g.mode,S),x.return=g,x):(x=s(x,w.children||[]),x.return=g,x)}function d(g,x,w,S,j){return x===null||x.tag!==7?(x=Li(w,g.mode,S,j),x.return=g,x):(x=s(x,w),x.return=g,x)}function h(g,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return x=jf(""+x,g.mode,w),x.return=g,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Uc:return w=Du(x.type,x.key,x.props,null,g.mode,w),w.ref=nl(g,null,x),w.return=g,w;case Ao:return x=Cf(x,g.mode,w),x.return=g,x;case Ss:var S=x._init;return h(g,S(x._payload),w)}if(pl(x)||Xa(x))return x=Li(x,g.mode,w,null),x.return=g,x;Zc(g,x)}return null}function p(g,x,w,S){var j=x!==null?x.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return j!==null?null:l(g,x,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Uc:return w.key===j?c(g,x,w,S):null;case Ao:return w.key===j?u(g,x,w,S):null;case Ss:return j=w._init,p(g,x,j(w._payload),S)}if(pl(w)||Xa(w))return j!==null?null:d(g,x,w,S,null);Zc(g,w)}return null}function f(g,x,w,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return g=g.get(w)||null,l(x,g,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Uc:return g=g.get(S.key===null?w:S.key)||null,c(x,g,S,j);case Ao:return g=g.get(S.key===null?w:S.key)||null,u(x,g,S,j);case Ss:var k=S._init;return f(g,x,w,k(S._payload),j)}if(pl(S)||Xa(S))return g=g.get(w)||null,d(x,g,S,j,null);Zc(x,S)}return null}function v(g,x,w,S){for(var j=null,k=null,E=x,A=x=0,I=null;E!==null&&A<w.length;A++){E.index>A?(I=E,E=null):I=E.sibling;var _=p(g,E,w[A],S);if(_===null){E===null&&(E=I);break}e&&E&&_.alternate===null&&t(g,E),x=i(_,x,A),k===null?j=_:k.sibling=_,k=_,E=I}if(A===w.length)return n(g,E),Ge&&gi(g,A),j;if(E===null){for(;A<w.length;A++)E=h(g,w[A],S),E!==null&&(x=i(E,x,A),k===null?j=E:k.sibling=E,k=E);return Ge&&gi(g,A),j}for(E=r(g,E);A<w.length;A++)I=f(E,g,A,w[A],S),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?A:I.key),x=i(I,x,A),k===null?j=I:k.sibling=I,k=I);return e&&E.forEach(function(D){return t(g,D)}),Ge&&gi(g,A),j}function y(g,x,w,S){var j=Xa(w);if(typeof j!="function")throw Error(V(150));if(w=j.call(w),w==null)throw Error(V(151));for(var k=j=null,E=x,A=x=0,I=null,_=w.next();E!==null&&!_.done;A++,_=w.next()){E.index>A?(I=E,E=null):I=E.sibling;var D=p(g,E,_.value,S);if(D===null){E===null&&(E=I);break}e&&E&&D.alternate===null&&t(g,E),x=i(D,x,A),k===null?j=D:k.sibling=D,k=D,E=I}if(_.done)return n(g,E),Ge&&gi(g,A),j;if(E===null){for(;!_.done;A++,_=w.next())_=h(g,_.value,S),_!==null&&(x=i(_,x,A),k===null?j=_:k.sibling=_,k=_);return Ge&&gi(g,A),j}for(E=r(g,E);!_.done;A++,_=w.next())_=f(E,g,A,_.value,S),_!==null&&(e&&_.alternate!==null&&E.delete(_.key===null?A:_.key),x=i(_,x,A),k===null?j=_:k.sibling=_,k=_);return e&&E.forEach(function(N){return t(g,N)}),Ge&&gi(g,A),j}function b(g,x,w,S){if(typeof w=="object"&&w!==null&&w.type===Ro&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Uc:e:{for(var j=w.key,k=x;k!==null;){if(k.key===j){if(j=w.type,j===Ro){if(k.tag===7){n(g,k.sibling),x=s(k,w.props.children),x.return=g,g=x;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Ss&&Jx(j)===k.type){n(g,k.sibling),x=s(k,w.props),x.ref=nl(g,k,w),x.return=g,g=x;break e}n(g,k);break}else t(g,k);k=k.sibling}w.type===Ro?(x=Li(w.props.children,g.mode,S,w.key),x.return=g,g=x):(S=Du(w.type,w.key,w.props,null,g.mode,S),S.ref=nl(g,x,w),S.return=g,g=S)}return o(g);case Ao:e:{for(k=w.key;x!==null;){if(x.key===k)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(g,x.sibling),x=s(x,w.children||[]),x.return=g,g=x;break e}else{n(g,x);break}else t(g,x);x=x.sibling}x=Cf(w,g.mode,S),x.return=g,g=x}return o(g);case Ss:return k=w._init,b(g,x,k(w._payload),S)}if(pl(w))return v(g,x,w,S);if(Xa(w))return y(g,x,w,S);Zc(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(g,x.sibling),x=s(x,w),x.return=g,g=x):(n(g,x),x=jf(w,g.mode,S),x.return=g,g=x),o(g)):n(g,x)}return b}var ka=mS(!0),gS=mS(!1),od=ri(null),ad=null,zo=null,Yg=null;function Qg(){Yg=zo=ad=null}function Xg(e){var t=od.current;We(od),e._currentValue=t}function Xp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Yo(e,t){ad=e,Yg=zo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(on=!0),e.firstContext=null)}function Un(e){var t=e._currentValue;if(Yg!==e)if(e={context:e,memoizedValue:t,next:null},zo===null){if(ad===null)throw Error(V(308));zo=e,ad.dependencies={lanes:0,firstContext:e}}else zo=zo.next=e;return t}var ki=null;function Jg(e){ki===null?ki=[e]:ki.push(e)}function vS(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Jg(t)):(n.next=s.next,s.next=n),t.interleaved=n,ss(e,r)}function ss(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ks=!1;function Zg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function yS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Jr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ws(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,ss(e,n)}return s=r.interleaved,s===null?(t.next=t,Jg(r)):(t.next=s.next,s.next=t),r.interleaved=t,ss(e,n)}function Tu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fg(e,n)}}function Zx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ld(e,t,n,r){var s=e.updateQueue;ks=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;o=0,d=u=c=null,l=i;do{var p=l.lane,f=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,y=l;switch(p=t,f=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){h=v.call(f,h,p);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,p=typeof v=="function"?v.call(f,h,p):v,p==null)break e;h=Je({},h,p);break e;case 2:ks=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=f,c=h):d=d.next=f,o|=p;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Bi|=o,e.lanes=o,e.memoizedState=h}}function ew(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(V(191,s));s.call(r)}}}var Sc={},Ar=ri(Sc),Ql=ri(Sc),Xl=ri(Sc);function ji(e){if(e===Sc)throw Error(V(174));return e}function ev(e,t){switch(ze(Xl,t),ze(Ql,e),ze(Ar,Sc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ap(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ap(t,e)}We(Ar),ze(Ar,t)}function ja(){We(Ar),We(Ql),We(Xl)}function xS(e){ji(Xl.current);var t=ji(Ar.current),n=Ap(t,e.type);t!==n&&(ze(Ql,e),ze(Ar,n))}function tv(e){Ql.current===e&&(We(Ar),We(Ql))}var Ye=ri(0);function cd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yf=[];function nv(){for(var e=0;e<yf.length;e++)yf[e]._workInProgressVersionPrimary=null;yf.length=0}var Pu=ls.ReactCurrentDispatcher,xf=ls.ReactCurrentBatchConfig,zi=0,Xe=null,dt=null,gt=null,ud=!1,Nl=!1,Jl=0,GR=0;function Nt(){throw Error(V(321))}function rv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fr(e[n],t[n]))return!1;return!0}function sv(e,t,n,r,s,i){if(zi=i,Xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pu.current=e===null||e.memoizedState===null?JR:ZR,e=n(r,s),Nl){i=0;do{if(Nl=!1,Jl=0,25<=i)throw Error(V(301));i+=1,gt=dt=null,t.updateQueue=null,Pu.current=e2,e=n(r,s)}while(Nl)}if(Pu.current=dd,t=dt!==null&&dt.next!==null,zi=0,gt=dt=Xe=null,ud=!1,t)throw Error(V(300));return e}function iv(){var e=Jl!==0;return Jl=0,e}function wr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Xe.memoizedState=gt=e:gt=gt.next=e,gt}function Hn(){if(dt===null){var e=Xe.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=gt===null?Xe.memoizedState:gt.next;if(t!==null)gt=t,dt=e;else{if(e===null)throw Error(V(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},gt===null?Xe.memoizedState=gt=e:gt=gt.next=e}return gt}function Zl(e,t){return typeof t=="function"?t(e):t}function wf(e){var t=Hn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=dt,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((zi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,Xe.lanes|=d,Bi|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,fr(r,t.memoizedState)||(on=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Xe.lanes|=i,Bi|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bf(e){var t=Hn(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);fr(i,t.memoizedState)||(on=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function wS(){}function bS(e,t){var n=Xe,r=Hn(),s=t(),i=!fr(r.memoizedState,s);if(i&&(r.memoizedState=s,on=!0),r=r.queue,ov(jS.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||gt!==null&>.memoizedState.tag&1){if(n.flags|=2048,ec(9,kS.bind(null,n,r,s,t),void 0,null),vt===null)throw Error(V(349));zi&30||SS(n,t,s)}return s}function SS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xe.updateQueue,t===null?(t={lastEffect:null,stores:null},Xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kS(e,t,n,r){t.value=n,t.getSnapshot=r,CS(t)&&_S(e)}function jS(e,t,n){return n(function(){CS(t)&&_S(e)})}function CS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fr(e,n)}catch{return!0}}function _S(e){var t=ss(e,1);t!==null&&ur(t,e,1,-1)}function tw(e){var t=wr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:e},t.queue=e,e=e.dispatch=XR.bind(null,Xe,e),[t.memoizedState,e]}function ec(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Xe.updateQueue,t===null?(t={lastEffect:null,stores:null},Xe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ES(){return Hn().memoizedState}function Au(e,t,n,r){var s=wr();Xe.flags|=e,s.memoizedState=ec(1|t,n,void 0,r===void 0?null:r)}function Gd(e,t,n,r){var s=Hn();r=r===void 0?null:r;var i=void 0;if(dt!==null){var o=dt.memoizedState;if(i=o.destroy,r!==null&&rv(r,o.deps)){s.memoizedState=ec(t,n,i,r);return}}Xe.flags|=e,s.memoizedState=ec(1|t,n,i,r)}function nw(e,t){return Au(8390656,8,e,t)}function ov(e,t){return Gd(2048,8,e,t)}function NS(e,t){return Gd(4,2,e,t)}function TS(e,t){return Gd(4,4,e,t)}function PS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function AS(e,t,n){return n=n!=null?n.concat([e]):null,Gd(4,4,PS.bind(null,t,e),n)}function av(){}function RS(e,t){var n=Hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function IS(e,t){var n=Hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&rv(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function OS(e,t,n){return zi&21?(fr(n,t)||(n=$1(),Xe.lanes|=n,Bi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,on=!0),e.memoizedState=n)}function YR(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=xf.transition;xf.transition={};try{e(!1),t()}finally{Oe=n,xf.transition=r}}function DS(){return Hn().memoizedState}function QR(e,t,n){var r=qs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},MS(e))LS(t,n);else if(n=vS(e,t,n,r),n!==null){var s=qt();ur(n,e,r,s),FS(n,t,r)}}function XR(e,t,n){var r=qs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(MS(e))LS(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,fr(l,o)){var c=t.interleaved;c===null?(s.next=s,Jg(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=vS(e,t,s,r),n!==null&&(s=qt(),ur(n,e,r,s),FS(n,t,r))}}function MS(e){var t=e.alternate;return e===Xe||t!==null&&t===Xe}function LS(e,t){Nl=ud=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fg(e,n)}}var dd={readContext:Un,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useInsertionEffect:Nt,useLayoutEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useMutableSource:Nt,useSyncExternalStore:Nt,useId:Nt,unstable_isNewReconciler:!1},JR={readContext:Un,useCallback:function(e,t){return wr().memoizedState=[e,t===void 0?null:t],e},useContext:Un,useEffect:nw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Au(4194308,4,PS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Au(4194308,4,e,t)},useInsertionEffect:function(e,t){return Au(4,2,e,t)},useMemo:function(e,t){var n=wr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=QR.bind(null,Xe,e),[r.memoizedState,e]},useRef:function(e){var t=wr();return e={current:e},t.memoizedState=e},useState:tw,useDebugValue:av,useDeferredValue:function(e){return wr().memoizedState=e},useTransition:function(){var e=tw(!1),t=e[0];return e=YR.bind(null,e[1]),wr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Xe,s=wr();if(Ge){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),vt===null)throw Error(V(349));zi&30||SS(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,nw(jS.bind(null,r,i,e),[e]),r.flags|=2048,ec(9,kS.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wr(),t=vt.identifierPrefix;if(Ge){var n=Qr,r=Yr;n=(r&~(1<<32-cr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=GR++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ZR={readContext:Un,useCallback:RS,useContext:Un,useEffect:ov,useImperativeHandle:AS,useInsertionEffect:NS,useLayoutEffect:TS,useMemo:IS,useReducer:wf,useRef:ES,useState:function(){return wf(Zl)},useDebugValue:av,useDeferredValue:function(e){var t=Hn();return OS(t,dt.memoizedState,e)},useTransition:function(){var e=wf(Zl)[0],t=Hn().memoizedState;return[e,t]},useMutableSource:wS,useSyncExternalStore:bS,useId:DS,unstable_isNewReconciler:!1},e2={readContext:Un,useCallback:RS,useContext:Un,useEffect:ov,useImperativeHandle:AS,useInsertionEffect:NS,useLayoutEffect:TS,useMemo:IS,useReducer:bf,useRef:ES,useState:function(){return bf(Zl)},useDebugValue:av,useDeferredValue:function(e){var t=Hn();return dt===null?t.memoizedState=e:OS(t,dt.memoizedState,e)},useTransition:function(){var e=bf(Zl)[0],t=Hn().memoizedState;return[e,t]},useMutableSource:wS,useSyncExternalStore:bS,useId:DS,unstable_isNewReconciler:!1};function nr(e,t){if(e&&e.defaultProps){t=Je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Jp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Yd={isMounted:function(e){return(e=e._reactInternals)?Zi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=qt(),s=qs(e),i=Jr(r,s);i.payload=t,n!=null&&(i.callback=n),t=Ws(e,i,s),t!==null&&(ur(t,e,s,r),Tu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=qt(),s=qs(e),i=Jr(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ws(e,i,s),t!==null&&(ur(t,e,s,r),Tu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=qt(),r=qs(e),s=Jr(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ws(e,s,r),t!==null&&(ur(t,e,r,n),Tu(t,e,r))}};function rw(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!ql(n,r)||!ql(s,i):!0}function $S(e,t,n){var r=!1,s=Js,i=t.contextType;return typeof i=="object"&&i!==null?i=Un(i):(s=ln(t)?Fi:Lt.current,r=t.contextTypes,i=(r=r!=null)?ba(e,s):Js),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Yd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function sw(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Yd.enqueueReplaceState(t,t.state,null)}function Zp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Zg(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Un(i):(i=ln(t)?Fi:Lt.current,s.context=ba(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Jp(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Yd.enqueueReplaceState(s,s.state,null),ld(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ca(e,t){try{var n="",r=t;do n+=NA(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Sf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function em(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var t2=typeof WeakMap=="function"?WeakMap:Map;function zS(e,t,n){n=Jr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fd||(fd=!0,um=r),em(e,t)},n}function BS(e,t,n){n=Jr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){em(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){em(e,t),typeof r!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function iw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new t2;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=m2.bind(null,e,t,n),t.then(e,e))}function ow(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}
vendor: 10,629 bytes, line 40
40function aw(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Jr(-1,1),t.tag=2,Ws(n,t,1))),n.lanes|=1),e)}var n2=ls.ReactCurrentOwner,on=!1;function Ht(e,t,n,r){t.child=e===null?gS(t,null,n,r):ka(t,e.child,n,r)}function lw(e,t,n,r,s){n=n.render;var i=t.ref;return Yo(t,s),r=sv(e,t,n,r,i,s),n=iv(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,is(e,t,s)):(Ge&&n&&qg(t),t.flags|=1,Ht(e,t,r,s),t.child)}function cw(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!mv(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,US(e,t,i,r,s)):(e=Du(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:ql,n(o,r)&&e.ref===t.ref)return is(e,t,s)}return t.flags|=1,e=Ks(i,r),e.ref=t.ref,e.return=t,t.child=e}function US(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(ql(i,r)&&e.ref===t.ref)if(on=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(on=!0);else return t.lanes=e.lanes,is(e,t,s)}return tm(e,t,n,r,s)}function HS(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ze(Uo,mn),mn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ze(Uo,mn),mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ze(Uo,mn),mn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ze(Uo,mn),mn|=r;return Ht(e,t,s,n),t.child}function WS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tm(e,t,n,r,s){var i=ln(n)?Fi:Lt.current;return i=ba(t,i),Yo(t,s),n=sv(e,t,n,r,i,s),r=iv(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,is(e,t,s)):(Ge&&r&&qg(t),t.flags|=1,Ht(e,t,n,s),t.child)}function uw(e,t,n,r,s){if(ln(n)){var i=!0;rd(t)}else i=!1;if(Yo(t,s),t.stateNode===null)Ru(e,t),$S(t,n,r),Zp(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Un(u):(u=ln(n)?Fi:Lt.current,u=ba(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&sw(t,o,r,u),ks=!1;var p=t.memoizedState;o.state=p,ld(t,r,o,s),c=t.memoizedState,l!==r||p!==c||an.current||ks?(typeof d=="function"&&(Jp(t,n,d,r),c=t.memoizedState),(l=ks||rw(t,n,l,r,p,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,yS(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:nr(t.type,l),o.props=u,h=t.pendingProps,p=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Un(c):(c=ln(n)?Fi:Lt.current,c=ba(t,c));var f=n.getDerivedStateFromProps;(d=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||p!==c)&&sw(t,o,r,c),ks=!1,p=t.memoizedState,o.state=p,ld(t,r,o,s);var v=t.memoizedState;l!==h||p!==v||an.current||ks?(typeof f=="function"&&(Jp(t,n,f,r),v=t.memoizedState),(u=ks||rw(t,n,u,r,p,v,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return nm(e,t,n,r,i,s)}function nm(e,t,n,r,s,i){WS(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Yx(t,n,!1),is(e,t,i);r=t.stateNode,n2.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=ka(t,e.child,null,i),t.child=ka(t,null,l,i)):Ht(e,t,l,i),t.memoizedState=r.state,s&&Yx(t,n,!0),t.child}function VS(e){var t=e.stateNode;t.pendingContext?Gx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Gx(e,t.context,!1),ev(e,t.containerInfo)}function dw(e,t,n,r,s){return Sa(),Gg(s),t.flags|=256,Ht(e,t,n,r),t.child}var rm={dehydrated:null,treeContext:null,retryLane:0};function sm(e){return{baseLanes:e,cachePool:null,transitions:null}}function qS(e,t,n){var r=t.pendingProps,s=Ye.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ze(Ye,s&1),e===null)return Qp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Jd(o,r,0,null),e=Li(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=sm(n),t.memoizedState=rm,e):lv(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return r2(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Ks(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=Ks(l,i):(i=Li(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?sm(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=rm,r}return i=e.child,e=i.sibling,r=Ks(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function lv(e,t){return t=Jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function eu(e,t,n,r){return r!==null&&Gg(r),ka(t,e.child,null,n),e=lv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function r2(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Sf(Error(V(422))),eu(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Jd({mode:"visible",children:r.children},s,0,null),i=Li(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&ka(t,e.child,null,o),t.child.memoizedState=sm(o),t.memoizedState=rm,i);if(!(t.mode&1))return eu(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(V(419)),r=Sf(i,r,void 0),eu(e,t,o,r)}if(l=(o&e.childLanes)!==0,on||l){if(r=vt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,ss(e,s),ur(r,e,s,-1))}return pv(),r=Sf(Error(V(421))),eu(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=g2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,yn=Hs(s.nextSibling),xn=t,Ge=!0,ar=null,e!==null&&(On[Dn++]=Yr,On[Dn++]=Qr,On[Dn++]=$i,Yr=e.id,Qr=e.overflow,$i=t),t=lv(t,r.children),t.flags|=4096,t)}function hw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xp(e.return,t,n)}function kf(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function KS(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ht(e,t,r.children,n),r=Ye.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hw(e,n,t);else if(e.tag===19)hw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ze(Ye,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&cd(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),kf(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&cd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}kf(t,!0,n,null,i);break;case"together":kf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ru(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function is(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=Ks(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ks(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function s2(e,t,n){switch(t.tag){case 3:VS(t),Sa();break;case 5:xS(t);break;case 1:ln(t.type)&&rd(t);break;case 4:ev(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ze(od,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ze(Ye,Ye.current&1),t.flags|=128,null):n&t.child.childLanes?qS(e,t,n
vendor: 4,883 bytes, line 40
40):(ze(Ye,Ye.current&1),e=is(e,t,n),e!==null?e.sibling:null);ze(Ye,Ye.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return KS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ze(Ye,Ye.current),r)break;return null;case 22:case 23:return t.lanes=0,HS(e,t,n)}return is(e,t,n)}var GS,im,YS,QS;GS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};im=function(){};YS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ji(Ar.current);var i=null;switch(n){case"input":s=Ep(e,s),r=Ep(e,r),i=[];break;case"select":s=Je({},s,{value:void 0}),r=Je({},r,{value:void 0}),i=[];break;case"textarea":s=Pp(e,s),r=Pp(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=td)}Rp(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&($l.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&($l.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&He("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};QS=function(e,t,n,r){n!==r&&(t.flags|=4)};function rl(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function i2(e,t,n){var r=t.pendingProps;switch(Kg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return ln(t.type)&&nd(),Tt(t),null;case 3:return r=t.stateNode,ja(),We(an),We(Lt),nv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Jc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ar!==null&&(fm(ar),ar=null))),im(e,t),Tt(t),null;case 5:tv(t);var s=ji(Xl.current);if(n=t.type,e!==null&&t.stateNode!=null)YS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(V(166));return Tt(t),null}if(e=ji(Ar.current),Jc(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[_r]=t,r[Yl]=i,e=(t.mode&1)!==0,n){case"dialog":He("cancel",r),He("close",r);break;case"iframe":case"object":case"embed":He("load",r);break;case"video":case"audio":for(s=0;s<gl.length;s++)He(gl[s],r);break;case"source":He("error",r);break;case"img":case"image":case"link":He("error",r),He("load",r);break;case"details":He("toggle",r);break;case"input":bx(r,i),He("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},He("invalid",r);break;case"textarea":kx(r,i),He("invalid",r)}Rp(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Xc(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Xc(r.textContent,l,e),s=["children",""+l]):$l.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&He("scroll",r)}switch(n){case"input":Hc(r),Sx(r,i,!0);break;case"textarea":Hc(r),jx(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=td)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=j1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[_r]=t,e[Yl]=r,GS(e,t,!1,!1),t.stateNode=e;e:{switch(o=Ip(n,r),n){case"dialog":He("cancel",e),He("close",e),s=r;break;case"iframe":case"object":case"embed":He("load",e),s=r;break;case"video":case"audio":for(s=0;s<gl.length;s++)He(gl[s],e);s=r;break;case"source":He("error",e),s=r;break;case"img":case"image":case"link":He("error",e),He("load",e),s=r;break;case"details":He("toggle",e),s=r;break;case"input":bx(e,r),s=Ep(e,r),He("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Je({},r,{value:void 0}),He("invalid",e);break;case"textarea":kx(e,r),s=Pp(e,r),He("invalid",e);break;default:s=r}Rp(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?E1(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&C1(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&zl(e,c):typeof c=="number"&&zl(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&($l.hasOwnProperty(i)?c!=null&&i==="onScroll"&&He("scroll",e):c!=null&&Rg(e,i,c,o))}switch(n){case"input":Hc(e),Sx(e,r,!1);break;case"textarea":Hc(e),jx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Xs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Vo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Vo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=td)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Tt(t),null;case 6:if(e&&t.stateNode!=null)QS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(V(166));if(n=ji(Xl.current),ji(Ar.current),Jc(t)){if(r=t.stateNode,n=t.memoizedProps,r[_r]=t,(i=r.nodeValue!==n)&&(e=xn,e!==null))switch(e.tag){case 3:Xc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Xc(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[_r]=t,t.stateNode=r}return Tt(t),null;case 13:if(We(Ye),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ge&&yn!==null&&t.mode&1&&!(t.flags&128))pS(),Sa(),t.flags|=98560,i=!1;else if(i=Jc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(V(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(V(317));i[_r]=t}else Sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Tt(t),i=!1}else ar!==null&&(fm(ar),ar=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ye.current&1?ft===0&&(ft=3):pv())),t.updateQueue!==null&&(t.flags|=4),Tt(t),null);case 4:return ja(),im(e,t),e===null&&Kl(t.stateNode.containerInfo),Tt(t),null;case 10:return Xg(t.type._context),Tt(t),null;case 17:return ln(t.type)&&nd(),Tt(t),null;case 19:if(We(Ye),i=t.memoizedState,i===null)return Tt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)rl(i,!1);else{if(ft!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=cd(e),o!==null){for(t.flags|=128,rl(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ze(Ye,Ye.current&1|2),t.child}e=e.sibling}i.tail!==null&&st()>_a&&(t.flags|=128,r=!0,rl(i,!1),t.lanes=4194304)}else{if(!r)if(e=cd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),rl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ge)return Tt(t),null}else 2*st()-i.renderingStartTime>_a&&n!==1073741824&&(t.flags|=128,r=!0,rl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=st(),t.sibling=null,n=Ye.current,ze(Ye,r?n&1|2:n&1),t):(Tt(t),null);case 22:case 23:return fv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?mn&1073741824&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function o2(e,t){switch(Kg(t),t.tag){case 1:return ln(t.type)&&nd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 26,751 bytes, line 40
40case 3:return ja(),We(an),We(Lt),nv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return tv(t),null;case 13:if(We(Ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return We(Ye),null;case 4:return ja(),null;case 10:return Xg(t.type._context),null;case 22:case 23:return fv(),null;case 24:return null;default:return null}}var tu=!1,Ot=!1,a2=typeof WeakSet=="function"?WeakSet:Set,re=null;function Bo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){tt(e,t,r)}else n.current=null}function om(e,t,n){try{n()}catch(r){tt(e,t,r)}}var fw=!1;function l2(e,t){if(Hp=Ju,e=tS(),Vg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||s!==0&&h.nodeType!==3||(l=o+s),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===s&&(l=o),p===i&&++d===r&&(c=o),(f=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=f}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wp={focusedElem:e,selectionRange:n},Ju=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,b=v.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:nr(t.type,y),b);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(S){tt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return v=fw,fw=!1,v}function Tl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&om(t,n,i)}s=s.next}while(s!==r)}}function Qd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function am(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function XS(e){var t=e.alternate;t!==null&&(e.alternate=null,XS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_r],delete t[Yl],delete t[Kp],delete t[WR],delete t[VR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function JS(e){return e.tag===5||e.tag===3||e.tag===4}function pw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||JS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=td));else if(r!==4&&(e=e.child,e!==null))for(lm(e,t,n),e=e.sibling;e!==null;)lm(e,t,n),e=e.sibling}function cm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(cm(e,t,n),e=e.sibling;e!==null;)cm(e,t,n),e=e.sibling}var bt=null,ir=!1;function ps(e,t,n){for(n=n.child;n!==null;)ZS(e,t,n),n=n.sibling}function ZS(e,t,n){if(Pr&&typeof Pr.onCommitFiberUnmount=="function")try{Pr.onCommitFiberUnmount(Ud,n)}catch{}switch(n.tag){case 5:Ot||Bo(n,t);case 6:var r=bt,s=ir;bt=null,ps(e,t,n),bt=r,ir=s,bt!==null&&(ir?(e=bt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):bt.removeChild(n.stateNode));break;case 18:bt!==null&&(ir?(e=bt,n=n.stateNode,e.nodeType===8?gf(e.parentNode,n):e.nodeType===1&&gf(e,n),Wl(e)):gf(bt,n.stateNode));break;case 4:r=bt,s=ir,bt=n.stateNode.containerInfo,ir=!0,ps(e,t,n),bt=r,ir=s;break;case 0:case 11:case 14:case 15:if(!Ot&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&om(n,t,o),s=s.next}while(s!==r)}ps(e,t,n);break;case 1:if(!Ot&&(Bo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){tt(n,t,l)}ps(e,t,n);break;case 21:ps(e,t,n);break;case 22:n.mode&1?(Ot=(r=Ot)||n.memoizedState!==null,ps(e,t,n),Ot=r):ps(e,t,n);break;default:ps(e,t,n)}}function mw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new a2),t.forEach(function(r){var s=v2.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:bt=l.stateNode,ir=!1;break e;case 3:bt=l.stateNode.containerInfo,ir=!0;break e;case 4:bt=l.stateNode.containerInfo,ir=!0;break e}l=l.return}if(bt===null)throw Error(V(160));ZS(i,o,s),bt=null,ir=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){tt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ek(t,e),t=t.sibling}function ek(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Xn(t,e),xr(e),r&4){try{Tl(3,e,e.return),Qd(3,e)}catch(y){tt(e,e.return,y)}try{Tl(5,e,e.return)}catch(y){tt(e,e.return,y)}}break;case 1:Xn(t,e),xr(e),r&512&&n!==null&&Bo(n,n.return);break;case 5:if(Xn(t,e),xr(e),r&512&&n!==null&&Bo(n,n.return),e.flags&32){var s=e.stateNode;try{zl(s,"")}catch(y){tt(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&S1(s,i),Ip(l,o);var u=Ip(l,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?E1(s,h):d==="dangerouslySetInnerHTML"?C1(s,h):d==="children"?zl(s,h):Rg(s,d,h,u)}switch(l){case"input":Np(s,i);break;case"textarea":k1(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var f=i.value;f!=null?Vo(s,!!i.multiple,f,!1):p!==!!i.multiple&&(i.defaultValue!=null?Vo(s,!!i.multiple,i.defaultValue,!0):Vo(s,!!i.multiple,i.multiple?[]:"",!1))}s[Yl]=i}catch(y){tt(e,e.return,y)}}break;case 6:if(Xn(t,e),xr(e),r&4){if(e.stateNode===null)throw Error(V(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(y){tt(e,e.return,y)}}break;case 3:if(Xn(t,e),xr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wl(t.containerInfo)}catch(y){tt(e,e.return,y)}break;case 4:Xn(t,e),xr(e);break;case 13:Xn(t,e),xr(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(dv=st())),r&4&&mw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ot=(u=Ot)||d,Xn(t,e),Ot=u):Xn(t,e),xr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(re=e,d=e.child;d!==null;){for(h=re=d;re!==null;){switch(p=re,f=p.child,p.tag){case 0:case 11:case 14:case 15:Tl(4,p,p.return);break;case 1:Bo(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){tt(r,n,y)}}break;case 5:Bo(p,p.return);break;case 22:if(p.memoizedState!==null){vw(h);continue}}f!==null?(f.return=p,re=f):vw(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=_1("display",o))}catch(y){tt(e,e.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){tt(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Xn(t,e),xr(e),r&4&&mw(e);break;case 21:break;default:Xn(t,e),xr(e)}}function xr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(JS(n)){var r=n;break e}n=n.return}throw Error(V(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(zl(s,""),r.flags&=-33);var i=pw(e);cm(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=pw(e);lm(e,l,o);break;default:throw Error(V(161))}}catch(c){tt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function c2(e,t,n){re=e,tk(e)}function tk(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var s=re,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||tu;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Ot;l=tu;var u=Ot;if(tu=o,(Ot=c)&&!u)for(re=s;re!==null;)o=re,c=o.child,o.tag===22&&o.memoizedState!==null?yw(s):c!==null?(c.return=o,re=c):yw(s);for(;i!==null;)re=i,tk(i),i=i.sibling;re=s,tu=l,Ot=u}gw(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,re=i):gw(e)}}function gw(e){for(;re!==null;){var t=re;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ot||Qd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ot)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:nr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&ew(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ew(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Wl(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}Ot||t.flags&512&&am(t)}catch(p){tt(t,t.return,p)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function vw(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function yw(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qd(4,t)}catch(c){tt(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){tt(t,s,c)}}var i=t.return;try{am(t)}catch(c){tt(t,i,c)}break;case 5:var o=t.return;try{am(t)}catch(c){tt(t,o,c)}}}catch(c){tt(t,t.return,c)}if(t===e){re=null;break}var l=t.sibling;if(l!==null){l.return=t.return,re=l;break}re=t.return}}var u2=Math.ceil,hd=ls.ReactCurrentDispatcher,cv=ls.ReactCurrentOwner,$n=ls.ReactCurrentBatchConfig,Pe=0,vt=null,lt=null,St=0,mn=0,Uo=ri(0),ft=0,tc=null,Bi=0,Xd=0,uv=0,Pl=null,nn=null,dv=0,_a=1/0,Wr=null,fd=!1,um=null,Vs=null,nu=!1,Fs=null,pd=0,Al=0,dm=null,Iu=-1,Ou=0;function qt(){return Pe&6?st():Iu!==-1?Iu:Iu=st()}function qs(e){return e.mode&1?Pe&2&&St!==0?St&-St:KR.transition!==null?(Ou===0&&(Ou=$1()),Ou):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:q1(e.type)),e):1}function ur(e,t,n,r){if(50<Al)throw Al=0,dm=null,Error(V(185));xc(e,n,r),(!(Pe&2)||e!==vt)&&(e===vt&&(!(Pe&2)&&(Xd|=n),ft===4&&Cs(e,St)),cn(e,r),n===1&&Pe===0&&!(t.mode&1)&&(_a=st()+500,Kd&&si()))}function cn(e,t){var n=e.callbackNode;KA(e,t);var r=Xu(e,e===vt?St:0);if(r===0)n!==null&&Ex(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ex(n),t===1)e.tag===0?qR(xw.bind(null,e)):dS(xw.bind(null,e)),UR(function(){!(Pe&6)&&si()}),n=null;else{switch(z1(r)){case 1:n=Lg;break;case 4:n=L1;break;case 16:n=Qu;break;case 536870912:n=F1;break;default:n=Qu}n=ck(n,nk.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nk(e,t){if(Iu=-1,Ou=0,Pe&6)throw Error(V(327));var n=e.callbackNode;if(Qo()&&e.callbackNode!==n)return null;var r=Xu(e,e===vt?St:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=md(e,r);else{t=r;var s=Pe;Pe|=2;var i=sk();(vt!==e||St!==t)&&(Wr=null,_a=st()+500,Mi(e,t));do try{f2();break}catch(l){rk(e,l)}while(!0);Qg(),hd.current=i,Pe=s,lt!==null?t=0:(vt=null,St=0,t=ft)}if(t!==0){if(t===2&&(s=Fp(e),s!==0&&(r=s,t=hm(e,s))),t===1)throw n=tc,Mi(e,0),Cs(e,r),cn(e,st()),n;if(t===6)Cs(e,r);else{if(s=e.current.alternate,!(r&30)&&!d2(s)&&(t=md(e,r),t===2&&(i=Fp(e),i!==0&&(r=i,t=hm(e,i))),t===1))throw n=tc,Mi(e,0),Cs(e,r),cn(e,st()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(V(345));case 2:vi(e,nn,Wr);break;case 3:if(Cs(e,r),(r&130023424)===r&&(t=dv+500-st(),10<t)){if(Xu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){qt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=qp(vi.bind(null,e,nn,Wr),t);break}vi(e,nn,Wr);break;case 4:if(Cs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-cr(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=st()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*u2(r/1960))-r,10<r){e.timeoutHandle=qp(vi.bind(null,e,nn,Wr),r);break}vi(e,nn,Wr);break;case 5:vi(e,nn,Wr);break;default:throw Error(V(329))}}}return cn(e,st()),e.callbackNode===n?nk.bind(null,e):null}function hm(e,t){var n=Pl;return e.current.memoizedState.isDehydrated&&(Mi(e,t).flags|=256),e=md(e,t),e!==2&&(t=nn,nn=n,t!==null&&fm(t)),e}function fm(e){nn===null?nn=e:nn.push.apply(nn,e)}function d2(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!fr(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cs(e,t){for(t&=~uv,t&=~Xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-cr(t),r=1<<n;e[n]=-1,t&=~r}}function xw(e){if(Pe&6)throw Error(V(327));Qo();var t=Xu(e,0);if(!(t&1))return cn(e,st()),null;var n=md(e,t);if(e.tag!==0&&n===2){var r=Fp(e);r!==0&&(t=r,n=hm(e,r))}if(n===1)throw n=tc,Mi(e,0),Cs(e,t),cn(e,st()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vi(e,nn,Wr),cn(e,st()),null}function hv(e,t){var n=Pe;Pe|=1;try{return e(t)}finally{Pe=n,Pe===0&&(_a=st()+500,Kd&&si())}}function Ui(e){Fs!==null&&Fs.tag===0&&!(Pe&6)&&Qo();var t=Pe;Pe|=1;var n=$n.transition,r=Oe;try{if($n.transition=null,Oe=1,e)return e()}finally{Oe=r,$n.transition=n,Pe=t,!(Pe&6)&&si()}}function fv(){mn=Uo.current,We(Uo)}function Mi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,BR(n)),lt!==null)for(n=lt.return;n!==null;){var r=n;switch(Kg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&nd();break;case 3:ja(),We(an),We(Lt),nv();break;case 5:tv(r);break;case 4:ja();break;case 13:We(Ye);break;case 19:We(Ye);break;case 10:Xg(r.type._context);break;case 22:case 23:fv()}n=n.return}if(vt=e,lt=e=Ks(e.current,null),St=mn=t,ft=0,tc=null,uv=Xd=Bi=0,nn=Pl=null,ki!==null){for(t=0;t<ki.length;t++)if(n=ki[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}ki=null}return e}function rk(e,t){do{var n=lt;try{if(Qg(),Pu.current=dd,ud){for(var r=Xe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ud=!1}if(zi=0,gt=dt=Xe=null,Nl=!1,Jl=0,cv.current=null,n===null||n.return===null){ft=1,tc=t,lt=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=St,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ow(o);if(f!==null){f.flags&=-257,aw(f,o,l,i,t),f.mode&1&&iw(i,u,t),t=f,c=u;var v=t.updateQueue;if(v===null){var y=new Set;y.add(c),t.updateQueue=y}else v.add(c);break e}else{if(!(t&1)){iw(i,u,t),pv();break e}c=Error(V(426))}}else if(Ge&&l.mode&1){var b=ow(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),aw(b,o,l,i,t),Gg(Ca(c,l));break e}}i=c=Ca(c,l),ft!==4&&(ft=2),Pl===null?Pl=[i]:Pl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=zS(i,c,t);Zx(i,g);break e;case 1:l=c;var x=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Vs===null||!Vs.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=BS(i,l,t);Zx(i,S);break e}}i=i.return}while(i!==null)}ok(n)}catch(j){t=j,lt===n&&n!==null&&(lt=n=n.return);continue}break}while(!0)}function sk(){var e=hd.current;return hd.current=dd,e===null?dd:e}function pv(){(ft===0||ft===3||ft===2)&&(ft=4),vt===null||!(Bi&268435455)&&!(Xd&268435455)||Cs(vt,St)}function md(e,t){var n=Pe;Pe|=2;var r=sk();(vt!==e||St!==t)&&(Wr=null,Mi(e,t));do try{h2();break}catch(s){rk(e,s)}while(!0);if(Qg(),Pe=n,hd.current=r,lt!==null)throw Error(V(261));return vt=null,St=0,ft}function h2(){for(;lt!==null;)ik(lt)}function f2(){for(;lt!==null&&!FA();)ik(lt)}function ik(e){var t=lk(e.alternate,e,mn);e.memoizedProps=e.pendingProps,t===null?ok(e):lt=t,cv.current=null}function ok(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=o2(n,t),n!==null){n.flags&=32767,lt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ft=6,lt=null;return}}else if(n=i2(n,t,mn),n!==null){lt=n;return}if(t=t.sibling,t!==null){lt=t;return}lt=t=e}while(t!==null);ft===0&&(ft=5)}function vi(e,t,n){var r=Oe,s=$n.transition;try{$n.transition=null,Oe=1,p2(e,t,n,r)}finally{$n.transition=s,Oe=r}return null}function p2(e,t,n,r){do Qo();while(Fs!==null);if(Pe&6)throw Error(V(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(GA(e,i),e===vt&&(lt=vt=null,St=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||nu||(nu=!0,ck(Qu,function(){return Qo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=$n.transition,$n.transition=null;var o=Oe;Oe=1;var l=Pe;Pe|=4,cv.current=null,l2(e,n),ek(n,e),OR(Wp),Ju=!!Hp,Wp=Hp=null,e.current=n,c2(n),$A(),Pe=l,Oe=o,$n.transition=i}else e.current=n;if(nu&&(nu=!1,Fs=e,pd=s),i=e.pendingLanes,i===0&&(Vs=null),UA(n.stateNode),cn(e,st()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(fd)throw fd=!1,e=um,um=null,e;return pd&1&&e.tag!==0&&Qo(),i=e.pendingLanes,i&1?e===dm?Al++:(Al=0,dm=e):Al=0,si(),null}function Qo(){if(Fs!==null){var e=z1(pd),t=$n.transition,n=Oe;try{if($n.transition=null,Oe=16>e?16:e,Fs===null)var r=!1;else{if(e=Fs,Fs=null,pd=0,Pe&6)throw Error(V(331));var s=Pe;for(Pe|=4,re=e.current;re!==null;){var i=re,o=i.child;if(re.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(re=u;re!==null;){var d=re;switch(d.tag){case 0:case 11:case 15:Tl(8,d,i)}var h=d.child;if(h!==null)h.return=d,re=h;else for(;re!==null;){d=re;var p=d.sibling,f=d.return;if(XS(d),d===u){re=null;break}if(p!==null){p.return=f,re=p;break}re=f}}}var v=i.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}re=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,re=o;else e:for(;re!==null;){if(i=re,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Tl(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,re=g;break e}re=i.return}}var x=e.current;for(re=x;re!==null;){o=re;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,re=w;else e:for(o=x;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Qd(9,l)}}catch(j){tt(l,l.return,j)}if(l===o){re=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,re=S;break e}re=l.return}}if(Pe=s,si(),Pr&&typeof Pr.onPostCommitFiberRoot=="function")try{Pr.onPostCommitFiberRoot(Ud,e)}catch{}r=!0}return r}finally{Oe=n,$n.transition=t}}return!1}function ww(e,t,n){t=Ca(n,t),t=zS(e,t,1),e=Ws(e,t,1),t=qt(),e!==null&&(xc(e,1,t),cn(e,t))}function tt(e,t,n){if(e.tag===3)ww(e,e,n);else for(;t!==null;){if(t.tag===3){ww(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vs===null||!Vs.has(r))){e=Ca(n,e),e=BS(t,e,1),t=Ws(t,e,1),e=qt(),t!==null&&(xc(t,1,e),cn(t,e));break}}t=t.return}}function m2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=qt(),e.pingedLanes|=e.suspendedLanes&n,vt===e&&(St&n)===n&&(ft===4||ft===3&&(St&130023424)===St&&500>st()-dv?Mi(e,0):uv|=n),cn(e,t)}function ak(e,t){t===0&&(e.mode&1?(t=qc,qc<<=1,!(qc&130023424)&&(qc=4194304)):t=1);var n=qt();e=ss(e,t),e!==null&&(xc(e,t,n),cn(e,n))}function g2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ak(e,n)}function v2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),ak(e,n)}var lk;lk=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||an.current)on=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return on=!1,s2(e,t,n);on=!!(e.flags&131072)}else on=!1,Ge&&t.flags&1048576&&hS(t,id,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ru(e,t),e=t.pendingProps;var s=ba(t,Lt.current);Yo(t,n),s=sv(null,t,r,e,s,n);var i=iv();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ln(r)?(i=!0,rd(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Zg(t),s.updater=Yd,t.stateNode=s,s._reactInternals=t,Zp(t,r,e,n),t=nm(null,t,r,!0,i,n)):(t.tag=0,Ge&&i&&qg(t),Ht(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ru(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=x2(r),e=nr(r,e),s){case 0:t=tm(null,t,r,e,n);break e;case 1:t=uw(null,t,r,e,n);break e;case 11:t=lw(null,t,r,e,n);break e;case 14:t=cw(null,t,r,nr(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nr(r,s),tm(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nr(r,s),uw(e,t,r,s,n);case 3:e:{if(VS(t),e===null)throw Error(V(387));r=t.pendingProps,i=t.memoizedState,s=i.element,yS(e,t),ld(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ca(Error(V(423)),t),t=dw(e,t,r,n,s);break e}else if(r!==s){s=Ca(Error(V(424)),t),t=dw(e,t,r,n,s);break e}else for(yn=Hs(t.stateNode.containerInfo.firstChild),xn=t,Ge=!0,ar=null,n=gS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Sa(),r===s){t=is(e,t,n);break e}Ht(e,t,r,n)}t=t.child}return t;case 5:return xS(t),e===null&&Qp(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Vp(r,s)?o=null:i!==null&&Vp(r,i)&&(t.flags|=32),WS(e,t),Ht(e,t,o,n),t.child;case 6:return e===null&&Qp(t),null;case 13:return qS(e,t,n);case 4:return ev(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ka(t,null,r,n):Ht(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nr(r,s),lw(e,t,r,s,n);case 7:return Ht(e,t,t.pendingProps,n),t.child;case 8:return Ht(e,t,t.pendingProps.children,n),t.child;case 12:return Ht(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,ze(od,r._currentValue),r._currentValue=o,i!==null)if(fr(i.value,o)){if(i.children===s.children&&!an.current){t=is(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Jr(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Xp(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(V(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Xp(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ht(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Yo(t,n),s=Un(s),r=r(s),t.flags|=1,Ht(e,t,r,n),t.child;case 14:return r=t.type,s=nr(r,t.pendingProps),s=nr(r.type,s),cw(e,t,r,s,n);case 15:return US(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:nr(r,s),Ru(e,t),t.tag=1,ln(r)?(e=!0,rd(t)):e=!1,Yo(t,n),$S(t,r,s),Zp(t,r,s,n),nm(null,t,r,!0,e,n);case 19:return KS(e,t,n);case 22:return HS(e,t,n)}throw Error(V(156,t.tag))};function ck(e,t){return M1(e,t)}function y2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(e,t,n,r){return new y2(e,t,n,r)}function mv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function x2(e){if(typeof e=="function")return mv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Og)return 11;if(e===Dg)return 14}return 2}function Ks(e,t){var n=e.alternate;return n===null?(n=Ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 4,322 bytes, line 40
40ons=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Du(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")mv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ro:return Li(n.children,s,i,t);case Ig:o=8,s|=8;break;case kp:return e=Ln(12,n,t,s|2),e.elementType=kp,e.lanes=i,e;case jp:return e=Ln(13,n,t,s),e.elementType=jp,e.lanes=i,e;case Cp:return e=Ln(19,n,t,s),e.elementType=Cp,e.lanes=i,e;case x1:return Jd(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case v1:o=10;break e;case y1:o=9;break e;case Og:o=11;break e;case Dg:o=14;break e;case Ss:o=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=Ln(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Li(e,t,n,r){return e=Ln(7,e,r,t),e.lanes=n,e}function Jd(e,t,n,r){return e=Ln(22,e,r,t),e.elementType=x1,e.lanes=n,e.stateNode={isHidden:!1},e}function jf(e,t,n){return e=Ln(6,e,null,t),e.lanes=n,e}function Cf(e,t,n){return t=Ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function w2(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sf(0),this.expirationTimes=sf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sf(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function gv(e,t,n,r,s,i,o,l,c){return e=new w2(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ln(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zg(i),e}function b2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ao,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function uk(e){if(!e)return Js;e=e._reactInternals;e:{if(Zi(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(ln(n))return uS(e,n,t)}return t}function dk(e,t,n,r,s,i,o,l,c){return e=gv(n,r,!0,e,s,i,o,l,c),e.context=uk(null),n=e.current,r=qt(),s=qs(n),i=Jr(r,s),i.callback=t??null,Ws(n,i,s),e.current.lanes=s,xc(e,s,r),cn(e,r),e}function Zd(e,t,n,r){var s=t.current,i=qt(),o=qs(s);return n=uk(n),t.context===null?t.context=n:t.pendingContext=n,t=Jr(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ws(s,t,o),e!==null&&(ur(e,s,o,i),Tu(e,s,o)),o}function gd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function bw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vv(e,t){bw(e,t),(e=e.alternate)&&bw(e,t)}function S2(){return null}var hk=typeof reportError=="function"?reportError:function(e){console.error(e)};function yv(e){this._internalRoot=e}eh.prototype.render=yv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Zd(e,t,null,null)};eh.prototype.unmount=yv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ui(function(){Zd(null,e,null,null)}),t[rs]=null}};function eh(e){this._internalRoot=e}eh.prototype.unstable_scheduleHydration=function(e){if(e){var t=H1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<js.length&&t!==0&&t<js[n].priority;n++);js.splice(n,0,e),n===0&&V1(e)}};function xv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function th(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Sw(){}
vendor: 5,083 bytes, line 40
40function k2(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=gd(o);i.call(u)}}var o=dk(t,r,e,0,null,!1,!1,"",Sw);return e._reactRootContainer=o,e[rs]=o.current,Kl(e.nodeType===8?e.parentNode:e),Ui(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=gd(c);l.call(u)}}var c=gv(e,0,!1,null,null,!1,!1,"",Sw);return e._reactRootContainer=c,e[rs]=c.current,Kl(e.nodeType===8?e.parentNode:e),Ui(function(){Zd(t,c,n,r)}),c}function nh(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var c=gd(o);l.call(c)}}Zd(t,o,e,s)}else o=k2(n,t,e,s,r);return gd(o)}B1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ml(t.pendingLanes);n!==0&&(Fg(t,n|1),cn(t,st()),!(Pe&6)&&(_a=st()+500,si()))}break;case 13:Ui(function(){var r=ss(e,1);if(r!==null){var s=qt();ur(r,e,1,s)}}),vv(e,1)}};$g=function(e){if(e.tag===13){var t=ss(e,134217728);if(t!==null){var n=qt();ur(t,e,134217728,n)}vv(e,134217728)}};U1=function(e){if(e.tag===13){var t=qs(e),n=ss(e,t);if(n!==null){var r=qt();ur(n,e,t,r)}vv(e,t)}};H1=function(){return Oe};W1=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};Dp=function(e,t,n){switch(t){case"input":if(Np(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=qd(r);if(!s)throw Error(V(90));b1(r),Np(r,s)}}}break;case"textarea":k1(e,n);break;case"select":t=n.value,t!=null&&Vo(e,!!n.multiple,t,!1)}};P1=hv;A1=Ui;var j2={usingClientEntryPoint:!1,Events:[bc,Mo,qd,N1,T1,hv]},sl={findFiberByHostInstance:Si,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},C2={bundleType:sl.bundleType,version:sl.version,rendererPackageName:sl.rendererPackageName,rendererConfig:sl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ls.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=O1(e),e===null?null:e.stateNode},findFiberByHostInstance:sl.findFiberByHostInstance||S2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{Ud=ru.inject(C2),Pr=ru}catch{}}Nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j2;Nn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xv(t))throw Error(V(200));return b2(e,t,null,n)};Nn.createRoot=function(e,t){if(!xv(e))throw Error(V(299));var n=!1,r="",s=hk;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=gv(e,1,!1,null,null,n,!1,r,s),e[rs]=t.current,Kl(e.nodeType===8?e.parentNode:e),new yv(t)};Nn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=O1(t),e=e===null?null:e.stateNode,e};Nn.flushSync=function(e){return Ui(e)};Nn.hydrate=function(e,t,n){if(!th(t))throw Error(V(200));return nh(null,e,t,!0,n)};Nn.hydrateRoot=function(e,t,n){if(!xv(e))throw Error(V(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=hk;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=dk(t,null,e,1,n??null,s,!1,i,o),e[rs]=t.current,Kl(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new eh(t)};Nn.render=function(e,t,n){if(!th(t))throw Error(V(200));return nh(null,e,t,!1,n)};Nn.unmountComponentAtNode=function(e){if(!th(e))throw Error(V(40));return e._reactRootContainer?(Ui(function(){nh(null,null,e,!1,function(){e._reactRootContainer=null,e[rs]=null})}),!0):!1};Nn.unstable_batchedUpdates=hv;Nn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!th(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return nh(e,t,n,!1,r)};Nn.version="18.3.1-next-f1338f8080-20240426";function fk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fk)}catch(e){console.error(e)}}fk(),f1.exports=Nn;var eo=f1.exports;const pk=Xi(eo);var mk,kw=eo;mk=kw.createRoot,kw.hydrateRoot;var _2=typeof Element<"u",E2=typeof Map=="function",N2=typeof Set=="function",T2=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Mu(e,t){if(e===t)return!0;
40if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Mu(e[r],t[r]))return!1;return!0}var i;if(E2&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Mu(r.value[1],t.get(r.value[0])))return!1;return!0}if(N2&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(T2&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(_2&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!Mu(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var P2=function(t,n){try{return Mu(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const A2=Xi(P2);var R2=function(e,t,n,r,s,i,o,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,s,i,o,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},I2=R2;const jw=Xi(I2);var O2=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var o=Object.keys(t),l=Object.keys(n);if(o.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),u=0;u<o.length;u++){var d=o[u];if(!c(d))return!1;var h=t[d],p=n[d];if(i=r?r.call(s,h,p,d):void 0,i===!1||i===void 0&&h!==p)return!1}return!0};const D2=Xi(O2);var gk=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(gk||{}),_f={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Cw=Object.values(gk),wv={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},M2=Object.entries(wv).reduce((e,[t,n])=>(e[n]=t,e),{}),lr="data-rh",Xo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Jo=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},L2=e=>{let t=Jo(e,"title");const n=Jo(e,Xo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Jo(e,Xo.DEFAULT_TITLE);return t||r||void 0},F2=e=>Jo(e,Xo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Ef=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),$2=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const s=Object.keys(r);for(let i=0;i<s.length;i+=1){const l=s[i].toLowerCase();if(e.indexOf(l)!==-1&&r[l])return n.concat(r)}}return n},[]),z2=e=>console&&typeof console.warn=="function"&&console.warn(e),il=(e,t,n)=>{const r={};return n.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&z2(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,i)=>{const o={};i.filter(c=>{let u;const d=Object.keys(c);for(let p=0;p<d.length;p+=1){const f=d[p],v=f.toLowerCase();t.indexOf(v)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(v==="rel"&&c[v].toLowerCase()==="stylesheet")&&(u=v),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return r[u]||(r[u]={}),o[u]||(o[u]={}),r[u][h]?!1:(o[u][h]=!0,!0)}
40).reverse().forEach(c=>s.push(c));const l=Object.keys(o);for(let c=0;c<l.length;c+=1){const u=l[c],d={...r[u],...o[u]};r[u]=d}return s},[]).reverse()},B2=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},U2=e=>({baseTag:$2(["href"],e),bodyAttributes:Ef("bodyAttributes",e),defer:Jo(e,Xo.DEFER),encode:Jo(e,Xo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Ef("htmlAttributes",e),linkTags:il("link",["rel","href"],e),metaTags:il("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:il("noscript",["innerHTML"],e),onChangeClientState:F2(e),scriptTags:il("script",["src","innerHTML"],e),styleTags:il("style",["cssText"],e),title:L2(e),titleAttributes:Ef("titleAttributes",e),prioritizeSeoTags:B2(e,Xo.PRIORITIZE_SEO_TAGS)}),vk=e=>Array.isArray(e)?e.join(""):e,H2=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Nf=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(H2(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},_w=(e,t)=>({...e,[t]:void 0}),W2=["noscript","script","style"],pm=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),yk=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),V2=(e,t,n,r)=>{const s=yk(n),i=vk(t);return s?`<${e} ${lr}="true" ${s}>${pm(i,r)}</${e}>`:`<${e} ${lr}="true">${pm(i,r)}</${e}>`},q2=(e,t,n=!0)=>t.reduce((r,s)=>{const i=s,o=Object.keys(i).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof i[d]>"u"?d:`${d}="${pm(i[d],n)}"`;return u?`${u} ${h}`:h},""),l=i.innerHTML||i.cssText||"",c=W2.indexOf(e)===-1;return`${r}<${e} ${lr}="true" ${o}${c?"/>":`>${l}</${e}>`}`},""),xk=(e,t={})=>Object.keys(e).reduce((n,r)=>{const s=wv[r];return n[s||r]=e[r],n}
40,t),K2=(e,t,n)=>{const r={key:t,[lr]:!0},s=xk(n,r);return[B.createElement("title",s,t)]},Lu=(e,t)=>t.map((n,r)=>{const s={key:r,[lr]:!0};return Object.keys(n).forEach(i=>{const l=wv[i]||i;if(l==="innerHTML"||l==="cssText"){const c=n.innerHTML||n.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=n[i]}),B.createElement(e,s)}),An=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>K2(e,t.title,t.titleAttributes),toString:()=>V2(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>xk(t),toString:()=>yk(t)};default:return{toComponent:()=>Lu(e,t),toString:()=>q2(e,t,n)}}},G2=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const s=Nf(e,_f.meta),i=Nf(t,_f.link),o=Nf(n,_f.script);return{priorityMethods:{toComponent:()=>[...Lu("meta",s.priority),...Lu("link",i.priority),...Lu("script",o.priority)],toString:()=>`${An("meta",s.priority,r)} ${An("link",i.priority,r)} ${An("script",o.priority,r)}`},metaTags:s.default,linkTags:i.default,scriptTags:o.default}},Y2=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:s,noscriptTags:i,styleTags:o,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:p}=e,f={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:f,linkTags:d,metaTags:h,scriptTags:p}=G2(e)),{priority:f,base:An("base",t,r),bodyAttributes:An("bodyAttributes",n,r),htmlAttributes:An("htmlAttributes",s,r),link:An("link",d,r),meta:An("meta",h,r),noscript:An("noscript",i,r),script:An("script",p,r),style:An("style",o,r),title:An("title",{title:l,titleAttributes:c},r)}},mm=Y2,su=[],wk=!!(typeof window<"u"&&window.document&&window.document.createElement),gm=class{constructor(e,t){zr(this,"instances",[]);zr(this,"canUseDOM",wk);zr(this,"context");zr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?su:this.instances,add:e=>{(this.canUseDOM?su:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?su:this.instances).indexOf(e);(this.canUseDOM?su:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=mm({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Q2={},bk=B.createContext(Q2),_i,Sk=(_i=class extends m.Component{constructor(n){super(n);zr(this,"helmetData");this.helmetData=new gm(this.props.context||{},_i.canUseDOM)}render(){return B.createElement(bk.Provider,{value:this.helmetData.value},this.props.children)}},zr(_i,"canUseDOM",wk),_i),fo=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${lr}]`),s=[].slice.call(r),i=[];let o;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText")c.styleSheet?c.styleSheet.cssText=l.cssText:c.appendChild(document.createTextNode(l.cssText));else{const d=u,h=typeof l[d]>"u"?"":l[d];c.setAttribute(u,h)}c.setAttribute(lr,"true"),s.some((u,d)=>(o=d,c.isEqualNode(u)))?s.splice(o,1):i.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),i.forEach(l=>n.appendChild(l)),{oldTags:s,newTags:i}},vm=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(lr),s=r?r.split(","):[],i=[...s],o=Object.keys(t);for(const l of o){const c=t[l]||"";n.getAttribute(l)!==c&&n.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const u=i.indexOf(l);u!==-1&&i.splice(u,1)}for(let l=i.length-1;l>=0;l-=1)n.removeAttribute(i[l]);s.length===i.length?n.removeAttribute(lr):n.getAttribute(lr)!==o.join(",")&&n.setAttribute(lr,o.join(","))},X2=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=vk(e)),vm("title",t)},Ew=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:s,linkTags:i,metaTags:o,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:p}=e;vm("body",r),vm("html",s),X2(h,p);const f={baseTag:fo("base",n),linkTags:fo("link",i),metaTags:fo("meta",o),noscriptTags:fo("noscript",l),scriptTags:fo("script",u),styleTags:fo("style",d)},v={},y={};Object.keys(f).forEach(b=>{const{newTags:g,oldTags:x}=f[b];g.length&&(v[b]=g),x.length&&(y[b]=f[b].oldTags)}),t&&t(),c(e,v,y)},ol=null,J2=e=>{ol&&cancelAnimationFrame(ol),e.defer?ol=requestAnimationFrame(()=>{Ew(e,()=>{ol=null})}):(Ew(e),ol=null)},Z2=J2,Nw=class extends m.Component{constructor(){super(...arguments);zr(this,"rendered",!1)}shouldComponentUpdate(t){return!D2(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const s=U2(t.get().map(i=>{const o={...i.props};return delete o.context,o}));
40Sk.canUseDOM?Z2(s):mm&&(r=mm(s)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},bp,kk=(bp=class extends m.Component{shouldComponentUpdate(e){return!A2(_w(this.props,"helmetData"),_w(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}warnOnInvalidChildren(e,t){return jw(Cw.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Cw.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),jw(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return B.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:s,...i}=r.props,o=Object.keys(i).reduce((c,u)=>(c[M2[u]||u]=i[u],c),{});let{type:l}=r;
40switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(r,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,o,s);break;default:t=this.mapObjectTypeChildren(r,t,o,s);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof gm)){const s=r;r=new gm(s.context,!0),delete n.helmetData}return r?B.createElement(Nw,{...n,context:r.value}):B.createElement(bk.Consumer,null,s=>B.createElement(Nw,{...n,context:s}))}},zr(bp,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),bp);const eI=1,tI=1e6;let Tf=0;function nI(){return Tf=(Tf+1)%Number.MAX_SAFE_INTEGER,Tf.toString()}const Pf=new Map,Tw=e=>{if(Pf.has(e))return;const t=setTimeout(()=>{Pf.delete(e),Rl({type:"REMOVE_TOAST",toastId:e})},tI);Pf.set(e,t)},rI=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,eI)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Tw(n):e.toasts.forEach(r=>{Tw(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Fu=[];let $u={toasts:[]};function Rl(e){$u=rI($u,e),Fu.forEach(t=>{t($u)})}function sI({...e}){const t=nI(),n=s=>Rl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Rl({type:"DISMISS_TOAST",toastId:t});return Rl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function gr(){const[e,t]=m.useState($u);return m.useEffect(()=>(Fu.push(t),()=>{const n=Fu.indexOf(t);n>-1&&Fu.splice(n,1)}),[e]),{...e,toast:sI,dismiss:n=>Rl({type:"DISMISS_TOAST",toastId:n})}}function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Pw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rh(...e){return t=>{let n=!1;const r=e.map(s=>{const i=Pw(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():Pw(e[s],null)}}}}function pe(...e){return m.useCallback(rh(...e),e)}function iI(e,t){const n=m.createContext(t),r=i=>{const{children:o,...l}=i,c=m.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function s(i){const o=m.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function mt(e,t=[]){let n=[];function r(i,o){const l=m.createContext(o),c=n.length;n=[...n,o];const u=h=>{var g;const{scope:p,children:f,...v}=h,y=((g=p==null?void 0:p[e])==null?void 0:g[c])||l,b=m.useMemo(()=>v,Object.values(v));return a.jsx(y.Provider,{value:b,children:f})};u.displayName=i+"Provider";function d(h,p){var y;const f=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,v=m.useContext(f);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>m.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,oI(s,...t)]}function oI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Hi(e){const t=lI(e),n=m.forwardRef((r,s)=>{const{children:i,...o}=r,l=m.Children.toArray(i),c=l.find(cI);if(c){const u=c.props.children,d=l.map(h=>h===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:h);return a.jsx(t,{...o,ref:s,children:m.isValidElement(u)?m.cloneElement(u,void 0,d):null})}return a.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var aI=Hi("Slot");function lI(e){const t=m.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 9,979 bytes, line 40
40if(m.isValidElement(s)){const o=dI(s),l=uI(i,s.props);return s.type!==m.Fragment&&(l.ref=r?rh(r,o):o),m.cloneElement(s,l)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jk=Symbol("radix.slottable");function Ck(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jk,t}function cI(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jk}function uI(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...l)=>{const c=i(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function dI(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function kc(e){const t=e+"CollectionProvider",[n,r]=mt(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:b,children:g}=y,x=B.useRef(null),w=B.useRef(new Map).current;return a.jsx(s,{scope:b,itemMap:w,collectionRef:x,children:g})};o.displayName=t;const l=e+"CollectionSlot",c=Hi(l),u=B.forwardRef((y,b)=>{const{scope:g,children:x}=y,w=i(l,g),S=pe(b,w.collectionRef);return a.jsx(c,{ref:S,children:x})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=Hi(d),f=B.forwardRef((y,b)=>{const{scope:g,children:x,...w}=y,S=B.useRef(null),j=pe(b,S),k=i(d,g);return B.useEffect(()=>(k.itemMap.set(S,{ref:S,...w}),()=>void k.itemMap.delete(S))),a.jsx(p,{[h]:"",ref:j,children:x})});f.displayName=d;function v(y){const b=i(e+"CollectionConsumer",y);return B.useCallback(()=>{const x=b.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:u,ItemSlot:f},v,r]}var hI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=hI.reduce((e,t)=>{const n=Hi(`Primitive.${t}`),r=m.forwardRef((s,i)=>{const{asChild:o,...l}=s,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bv(e,t){e&&eo.flushSync(()=>e.dispatchEvent(t))}function it(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function fI(e,t=globalThis==null?void 0:globalThis.document){const n=it(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var pI="DismissableLayer",ym="dismissableLayer.update",mI="dismissableLayer.pointerDownOutside",gI="dismissableLayer.focusOutside",Aw,_k=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Da=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=m.useContext(_k),[d,h]=m.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=m.useState({}),v=pe(t,E=>h(E)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(b),x=d?y.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=g,j=yI(E=>{const A=E.target,I=[...u.branches].some(_=>_.contains(A));!S||I||(s==null||s(E),o==null||o(E),E.defaultPrevented||l==null||l())},p),k=xI(E=>{const A=E.target;[...u.branches].some(_=>_.contains(A))||(i==null||i(E),o==null||o(E),E.defaultPrevented||l==null||l())},p);return fI(E=>{x===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},p),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Aw=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Rw(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Aw)}},[d,p,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Rw())},[d,u]),m.useEffect(()=>{const E=()=>f({});return document.addEventListener(ym,E),()=>document.removeEventListener(ym,E)},[]),a.jsx(ee.div,{...c,ref:v,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,k.onFocusCapture),onBlurCapture:K(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,j.onPointerDownCapture)})});Da.displayName=pI;var vI="DismissableLayerBranch",Ek=m.forwardRef((e,t)=>{const n=m.useContext(_k),r=m.useRef(null),s=pe(t,r);return m.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),a.jsx(ee.div,{...e,ref:s})});Ek.displayName=vI;function yI(e,t=globalThis==null?void 0:globalThis.document){const n=it(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){Nk(mI,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xI(e,t=globalThis==null?void 0:globalThis.document){const n=it(e),r=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!r.current&&Nk(gI,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Rw(){const e=new CustomEvent(ym);document.dispatchEvent(e)}function Nk(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?bv(s,i):s.dispatchEvent(i)}var wI=Da,bI=Ek,pt=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},SI="Portal",jc=m.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,i]=m.useState(!1);pt(()=>i(!0),[]);const o=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?pk.createPortal(a.jsx(ee.div,{...r,ref:t}),o):null});jc.displayName=SI;function kI(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var yt=e=>{const{present:t,children:n}=e,r=jI(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=pe(r.ref,CI(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:i}):null};yt.displayName="Presence";function jI(e){const[t,n]=m.useState(),r=m.useRef(null),s=m.useRef(e),i=m.useRef("none"),o=e?"mounted":"unmounted",[l,c]=kI(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=iu(r.current);i.current=l==="mounted"?u:"none"},[l]),pt(()=>{const u=r.current,d=s.current;if(d!==e){const p=i.current,f=iu(u);e?c("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),pt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=f=>{const y=iu(r.current).includes(f.animationName);if(f.target===t&&y&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=f=>{f.target===t&&(i.current=iu(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function iu(e){return(e==null?void 0:e.animationName)||"none"}function CI(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var _I=Tg[" useInsertionEffect ".trim().toString()]||pt;function En({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=EI({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const d=m.useRef(e!==void 0);m.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=m.useCallback(d=>{var h;if(l){const p=NI(d)?d(e):d;p!==e&&((h=o.current)==null||h.call(o,p))}else i(d)},[l,e,i,o]);return[c,u]}function EI({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),i=m.useRef(t);return _I(()=>{i.current=t},[t]),m.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function NI(e){return typeof e=="function"}var Tk=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"}),TI="VisuallyHidden",sh=m.forwardRef((e,t)=>
40a.jsx(ee.span,{...e,ref:t,style:{...Tk,...e.style}}));sh.displayName=TI;var PI=sh,Sv="ToastProvider",[kv,AI,RI]=kc("Toast"),[Pk,Eq]=mt("Toast",[RI]),[II,ih]=Pk(Sv),Ak=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[l,c]=m.useState(null),[u,d]=m.useState(0),h=m.useRef(!1),p=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Sv}\`. Expected non-empty \`string\`.`),a.jsx(kv.Provider,{scope:t,children:a.jsx(II,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:m.useCallback(()=>d(f=>f+1),[]),onToastRemove:m.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:p,children:o})})};Ak.displayName=Sv;var Rk="ToastViewport",OI=["F8"],xm="toast.viewportPause",wm="toast.viewportResume",Ik=m.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=OI,label:s="Notifications ({hotkey})",...i}=e,o=ih(Rk,n),l=AI(n),c=m.useRef(null),u=m.useRef(null),d=m.useRef(null),h=m.useRef(null),p=pe(t,h,o.onViewportChange),f=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;m.useEffect(()=>{const b=g=>{var w;r.length!==0&&r.every(S=>g[S]||g.code===S)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r]),m.useEffect(()=>{const b=c.current,g=h.current;if(v&&b&&g){const x=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(xm);g.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(wm);g.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!b.contains(k.relatedTarget)&&w()},j=()=>{b.contains(document.activeElement)||w()};return b.addEventListener("focusin",x),b.addEventListener("focusout",S),b.addEventListener("pointermove",x),b.addEventListener("pointerleave",j),window.addEventListener("blur",x),window.addEventListener("focus",w),()=>{b.removeEventListener("focusin",x),b.removeEventListener("focusout",S),b.removeEventListener("pointermove",x),b.removeEventListener("pointerleave",j),window.removeEventListener("blur",x),window.removeEventListener("focus",w)}}},[v,o.isClosePausedRef]);const y=m.useCallback(({tabbingDirection:b})=>{const x=l().map(w=>{const S=w.ref.current,j=[S,...KI(S)];return b==="forwards"?j:j.reverse()});return(b==="forwards"?x.reverse():x).flat()},[l]);return m.useEffect(()=>{const b=h.current;if(b){const g=x=>{var j,k,E;const w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){const A=document.activeElement,I=x.shiftKey;if(x.target===b&&I){(j=u.current)==null||j.focus();return}const N=y({tabbingDirection:I?"backwards":"forwards"}),F=N.findIndex(M=>M===A);Af(N.slice(F+1))?x.preventDefault():I?(k=u.current)==null||k.focus():(E=d.current)==null||E.focus()}};return b.addEventListener("keydown",g),()=>b.removeEventListener("keydown",g)}},[l,y]),a.jsxs(bI,{ref:c,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&a.jsx(bm,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});Af(b)}}),a.jsx(kv.Slot,{scope:n,children:a.jsx(ee.ol,{tabIndex:-1,...i,ref:p})}),v&&a.jsx(bm,{ref:d,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});Af(b)}})]})});Ik.displayName=Rk;var Ok="ToastFocusProxy",bm=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=ih(Ok,n);return a.jsx(sh,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});bm.displayName=Ok;var Cc="Toast",DI="toast.swipeStart",MI="toast.swipeMove",LI="toast.swipeCancel",FI="toast.swipeEnd",Dk=m.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[l,c]=En({prop:r,defaultProp:s??!0,onChange:i,caller:Cc});return a.jsx(yt,{present:n||l,children:a.jsx(BI,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:it(e.onPause),onResume:it(e.onResume),onSwipeStart:K(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:K(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:K(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:K(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Dk.displayName=Cc;var[$I,zI]=Pk(Cc,{onClose(){}}),BI=m.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:p,onSwipeEnd:f,...v}=e,y=ih(Cc,n),[b,g]=m.useState(null),x=pe(t,M=>g(M)),w=m.useRef(null),S=m.useRef(null),j=s||y.duration,k=m.useRef(0),E=m.useRef(j),A=m.useRef(0),{onToastAdd:I,onToastRemove:_}=y,D=it(()=>{var $;(b==null?void 0:b.contains(document.activeElement))&&(($=y.viewport)==null||$.focus()),o()}),N=m.useCallback(M=>{!M||M===1/0||(window.clearTimeout(A.current),k.current=new Date().getTime(),A.current=window.setTimeout(D,M))},[D]);m.useEffect(()=>{const M=y.viewport;if(M){const $=()=>{N(E.current),u==null||u()},z=()=>{const Y=new Date().getTime()-k.current;E.current=E.current-Y,window.clearTimeout(A.current),c==null||c()};return M.addEventListener(xm,z),M.addEventListener(wm,$),()=>{M.removeEventListener(xm,z),M.removeEventListener(wm,$)}}},[y.viewport,j,c,u,N]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&N(j)},[i,j,y.isClosePausedRef,N]),m.useEffect(()=>(I(),()=>_()),[I,_]);const F=m.useMemo(()=>b?Uk(b):null,[b]);return y.viewport?a.jsxs(a.Fragment,{children:[F&&a.jsx(UI,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),a.jsx($I,{scope:n,onClose:D,children:eo.createPortal(a.jsx(kv.ItemSlot,{scope:n,children:a.jsx(wI,{asChild:!0,onEscapeKeyDown:K(l,()=>{y.isFocusedToastEscapeKeyDownRef.current||D(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(ee.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...v,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:K(e.onKeyDown,M=>{M.key==="Escape"&&(l==null||l(M.nativeEvent),M.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:K(e.onPointerDown,M=>{M.button===0&&(w.current={x:M.clientX,y:M.clientY})}),onPointerMove:K(e.onPointerMove,M=>{if(!w.current)return;const $=M.clientX-w.current.x,z=M.clientY-w.current.y,Y=!!S.current,O=["left","right"].includes(y.swipeDirection),R=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,C=O?R(0,$):0,X=O?0:R(0,z),Q=M.pointerType==="touch"?10:2,T={x:C,y:X},U={originalEvent:M,delta:T};Y?(S.current=T,ou(MI,h,U,{discrete:!1})):Iw(T,y.swipeDirection,Q)?(S.current=T,ou(DI,d,U,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs($)>Q||Math.abs(z)>Q)&&(w.current=null)}),onPointerUp:K(e.onPointerUp,M=>{const $=S.current,z=M.target;if(z.hasPointerCapture(M.pointerId)&&z.releasePointerCapture(M.pointerId),S.current=null,w.current=null,$){const Y=M.currentTarget,O={originalEvent:M,delta:$};Iw($,y.swipeDirection,y.swipeThreshold)?ou(FI,f,O,{discrete:!0}):ou(LI,p,O,{discrete:!0}),Y.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),UI=e=>{const{__scopeToast:t,children:n,...r}=e,s=ih(Cc,t),[i,o]=m.useState(!1),[l,c]=m.useState(!1);return VI(()=>o(!0)),m.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(jc,{asChild:!0,children:a.jsx(sh,{...r,children:i&&a.jsxs(a.Fragment,{children:[s.label," ",n]})})})},HI="ToastTitle",Mk=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(ee.div,{...r,ref:t})});Mk.displayName=HI;var WI="ToastDescription",Lk=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(ee.div,{...r,ref:t})});Lk.displayName=WI;var Fk="ToastAction",$k=m.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(Bk,{altText:n,asChild:!0,children:a.jsx(jv,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Fk}\`. Expected non-empty \`string\`.`),null)});$k.displayName=Fk;var zk="ToastClose",jv=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=zI(zk,n);return a.jsx(Bk,{asChild:!0,children:a.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,s.onClose)})})});jv.displayName=zk;var Bk=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return a.jsx(ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function Uk(e){const t=[];
vendor: 16,266 bytes, lines 40-240
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),qI(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Uk(r))}}),t}function ou(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?bv(s,i):s.dispatchEvent(i)}var Iw=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function VI(e=()=>{}){const t=it(e);pt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function qI(e){return e.nodeType===e.ELEMENT_NODE}function KI(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Af(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var GI=Ak,Hk=Ik,Wk=Dk,Vk=Mk,qk=Lk,Kk=$k,Gk=jv;function Yk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Yk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Yk(e))&&(r&&(r+=" "),r+=t);return r}const Ow=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dw=Qk,_c=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Dw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const p=Ow(d)||Ow(h);return s[u][p]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,p]=d;return p===void 0||(u[h]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:p,...f}=d;return Object.entries(f).every(v=>{let[y,b]=v;return Array.isArray(b)?b.includes({...i,...l}[y]):{...i,...l}[y]===b})?[...u,h,p]:u},[]);return Dw(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const YI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var QI={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const XI=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...l},c)=>m.createElement("svg",{ref:c,...QI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Xk("lucide",s),...l},[...o.map(([u,d])=>m.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const me=(e,t)=>{const n=m.forwardRef(({className:r,...s},i)=>m.createElement(XI,{ref:i,iconNode:t,className:Xk(`lucide-${YI(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const nc=me("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const Cv=me("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const JI=me("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Jk=me("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const _v=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Ev=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const ZI=me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const eO=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const tO=me("CircleAlert",[["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"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const nO=me("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const al=me("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const rO=me("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Zk=me("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const to=me("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const vd=me("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const sO=me("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const Ho=me("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const iO=me("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const ej=me("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const oO=me("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const aO=me("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const Rf=me("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const au=me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const If=me("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const lO=me("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Xr=me("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const tj=me("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const Of=me("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Mw=me("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const Nv=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const zu=me("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const Lw=me("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const Tv=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const nj=me("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const cO=me("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const rj=me("Shield",[["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
240y:"oel41y"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const uO=me("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const Df=me("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const dO=me("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const hO=me("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const fO=me("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const Pv=me("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const yd=me("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const Av=me("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 281 * @license lucide-react v0.462.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const Fw=me("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 286 * @license lucide-react v0.462.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const pO=me("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}
vendor: 6,304 bytes, lines 290-295
290],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 291 * @license lucide-react v0.462.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const rc=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Rv="-",mO=e=>{const t=vO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Rv);return l[0]===""&&l.length!==1&&l.shift(),sj(l,t)||gO(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},sj=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?sj(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Rv);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},$w=/^\[(.+)\]$/,gO=e=>{if($w.test(e)){const t=$w.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},vO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xO(Object.entries(e.classGroups),n).forEach(([i,o])=>{Sm(o,r,i,t)}),r},Sm=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:zw(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(yO(s)){Sm(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Sm(o,zw(t,i),n,r)})})},zw=(e,t)=>{let n=e;return t.split(Rv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yO=e=>e.isThemeGetter,xO=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,s]}):e,wO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},ij="!",bO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let b=0;b<l.length;b++){let g=l[b];if(u===0){if(g===s&&(r||l.slice(b,b+i)===t)){c.push(l.slice(d,b)),d=b+i;continue}if(g==="/"){h=b;continue}}g==="["?u++:g==="]"&&u--}const p=c.length===0?l:l.substring(d),f=p.startsWith(ij),v=f?p.substring(1):p,y=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:y}};return n?l=>n({className:l,parseClassName:o}):o},SO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},kO=e=>({cache:wO(e.cacheSize),parseClassName:bO(e),...mO(e)}),jO=/\s+/,CO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(jO);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:f}=n(u);let v=!!f,y=r(v?p.substring(0,f):p);if(!y){if(!v){l=u+(l.length>0?" "+l:l);continue}if(y=r(p),!y){l=u+(l.length>0?" "+l:l);continue}v=!1}const b=SO(d).join(":"),g=h?b+ij:b,x=g+y;if(i.includes(x))continue;i.push(x);const w=s(y,v);for(let S=0;S<w.length;++S){const j=w[S];i.push(g+j)}l=u+(l.length>0?" "+l:l)}return l};function _O(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=oj(t))&&(r&&(r+=" "),r+=n);return r}const oj=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=oj(e[r]))&&(n&&(n+=" "),n+=t);return n};function EO(e,...t){let n,r,s,i=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=kO(u),r=n.cache.get,s=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=CO(c,n);return s(c,d),d}return function(){return i(_O.apply(null,arguments))}}const Ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},aj=/^\[(?:([a-z-]+):)?(.+)\]$/i,NO=/^\d+\/\d+$/,TO=new Set(["px","full","screen"]),PO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,AO=/\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$/,RO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,IO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Br=e=>Zo(e)||TO.has(e)||NO.test(e),ms=e=>Ma(e,"length",UO),Zo=e=>!!e&&!Number.isNaN(Number(e)),Mf=e=>Ma(e,"number",Zo),ll=e=>!!e&&Number.isInteger(Number(e)),DO=e=>e.endsWith("%")&&Zo(e.slice(0,-1)),xe=e=>aj.test(e),gs=e=>PO.test(e),MO=new Set(["length","size","percentage"]),LO=e=>Ma(e,MO,lj),FO=e=>Ma(e,"position",lj),$O=new Set(["image","url"]),zO=e=>Ma(e,$O,WO),BO=e=>Ma(e,"",HO),cl=()=>!0,Ma=(e,t,n)=>{const r=aj.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},UO=e=>AO.test(e)&&!RO.test(e),lj=()=>!1,HO=e=>IO.test(e),WO=e=>OO.test(e),VO=()=>{const e=Ue("colors"),t=Ue("spacing"),n=Ue("blur"),r=Ue("brightness"),s=Ue("borderColor"),i=Ue("borderRadius"),o=Ue("borderSpacing"),l=Ue("borderWidth"),c=Ue("contrast"),u=Ue("grayscale"),d=Ue("hueRotate"),h=Ue("invert"),p=Ue("gap"),f=Ue("gradientColorStops"),v=Ue("gradientColorStopPositions"),y=Ue("inset"),b=Ue("margin"),g=Ue("opacity"),x=Ue("padding"),w=Ue("saturate"),S=Ue("scale"),j=Ue("sepia"),k=Ue("skew"),E=Ue("space"),A=Ue("translate"),I=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",xe,t],N=()=>[xe,t],F=()=>["",Br,ms],M=()=>["auto",Zo,xe],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",xe],C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Zo,xe];return{cacheSize:500,separator:":",theme:{colors:[cl],spacing:[Br,ms],blur:["none","",gs,xe],brightness:X(),borderColor:[e],borderRadius:["n
vendor: 3,184 bytes, line 295
295one","","full",gs,xe],borderSpacing:N(),borderWidth:F(),contrast:X(),grayscale:R(),hueRotate:X(),invert:R(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[DO,ms],inset:D(),margin:D(),opacity:X(),padding:N(),saturate:X(),scale:X(),sepia:R(),skew:X(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",xe]}],container:["container"],columns:[{columns:[gs]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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"],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:[...$(),xe]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ll,xe]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",xe]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",ll,xe]}],"grid-cols":[{"grid-cols":[cl]}],"col-start-end":[{col:["auto",{span:["full",ll,xe]},xe]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[cl]}],"row-start-end":[{row:["auto",{span:[ll,xe]},xe]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",xe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",xe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,339 bytes, line 295
295],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",xe,t]}],"min-w":[{"min-w":[xe,t,"min","max","fit"]}],"max-w":[{"max-w":[xe,t,"none","full","min","max","fit","prose",{screen:[gs]},gs]}],h:[{h:[xe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[xe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[xe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gs,ms]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mf]}],"font-family":[{font:[cl]}],"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:["tighter","tight","normal","wide","wider","widest",xe]}],"line-clamp":[{"line-clamp":["none",Zo,Mf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Br,xe]}],"list-image":[{"list-image":["none",xe]}],"list-style-type":[{list:["none","disc","decimal",xe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Br,ms]}],"underline-offset":[{"underline-offset":["auto",Br,xe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),FO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[Br,xe]}],"outline-w":[{outline:[Br,ms]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Br,ms]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gs,BO]}],"shadow-color":[{shadow:[cl]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...Y(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Y()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",gs,xe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",xe]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",xe]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",xe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ll,xe]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",xe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",xe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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"]}
vendor: 4,642 bytes, line 295
295],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",xe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Br,ms,Mf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},qO=EO(VO);function J(...e){return qO(Qk(e))}const KO=GI,cj=m.forwardRef(({className:e,...t},n)=>a.jsx(Hk,{ref:n,className:J("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));cj.displayName=Hk.displayName;const GO=_c("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),uj=m.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(Wk,{ref:r,className:J(GO({variant:t}),e),...n}));uj.displayName=Wk.displayName;const YO=m.forwardRef(({className:e,...t},n)=>a.jsx(Kk,{ref:n,className:J("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));YO.displayName=Kk.displayName;const dj=m.forwardRef(({className:e,...t},n)=>a.jsx(Gk,{ref:n,className:J("absolute right-2 top-2 rounded-md p-1 text-foreground
295/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(rc,{className:"h-4 w-4"})}));dj.displayName=Gk.displayName;const hj=m.forwardRef(({className:e,...t},n)=>a.jsx(Vk,{ref:n,className:J("text-sm font-semibold",e),...t}));hj.displayName=Vk.displayName;const fj=m.forwardRef(({className:e,...t},n)=>a.jsx(qk,{ref:n,className:J("text-sm opacity-90",e),...t}));fj.displayName=qk.displayName;function QO(){const{toasts:e}=gr();return a.jsxs(KO,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return a.jsxs(uj,{...i,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(hj,{children:n}),r&&a.jsx(fj,{children:r})]}),s,a.jsx(dj,{})]},t)}),a.jsx(cj,{})]})}var Bw=["light","dark"],XO="(prefers-color-scheme: dark)",JO=m.createContext(void 0),ZO={setTheme:e=>{},themes:[]},eD=()=>{var e;return(e=m.useContext(JO))!=null?e:ZO};m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:l,nonce:c})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Bw.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(v,y=!1,b=!0)=>{let g=o?o[v]:v,x=y?v+"|| ''":`'${g}'`,w="";return s&&b&&!y&&Bw.includes(v)&&(w+=`d.style.colorScheme = '${v}';`),n==="class"?y||g?w+=`c.add(${x})`:w+="null":g&&(w+=`d[s](n,${x})`),w},f=e?`!function(){${d}${p(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${XO}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${u?"":"else{"+p(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(i,!1,!1)};}${h}}catch(t){}}();`;return m.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:f}})});var tD=e=>{switch(e){case"success":return sD;case"info":return oD;case"warning":return iD;case"error":return aD;default:return null}},nD=Array(12).fill(0),rD=({visible:e,className:t})=>B.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},B.createElement("div",{className:"sonner-spinner"},nD.map((n,r)=>B.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sD=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.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"})),iD=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},B.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"})),oD=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.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"})),aD=B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},B.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"})),lD=B.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"},B.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),B.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),cD=()=>
295{let[e,t]=B.useState(document.hidden);return B.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},km=1,uD=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:km++,i=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
295this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],B.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(hD(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||km++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},en=new uD,dD=(e,t)=>{let n=(t==null?void 0:t.id)||km++;return en.addToast({title:e,...t,id:n}),n},hD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",fD=dD,pD=()=>en.toasts,mD=()=>en.getActiveToasts(),Wo=Object.assign(fD,{success:en.success,info:en.info,warning:en.warning,error:en.error,custom:en.custom,message:en.message,promise:en.promise,dismiss:en.dismiss,loading:en.loading},{getHistory:pD,getToasts:mD});function gD(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}gD(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
295left: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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
295:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
295--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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%)} 296`);function lu(e){return e.label!==void 0}var vD=3,yD="32px",xD="16px",Uw=4e3,wD=356,bD=14,SD=20,kD=200;function Jn(...e){return e.filter(Boolean).join(" ")}function jD(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var CD=e=>{var t,n,r,s,i,o,l,c,u,d,h;let{invert:p,toast:f,unstyled:v,interacting:y,setHeights:b,visibleToasts:g,heights:x,index:w,toasts:S,expanded:j,removeToast:k,defaultRichColors:E,closeButton:A,style:I,cancelButtonStyle:_,actionButtonStyle:D,className:N="",descriptionClassName:F="",duration:M,position:$,gap:z,loadingIcon:Y,expandByDefault:O,classNames:R,icons:C,closeButtonAriaLabel:X="Close toast",pauseWhenPageIsHidden:
296Q}=e,[T,U]=B.useState(null),[ne,se]=B.useState(null),[H,W]=B.useState(!1),[ie,oe]=B.useState(!1),[he,fe]=B.useState(!1),[Be,nt]=B.useState(!1),[xt,jt]=B.useState(!1),[Ze,Ct]=B.useState(0),[hn,$r]=B.useState(0),Pn=B.useRef(f.duration||M||Uw),ds=B.useRef(null),Vn=B.useRef(null),qn=w===0,co=w+1<=g,L=f.type,G=f.dismissible!==!1,le=f.className||"",ye=f.descriptionClassName||"",ke=B.useMemo(()=>x.findIndex(ge=>ge.toastId===f.id)||0,[x,f.id]),wt=B.useMemo(()=>{var ge;return(ge=f.closeButton)!=null?ge:A},[f.closeButton,A]),fn=B.useMemo(()=>f.duration||M||Uw,[f.duration,M]),_t=B.useRef(0),rt=B.useRef(0),$t=B.useRef(0),Re=B.useRef(null),[Et,Qt]=$.split("-"),Ya=B.useMemo(()=>x.reduce((ge,De,Ve)=>Ve>=ke?ge:ge+De.height,0),[x,ke]),Qa=cD(),$c=f.invert||p,uo=L==="loading";rt.current=B.useMemo(()=>ke*z+Ya,[ke,Ya]),B.useEffect(()=>{Pn.current=fn},[fn]),B.useEffect(()=>{W(!0)},[]),B.useEffect(()=>{let ge=Vn.current;if(ge){let De=ge.getBoundingClientRect().height;return $r(De),b(Ve=>[{toastId:f.id,height:De,position:f.position},...Ve]),()=>b(Ve=>Ve.filter(Gn=>Gn.toastId!==f.id))}},[b,f.id]),B.useLayoutEffect(()=>{if(!H)return;let ge=Vn.current,De=ge.style.height;ge.style.height="auto";let Ve=ge.getBoundingClientRect().height;ge.style.height=De,$r(Ve),b(Gn=>Gn.find(Yn=>Yn.toastId===f.id)?Gn.map(Yn=>Yn.toastId===f.id?{...Yn,height:Ve}:Yn):[{toastId:f.id,height:Ve,position:f.position},...Gn])},[H,f.title,f.description,b,f.id]);let Kn=B.useCallback(()=>{oe(!0),Ct(rt.current),b(ge=>ge.filter(De=>De.toastId!==f.id)),setTimeout(()=>{k(f)},kD)},[f,k,b,rt]);B.useEffect(()=>{if(f.promise&&L==="loading"||f.duration===1/0||f.type==="loading")return;let ge;return j||y||Q&&Qa?(()=>{if($t.current<_t.current){let De=new Date().getTime()-_t.current;Pn.current=Pn.current-De}$t.current=new Date().getTime()})():Pn.current!==1/0&&(_t.current=new Date().getTime(),ge=setTimeout(()=>{var De;(De=f.onAutoClose)==null||De.call(f,f),Kn()},Pn.current)),()=>clearTimeout(ge)},[j,y,f,L,Q,Qa,Kn]),B.useEffect(()=>{f.delete&&Kn()},[Kn,f.delete]);function QP(){var ge,De,Ve;return C!=null&&C.loading?B.createElement("div",{className:Jn(R==null?void 0:R.loader,(ge=f==null?void 0:f.classNames)==null?void 0:ge.loader,"sonner-loader"),"data-visible":L==="loading"},C.loading):Y?B.createElement("div",{className:Jn(R==null?void 0:R.loader,(De=f==null?void 0:f.classNames)==null?void 0:De.loader,"sonner-loader"),"data-visible":L==="loading"},Y):B.createElement(rD,{className:Jn(R==null?void 0:R.loader,(Ve=f==null?void 0:f.classNames)==null?void 0:Ve.loader),visible:L==="loading"})}return B.createElement("li",{tabIndex:0,ref:Vn,className:Jn(N,le,R==null?void 0:R.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[L],(n=f==null?void 0:f.classNames)==null?void 0:n[L]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:E,"data-styled":!(f.jsx||f.unstyled||v),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":xt,"data-removed":ie,"data-visible":co,"data-y-position":Et,"data-x-position":Qt,"data-index":w,"data-front":qn,"data-swiping":he,"data-dismissible":G,"data-type":L,"data-invert":$c,"data-swipe-out":Be,"data-swipe-direction":ne,"data-expanded":!!(j||O&&H),style:{"--index":w,"--toasts-before":w,"--z-index":S.length-w,"--offset":`${ie?Ze:rt.current}px`,"--initial-height":O?"auto":`${hn}px`,...I,...f.style},onDragEnd:()=>{fe(!1),U(null),Re.current=null},onPointerDown:ge=>{uo||!G||(ds.current=new Date,Ct(rt.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(fe(!0),Re.current={x:ge.clientX,y:ge.clientY}))},onPointerUp:()=>{var ge,De,Ve,Gn;if(Be||!G)return;Re.current=null;let Yn=Number(((ge=Vn.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),hs=Number(((De=Vn.current)==null?void 0:De.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),hi=new Date().getTime()-((Ve=ds.current)==null?void 0:Ve.getTime()),Qn=T==="x"?Yn:hs,fs=Math.abs(Qn)/hi;if(Math.abs(Qn)>=SD||fs>.11){Ct(rt.current),(Gn=f.onDismiss)==null||Gn.call(f,f),se(T==="x"?Yn>0?"right":"left":hs>0?"down":"up"),Kn(),nt(!0),jt(!1);return}fe(!1),U(null)},onPointerMove:ge=>{var De,Ve,Gn,Yn;if(!Re.current||!G||((De=window.getSelection())==null?void 0:De.toString().length)>0)return;let hs=ge.clientY-Re.current.y,hi=ge.clientX-Re.current.x,Qn=(Ve=e.swipeDirections)!=null?Ve:jD($);!T&&(Math.abs(hi)>1||Math.abs(hs)>1)&&U(Math.abs(hi)>Math.abs(hs)?"x":"y");let fs={x:0,y:0};T==="y"?(Qn.includes("top")||Qn.includes("bottom"))&&(Qn.includes("top")&&hs<0||Qn.includes("bottom")&&hs>
2960)&&(fs.y=hs):T==="x"&&(Qn.includes("left")||Qn.includes("right"))&&(Qn.includes("left")&&hi<0||Qn.includes("right")&&hi>0)&&(fs.x=hi),(Math.abs(fs.x)>0||Math.abs(fs.y)>0)&&jt(!0),(Gn=Vn.current)==null||Gn.style.setProperty("--swipe-amount-x",`${fs.x}px`),(Yn=Vn.current)==null||Yn.style.setProperty("--swipe-amount-y",`${fs.y}px`)}},wt&&!f.jsx?B.createElement("button",{"aria-label":X,"data-disabled":uo,"data-close-button":!0,onClick:uo||!G?()=>{}:()=>{var ge;Kn(),(ge=f.onDismiss)==null||ge.call(f,f)},className:Jn(R==null?void 0:R.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(i=C==null?void 0:C.close)!=null?i:lD):null,f.jsx||m.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:B.createElement(B.Fragment,null,L||f.icon||f.promise?B.createElement("div",{"data-icon":"",className:Jn(R==null?void 0:R.icon,(o=f==null?void 0:f.classNames)==null?void 0:o.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||QP():null,f.type!=="loading"?f.icon||(C==null?void 0:C[L])||tD(L):null):null,B.createElement("div",{"data-content":"",className:Jn(R==null?void 0:R.content,(l=f==null?void 0:f.classNames)==null?void 0:l.content)},B.createElement("div",{"data-title":"",className:Jn(R==null?void 0:R.title,(c=f==null?void 0:f.classNames)==null?void 0:c.title)},typeof f.title=="function"?f.title():f.title),f.description?B.createElement("div",{"data-description":"",className:Jn(F,ye,R==null?void 0:R.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),m.isValidElement(f.cancel)?f.cancel:f.cancel&&lu(f.cancel)?B.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||_,onClick:ge=>{var De,Ve;lu(f.cancel)&&G&&((Ve=(De=f.cancel).onClick)==null||Ve.call(De,ge),Kn())},className:Jn(R==null?void 0:R.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,m.isValidElement(f.action)?f.action:f.action&&lu(f.action)?B.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:ge=>{var De,Ve;lu(f.action)&&((Ve=(De=f.action).onClick)==null||Ve.call(De,ge),!ge.defaultPrevented&&Kn())},className:Jn(R==null?void 0:R.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Hw(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function _D(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",l=i?xD:yD;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var ED=m.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:p,style:f,visibleToasts:v=vD,toastOptions:y,dir:b=Hw(),gap:g=bD,loadingIcon:x,icons:w,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:j}=e,[k,E]=B.useState([]),A=B.useMemo(()=>Array.from(new Set([r].concat(k.filter(Q=>Q.position).map(Q=>Q.position)))),[k,r]),[I,_]=B.useState([]),[D,N]=B.useState(!1),[F,M]=B.useState(!1),[$,z]=B.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=B.useRef(null),O=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=B.useRef(null),C=B.useRef(!1),X=B.useCallback(Q=>{E(T=>{var U;return(U=T.find(ne=>ne.id===Q.id))!=null&&U.delete||en.dismiss(Q.id),T.filter(({id:ne})=>ne!==Q.id)})},[]);return B.useEffect(()=>en.subscribe(Q=>{if(Q.dismiss){E(T=>T.map(U=>U.id===Q.id?{...U,delete:!0}:U));return}setTimeout(()=>{pk.flushSync(()=>{E(T=>{let U=T.findIndex(ne=>ne.id===Q.id);
vendor: 4,111 bytes, line 296
296return U!==-1?[...T.slice(0,U),{...T[U],...Q},...T.slice(U+1)]:[Q,...T]})})})}),[]),B.useEffect(()=>{if(d!=="system"){z(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:T})=>{z(T?"dark":"light")})}catch{Q.addListener(({matches:U})=>{try{z(U?"dark":"light")}catch(ne){console.error(ne)}})}},[d]),B.useEffect(()=>{k.length<=1&&N(!1)},[k]),B.useEffect(()=>{let Q=T=>{var U,ne;s.every(se=>T[se]||T.code===se)&&(N(!0),(U=Y.current)==null||U.focus()),T.code==="Escape"&&(document.activeElement===Y.current||(ne=Y.current)!=null&&ne.contains(document.activeElement))&&N(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[s]),B.useEffect(()=>{if(Y.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,C.current=!1)}},[Y.current]),B.createElement("section",{ref:t,"aria-label":`${S} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((Q,T)=>{var U;let[ne,se]=Q.split("-");return k.length?B.createElement("ol",{key:Q,dir:b==="auto"?Hw():b,tabIndex:-1,ref:Y,className:l,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":ne,"data-lifted":D&&k.length>1&&!i,"data-x-position":se,style:{"--front-toast-height":`${((U=I[0])==null?void 0:U.height)||0}px`,"--width":`${wD}px`,"--gap":`${g}px`,...f,..._D(c,u)},onBlur:H=>{C.current&&!H.currentTarget.contains(H.relatedTarget)&&(C.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||C.current||(C.current=!0,R.current=H.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{F||N(!1)},onDragEnd:()=>N(!1),onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||M(!0)},onPointerUp:()=>M(!1)},k.filter(H=>!H.position&&T===0||H.position===Q).map((H,W)=>{var ie,oe;return B.createElement(CD,{key:H.id,icons:w,index:W,toast:H,defaultRichColors:h,duration:(ie=y==null?void 0:y.duration)!=null?ie:p,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:v,closeButton:(oe=y==null?void 0:y.closeButton)!=null?oe:o,interacting:F,position:Q,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:X,toasts:k.filter(he=>he.position==H.position),heights:I.filter(he=>he.position==H.position),setHeights:_,expandByDefault:i,gap:g,loadingIcon:x,expanded:D,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const ND=({...e})=>{const{theme:t="system"}=eD();return a.jsx(ED,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var TD=Tg[" useId ".trim().toString()]||(()=>{}),PD=0;function zn(e){const[t,n]=m.useState(TD());return pt(()=>{n(r=>r??String(PD++))},[e]),t?`radix-${t}`:""}const AD=["top","right","bottom","left"],Zs=Math.min,vn=Math.max,xd=Math.round,cu=Math.floor,Rr=e=>({x:e,y:e}),RD={left:"right",right:"left",bottom:"top",top:"bottom"},ID={start:"end",end:"start"};function jm(e,t,n){return vn(e,Zs(t,n))}function os(e,t){return typeof e=="function"?e(t):e}function as(e){return e.split("-")[0]}function La(e){return e.split("-")[1]}function Iv(e){return e==="x"?"y":"x"}function Ov(e){return e==="y"?"height":"width"}const OD=new Set(["top","bottom"]);function Nr(e){return OD.has(as(e))?"y":"x"}function Dv(e){return Iv(Nr(e))}
vendor: 11,467 bytes, line 296
296function DD(e,t,n){n===void 0&&(n=!1);const r=La(e),s=Dv(e),i=Ov(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=wd(o)),[o,wd(o)]}function MD(e){const t=wd(e);return[Cm(e),t,Cm(t)]}function Cm(e){return e.replace(/start|end/g,t=>ID[t])}const Ww=["left","right"],Vw=["right","left"],LD=["top","bottom"],FD=["bottom","top"];function $D(e,t,n){switch(e){case"top":case"bottom":return n?t?Vw:Ww:t?Ww:Vw;case"left":case"right":return t?LD:FD;default:return[]}}function zD(e,t,n,r){const s=La(e);let i=$D(as(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Cm)))),i}function wd(e){return e.replace(/left|right|bottom|top/g,t=>RD[t])}function BD(e){return{top:0,right:0,bottom:0,left:0,...e}}function pj(e){return typeof e!="number"?BD(e):{top:e,right:e,bottom:e,left:e}}function bd(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function qw(e,t,n){let{reference:r,floating:s}=e;const i=Nr(t),o=Dv(t),l=Ov(o),c=as(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,p=r[l]/2-s[l]/2;let f;switch(c){case"top":f={x:d,y:r.y-s.height};break;case"bottom":f={x:d,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-s.width,y:h};break;default:f={x:r.x,y:r.y}}switch(La(t)){case"start":f[o]-=p*(n&&u?-1:1);break;case"end":f[o]+=p*(n&&u?-1:1);break}return f}const UD=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=qw(u,r,c),p=r,f={},v=0;for(let y=0;y<l.length;y++){const{name:b,fn:g}=l[y],{x,y:w,data:S,reset:j}=await g({x:d,y:h,initialPlacement:r,placement:p,strategy:s,middlewareData:f,rects:u,platform:o,elements:{reference:e,floating:t}});d=x??d,h=w??h,f={...f,[b]:{...f[b],...S}},j&&v<=50&&(v++,typeof j=="object"&&(j.placement&&(p=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:h}=qw(u,p,c)),y=-1)}return{x:d,y:h,placement:p,strategy:s,middlewareData:f}};async function sc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:f=0}=os(t,e),v=pj(f),b=l[p?h==="floating"?"reference":"floating":h],g=bd(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),x=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},j=bd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(g.top-j.top+v.top)/S.y,bottom:(j.bottom-g.bottom+v.bottom)/S.y,left:(g.left-j.left+v.left)/S.x,right:(j.right-g.right+v.right)/S.x}}const HD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=os(e,t)||{};if(u==null)return{};const h=pj(d),p={x:n,y:r},f=Dv(s),v=Ov(f),y=await o.getDimensions(u),b=f==="y",g=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[f]-p[f]-i.floating[v],j=p[f]-i.reference[f],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=k?k[w]:0;(!E||!await(o.isElement==null?void 0:o.isElement(k)))&&(E=l.floating[w]||i.floating[v]);const A=S/2-j/2,I=E/2-y[v]/2-1,_=Zs(h[g],I),D=Zs(h[x],I),N=_,F=E-y[v]-D,M=E/2-y[v]/2+A,$=jm(N,M,F),z=!c.arrow&&La(s)!=null&&M!==$&&i.reference[v]/2-(M<N?_:D)-y[v]/2<0,Y=z?M<N?M-N:M-F:0;return{[f]:p[f]+Y,data:{[f]:$,centerOffset:M-$-Y,...z&&{alignmentOffset:Y}},reset:z}}}),WD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...b}=os(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=as(s),x=Nr(l),w=as(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=p||(w||!y?[wd(l)]:MD(l)),k=v!=="none";!p&&k&&j.push(...zD(l,y,v,S));const E=[l,...j],A=await sc(t,b),I=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&I.push(A[g]),h){const M=DD(s,o,S);I.push(A[M[0]],A[M[1]])}if(_=[..._,{placement:s,overflows:I}],!I.every(M=>M<=0)){var D,N;const M=(((D=i.flip)==null?void 0:D.index)||0)+1,$=E[M];if($&&(!(h==="alignment"?x!==Nr($):!1)||_.every(O=>O.overflows[0]>0&&Nr(O.placement)===x)))return{data:{index:M,overflows:_},reset:{placement:$}};let z=(N=_.filter(Y=>Y.overflows[0]<=0).sort((Y,O)=>Y.overflows[1]-O.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(f){case"bestFit":{var F;const Y=(F=_.filter(O=>{if(k){const R=Nr(O.placement);return R===x||R==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(R=>R>0).reduce((R,C)=>R+C,0)]).sort((O,R)=>O[1]-R[1])[0])==null?void 0:F[0];Y&&(z=Y);break}case"initialPlacement":z=l;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function Kw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gw(e){return AD.some(t=>e[t]>=0)}const VD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=os(e,t);switch(r){case"referenceHidden":{const i=await sc(t,{...s,elementContext:"reference"}),o=Kw(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Gw(o)}}}case"escaped":{const i=await sc(t,{...s,altBoundary:!0}),o=Kw(i,n.floating);return{data:{escapedOffsets:o,escaped:Gw(o)}}}default:return{}}}}},mj=new Set(["left","top"]);async function qD(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=as(n),l=La(n),c=Nr(n)==="y",u=mj.has(o)?-1:1,d=i&&c?-1:1,h=os(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof v=="number"&&(f=l==="end"?v*-1:v),c?{x:f*d,y:p*u}:{x:p*u,y:f*d}}const KD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:l}=t,c=await qD(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},GD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:b=>{let{x:g,y:x}=b;return{x:g,y:x}}},...c}=os(e,t),u={x:n,y:r},d=await sc(t,c),h=Nr(as(s)),p=Iv(h);let f=u[p],v=u[h];if(i){const b=p==="y"?"top":"left",g=p==="y"?"bottom":"right",x=f+d[b],w=f-d[g];f=jm(x,f,w)}if(o){const b=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=v+d[b],w=v-d[g];v=jm(x,v,w)}const y=l.fn({...t,[p]:f,[h]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:i,[h]:o}}}}}},YD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=os(e,t),d={x:n,y:r},h=Nr(s),p=Iv(h);let f=d[p],v=d[h];const y=os(l,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const w=p==="y"?"height":"width",S=i.reference[p]-i.floating[w]+b.mainAxis,j=i.reference[p]+i.reference[w]-b.mainAxis;f<S?f=S:f>j&&(f=j)}if(u){var g,x;const w=p==="y"?"width":"height",S=mj.has(as(s)),j=i.reference[h]-i.floating[w]+(S&&((g=o.offset)==null?void 0:g[h])||0)+(S?0:b.crossAxis),k=i.reference[h]+i.reference[w]+(S?0:((x=o.offset)==null?void 0:x[h])||0)-(S?b.crossAxis:0);v<j?v=j:v>k&&(v=k)}return{[p]:f,[h]:v}}}},QD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=os(e,t),d=await sc(t,u),h=as(s),p=La(s),f=Nr(s)==="y",{width:v,height:y}=i.floating;let b,g;h==="top"||h==="bottom"?(b=h,g=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(g=h,b=p==="end"?"top":"bottom");const x=y-d.top-d.bottom,w=v-d.left-d.right,S=Zs(y-d[b],x),j=Zs(v-d[g],w),k=!t.middlewareData.shift;let E=S,A=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=x),k&&!p){const _=vn(d.left,0),D=vn(d.right,0),N=vn(d.top,0),F=vn(d.bottom,0);f?A=v-2*(_!==0||D!==0?_+D:vn(d.left,d.right)):E=y-2*(N!==0||F!==0?N+F:vn(d.top,d.bottom))}await c({...t,availableWidth:A,availableHeight:E});const I=await o.getDimensions(l.floating);return v!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function oh(){return typeof window<"u"}function Fa(e){return gj(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mr(e){var t;return(t=(gj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gj(e){return oh()?e instanceof Node||e instanceof wn(e).Node:!1}function pr(e){return oh()?e instanceof Element||e instanceof wn(e).Element:!1}function Dr(e){return oh()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function Yw(e){return!oh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}const XD=new Set(["inline","contents"]);function Ec(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!XD.has(s)}const JD=new Set(["table","td","th"]);function ZD(e){return JD.has(Fa(e))}const eM=[":popover-open",":modal"];function ah(e){return eM.some(t=>{try{return e.matches(t)}catch{return!1}})}const tM=["transform","translate","scale","rotate","perspective"],nM=["transform","translate","scale","rotate","perspective","filter"],rM=["paint","layout","strict","content"];function Mv(e){const t=Lv(),n=pr(e)?mr(e):e;return tM.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||nM.some(r=>(n.willChange||"").includes(r))||rM.some(r=>(n.contain||"").includes(r))}function sM(e){let t=ei(e);for(;Dr(t)&&!Ea(t);){if(Mv(t))return t;if(ah(t))return null;t=ei(t)}return null}function Lv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const iM=new Set(["html","body","#document"]);function Ea(e){return iM.has(Fa(e))}function mr(e){return wn(e).getComputedStyle(e)}function lh(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ei(e){if(Fa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yw(e)&&e.host||Mr(e);return Yw(t)?t.host:t}function vj(e){const t=ei(e);return Ea(t)?e.ownerDocument?e.ownerDocument.body:e.body:Dr(t)&&Ec(t)?t:vj(t)}function ic(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=vj(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=wn(s);if(i){const l=_m(o);
vendor: 5,412 bytes, line 296
296return t.concat(o,o.visualViewport||[],Ec(s)?s:[],l&&n?ic(l):[])}return t.concat(s,ic(s,[],n))}function _m(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yj(e){const t=mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Dr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,l=xd(n)!==i||xd(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function Fv(e){return pr(e)?e:e.contextElement}function ea(e){const t=Fv(e);if(!Dr(t))return Rr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=yj(t);let o=(i?xd(n.width):n.width)/r,l=(i?xd(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const oM=Rr(0);function xj(e){const t=wn(e);return!Lv()||!t.visualViewport?oM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==wn(e)?!1:t}function Wi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Fv(e);let o=Rr(1);t&&(r?pr(r)&&(o=ea(r)):o=ea(e));const l=aM(i,n,r)?xj(i):Rr(0);let c=(s.left+l.x)/o.x,u=(s.top+l.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const p=wn(i),f=r&&pr(r)?wn(r):r;let v=p,y=_m(v);for(;y&&r&&f!==v;){const b=ea(y),g=y.getBoundingClientRect(),x=mr(y),w=g.left+(y.clientLeft+parseFloat(x.paddingLeft))*b.x,S=g.top+(y.clientTop+parseFloat(x.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,h*=b.y,c+=w,u+=S,v=wn(y),y=_m(v)}}return bd({width:d,height:h,x:c,y:u})}function $v(e,t){const n=lh(e).scrollLeft;return t?t.left+n:Wi(Mr(e)).left+n}function wj(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:$v(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function lM(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Mr(r),l=t?ah(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=Rr(1);const d=Rr(0),h=Dr(r);if((h||!h&&!i)&&((Fa(r)!=="body"||Ec(o))&&(c=lh(r)),Dr(r))){const f=Wi(r);u=ea(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}const p=o&&!h&&!i?wj(o,c,!0):Rr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function cM(e){return Array.from(e.getClientRects())}function uM(e){const t=Mr(e),n=lh(e),r=e.ownerDocument.body,s=vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+$v(e);const l=-n.scrollTop;return mr(r).direction==="rtl"&&(o+=vn(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:l}}function dM(e,t){const n=wn(e),r=Mr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(s){i=s.width,o=s.height;const u=Lv();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:l,y:c}}const hM=new Set(["absolute","fixed"]);function fM(e,t){const n=Wi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Dr(e)?ea(e):Rr(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function Qw(e,t,n){let r;if(t==="viewport")r=dM(e,n);else if(t==="document")r=uM(Mr(e));else if(pr(t))r=fM(t,n);else{const s=xj(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return bd(r)}function bj(e,t){const n=ei(e);return n===t||!pr(n)||Ea(n)?!1:mr(n).position==="fixed"||bj(n,t)}function pM(e,t){const n=t.get(e);if(n)return n;let r=ic(e,[],!1).filter(l=>pr(l)&&Fa(l)!=="body"),s=null;const i=mr(e).position==="fixed";let o=i?ei(e):e;for(;pr(o)&&!Ea(o);){const l=mr(o),c=Mv(o);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&hM.has(s.position)||Ec(o)&&!c&&bj(e,o))?r=r.filter(d=>d!==o):s=l,o=ei(o)}return t.set(e,r),r}function mM(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?ah(t)?[]:pM(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=Qw(t,d,s);return u.top=vn(h.top,u.top),u.right=Zs(h.right,u.right),u.bottom=Zs(h.bottom,u.bottom),u.left=vn(h.left,u.left),u},Qw(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gM(e){const{width:t,height:n}=yj(e);return{width:t,height:n}}function vM(e,t,n){const r=Dr(t),s=Mr(t),i=n==="fixed",o=Wi(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Rr(0);function u(){c.x=$v(s)}if(r||!r&&!i)if((Fa(t)!=="body"||Ec(s))&&(l=lh(t)),r){const f=Wi(t,!0,i,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&u();i&&!r&&s&&u();const d=s&&!r&&!i?wj(s,l):Rr(0),h=o.left+l.scrollLeft-c.x-d.x,p=o.top+l.scrollTop-c.y-d.y;return{x:h,y:p,width:o.width,height:o.height}}function Lf(e){return mr(e).position==="static"}function Xw(e,t){if(!Dr(e)||mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mr(e)===n&&(n=n.ownerDocument.body),n}function Sj(e,t){const n=wn(e);if(ah(e))return n;if(!Dr(e)){let s=ei(e);for(;s&&!Ea(s);){if(pr(s)&&!Lf(s))return s;s=ei(s)}return n}let r=Xw(e,t);for(;r&&ZD(r)&&Lf(r);)r=Xw(r,t);return r&&Ea(r)&&Lf(r)&&!Mv(r)?n:r||sM(e)||n}const yM=async function(e){const t=this.getOffsetParent||Sj,n=this.getDimensions,r=await n(e.floating);return{reference:vM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xM(e){return mr(e).direction==="rtl"}const wM={convertOffsetParentRelativeRectToViewportRelativeRect:lM,getDocumentElement:Mr,getClippingRect:mM,getOffsetParent:Sj,getElementRects:yM,getClientRects:cM,getDimensions:gM,get
vendor: 10,333 bytes, line 296
296Scale:ea,isElement:pr,isRTL:xM};function kj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bM(e,t){let n=null,r;const s=Mr(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:p,height:f}=u;if(l||t(),!p||!f)return;const v=cu(h),y=cu(s.clientWidth-(d+p)),b=cu(s.clientHeight-(h+f)),g=cu(d),w={rootMargin:-v+"px "+-y+"px "+-b+"px "+-g+"px",threshold:vn(0,Zs(1,c))||1};let S=!0;function j(k){const E=k[0].intersectionRatio;if(E!==c){if(!S)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!kj(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(j,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,w)}n.observe(e)}return o(!0),i}function SM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Fv(e),d=s||i?[...u?ic(u):[],...ic(t)]:[];d.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const h=u&&l?bM(u,n):null;let p=-1,f=null;o&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),u&&!c&&f.observe(u),f.observe(t));let v,y=c?Wi(e):null;c&&b();function b(){const g=Wi(e);y&&!kj(y,g)&&n(),y=g,v=requestAnimationFrame(b)}return n(),()=>{var g;d.forEach(x=>{s&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),h==null||h(),(g=f)==null||g.disconnect(),f=null,c&&cancelAnimationFrame(v)}}const kM=KD,jM=GD,CM=WD,_M=QD,EM=VD,Jw=HD,NM=YD,TM=(e,t,n)=>{const r=new Map,s={platform:wM,...n},i={...s.platform,_c:r};return UD(e,t,{...s,platform:i})};var PM=typeof document<"u",AM=function(){},Bu=PM?m.useLayoutEffect:AM;function Sd(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 n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Sd(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!Sd(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function jj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zw(e,t){const n=jj(e);return Math.round(t*n)/n}function Ff(e){const t=m.useRef(e);return Bu(()=>{t.current=e}),t}function RM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=m.useState(r);Sd(p,r)||f(r);const[v,y]=m.useState(null),[b,g]=m.useState(null),x=m.useCallback(O=>{O!==k.current&&(k.current=O,y(O))},[]),w=m.useCallback(O=>{O!==E.current&&(E.current=O,g(O))},[]),S=i||v,j=o||b,k=m.useRef(null),E=m.useRef(null),A=m.useRef(d),I=c!=null,_=Ff(c),D=Ff(s),N=Ff(u),F=m.useCallback(()=>{if(!k.current||!E.current)return;const O={placement:t,strategy:n,middleware:p};D.current&&(O.platform=D.current),TM(k.current,E.current,O).then(R=>{const C={...R,isPositioned:N.current!==!1};M.current&&!Sd(A.current,C)&&(A.current=C,eo.flushSync(()=>{h(C)}))})},[p,t,n,D,N]);Bu(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,h(O=>({...O,isPositioned:!1})))},[u]);const M=m.useRef(!1);Bu(()=>(M.current=!0,()=>{M.current=!1}),[]),Bu(()=>{if(S&&(k.current=S),j&&(E.current=j),S&&j){if(_.current)return _.current(S,j,F);F()}},[S,j,F,_,I]);const $=m.useMemo(()=>({reference:k,floating:E,setReference:x,setFloating:w}),[x,w]),z=m.useMemo(()=>({reference:S,floating:j}),[S,j]),Y=m.useMemo(()=>{const O={position:n,left:0,top:0};if(!z.floating)return O;const R=Zw(z.floating,d.x),C=Zw(z.floating,d.y);return l?{...O,transform:"translate("+R+"px, "+C+"px)",...jj(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:C}},[n,l,z.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:F,refs:$,elements:z,floatingStyles:Y}),[d,F,$,z,Y])}const IM=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Jw({element:r.current,padding:s}).fn(n):{}:r?Jw({element:r,padding:s}).fn(n):{}}}},OM=(e,t)=>({...kM(e),options:[e,t]}),DM=(e,t)=>({...jM(e),options:[e,t]}),MM=(e,t)=>({...NM(e),options:[e,t]}),LM=(e,t)=>({...CM(e),options:[e,t]}),FM=(e,t)=>({..._M(e),options:[e,t]}),$M=(e,t)=>({...EM(e),options:[e,t]}),zM=(e,t)=>({...IM(e),options:[e,t]});var BM="Arrow",Cj=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return a.jsx(ee.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cj.displayName=BM;var UM=Cj;function ch(e){const[t,n]=m.useState(void 0);return pt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var zv="Popper",[_j,$a]=mt(zv),[HM,Ej]=_j(zv),Nj=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return a.jsx(HM,{scope:t,anchor:r,onAnchorChange:s,children:n})};Nj.displayName=zv;var Tj="PopperAnchor",Pj=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=Ej(Tj,n),o=m.useRef(null),l=pe(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:a.jsx(ee.div,{...s,ref:l})});Pj.displayName=Tj;var Bv="PopperContent",[WM,VM]=_j(Bv),Aj=m.forwardRef((e,t)=>{var H,W,ie,oe,he,fe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:v,...y}=e,b=Ej(Bv,n),[g,x]=m.useState(null),w=pe(t,Be=>x(Be)),[S,j]=m.useState(null),k=ch(S),E=(k==null?void 0:k.width)??0,A=(k==null?void 0:k.height)??0,I=r+(i!=="center"?"-"+i:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],N=D.length>0,F={padding:_,boundary:D.filter(KM),altBoundary:N},{refs:M,floatingStyles:$,placement:z,isPositioned:Y,middlewareData:O}=RM({strategy:"fixed",placement:I,whileElementsMounted:(...Be)=>SM(...Be,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[OM({mainAxis:s+A,alignmentAxis:o}),c&&DM({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?MM():void 0,...F}),c&&LM({...F}),FM({...F,apply:({elements:Be,rects:nt,availableWidth:xt,availableHeight:jt})=>{const{width:Ze,height:Ct}=nt.reference,hn=Be.floating.style;hn.setProperty("--radix-popper-available-width",`${xt}px`),hn.setProperty("--radix-popper-available-height",`${jt}px`),hn.setProperty("--radix-popper-anchor-width",`${Ze}px`),hn.setProperty("--radix-popper-anchor-height",`${Ct}px`)}}),S&&zM({element:S,padding:l}),GM({arrowWidth:E,arrowHeight:A}),p&&$M({strategy:"referenceHidden",...F})]}),[R,C]=Oj(z),X=it(v);pt(()=>{Y&&(X==null||X())},[Y,X]);const Q=(H=O.arrow)==null?void 0:H.x,T=(W=O.arrow)==null?void 0:W.y,U=((ie=O.arrow)==null?void 0:ie.centerOffset)!==0,[ne,se]=m.useState();return pt(()=>{g&&se(window.getComputedStyle(g).zIndex)},[g]),a.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:Y?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(oe=O.transformOrigin)==null?void 0:oe.x,(he=O.transformOrigin)==null?void 0:he.y].join(" "),...((fe=O.hide)==null?void 0:fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(WM,{scope:n,placedSide:R,onArrowChange:j,arrowX:Q,arrowY:T,shouldHideArrow:U,children:a.jsx(ee.div,{"data-side":R,"data-align":C,...y,ref:w,style:{...y.style,animation:Y?void 0:"none"}})})})});Aj.displayName=Bv;var Rj="PopperArrow",qM={top:"bottom",right:"left",bottom:"top",left:"right"},Ij=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=VM(Rj,r),o=qM[i.placedSide];return a.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:a.jsx(UM,{...s,ref:n,style:{...s.style,display:"block"}})})});Ij.displayName=Rj;function KM(e){return e!==null}var GM=e=>({name:"transformOrigin",options:e,fn(t){var b,g,x;const{placement:n,rects:r,middlewareData:s}=t,o=((b=s.arrow)==null?void 0:b.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=Oj(n),h={start:"0%",center:"50%",end:"100%"}[d],p=(((g=s.arrow)==null?void 0:g.x)??0)+l/2,f=(((x=s.arrow)==null?void 0:x.y)??0)+c/2;let v="",y="";return u==="bottom"?(v=o?h:`${p}px`,y=`${-c}px`):u==="top"?(v=o?h:`${p}px`,y=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,y=o?h:`${f}px`):u==="left"&&(v=`${r.floating.width+c}px`,y=o?h:`${f}px`),{data:{x:v,y}}}});function Oj(e){const[t,n="center"]=e.split("-");return[t,n]}var Dj=Nj,Uv=Pj,Hv=Aj,Wv=Ij,[uh,Nq]=mt("Tooltip",[$a]),Vv=$a(),Mj="TooltipProvider",YM=700,e0="tooltip.open",[QM,Lj]=uh(Mj),Fj=e=>{const{__scopeTooltip:t,delayDuration:n=YM,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(QM,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>
vendor: 4,659 bytes, line 296
296o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};Fj.displayName=Mj;var $j="Tooltip",[Tq,dh]=uh($j),Em="TooltipTrigger",XM=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=dh(Em,n),i=Lj(Em,n),o=Vv(n),l=m.useRef(null),c=pe(t,l,s.onTriggerChange),u=m.useRef(!1),d=m.useRef(!1),h=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(Uv,{asChild:!0,...o,children:a.jsx(ee.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:K(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:K(e.onBlur,s.onClose),onClick:K(e.onClick,s.onClose)})})});XM.displayName=Em;var JM="TooltipPortal",[Pq,ZM]=uh(JM,{forceMount:void 0}),Na="TooltipContent",zj=m.forwardRef((e,t)=>{const n=ZM(Na,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=dh(Na,e.__scopeTooltip);return a.jsx(yt,{present:r||o.open,children:o.disableHoverableContent?a.jsx(Bj,{side:s,...i,ref:t}):a.jsx(eL,{side:s,...i,ref:t})})}),eL=m.forwardRef((e,t)=>{const n=dh(Na,e.__scopeTooltip),r=Lj(Na,e.__scopeTooltip),s=m.useRef(null),i=pe(t,s),[o,l]=m.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,p=m.useCallback(()=>{l(null),h(!1)},[h]),f=m.useCallback((v,y)=>{const b=v.currentTarget,g={x:v.clientX,y:v.clientY},x=iL(g,b.getBoundingClientRect()),w=oL(g,x),S=aL(y.getBoundingClientRect()),j=cL([...w,...S]);l(j),h(!0)},[h]);return m.useEffect(()=>()=>p(),[p]),m.useEffect(()=>{if(c&&d){const v=b=>f(b,d),y=b=>f(b,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",y)}}},[c,d,f,p]),m.useEffect(()=>{if(o){const v=y=>{const b=y.target,g={x:y.clientX,y:y.clientY},x=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),w=!lL(g,o);x?p():w&&(p(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,o,u,p]),a.jsx(Bj,{...e,ref:i})}),[tL,nL]=uh($j,{isInside:!1}),rL=Ck("TooltipContent"),Bj=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=dh(Na,n),u=Vv(n),{onClose:d}=c;return m.useEffect(()=>(document.addEventListener(e0,d),()=>document.removeEventListener(e0,d)),[d]),m.useEffect(()=>{if(c.trigger){const h=p=>{const f=p.target;f!=null&&f.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),a.jsx(Da,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:a.jsxs(Hv,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[a.jsx(rL,{children:r}),a.jsx(tL,{scope:n,isInside:!0,children:a.jsx(PI,{id:c.contentId,role:"tooltip",children:s||r})})]})})});zj.displayName=Na;var Uj="TooltipArrow",sL=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Vv(n);return nL(Uj,n).isInside?null:a.jsx(Wv,{...s,...r,ref:t})});sL.displayName=Uj;function iL(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function oL(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function aL(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function lL(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;
296o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,h=c.x,p=c.y;d>r!=p>r&&n<(h-u)*(r-d)/(p-d)+u&&(s=!s)}return s}function cL(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),uL(t)}function uL(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var dL=Fj,Hj=zj;const hL=dL,fL=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(Hj,{ref:r,sideOffset:t,className:J("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));fL.displayName=Hj.displayName;var za=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(){}},Vi=typeof window>"u"||"Deno"in globalThis;function Wt(){}function pL(e,t){return typeof e=="function"?e(t):e}function Nm(e){return typeof e=="number"&&e>=0&&e!==1/0}function Wj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gs(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function t0(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==qv(o,t.options))return!1}else if(!oc(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function n0(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(qi(t.options.mutationKey)!==qi(i))return!1}else if(!oc(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function qv(e,t){return((t==null?void 0:t.queryKeyHashFn)||qi)(e)}function qi(e){return JSON.stringify(e,(t,n)=>Tm(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function oc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>oc(e[n],t[n])):!1}function Vj(e,t){if(e===t)return e;const n=r0(e)&&r0(t);if(n||Tm(e)&&Tm(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:i[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=Vj(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===o&&u===s?e:l}return t}function kd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function r0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Tm(e){if(!s0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!s0(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function s0(e){return Object.prototype.toString.call(e)==="[object Object]"}function mL(e){return new Promise(t=>{setTimeout(t,e)})}function Pm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Vj(e,t):t}function gL(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vL(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Kv=Symbol();function qj(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Kv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kj(e,t){return typeof e=="function"?e(...t):!!e}var Ei,Es,la,qb,yL=(qb=class extends za{constructor(){super();ce(this,Ei);ce(this,Es);ce(this,la);Z(this,la,t=>{if(!Vi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Es)||this.setEventListener(P(this,la))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Es))==null||t.call(this),Z(this,Es,void 0))}setEventListener(t){var n;
vendor: 5,128 bytes, line 296
296Z(this,la,t),(n=P(this,Es))==null||n.call(this),Z(this,Es,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Ei)!==t&&(Z(this,Ei,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Ei)=="boolean"?P(this,Ei):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ei=new WeakMap,Es=new WeakMap,la=new WeakMap,qb),Gv=new yL,ca,Ns,ua,Kb,xL=(Kb=class extends za{constructor(){super();ce(this,ca,!0);ce(this,Ns);ce(this,ua);Z(this,ua,t=>{if(!Vi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,Ns)||this.setEventListener(P(this,ua))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Ns))==null||t.call(this),Z(this,Ns,void 0))}setEventListener(t){var n;Z(this,ua,t),(n=P(this,Ns))==null||n.call(this),Z(this,Ns,t(this.setOnline.bind(this)))}setOnline(t){P(this,ca)!==t&&(Z(this,ca,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,ca)}},ca=new WeakMap,Ns=new WeakMap,ua=new WeakMap,Kb),jd=new xL;function Am(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function wL(e){return Math.min(1e3*2**e,3e4)}function Gj(e){return(e??"online")==="online"?jd.isOnline():!0}var Yj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $f(e){return e instanceof Yj}function Qj(e){let t=!1,n=0,r=!1,s;const i=Am(),o=y=>{var b;r||(p(new Yj(y)),(b=e.abort)==null||b.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Gv.isFocused()&&(e.networkMode==="always"||jd.isOnline())&&e.canRun(),d=()=>Gj(e.networkMode)&&e.canRun(),h=y=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,y),s==null||s(),i.resolve(y))},p=y=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,y),s==null||s(),i.reject(y))},f=()=>new Promise(y=>{var b;s=g=>{(r||u())&&y(g)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;s=void 0,r||(y=e.onContinue)==null||y.call(e)}),v=()=>{if(r)return;let y;const b=n===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(h).catch(g=>{var k;if(r)return;const x=e.retry??(Vi?0:3),w=e.retryDelay??wL,S=typeof w=="function"?w(n,g):w,j=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,g);if(t||!j){p(g);return}n++,(k=e.onFail)==null||k.call(e,n,g),mL(S).then(()=>u()?void 0:f()).then(()=>{t?p(g):v()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?v():f().then(v),i)}}var bL=e=>setTimeout(e,0);function SL(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=bL;const i=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var ht=SL(),Ni,Gb,Xj=(Gb=class{constructor(){ce(this,Ni)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nm(this.gcTime)&&Z(this,Ni,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vi?1/0:5*60*1e3))}clearGcTimeout(){P(this,Ni)&&(clearTimeout(P(this,Ni)),Z(this,Ni,void 0))}},Ni=new WeakMap,Gb),da,Ti,Rn,Pi,It,pc,Ai,rr,Ur,Yb,kL=(Yb=class extends Xj{constructor(t){super();ce(this,rr);ce(this,da);ce(this,Ti);ce(this,Rn);ce(this,Pi);ce(this,It);ce(this,pc);ce(this,Ai);Z(this,Ai,!1),Z(this,pc,t.defaultOptions),this.setOptions(t.options),this.observers=[],Z(this,Pi,t.client),Z(this,Rn,P(this,Pi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,da,jL(this.options)),this.state=t.state??P(this,da),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,It))==null?void 0:t.promise}setOptions(t){this.options={...P(this,pc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Rn).remove(this)}setData(t,n){const r=Pm(this.state.data,t,this.options);return Se(this,rr,Ur).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Se(this,rr,Ur).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=P(this,It))==null?void 0:r.promise;return(s=P(this,It))==null||s.cancel(t),n?n.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,da))}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kv||this.state.dataUpdateCount+this.state.errorUpdate
vendor: 1,274 bytes, line 296
296Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Gs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Wj(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,It))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,It))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,Rn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,It)&&(P(this,Ai)?P(this,It).cancel({revert:!0}):P(this,It).cancelRetry()),this.scheduleGc()),P(this,Rn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,rr,Ur).call(this,{type:"invalidate"})}
vendor: 24,479 bytes, line 296
296fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,It))return P(this,It).continueRetry(),P(this,It).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(f=>f.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(Z(this,Ai,!0),r.signal)})},i=()=>{const p=qj(this.options,n),v=(()=>{const y={client:P(this,Pi),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return Z(this,Ai,!1),this.options.persister?this.options.persister(p,v,this):p(v)},l=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,Pi),state:this.state,fetchFn:i};return s(p),p})();(u=this.options.behavior)==null||u.onFetch(l,this),Z(this,Ti,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Se(this,rr,Ur).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=p=>{var f,v,y,b;$f(p)&&p.silent||Se(this,rr,Ur).call(this,{type:"error",error:p}),$f(p)||((v=(f=P(this,Rn).config).onError)==null||v.call(f,p,this),(b=(y=P(this,Rn).config).onSettled)==null||b.call(y,this.state.data,p,this)),this.scheduleGc()};return Z(this,It,Qj({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var f,v,y,b;if(p===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(g){c(g);return}(v=(f=P(this,Rn).config).onSuccess)==null||v.call(f,p,this),(b=(y=P(this,Rn).config).onSettled)==null||b.call(y,p,this.state.error,this),this.scheduleGc()},onError:c,onFail:(p,f)=>{Se(this,rr,Ur).call(this,{type:"failed",failureCount:p,error:f})},onPause:()=>{Se(this,rr,Ur).call(this,{type:"pause"})},onContinue:()=>{Se(this,rr,Ur).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),P(this,It).start()}},da=new WeakMap,Ti=new WeakMap,Rn=new WeakMap,Pi=new WeakMap,It=new WeakMap,pc=new WeakMap,Ai=new WeakMap,rr=new WeakSet,Ur=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Jj(r.data,this.options),fetchMeta:t.meta??null};case"success":return Z(this,Ti,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return $f(s)&&s.revert&&P(this,Ti)?{...P(this,Ti),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Rn).notify({query:this,type:"updated",action:t})})},Yb);function Jj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jL(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var kr,Qb,CL=(Qb=class extends za{constructor(t={}){super();ce(this,kr);this.config=t,Z(this,kr,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??qv(s,n);let o=this.get(i);return o||(o=new kL({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){P(this,kr).has(t.queryHash)||(P(this,kr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,kr).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,kr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,kr).get(t)}getAll(){return[...P(this,kr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>t0(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>t0(t,r)):n}notify(t){ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},kr=new WeakMap,Qb),jr,Bt,Ri,Cr,xs,Xb,_L=(Xb=class extends Xj{constructor(t){super();ce(this,Cr);ce(this,jr);ce(this,Bt);ce(this,Ri);this.mutationId=t.mutationId,Z(this,Bt,t.mutationCache),Z(this,jr,[]),this.state=t.state||Zj(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,jr).includes(t)||(P(this,jr).push(t),this.clearGcTimeout(),P(this,Bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,jr,P(this,jr).filter(n=>n!==t)),this.scheduleGc(),P(this,Bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,jr).length||(this.state.status==="pending"?this.scheduleGc():P(this,Bt).remove(this))}continue(){var t;return((t=P(this,Ri))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,u,d,h,p,f,v,y,b,g,x,w,S,j,k,E,A;const n=()=>{Se(this,Cr,xs).call(this,{type:"continue"})};Z(this,Ri,Qj({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,_)=>{Se(this,Cr,xs).call(this,{type:"failed",failureCount:I,error:_})},onPause:()=>{Se(this,Cr,xs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Bt).canRun(this)}));const r=this.state.status==="pending",s=!P(this,Ri).canStart();try{if(r)n();else{Se(this,Cr,xs).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=P(this,Bt).config).onMutate)==null?void 0:o.call(i,t,this));const _=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));_!==this.state.context&&Se(this,Cr,xs).call(this,{type:"pending",context:_,variables:t,isPaused:s})}const I=await P(this,Ri).start();return await((d=(u=P(this,Bt).config).onSuccess)==null?void 0:d.call(u,I,t,this.state.context,this)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,I,t,this.state.context)),await((v=(f=P(this,Bt).config).onSettled)==null?void 0:v.call(f,I,null,this.state.variables,this.state.context,this)),await((b=(y=this.options).onSettled)==null?void 0:b.call(y,I,null,t,this.state.context)),Se(this,Cr,xs).call(this,{type:"success",data:I}),I}catch(I){try{throw await((x=(g=P(this,Bt).config).onError)==null?void 0:x.call(g,I,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,I,t,this.state.context)),await((k=(j=P(this,Bt).config).onSettled)==null?void 0:k.call(j,void 0,I,this.state.variables,this.state.context,this)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,void 0,I,t,this.state.context)),I}finally{Se(this,Cr,xs).call(this,{type:"error",error:I})}}finally{P(this,Bt).runNext(this)}}},jr=new WeakMap,Bt=new WeakMap,Ri=new WeakMap,Cr=new WeakSet,xs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ht.batch(()=>{P(this,jr).forEach(r=>{r.onMutationUpdate(t)}),P(this,Bt).notify({mutation:this,type:"updated",action:t})})},Xb);function Zj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Kr,sr,mc,Jb,EL=(Jb=class extends za{constructor(t={}){super();ce(this,Kr);ce(this,sr);ce(this,mc);this.config=t,Z(this,Kr,new Set),Z(this,sr,new Map),Z(this,mc,0)}build(t,n,r){const s=new _L({mutationCache:this,mutationId:++zc(this,mc)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){P(this,Kr).add(t);const n=uu(t);if(typeof n=="string"){const r=P(this,sr).get(n);r?r.push(t):P(this,sr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,Kr).delete(t)){const n=uu(t);if(typeof n=="string"){const r=P(this,sr).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&P(this,sr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=uu(t);if(typeof n=="string"){const r=P(this,sr).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=uu(t);if(typeof n=="string"){const s=(r=P(this,sr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{P(this,Kr).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,Kr).clear(),P(this,sr).clear()})}getAll(){return Array.from(P(this,Kr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n0(n,r))}findAll(t={}){return this.getAll().filter(n=>n0(t,n))}notify(t){ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(Wt))))}},Kr=new WeakMap,sr=new WeakMap,mc=new WeakMap,Jb);function uu(e){var t;return(t=e.options.scope)==null?void 0:t.id}function i0(e){return{onFetch:(t,n)=>{var d,h,p,f,v;const r=t.options,s=(p=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((f=t.state.data)==null?void 0:f.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let y=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},g=qj(t.options,t.fetchOptions),x=async(w,S,j)=>{if(y)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return b(D),D})(),A=await g(E),{maxPages:I}=t.options,_=j?vL:gL;return{pages:_(w.pages,A,I),pageParams:_(w.pageParams,S,I)}};if(s&&i.length){const w=s==="backward",S=w?NL:o0,j={pages:i,pageParams:o},k=S(r,j);l=await x(j,k,w)}else{const w=e??i.length;do{const S=c===0?o[0]??r.initialPageParam:o0(r,l);if(c>0&&S==null)break;l=await x(l,S),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function o0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function NL(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var et,Ts,Ps,ha,fa,As,pa,ma,Zb,TL=(Zb=class{constructor(e={}){ce(this,et);ce(this,Ts);ce(this,Ps);ce(this,ha);ce(this,fa);ce(this,As);ce(this,pa);ce(this,ma);Z(this,et,e.queryCache||new CL),Z(this,Ts,e.mutationCache||new EL),Z(this,Ps,e.defaultOptions||{}),Z(this,ha,new Map),Z(this,fa,new Map),Z(this,As,0)}mount(){zc(this,As)._++,P(this,As)===1&&(Z(this,pa,Gv.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,et).onFocus())})),Z(this,ma,jd.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,et).onOnline())})))}unmount(){var e,t;zc(this,As)._--,P(this,As)===0&&((e=P(this,pa))==null||e.call(this),Z(this,pa,void 0),(t=P(this,ma))==null||t.call(this),Z(this,ma,void 0))}isFetching(e){return P(this,et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Ts).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,et).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,et).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,et).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=P(this,et).get(r.queryHash),i=s==null?void 0:s.state.data,o=pL(t,i);if(o!==void 0)return P(this,et).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ht.batch(()=>P(this,et).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,et).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,et);ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,et);return ht.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ht.batch(()=>P(this,et).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return ht.batch(()=>(P(this,et).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ht.batch(()=>P(this,et).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Wt)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,et).build(this,t);return n.isStaleByTime(Gs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=i0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=i0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return jd.isOnline()?P(this,Ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,et)}getMutationCache(){return P(this,Ts)}getDefaultOptions(){return P(this,Ps)}setDefaultOptions(e){Z(this,Ps,e)}setQueryDefaults(e,t){P(this,ha).set(qi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,ha).values()],n={};return t.forEach(r=>{oc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,fa).set(qi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,fa).values()],n={};return t.forEach(r=>{oc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,Ps).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qv(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===Kv&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Ps).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,et).clear(),P(this,Ts).clear()}},et=new WeakMap,Ts=new WeakMap,Ps=new WeakMap,ha=new WeakMap,fa=new WeakMap,As=new WeakMap,pa=new WeakMap,ma=new WeakMap,Zb),Jt,Ne,gc,Ut,Ii,ga,Rs,Is,vc,va,ya,Oi,Di,Os,xa,Ie,vl,Rm,Im,Om,Dm,Mm,Lm,Fm,eC,e1,PL=(e1=class extends za{constructor(t,n){super();ce(this,Ie);ce(this,Jt);ce(this,Ne);ce(this,gc);ce(this,Ut);ce(this,Ii);ce(this,ga);ce(this,Rs);ce(this,Is);ce(this,vc);ce(this,va);ce(this,ya);ce(this,Oi);ce(this,Di);ce(this,Os);ce(this,xa,new Set);this.options=n,Z(this,Jt,t),Z(this,Is,null),Z(this,Rs,Am()),this.options.experimental_prefetchInRender||P(this,Rs).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Ne).addObserver(this),a0(P(this,Ne),this.options)?Se(this,Ie,vl).call(this):this.updateResult(),Se(this,Ie,Dm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $m(P(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $m(P(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Ie,Mm).call(this),Se(this,Ie,Lm).call(this),P(this,Ne).removeObserver(this)}setOptions(t){const n=this.options,r=P(this,Ne);if(this.options=P(this,Jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,P(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Ie,Fm).call(this),P(this,Ne).setOptions(this.options),n._defaulted&&!kd(this.options,n)&&P(this,Jt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Ne),observer:this});const s=this.hasListeners();s&&l0(P(this,Ne),r,this.options,n)&&Se(this,Ie,vl).call(this),this.updateResult(),s&&(P(this,Ne)!==r||In(this.options.enabled,P(this,Ne))!==In(n.enabled,P(this,Ne))||Gs(this.options.staleTime,P(this,Ne))!==Gs(n.staleTime,P(this,Ne)))&&Se(this,Ie,Rm).call(this);const i=Se(this,Ie,Im).call(this);s&&(P(this,Ne)!==r||In(this.options.enabled,P(this,Ne))!==In(n.enabled,P(this,Ne))||i!==P(this,Os))&&Se(this,Ie,Om).call(this,i)}getOptimisticResult(t){const n=P(this,Jt).getQueryCache().build(P(this,Jt),t),r=this.createResult(n,t);return RL(this,r)&&(Z(this,Ut,r),Z(this,ga,this.options),Z(this,Ii,P(this,Ne).state)),r}getCurrentResult(){return P(this,Ut)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),Reflect.get(r,s))})}trackProp(t){P(this,xa).add(t)}getCurrentQuery(){return P(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Jt).defaultQueryOptions(t),r=P(this,Jt).getQueryCache().build(P(this,Jt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Se(this,Ie,vl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Ut)))}createResult(t,n){var I;const r=P(this,Ne),s=this.options,i=P(this,Ut),o=P(this,Ii),l=P(this,ga),u=t!==r?t.state:P(this,gc),{state:d}=t;let h={...d},p=!1,f;if(n._optimisticResults){const _=this.hasListeners(),D=!_&&a0(t,n),N=_&&l0(t,r,n,s);(D||N)&&(h={...h,...Jj(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=h;f=h.data;let g=!1;if(n.placeholderData!==void 0&&f===void 0&&b==="pending"){let _;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(_=i.data,g=!0):_=typeof n.placeholderData=="function"?n.placeholderData((I=P(this,ya))==null?void 0:I.state.data,P(this,ya)):n.placeholderData,_!==void 0&&(b="success",f=Pm(i==null?void 0:i.data,_,n),p=!0)}if(n.select&&f!==void 0&&!g)if(i&&f===(o==null?void 0:o.data)&&n.select===P(this,vc))f=P(this,va);else try{Z(this,vc,n.select),f=n.select(f),f=Pm(i==null?void 0:i.data,f,n),Z(this,va,f),Z(this,Is,null)}catch(_){Z(this,Is,_)}P(this,Is)&&(v=P(this,Is),f=P(this,va),y=Date.now(),b="error");const x=h.fetchStatus==="fetching",w=b==="pending",S=b==="error",j=w&&x,k=f!==void 0,A={status:b,fetchStatus:h.fetchStatus,isPending:w,isSuccess:b==="success",isError:S,isInitialLoading:j,isLoading:j,data:f,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:S&&!k,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:S&&k,isStale:Yv(t,n),refetch:this.refetch,promise:P(this,Rs),isEnabled:In(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const _=F=>{A.status==="error"?F.reject(A.error):A.data!==void 0&&F.resolve(A.data)},D=()=>{const F=Z(this,Rs,A.promise=Am());_(F)},N=P(this,Rs);switch(N.status){case"pending":t.queryHash===r.queryHash&&_(N);break;case"fulfilled":(A.status==="error"||A.data!==N.value)&&D();break;case"rejected":(A.status!=="error"||A.error!==N.reason)&&D();break}}return A}updateResult(){const t=P(this,Ut),n=this.createResult(P(this,Ne),this.options);if(Z(this,Ii,P(this,Ne).state),Z(this,ga,this.options),P(this,Ii).data!==void 0&&Z(this,ya,P(this,Ne)),kd(n,t))return;Z(this,Ut,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!P(this,xa).size)return!0;const o=new Set(i??P(this,xa));return this.options.throwOnError&&o.add("error"),Object.keys(P(this,Ut)).some(l=>{const c=l;return P(this,Ut)[c]!==t[c]&&o.has(c)})};Se(this,Ie,eC).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Ie,Dm).call(this)}},Jt=new WeakMap,Ne=new WeakMap,gc=new WeakMap,Ut=new WeakMap,Ii=new WeakMap,ga=new WeakMap,Rs=new WeakMap,Is=new WeakMap,vc=new WeakMap,va=new WeakMap,ya=new WeakMap,Oi=new WeakMap,Di=new WeakMap,Os=new WeakMap,xa=new WeakMap,Ie=new WeakSet,vl=function(t){Se(this,Ie,Fm).call(this);let n=P(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Wt)),n},Rm=function(){Se(this,Ie,Mm).call(this);const t=Gs(this.options.staleTime,P(this,Ne));if(Vi||P(this,Ut).isStale||!Nm(t))return;const r=Wj(P(this,Ut).dataUpdatedAt,t)+1;Z(this,Oi,setTimeout(()=>{P(this,Ut).isStale||this.updateResult()},r))},Im=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Ne)):this.options.refetchInterval)??!1},Om=function(t){Se(this,Ie,Lm).call(this),Z(this,Os,t),!(Vi||In(this.options.enabled,P(this,Ne))===!1||!Nm(P(this,Os))||P(this,Os)===0)&&Z(this,Di,setInterval(()=>{(this.options.refetchIntervalInBackground||Gv.isFocused())&&Se(this,Ie,vl).call(this)},P(this,Os)))},Dm=function(){Se(this,Ie,Rm).call(this),Se(this,Ie,Om).call(this,Se(this,Ie,Im).call(this))},Mm=function(){P(this,Oi)&&(clearTimeout(P(this,Oi)),Z(this,Oi,void 0))},Lm=function(){P(this,Di)&&(clearInterval(P(this,Di)),Z(this,Di,void 0))},Fm=function(){const t=P(this,Jt).getQueryCache().build(P(this,Jt),this.options);if(t===P(this,Ne))return;const n=P(this,Ne);Z(this,Ne,t),Z(this,gc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},eC=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,Ut))}),P(this,Jt).getQueryCache().notify({query:P(this,Ne),type:"observerResultsUpdated"})})},e1);function AL(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function a0(e,t){return AL(e,t)||e.state.data!==void 0&&$m(e,t,t.refetchOnMount)}function $m(e,t,n){if(In(t.enabled,e)!==!1&&Gs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Yv(e,t)}return!1}function l0(e,t,n,r){return(e!==t||In(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Yv(e,n)}function Yv(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(Gs(t.staleTime,e))}function RL(e,t){return!kd(e.getCurrentResult(),t)}
296var Ds,Ms,Zt,Gr,ts,Uu,zm,t1,IL=(t1=class extends za{constructor(n,r){super();ce(this,ts);ce(this,Ds);ce(this,Ms);ce(this,Zt);ce(this,Gr);Z(this,Ds,n),this.setOptions(r),this.bindMethods(),Se(this,ts,Uu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=P(this,Ds).defaultMutationOptions(n),kd(this.options,r)||P(this,Ds).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,Zt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&qi(r.mutationKey)!==qi(this.options.mutationKey)?this.reset():((s=P(this,Zt))==null?void 0:s.state.status)==="pending"&&P(this,Zt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=P(this,Zt))==null||n.removeObserver(this)}onMutationUpdate(n){Se(this,ts,Uu).call(this),Se(this,ts,zm).call(this,n)}getCurrentResult(){return P(this,Ms)}reset(){var n;(n=P(this,Zt))==null||n.removeObserver(this),Z(this,Zt,void 0),Se(this,ts,Uu).call(this),Se(this,ts,zm).call(this)}mutate(n,r){var s;return Z(this,Gr,r),(s=P(this,Zt))==null||s.removeObserver(this),Z(this,Zt,P(this,Ds).getMutationCache().build(P(this,Ds),this.options)),P(this,Zt).addObserver(this),P(this,Zt).execute(n)}},Ds=new WeakMap,Ms=new WeakMap,Zt=new WeakMap,Gr=new WeakMap,ts=new WeakSet,Uu=function(){var r;const n=((r=P(this,Zt))==null?void 0:r.state)??Zj();Z(this,Ms,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},zm=function(n){ht.batch(()=>{var r,s,i,o,l,c,u,d;if(P(this,Gr)&&this.hasListeners()){const h=P(this,Ms).variables,p=P(this,Ms).context;(n==null?void 0:n.type)==="success"?((s=(r=P(this,Gr)).onSuccess)==null||s.call(r,n.data,h,p),(o=(i=P(this,Gr)).onSettled)==null||o.call(i,n.data,null,h,p)):(n==null?void 0:n.type)==="error"&&((c=(l=P(this,Gr)).onError)==null||c.call(l,n.error,h,p),(d=(u=P(this,Gr)).onSettled)==null||d.call(u,void 0,n.error,h,p))}this.listeners.forEach(h=>{h(P(this,Ms))})})},t1),tC=m.createContext(void 0),Qv=e=>{const t=m.useContext(tC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},OL=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(tC.Provider,{value:e,children:t})),nC=m.createContext(!1),DL=()=>m.useContext(nC);nC.Provider;function ML(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LL=m.createContext(ML()),FL=()=>m.useContext(LL),$L=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},zL=e=>{m.useEffect(()=>{e.clearReset()},[e])},BL=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Kj(n,[e.error,r])),UL=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},HL=(e,t)=>e.isLoading&&e.isFetching&&!t,WL=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,c0=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function VL(e,t,n){var h,p,f,v,y;const r=DL(),s=FL(),i=Qv(),o=i.defaultQueryOptions(e);(p=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||p.call(h,o),o._optimisticResults=r?"isRestoring":"optimistic",UL(o),$L(o,s),zL(s);const l=!i.getQueryCache().get(o.queryHash),[c]=m.useState(()=>new t(i,o)),u=c.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(b=>{const g=d?c.subscribe(ht.batchCalls(b)):Wt;return c.updateResult(),g},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),m.useEffect(()=>{c.setOptions(o)},[o,c]),WL(o,u))throw c0(o,c,s);if(BL({result:u,errorResetBoundary:s,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||v.call(f,o,u),o.experimental_prefetchInRender&&!Vi&&HL(u,r)){const b=l?c0(o,c,s):(y=i.getQueryCache().get(o.queryHash))==null?void 0:y.promise;b==null||b.catch(Wt).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function qL(e,t){return VL(e,PL)}function KL(e,t){const n=Qv(),[r]=m.useState(()=>new IL(n,e));m.useEffect(()=>{r.setOptions(e)},[r,e]);const s=m.useSyncExternalStore(m.useCallback(o=>r.subscribe(ht.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=m.useCallback((o,l)=>{r.mutate(o,l).catch(Wt)},[r]);if(s.error&&Kj(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}/** 297 * @remix-run/router v1.23.0 298 * 299 * Copyright (c) Remix Software Inc. 300 * 301 * This source code is licensed under the MIT license found in the 302 * LICENSE.md file in the root directory of this source tree. 303 * 304 * @license MIT 305 */function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(this,arguments)}var $s;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($s||($s={}));const u0="popstate";function GL(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:l}=r.location;return Bm("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Cd(s)}return QL(t,n,null,e)}function ot(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function YL(){return Math.random().toString(36).substr(2,8)}function d0(e,t){return{usr:e.state,key:e.key,idx:t}}function Bm(e,t,n,r){return n===void 0&&(n=null),ac({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ba(t):t,{state:n,key:t&&t.key||r||YL()})}function Cd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ba(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function QL(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,l=$s.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(ac({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=$s.Pop;let b=d(),g=b==null?null:b-u;u=b,c&&c({action:l,location:y.location,delta:g})}function p(b,g){l=$s.Push;let x=Bm(y.location,b,g);u=d()+1;let w=d0(x,u),S=y.createHref(x);try{o.pushState(w,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(S)}i&&c&&c({action:l,location:y.location,delta:1})}function f(b,g){l=$s.Replace;let x=Bm(y.location,b,g);u=d();let w=d0(x,u),S=y.createHref(x);o.replaceState(w,"",S),i&&c&&c({action:l,location:y.location,delta:0})}function v(b){let g=s.location.origin!=="null"?s.location.origin:s.location.href,x=typeof b=="string"?b:Cd(b);
vendor: 2,909 bytes, line 305
305return x=x.replace(/ $/,"%20"),ot(g,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,g)}let y={get action(){return l},get location(){return e(s,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(u0,h),c=b,()=>{s.removeEventListener(u0,h),c=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let g=v(b);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:f,go(b){return o.go(b)}};return y}var h0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(h0||(h0={}));function XL(e,t,n){return n===void 0&&(n="/"),JL(e,t,n,!1)}function JL(e,t,n,r){let s=typeof t=="string"?Ba(t):t,i=Xv(s.pathname||"/",n);if(i==null)return null;let o=sC(e);ZL(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=u4(i);l=l4(o[c],u,r)}return l}function sC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(ot(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Ys([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(ot(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),sC(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:o4(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,o);else for(let c of iC(i.path))s(i,o,c)}),t}function iC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=iC(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function ZL(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:a4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const e4=/^:[\w-]+$/,t4=3,n4=2,r4=1,s4=10,i4=-2,f0=e=>e==="*";function o4(e,t){let n=e.split("/"),r=n.length;return n.some(f0)&&(r+=i4),t&&(r+=n4),n.filter(s=>!f0(s)).reduce((s,i)=>s+(e4.test(i)?t4:i===""?r4:s4),r)}function a4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function l4(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=p0({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),p=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=p0({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 6,834 bytes, lines 305-314
305Object.assign(s,h.params),o.push({params:s,pathname:Ys([i,h.pathname]),pathnameBase:p4(Ys([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=Ys([i,h.pathnameBase]))}return o}function p0(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=c4(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:p,isOptional:f}=d;if(p==="*"){let y=l[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const v=l[h];return f&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function c4(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),rC(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=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function u4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return rC(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Xv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function d4(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ba(e):e;return{pathname:n?n.startsWith("/")?n:h4(n,t):t,search:m4(r),hash:g4(s)}}function h4(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function zf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function f4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Jv(e,t){let n=f4(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Zv(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ba(e):(s=ac({},e),ot(!s.pathname||!s.pathname.includes("?"),zf("?","pathname","search",s)),ot(!s.pathname||!s.pathname.includes("#"),zf("#","pathname","hash",s)),ot(!s.search||!s.search.includes("#"),zf("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;s.pathname=p.join("/")}l=h>=0?t[h]:"/"}let c=d4(s,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Ys=e=>e.join("/").replace(/\/\/+/g,"/"),p4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),m4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,g4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function v4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const oC=["post","put","patch","delete"];new Set(oC);const y4=["get",...oC];new Set(y4);/** 306 * React Router v6.30.1 307 * 308 * Copyright (c) Remix Software Inc. 309 * 310 * This source code is licensed under the MIT license found in the 311 * LICENSE.md file in the root directory of this source tree. 312 * 313 * @license MIT 314 */function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lc.apply(this,arguments)}const ey=m.createContext(null),x4=m.createContext(null),ii=m.createContext(null),hh=m.createContext(null),oi=m.createContext({outlet:null,matches:[],isDataRoute:!1}),aC=m.createContext(null);function w4(e,t){let{relative:n}=t===void 0?{}:t;Ua()||ot(!1);let{basename:r,navigator:s}=m.useContext(ii),{hash:i,pathname:o,search:l}=cC(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:Ys([r,o])),s.createHref({pathname:c,search:l,hash:i})}function Ua(){return m.useContext(hh)!=null}function no(){return Ua()||ot(!1),m.useContext(hh).location}function lC(e){m.useContext(ii).static||m.useLayoutEffect(e)}function ro(){let{isDataRoute:e}=m.useContext(oi);return e?I4():b4()}function b4(){Ua()||ot(!1);let e=m.useContext(ey),{basename:t,future:n,navigator:r}=m.useContext(ii),{matches:s}=m.useContext(oi),{pathname:i}=no(),o=JSON.stringify(Jv(s,n.v7_relativeSplatPath)),l=m.useRef(!1);return lC(()=>{l.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=Zv(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Ys([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function cC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(ii),{matches:s}=m.useContext(oi),{pathname:i}=no(),o=JSON.stringify(Jv(s,r.v7_relativeSplatPath));return m.useMemo(()=>Zv(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function S4(e,t){return k4(e,t)}function k4(e,t,n,r){Ua()||ot(!1);let{navigator:s}=m.useContext(ii),{matches:i}=m.useContext(oi),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=no(),d;if(t){var h;let b=typeof t=="string"?Ba(t):t;c==="/"||(h=b.pathname)!=null&&h.startsWith(c)||ot(!1),d=b}else d=u;let p=d.pathname||"/",f=p;if(c!=="/"){let b=c.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=XL(e,{pathname:f}),y=N4(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Ys([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:Ys([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&y?m.createElement(hh.Provider,{value:{location:lc({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:$s.Pop}},y):y}function j4(){let e=R4(),t=v4(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
314Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const C4=m.createElement(j4,null);class _4 extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(oi.Provider,{value:this.props.routeContext},m.createElement(aC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function E4(e){let{routeContext:t,match:n,children:r}=e,s=m.useContext(ey);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(oi.Provider,{value:t},r)}function N4(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||ot(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:p,errors:f}=n,v=h.route.loader&&p[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||v){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,p)=>{let f,v=!1,y=null,b=null;n&&(f=l&&h.route.id?l[h.route.id]:void 0,y=h.route.errorElement||C4,c&&(u<0&&p===0?(v=!0,b=null):u===p&&(v=!0,b=h.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,p+1)),x=()=>{let w;return f?w=y:v?w=b:h.route.Component?w=m.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,m.createElement(E4,{match:h,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?m.createElement(_4,{location:n.location,revalidation:n.revalidation,component:y,error:f,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}var uC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(uC||{}),_d=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(_d||{});function T4(e){let t=m.useContext(ey);return t||ot(!1),t}function P4(e){let t=m.useContext(x4);return t||ot(!1),t}function A4(e){let t=m.useContext(oi);return t||ot(!1),t}function dC(e){let t=A4(),n=t.matches[t.matches.length-1];return n.route.id||ot(!1),n.route.id}function R4(){var e;let t=m.useContext(aC),n=P4(_d.UseRouteError),r=dC(_d.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function I4(){let{router:e}=T4(uC.UseNavigateStable),t=dC(_d.UseNavigateStable),n=m.useRef(!1);return lC(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,lc({fromRouteId:t},i)))},[e,t])}function O4(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function D4(e){let{to:t,replace:n,state:r,relative:s}=e;Ua()||ot(!1);let{future:i,static:o}=m.useContext(ii),{matches:l}=m.useContext(oi),{pathname:c}=no(),u=ro(),d=Zv(t,Jv(l,i.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return m.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function Zn(e){ot(!1)}function M4(e){let{basename:t="/",children:n=null,location:r,navigationType:s=$s.Pop,navigator:i,static:o=!1,future:l}=e;Ua()&&ot(!1);let c=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:i,static:o,future:lc({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=Ba(r));let{pathname:d="/",search:h="",hash:p="",state:f=null,key:v="default"}=r,y=m.useMemo(()=>{let b=Xv(d,c);return b==null?null:{location:{pathname:b,search:h,hash:p,state:f,key:v},navigationType:s}},[c,d,h,p,f,v,s]);return y==null?null:m.createElement(ii.Provider,{value:u},m.createElement(hh.Provider,{children:n,value:y}))}function L4(e){let{children:t,location:n}=e;return S4(Um(t),n)}new Promise(()=>{});function Um(e,t){t===void 0&&(t=[]);let n=[];
314return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let i=[...t,s];if(r.type===m.Fragment){n.push.apply(n,Um(r.props.children,i));return}r.type!==Zn&&ot(!1),!r.props.index||!r.props.children||ot(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Um(r.props.children,i)),n.push(o)}),n}/** 315 * React Router DOM v6.30.1 316 * 317 * Copyright (c) Remix Software Inc. 318 * 319 * This source code is licensed under the MIT license found in the 320 * LICENSE.md file in the root directory of this source tree. 321 * 322 * @license MIT 323 */function Hm(){return Hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hm.apply(this,arguments)}function F4(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function $4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function z4(e,t){return e.button===0&&(!t||t==="_self")&&!$4(e)}function Wm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function B4(e,t){let n=Wm(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const U4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],H4="6";try{window.__reactRouterVersion=H4}catch{}const W4="startTransition",m0=Tg[W4];function V4(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=GL({window:s,v5Compat:!0}));let o=i.current,[l,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=m.useCallback(h=>{u&&m0?m0(()=>c(h)):c(h)},[c,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>O4(r),[r]),m.createElement(M4,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const q4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fn=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,p=F4(t,U4),{basename:f}=m.useContext(ii),v,y=!1;if(typeof u=="string"&&K4.test(u)&&(v=u,q4))try{let w=new URL(window.location.href),S=u.startsWith("//")?new URL(w.protocol+u):new URL(u),j=Xv(S.pathname,f);S.origin===w.origin&&j!=null?u=j+S.search+S.hash:y=!0}catch{}let b=w4(u,{relative:s}),g=G4(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function x(w){r&&r(w),w.defaultPrevented||g(w)}return m.createElement("a",Hm({},p,{href:v||b,onClick:y||i?r:x,ref:n,target:c}))});var g0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(g0||(g0={}));var v0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(v0||(v0={}));function G4(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=ro(),u=no(),d=cC(e,{relative:o});return m.useCallback(h=>{if(z4(h,n)){h.preventDefault();let p=r!==void 0?r:Cd(u)===Cd(d);c(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,r,s,n,e,i,o,l])}function Y4(e){let t=m.useRef(Wm(e)),n=m.useRef(!1),r=no(),s=m.useMemo(()=>B4(r.search,n.current?null:t.current),[r.search]),i=ro(),o=m.useCallback((l,c)=>{const u=Wm(typeof l=="function"?l(s):l);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}const Q4="modulepreload",X4=function(e){return"/"+e},y0={},Nc=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(c=>{if(c=X4(c),c in y0)return;y0[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");
323if(h.rel=u?"stylesheet":Q4,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((p,f)=>{h.addEventListener("load",p),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},J4=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Nc(async()=>{const{default:r}=await Promise.resolve().then(()=>Ha);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class ty extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class Z4 extends ty{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class x0 extends ty{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class w0 extends ty{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Vm;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Vm||(Vm={}));var eF=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};class tF{constructor(t,{headers:n={},customFetch:r,region:s=Vm.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=J4(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return eF(this,void 0,void 0,function*(){try{const{headers:s,method:i,body:o}=n;let l={},{region:c}=n;c||(c=this.region);const u=new URL(`${this.url}/${t}`);c&&c!=="any"&&(l["x-region"]=c,u.searchParams.set("forceFunctionRegion",c));let d;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",d=o):typeof o=="string"?(l["Content-Type"]="text/plain",d=o):typeof FormData<"u"&&o instanceof FormData?d=o:(l["Content-Type"]="application/json",d=JSON.stringify(o)));const h=yield this.fetch(u.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),s),body:d}).catch(y=>{throw new Z4(y)}),p=h.headers.get("x-relay-error");if(p&&p==="true")throw new x0(h);if(!h.ok)throw new w0(h);let f=((r=h.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),v;return f==="application/json"?v=yield h.json():f==="application/octet-stream"?v=yield h.blob():f==="text/event-stream"?v=h:f==="multipart/form-data"?v=yield h.formData():v=yield h.text(),{data:v,error:null,response:h}}catch(s){return{data:null,error:s,response:s instanceof w0||s instanceof x0?s.context:void 0}}})}}var rn={},ny={},fh={},Tc={},ph={},mh={},nF=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Ta=nF();const rF=Ta.fetch,hC=Ta.fetch.bind(Ta),fC=Ta.Headers,sF=Ta.Request,iF=Ta.Response,Ha=Object.freeze(Object.defineProperty({__proto__:null,Headers:fC,Request:sF,Response:iF,default:hC,fetch:rF},Symbol.toStringTag,{value:"Module"})),oF=eA(Ha);var gh={};Object.defineProperty(gh,"__esModule",{value:!0});let aF=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
323de=t.code}};gh.default=aF;var pC=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mh,"__esModule",{value:!0});const lF=pC(oF),cF=pC(gh);let uF=class{constructor(t){var n,r;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(n=t.shouldThrowOnError)!==null&&n!==void 0?n:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=lF.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=new Headers(this.headers),this.headers.set(t,n),this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{var o,l,c,u;let d=null,h=null,p=null,f=i.status,v=i.statusText;if(i.ok){if(this.method!=="HEAD"){const x=await i.text();x===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((o=this.headers.get("Accept"))===null||o===void 0)&&o.includes("application/vnd.pgrst.plan+text"))?h=x:h=JSON.parse(x))}const b=(l=this.headers.get("Prefer"))===null||l===void 0?void 0:l.match(/count=(exact|planned|estimated)/),g=(c=i.headers.get("content-range"))===null||c===void 0?void 0:c.split("/");b&&g&&g.length>1&&(p=parseInt(g[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(h)&&(h.length>1?(d={code:"PGRST116",details:`Results contain ${h.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},h=null,p=null,f=406,v="Not Acceptable"):h.length===1?h=h[0]:h=null)}else{const b=await i.text();try{d=JSON.parse(b),Array.isArray(d)&&i.status===404&&(h=[],d=null,f=200,v="OK")}catch{i.status===404&&b===""?(f=204,v="No Content"):d={message:b}}if(d&&this.isMaybeSingle&&(!((u=d==null?void 0:d.details)===null||u===void 0)&&u.includes("0 rows"))&&(d=null,f=200,v="OK"),d&&this.shouldThrowOnError)throw new cF.default(d)}return{error:d,data:h,count:p,status:f,statusText:v}});return this.shouldThrowOnError||(s=s.catch(i=>{var o,l,c;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(l=i==null?void 0:i.stack)!==null&&l!==void 0?l:""}`,hint:"",code:`${(c=i==null?void 0:i.code)!==null&&c!==void 0?c:""}`},data:null,count:null,status:0,statusText:""}})),s.then(t,n)}returns(){return this}overrideTypes(){return this}};mh.default=uF;var dF=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ph,"__esModule",{value:!0});const hF=dF(mh);let fF=class extends hF.default{select(t){let n=!1;const r=(t??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:i=s}={}){const o=i?`${i}.order`:"order",l=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${l?`${l},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:s=r}={}){const i=typeof s>"u"?"offset":`${s}.offset`,o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(o,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
323explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:i=!1,format:o="text"}={}){var l;const c=[t?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),u=(l=this.headers.get("Accept"))!==null&&l!==void 0?l:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${u}"; options=${c};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};ph.default=fF;var pF=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tc,"__esModule",{value:!0});const mF=pF(ph);let gF=class extends mF.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${i}fts${o}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Tc.default=gF;var vF=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fh,"__esModule",{value:!0});const ul=vF(Tc);let yF=class{constructor(t,{headers:n={},schema:r,fetch:s}){this.url=t,this.headers=new Headers(n),this.schema=r,this.fetch=s}select(t,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(l=>/\s/.test(l)&&!i?"":(l==='"'&&(i=!i),l)).join("");return this.url.searchParams.set("select",o),r&&this.headers.append("Prefer",`count=${r}`),new ul.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(t,{count:n,defaultToNull:r=!0}={}){var s;const i="POST";if(n&&this.headers.append("Prefer",`count=${n}`),r||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(o.length>0){const l=[...new Set(o)].map(c=>`"${c}"`);this.url.searchParams.set("columns",l.join(","))}}return new ul.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:i=!0}={}){var o;const l="POST";if(this.headers.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),n!==void 0&&this.url.searchParams.set("on_conflict",n),s&&this.headers.append("Prefer",`count=${s}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);this.url.searchParams.set("columns",u.join(","))}}return new ul.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}update(t,{count:n}={}){var r;const s="PATCH";return n&&this.headers.append("Prefer",`count=${n}`),new ul.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}delete({count:t}={}){var n;const r="DELETE";return t&&this.headers.append("Prefer",`count=${t}`),new ul.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch})}};fh.default=yF;
323var mC=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ny,"__esModule",{value:!0});const xF=mC(fh),wF=mC(Tc);let bF=class gC{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.fetch=s}from(t){const n=new URL(`${this.url}/${t}`);return new xF.default(n,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new gC(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;r||s?(l=r?"HEAD":"GET",Object.entries(n).filter(([h,p])=>p!==void 0).map(([h,p])=>[h,Array.isArray(p)?`{${p.join(",")}}`:`${p}`]).forEach(([h,p])=>{c.searchParams.append(h,p)})):(l="POST",u=n);const d=new Headers(this.headers);return i&&d.set("Prefer",`count=${i}`),new wF.default({method:l,url:c,headers:d,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}};ny.default=bF;var Wa=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rn,"__esModule",{value:!0});rn.PostgrestError=rn.PostgrestBuilder=rn.PostgrestTransformBuilder=rn.PostgrestFilterBuilder=rn.PostgrestQueryBuilder=rn.PostgrestClient=void 0;const vC=Wa(ny);rn.PostgrestClient=vC.default;const yC=Wa(fh);rn.PostgrestQueryBuilder=yC.default;const xC=Wa(Tc);rn.PostgrestFilterBuilder=xC.default;const wC=Wa(ph);rn.PostgrestTransformBuilder=wC.default;const bC=Wa(mh);rn.PostgrestBuilder=bC.default;const SC=Wa(gh);rn.PostgrestError=SC.default;var SF=rn.default={PostgrestClient:vC.default,PostgrestQueryBuilder:yC.default,PostgrestFilterBuilder:xC.default,PostgrestTransformBuilder:wC.default,PostgrestBuilder:bC.default,PostgrestError:SC.default};const{PostgrestClient:kF,PostgrestQueryBuilder:Lq,PostgrestFilterBuilder:Fq,PostgrestTransformBuilder:$q,PostgrestBuilder:zq,PostgrestError:Bq}=SF;class jF{static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const n=process.versions;if(n&&n.node){const r=n.node,s=parseInt(r.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 324import ws from "ws" 325new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=` 326 327Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const CF="2.15.5",_F=`realtime-js/${CF}`,EF="1.0.0",qm=1e4,NF=1e3,TF=100;var Il;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Il||(Il={}));var ct;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(ct||(ct={}));var or;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(or||(or={}));var Km;(function(e){e.websocket="websocket"})(Km||(Km={}));var wi;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(wi||(wi={}));class PF{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2);let o=this.HEADER_LENGTH+2;const l=r.decode(t.slice(o,o+s));o=o+s;const c=r.decode(t.slice(o,o+i));o=o+i;const u=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:l,event:c,payload:u}}}class kC{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Le;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Le||(Le={}));const b0=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((i,o)=>(i[o]=AF(o,e,t,s),i),{})},AF=(e,t,n,r)=>{const s=t.find(l=>
vendor: 4,552 bytes, line 327
327l.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?jC(i,o):Gm(o)},jC=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return DF(t,n)}switch(e){case Le.bool:return RF(t);case Le.float4:case Le.float8:case Le.int2:case Le.int4:case Le.int8:case Le.numeric:case Le.oid:return IF(t);case Le.json:case Le.jsonb:return OF(t);case Le.timestamp:return MF(t);case Le.abstime:case Le.date:case Le.daterange:case Le.int4range:case Le.int8range:case Le.money:case Le.reltime:case Le.text:case Le.time:case Le.timestamptz:case Le.timetz:case Le.tsrange:case Le.tstzrange:return Gm(t);default:return Gm(t)}},Gm=e=>e,RF=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},IF=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},OF=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},DF=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>jC(t,l))}return e},MF=e=>typeof e=="string"?e.replace(" ","T"):e,CC=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"};class Bf{constructor(t,n,r={},s=qm){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var S0;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(S0||(S0={}));class Ol{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ol.syncState(this.state,s,i,o),this.pendingDiffs.forEach(c=>{this.state=Ol.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ol.syncDiff(this.state,s,i,o),l())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const i=this.cloneDeep(t),o=this.transformState(n),l={},c={};return this.map(i,(u,d)=>{o[u]||(c[u]=d)}),this.map(o,(u,d)=>{const h=i[u];if(h){const p=d.map(b=>b.presence_ref),f=h.map(b=>b.presence_ref),v=d.filter(b=>f.indexOf(b.presence_ref)<0),y=h.filter(b=>p.indexOf(b.presence_ref)<0);v.length>0&&(l[u]=v),y.length>0&&(c[u]=y)}else l[u]=d}),this.syncDiff(i,{joins:l,leaves:c},r,s)}static syncDiff(t,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(l,c)=>{var u;
327const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const h=t[l].map(f=>f.presence_ref),p=d.filter(f=>h.indexOf(f.presence_ref)<0);t[l].unshift(...p)}r(l,d,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[l]=u,s(l,u,c),u.length===0&&delete t[l]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var k0;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(k0||(k0={}));var Dl;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Dl||(Dl={}));var Vr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Vr||(Vr={}));class ry{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=ct.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Bf(this,or.join,this.params,this.timeout),this.rejoinTimer=new kC(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ct.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=ct.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=ct.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=ct.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=ct.errored,this.rejoinTimer.scheduleTimeout())}),this._on(or.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new Ol(this),this.broadcastEndpointURL=CC(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==ct.closed){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[Dl.PRESENCE]&&this.bindings[Dl.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},p={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>t==null?void 0:t(Vr.CHANNEL_ERROR,f)),this._onClose(()=>t==null?void 0:t(Vr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},h)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:f})=>{var v;if(this.socket.setAuth(),f===void 0){t==null||t(Vr.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,b=(v=y==null?void 0:y.length)!==null&&v!==void 0?v:0,g=[];for(let x=0;x<b;x++){const w=y[x],{filter:{event:S,schema:j,table:k,filter:E}}=w,A=f&&f[x];if(A&&A.event===S&&A.schema===j&&A.table===k&&A.filter===E)g.push(Object.assign(Object.assign({},w),{id:A.id}));else{this.unsubscribe(),this.state=ct.errored,t==null||t(Vr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g,t&&t(Vr.SUBSCRIBED);return}}).receive("error",f=>{this.state=ct.errored,t==null||t(Vr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Vr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===ct.joined&&t===Dl.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,n,r)}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){const{event:i,payload:o}=t,c={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=ct.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(or.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(s=>{r=new Bf(this,or.leave,{},t),r.receive("ok",()=>{n(),s("ok")}).receive("timeout",()=>{n(),s("timed out")}).receive("error",()=>{s("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ct.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Bf(this,t,n,r);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>TF){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,i;const o=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=or;if(r&&[l,c,u,d].indexOf(o)>=0&&r!==this._joinRef())return;let p=this._onMessage(o,n,r);if(n&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(f=>{var v,y,b;return((v=f.filter)===null||v===void 0?void 0:v.event)==="*"||((b=(y=f.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===o}).map(f=>f.callback(p,r)):(i=this.bindings[o])===null||i===void 0||i.filter(f=>{var v,y,b,g,x,w;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const S=f.id,j=(v=f.filter)===null||v===void 0?void 0:v.event;return S&&((y=n.ids)===null||y===void 0?void 0:y.includes(S))&&(j==="*"||(j==null?void 0:j.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const S=(x=(g=f==null?void 0:f.filter)===null||g===void 0?void 0:g.event)===null||x===void 0?void 0:x.toLocaleLowerCase();return S==="*"||S===((w=n==null?void 0:n.event)===null||w===void 0?void 0:w.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof p=="object"&&"ids"in p){const v=p.data,{schema:y,table:b,commit_timestamp:g,type:x,errors:w}=v;p=Object.assign(Object.assign({},{schema:y,table:b,commit_timestamp:g,eventType:x,new:{},old:{},errors:w}),this._getPayloadRecords(v))}f.callback(p,r)})}_isClosed(){return this.state===ct.closed}_isJoined(){return this.state===ct.joined}_isJoining(){return this.state===ct.joining}_isLeaving(){return this.state===ct.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&ry.isEqual(s.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(or.close,{},t)}_onError(t){this._on(or.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ct.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=b0(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=b0(t.columns,t.old_record)),n}}const Uf=()=>{},du={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},LF=[1e3,2e3,5e3,1e4],FF=1e4,$F=` 328 addEventListener("message", (e) => { 329 if (e.data.event === "start") { 330 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 331 } 332 });`;class zF{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=qm,this.transport=null,this.heartbeatIntervalMs=du.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Uf,this.ref=0,this.reconnectTimer=null,this.logger=Uf,this.conn=null,this.sendBuffer=[],this.serializer
332=new PF,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>Nc(async()=>{const{default:l}=await Promise.resolve().then(()=>Ha);return{default:l}},void 0).then(({default:l})=>l(...o)).catch(l=>{throw new Error(`Failed to load @supabase/node-fetch: ${l.message}. This is required for HTTP requests in Node.js environments without native fetch.`)}):i=fetch,(...o)=>i(...o)},!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${Km.websocket}`,this.httpEndpoint=CC(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=jF.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n} 333 334To use Realtime in Node.js, you need to provide a WebSocket implementation: 335 336Option 1: Use Node.js 22+ which has native WebSocket support 337Option 2: Install and provide the "ws" package: 338 339 npm install ws 340 341 import ws from "ws" 342 const client = new RealtimeClient(url, { 343 ...options, 344 transport: ws 345 })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:EF}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},t?this.conn.close(t,n??""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Il.connecting:return wi.Connecting;case Il.open:return wi.Open;case Il.closing:return wi.Closing;default:return wi.Closed}}isConnected(){return this.connectionState()===wi.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new ry(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){const{topic:n,event:r,payload:s,ref:i}=t,o=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(NF,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},du.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>
345{if(n.topic==="phoenix"&&n.event==="phx_reply")try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}n.ref&&n.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:r,event:s,payload:i,ref:o}=n,l=o?`(${o})`:"",c=i.status||"";this.log("receive",`${c} ${r} ${s} ${l}`.trim(),i),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(s,i,o)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(or.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([$F],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n;t?n=t:this.accessToken?n=await this.accessToken():n=this.accessTokenValue,this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(r=>{const s={access_token:n,version:_F};n&&r.updateJoinPayload(s),r.joinedOnce&&r._isJoined()&&r._push(or.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(n=>{this.log("error",`error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new kC(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},du.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,s,i,o,l,c,u,d;if(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.t
345imeout)!==null&&r!==void 0?r:qm,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:du.HEARTBEAT_INTERVAL,this.worker=(i=t==null?void 0:t.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=t==null?void 0:t.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:Uf,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:h=>LF[h-1]||FF,this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(h,p)=>p(JSON.stringify(h)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:this.serializer.decode.bind(this.serializer),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}class sy extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function ut(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class BF extends sy{constructor(t,n,r){super(t),this.name="StorageApiError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Ym extends sy{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var UF=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const _C=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Nc(async()=>{const{default:r}=await Promise.resolve().then(()=>Ha);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},HF=()=>UF(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Nc(()=>Promise.resolve().then(()=>Ha),void 0)).Response:Response}),Qm=e=>{if(Array.isArray(e))return e.map(n=>Qm(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=Qm(r)}),t},WF=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};var so=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const Hf=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),VF=(e,t,n)=>so(void 0,void 0,void 0,function*(){const r=yield HF();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(s=>{const i=e.status||500,o=(s==null?void 0:s.statusCode)||i+"";t(new BF(Hf(s),i,o))}).catch(s=>{t(new Ym(Hf(s),s))}):t(new Ym(Hf(e),e))}),qF=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!r?s:(WF(r)?(s.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),Object.assign(Object.assign({},s),n))};function Pc(e,t,n,r,s,i){return so(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(n,qF(t,r,s,i)).then(c=>{if(!c.ok)throw c;return r!=null&&r.noResolveJson?c:c.json()}).then(c=>o(c)).catch(c=>VF(c,l,r))})})}function Ed(e,t,n,r){return so(this,void 0,void 0,function*(){return Pc(e,"GET",t,n,r)})}function br(e,t,n,r,s){return so(this,void 0,void 0,function*(){return Pc(e,"POST",t,r,s,n)})}function Xm(e,t,n,r,s){return so(this,void 0,void 0,function*(){return Pc(e,"PUT",t,r,s,n)})}function KF(e,t,n,r){return so(this,void 0,void 0,function*(){return Pc(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}
345function EC(e,t,n,r,s){return so(this,void 0,void 0,function*(){return Pc(e,"DELETE",t,r,s,n)})}var zt=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const GF={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},j0={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class YF{constructor(t,n={},r,s){this.shouldThrowOnError=!1,this.url=t,this.headers=n,this.bucketId=r,this.fetch=_C(s)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,n,r,s){return zt(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},j0),s);let l=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",this.encodeMetadata(c)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",this.encodeMetadata(c))):(i=r,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=this.toBase64(this.encodeMetadata(c)))),s!=null&&s.headers&&(l=Object.assign(Object.assign({},l),s.headers));const u=this._removeEmptyFolders(n),d=this._getFinalPath(u),h=yield(t=="PUT"?Xm:br)(this.fetch,`${this.url}/object/${d}`,i,Object.assign({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{data:{path:u,id:h.Id,fullPath:h.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(ut(i))return{data:null,error:i};throw i}})}upload(t,n,r){return zt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,s){return zt(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(t),o=this._getFinalPath(i),l=new URL(this.url+`/object/upload/sign/${o}`);l.searchParams.set("token",n);try{let c;const u=Object.assign({upsert:j0.upsert},s),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const h=yield Xm(this.fetch,l.toString(),c,{headers:d});return{data:{path:i,fullPath:h.Key},error:null}}catch(c){if(this.shouldThrowOnError)throw c;if(ut(c))return{data:null,error:c};throw c}})}createSignedUploadUrl(t,n){return zt(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const i=yield br(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(this.url+i.url),l=o.searchParams.get("token");if(!l)throw new sy("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:l},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}})}update(t,n,r){return zt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return zt(this,void 0,void 0,function*(){try{return{data:yield br(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}})}copy(t,n,r){return zt(this,void 0,void 0,function*(){try{return{data:{path:(yield br(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}})}createSignedUrl(t,n,r){return zt(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),i=yield br(this.fetch,`${this.url}/object/sign/${s}
345`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}})}createSignedUrls(t,n,r){return zt(this,void 0,void 0,function*(){try{const s=yield br(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}})}download(t,n){return zt(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=i?`?${i}`:"";try{const l=this._getFinalPath(t);return{data:yield(yield Ed(this.fetch,`${this.url}/${s}/${l}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(ut(l))return{data:null,error:l};throw l}})}info(t){return zt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Ed(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Qm(r),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}})}exists(t){return zt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield KF(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ut(r)&&r instanceof Ym){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),s=[],i=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";i!==""&&s.push(i);const l=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",c=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});c!==""&&s.push(c);let u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${r}${u}`)}}}remove(t){return zt(this,void 0,void 0,function*(){try{return{data:yield EC(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}})}list(t,n,r){return zt(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},GF),n),{prefix:t||""});return{data:yield br(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(ut(s))return{data:null,error:s};throw s}})}listV2(t,n){return zt(this,void 0,void 0,function*(){try{const r=Object.assign({},t);return{data:yield br(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const QF="2.12.1",XF={"X-Client-Info":`storage-js/${QF}`};var po=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};class JF{constructor(t,n={},r,s){this.shouldThrowOnError=!1;const i=new URL(t);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase.")),this.url=i.href,this.headers=Object.assign(Object.assign({}
345,XF),n),this.fetch=_C(r)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return po(this,void 0,void 0,function*(){try{return{data:yield Ed(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(ut(t))return{data:null,error:t};throw t}})}getBucket(t){return po(this,void 0,void 0,function*(){try{return{data:yield Ed(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return po(this,void 0,void 0,function*(){try{return{data:yield br(this.fetch,`${this.url}/bucket`,{id:t,name:t,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return po(this,void 0,void 0,function*(){try{return{data:yield Xm(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(ut(r))return{data:null,error:r};throw r}})}emptyBucket(t){return po(this,void 0,void 0,function*(){try{return{data:yield br(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}})}deleteBucket(t){return po(this,void 0,void 0,function*(){try{return{data:yield EC(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(ut(n))return{data:null,error:n};throw n}})}}class ZF extends JF{constructor(t,n={},r,s){super(t,n,r,s)}from(t){return new YF(this.url,this.headers,t,this.fetch)}}const e$="2.57.4";let yl="";typeof Deno<"u"?yl="deno":typeof document<"u"?yl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?yl="react-native":yl="node";const t$={"X-Client-Info":`supabase-js-${yl}/${e$}`},n$={headers:t$},r$={schema:"public"},s$={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},i$={};var o$=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};const a$=e=>{let t;return e?t=e:typeof fetch>"u"?t=hC:t=fetch,(...n)=>t(...n)},l$=()=>typeof Headers>"u"?fC:Headers,c$=(e,t,n)=>{const r=a$(n),s=l$();return(i,o)=>o$(void 0,void 0,void 0,function*(){var l;const c=(l=yield t())!==null&&l!==void 0?l:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(i,Object.assign(Object.assign({},o),{headers:u}))})};var u$=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};function d$(e){return e.endsWith("/")?e:e+"/"}function h$(e,t){var n,r;const{db:s,auth:i,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,p={db:Object.assign(Object.assign({},c),s),auth:Object.assign(Object.assign({},u),i),realtime:Object.assign(Object.assign({},d),o),storage:{},global:Object.assign(Object.assign(Object.assign({},h),l),{headers:Object.assign(Object.assign({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:()=>u$(this,void 0,void 0,function*(){return""})};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function f$(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(d$(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const NC="2.71.1",_o=30*1e3,Jm=3,Wf=Jm*_o,p$="http://localhost:9999",m$="supabase.auth.token",g$={"X-Client-Info":`gotrue-js/${NC}`},Zm="X-Supabase-Api-Version",TC={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},v$=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,y$=10*60*1e3;
345class iy extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ve(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class x$ extends iy{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function w$(e){return ve(e)&&e.name==="AuthApiError"}class PC extends iy{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class ai extends iy{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class ws extends ai{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function b$(e){return ve(e)&&e.name==="AuthSessionMissingError"}class hu extends ai{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class fu extends ai{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class pu extends ai{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function S$(e){return ve(e)&&e.name==="AuthImplicitGrantRedirectError"}class C0 extends ai{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class eg extends ai{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Vf(e){return ve(e)&&e.name==="AuthRetryableFetchError"}class _0 extends ai{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class tg extends ai{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Nd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),E0=` 346\r=`.split(""),k$=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<E0.length;t+=1)e[E0[t].charCodeAt(0)]=-2;for(let t=0;t<Nd.length;t+=1)e[Nd[t].charCodeAt(0)]=t;return e})();function N0(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Nd[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(Nd[r]),t.queuedBits-=6}}function AC(e,t,n){const r=k$[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function T0(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{_$(o,r,n)};for(let o=0;o<e.length;o+=1)AC(e.charCodeAt(o),s,i);return t.join("")}function j$(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function C$(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}j$(r,t)}}function _$(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function E$(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)AC(e.charCodeAt(s),n,r);return new Uint8Array(t)}function N$(e){const t=[];return C$(e,n=>t.push(n)),new Uint8Array(t)}function T$(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>N0(s,n,r)),N0(null,n,r),t.join("")}function P$(e){return Math.round(Date.now()/1e3)+e}function A$(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const er=()=>typeof window<"u"&&typeof document<"u",fi={tested:!1,writable:!1},RC=()=>
346{if(!er())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(fi.tested)return fi.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),fi.tested=!0,fi.writable=!0}catch{fi.tested=!0,fi.writable=!1}return fi.writable};function R$(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const IC=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Nc(async()=>{const{default:r}=await Promise.resolve().then(()=>Ha);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},I$=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Eo=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},pi=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},vs=async(e,t)=>{await e.removeItem(t)};class vh{constructor(){this.promise=new vh.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}vh.promiseConstructor=Promise;function qf(e){const t=e.split(".");if(t.length!==3)throw new tg("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!v$.test(t[r]))throw new tg("JWT not in base64url format");return{header:JSON.parse(T0(t[0])),payload:JSON.parse(T0(t[1])),signature:E$(t[2]),raw:{header:t[0],payload:t[1]}}}async function O$(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function D$(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function M$(e){return("0"+e.toString(16)).substr(-2)}function L$(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,M$).join("")}async function F$(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function $$(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await F$(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function mo(e,t,n=!1){const r=L$();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Eo(e,`${t}-code-verifier`,s);const i=await $$(r);return[i,r===i?"plain":"s256"]}const z$=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function B$(e){const t=e.headers.get(Zm);if(!t||!t.match(z$))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function U$(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function H$(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const W$=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function go(e){if(!W$.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Kf(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function P0(e){return JSON.parse(JSON.stringify(e))}var V$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};const yi=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),q$=[502,503,504];async function A0(e){var t;if(!I$(e))throw new eg(yi(e),0);if(q$.includes(e.status))throw new eg(yi(e),e.status);let n;try{n=await e.json()}catch(i){throw new PC(yi(i),i)}let r;const s=B$(e);
346if(s&&s.getTime()>=TC["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new _0(yi(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new ws}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>i&&typeof o=="string",!0))throw new _0(yi(n),e.status,n.weak_password.reasons);throw new x$(yi(n),e.status||500,r)}const K$=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function je(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Zm]||(i[Zm]=TC["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await G$(e,t,n+l,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function G$(e,t,n,r,s,i){const o=K$(t,r,s,i);let l;try{l=await e(n,Object.assign({},o))}catch(c){throw console.error(c),new eg(yi(c),0)}if(l.ok||await A0(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await A0(c)}}function Hr(e){var t;let n=null;J$(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=P$(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function R0(e){const t=Hr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function _s(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Y$(e){return{data:e,error:null}}function Q$(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=V$(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function X$(e){return e}function J$(e){return e.access_token&&e.refresh_token&&e.expires_in}const Gf=["global","local","others"];var Z$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};class ez{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=IC(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n=Gf[0]){if(Gf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Gf.join(", ")}`);try{return await je(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ve(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await je(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:_s})}catch(r){if(ve(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Z$(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await je(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:Q$,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ve(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await je(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:_s})}catch(n){if(ve(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await je(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:X$});if(d.error)throw d.error;const h=await d.json(),p=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(v=>{const y=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(v.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(p)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(ve(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){go(t);try{return await je(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:_s})}catch(n){if(ve(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){go(t);try{return await je(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:_s})}catch(r){if(ve(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){go(t);
346try{return await je(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:_s})}catch(r){if(ve(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){go(t.userId);try{const{data:n,error:r}=await je(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(ve(n))return{data:null,error:n};throw n}}async _deleteFactor(t){go(t.userId),go(t.id);try{return{data:await je(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ve(n))return{data:null,error:n};throw n}}}function I0(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function tz(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const vo={debug:!!(globalThis&&RC()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class OC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class nz extends OC{}async function rz(e,t,n){vo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),vo.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){vo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{vo.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw vo.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new nz(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(vo.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}tz();const sz={url:p$,storageKey:m$,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:g$,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function O0(e,t,n){return await n()}const yo={};class cc{constructor(t){var n,r;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=cc.nextInstanceID,cc.nextInstanceID+=1,this.instanceID>0&&er()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},sz),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new ez({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=IC(s.fetch),this.lock=s.lock||O0,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:er()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=rz:this.lock=O0,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:RC()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=I0(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=I0(this.memoryStorage)),er()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}get jwks(){var t,n;return(n=(t=yo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){yo[this.storageKey]=Object.assign(Object.assign({},yo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=yo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){yo[this.storageKey]=Object.assign(Object.assign({},yo[this.storageKey]),{cachedAt:t})}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${NC}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=R$(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),er()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),S$(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ve(n)?{error:n}:{error:new PC("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await je(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Hr}),{data:o,error:l}=i;if(l||!o)return{data:{user:null,session:null},error:l};const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(i){if(ve(i))return{data:{user:null,session:null},error:i};throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:d,password:h,options:p}=t;let f=null,v=null;this.flowType==="pkce"&&([f,v]=await mo(this.storage,this.storageKey)),i=await je(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:h,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:f,code_challenge_method:v},xform:Hr})}else if("phone"in t){const{phone:d,password:h,options:p}=t;i=await je(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Hr})}else throw new fu("You must provide either an email or phone number and a password");const{data:o,error:l}=i;if(l||!o)return{data:{user:null,session:null},error:l};const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(i){if(ve(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:l}=t;n=await je(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:R0})}else if("phone"in t){const{phone:i,password:o,options:l}=t;n=await je(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:R0})}else throw new fu("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new hu}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(ve(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;if(n==="solana")return await this.signInWithSolana(t);throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}async signInWithSolana(t){var n,r,s,i,o,l,c,u,d,h,p,f;let v,y;if("message"in t)v=t.message,y=t.signature;else{const{chain:b,wallet:g,statement:x,options:w}=t;let S;if(er())if(typeof g=="object")S=g;
346else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof g!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=g}const j=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),x?{statement:x}:null));let E;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")E=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)E=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)v=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),y=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${j.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(s=(r=w==null?void 0:w.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=w==null?void 0:w.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${w.signInWithSolana.notBefore}`]:[],...!((o=w==null?void 0:w.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${w.signInWithSolana.expirationTime}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((c=w==null?void 0:w.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((h=(d=w==null?void 0:w.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 347`);const k=await S.signMessage(new TextEncoder().encode(v),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=k}}try{const{data:b,error:g}=await je(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:T$(y)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Hr});if(g)throw g;return!b||!b.session||!b.user?{data:{user:null,session:null},error:new hu}:(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),{data:Object.assign({},b),error:g})}catch(b){if(ve(b))return{data:{user:null,session:null},error:b};throw b}}async _exchangeCodeForSession(t){const n=await pi(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:i,error:o}=await je(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Hr});if(await vs(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new hu}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(ve(i))return{data:{user:null,session:null,redirectType:null},error:i};throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,l=await je(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Hr}),{data:c,error:u}=l;return u?{data:{user:null,session:null},error:u}:!c||!c.session||!c.user?{data:{user:null,session:null},error:new hu}:(c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),{data:c,error:u})}catch(n){if(ve(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await mo(this.storage,this.storageKey));const{error:h}=await je(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await je(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d}}throw new fu("You must provide either an email or phone number.")}catch(l){if(ve(l))return{data:{user:null,session:null},error:l};throw l}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await je(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Hr});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),{data:{user:u,session:c},error:null}}catch(s){if(ve(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(t){var n,r,s;try{let i=null,o=null;return this.flowType==="pkce"&&([i,o]=await mo(this.storage,this.storageKey)),await je(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:Y$})}catch(i){if(ve(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new ws;const{error:s}=await je(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(t){if(ve(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await je(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:l}=await je(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l}}throw new fu("You must provide either an email or phone number and a type")}catch(n){if(ve(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await pi(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
347id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Wf:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await pi(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Kf()}if(this.storage.isServer&&t.user){let o=this.suppressGetSessionWarning;t=new Proxy(t,{get:(c,u,d)=>(!o&&u==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(c,u,d))})}return{data:{session:t},error:null}}const{session:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?{data:{session:null},error:i}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await je(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:_s}):await this._useSession(async n=>{var r,s,i;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ws}:await je(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:_s})})}catch(n){if(ve(n))return b$(n)&&(await this._removeSession(),await vs(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new ws;const o=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await mo(this.storage,this.storageKey));const{data:u,error:d}=await je(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:_s});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(ve(r))return{data:{user:null},error:r};throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ws;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=qf(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{session:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return{data:{user:null,session:null},error:c};if(!l)return{data:{user:null,session:null},error:null};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)throw c;i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(n){if(ve(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new ws;const{session:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?{data:{user:null,session:null},error:i}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(ve(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!er())throw new pu("No browser detected.");
347if(t.error||t.error_description||t.error_code)throw new pu(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new C0("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new pu("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new C0("No code detected.");const{data:x,error:w}=await this._exchangeCodeForSession(t.code);if(w)throw w;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:x.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!i||!l||!o||!u)throw new pu("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let p=d+h;c&&(p=parseInt(c));const f=p-d;f*1e3<=_o&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const v=p-h;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,p,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,p,d);const{data:y,error:b}=await this._getUser(i);if(b)throw b;const g={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:p,refresh_token:o,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:g,redirectType:t.type},error:null}}catch(r){if(ve(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await pi(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{error:i};const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(w$(l)&&(l.status===404||l.status===401||l.status===403)))return{error:l}}return t!=="others"&&(await this._removeSession(),await vs(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=A$(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await mo(this.storage,this.storageKey,!0));try{return await je(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(ve(i))return{data:null,error:i};throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(ve(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,l,c,u,d;const{data:h,error:p}=i;if(p)throw p;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await je(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return er()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(ve(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;
347if(o)throw o;return await je(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(ve(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await D$(async s=>(s>0&&await O$(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await je(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Hr})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Vf(i)&&Date.now()+o-r<_o})}catch(r){if(this._debug(n,"error",r),ve(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),er()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await pi(this.storage,this.storageKey);if(s&&this.userStorage){let o=await pi(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Eo(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Kf()}else if(s&&!s.user&&!s.user){const o=await pi(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await vs(this.storage,this.storageKey+"-user"),await Eo(this.storage,this.storageKey,s)):s.user=Kf()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Wf;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Wf}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Vf(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(s.access_token);!l&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new ws;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new vh;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new ws;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={session:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(s,"error",i),ve(i)){const o={session:null,error:i};return Vf(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Eo(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=P0(s);await Eo(this.storage,this.storageKey,i)}else{const s=P0(n);await Eo(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await vs(this.storage,this.storageKey),await vs(this.storage,this.storageKey+"-code-verifier"),await vs(this.storage,this.storageKey+"-user"),this.userStorage&&await vs(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&er()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
347catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),_o);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/_o);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${_o}ms, refresh threshold is ${Jm} ticks`),s<=Jm&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof OC)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!er()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await mo(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await je(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ve(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return{data:null,error:o};const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:c,error:u}=await je(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?{data:null,error:u}:(t.factorType==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),{data:c,error:null})})}catch(n){if(ve(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{data:null,error:i};const{data:o,error:l}=await je(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:l})})}catch(n){if(ve(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await je(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ve(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],s=r.filter(o=>o.factor_type==="totp"&&o.status==="verified"),i=r.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:r,totp:s,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:s},error:i}=t;if(i)return{data:null,error:i};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=qf(s.access_token);let l=null;o.aal&&(l=o.aal);let c=l;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(h=>h.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(c="aal2");const d=o.amr||[];return{data:{currentLevel:l,nextLevel:c,currentAuthenticationMethods:d},error:null}}))}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+y$>s)return r;const{data:i,error:o}=await je(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:f,error:v}
347=await this.getSession();if(v||!f.session)return{data:null,error:v};r=f.session.access_token}const{header:s,payload:i,signature:o,raw:{header:l,payload:c}}=qf(r);n!=null&&n.allowExpired||U$(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:f}=await this.getUser(r);if(f)throw f;return{data:{claims:i,header:s,signature:o},error:null}}const d=H$(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,N$(`${l}.${c}`)))throw new tg("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(ve(r))return{data:null,error:r};throw r}}}cc.nextInstanceID=0;const iz=cc;class oz extends iz{constructor(t){super(t)}}var az=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})};class lz{constructor(t,n,r){var s,i,o;this.supabaseUrl=t,this.supabaseKey=n;const l=f$(t);if(!n)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",l),this.storageUrl=new URL("storage/v1",l),this.functionsUrl=new URL("functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,u={db:r$,realtime:i$,auth:Object.assign(Object.assign({},s$),{storageKey:c}),global:n$},d=h$(r??{},u);this.storageKey=(s=d.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(h,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=c$(n,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new kF(new URL("rest/v1",l).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new ZF(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new tF(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return az(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,userStorage:i,storageKey:o,flowType:l,lock:c,debug:u},d,h){const p={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new oz({url:this.authUrl.href,headers:Object.assign(Object.assign({},p),d),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,userStorage:i,flowType:l,lock:c,debug:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new zF(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}
347const cz=(e,t,n)=>new lz(e,t,n);function uz(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}uz()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const dz="https://sscdpwbgnatztoyfxnnf.supabase.co",hz="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNzY2Rwd2JnbmF0enRveWZ4bm5mIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTc3ODc2MjgsImV4cCI6MjA3MzM2MzYyOH0.2YAtN3FsmwS5KroEJ656N2M67mUct5VxEBnCEIa2_fU",ae=cz(dz,hz,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),DC=m.createContext(void 0);function fz({children:e}){const[t,n]=m.useState(null),[r,s]=m.useState(null),[i,o]=m.useState(!0);m.useEffect(()=>{const{data:{subscription:p}}=ae.auth.onAuthStateChange((f,v)=>{s(v),n((v==null?void 0:v.user)??null),o(!1)});return ae.auth.getSession().then(({data:{session:f}})=>{s(f),n((f==null?void 0:f.user)??null),o(!1)}),()=>p.unsubscribe()},[]);const h={user:t,session:r,loading:i,signUp:async(p,f)=>{const v="https://www.coach-bernhard.ai/auth",{error:y}=await ae.auth.signUp({email:p,password:f,options:{emailRedirectTo:v}});return{error:y}},signIn:async(p,f)=>{const{error:v}=await ae.auth.signInWithPassword({email:p,password:f});return{error:v}},signOut:async()=>{await ae.auth.signOut()},resetPassword:async p=>{const f="https://www.coach-bernhard.ai/auth?type=recovery",{error:v}=await ae.auth.resetPasswordForEmail(p,{redirectTo:f});return{error:v}}};return a.jsx(DC.Provider,{value:h,children:e})}function li(){const e=m.useContext(DC);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const xo={"coach.revibrations.com":{id:"bernhard",name:"Coach Bernhard (AI)",tagline:"Your pocket-sized sparring partner for reflection, growth, and bold ideas",coachName:"Bernhard Kerres",companyName:"Bernhard Kerres & Friends GmbH",logo:"/coach-bernhard-logo.jpg",logoBW:"/coach-bernhard-logo-bw.jpg",headerImage:"/coach-bernhard-home-header.jpg",favicon:"/favicon.jpg",colors:{primary:"16 100% 50%",primaryForeground:"0 0% 100%",accent:"210 40% 96.1%"},bookingUrl:"https://book.bernhardkerres.com",websiteUrl:"https://www.bernhardkerres.com",contactEmail:"[email protected]",metaTitle:"Coach Bernhard (AI) - Your AI-Powered Coaching Companion",metaDescription:"Experience personalized AI coaching with Coach Bernhard. Your pocket-sized sparring partner for reflection, growth, and bold ideas.",domain:"coach.revibrations.com"},"coach-example.com":{id:"example",name:"Coach Example AI",tagline:"Professional development through AI-powered coaching",coachName:"Example Coach",companyName:"Example Coaching LLC",logo:"/coach-example-logo.jpg",logoBW:"/coach-example-logo-bw.jpg",headerImage:"/coach-example-header.jpg",favicon:"/favicon-example.jpg",colors:{primary:"220 90% 56%",primaryForeground:"0 0% 100%",accent:"210 40% 96.1%"},bookingUrl:"https://book.example.com",websiteUrl:"https://www.example.com",contactEmail:"[email protected]",metaTitle:"Coach Example AI - Professional Development Coaching",metaDescription:"AI-powered coaching for career growth and professional development.",domain:"coach-example.com"}};function mu(){const e=window.location.hostname;if(["coach.revibrations.com","coach-bernhard.ai","www.coach.revibrations.com","www.coach-bernhard.ai"].includes(e))return xo["coach.revibrations.com"];if(xo[e])return xo[e];const n=e.replace(/^www\./,"");return xo[n]?xo[n]:xo["coach.revibrations.com"]}const MC=m.createContext(void 0);function pz({children:e}){const[t,n]=m.useState(mu()),[r,s]=m.useState(!0);return m.useEffect(()=>{(async()=>{const o=window.location.hostname;console.log("ð Fetching tenant for hostname:",o);try{const{data:l,error:c}=await ae.functions.invoke("get-tenant-config",{body:{hostname:o}});if(console.log("ð Edge function result:",{data:l,error:c}),l!=null&&l.found&&(l!=null&&l.config)){const u=l.config,d=mu(),h={id:u.tenantKey,name:u.name,domain:o,tagline:u.tagline,introText:u.introText,coachName:u.coachName,companyName:u.companyName,logo:u.logo||d.logo,logoBW:u.logoBW||d.logoBW,headerImage:u.headerImage||d.headerImage,favicon:u.favicon||d.favicon,bookingUrl:u.bookingUrl,websiteUrl:u.websiteUrl,contactEmail:u.contactEmail,metaTitle:u.metaTitle,metaDescription:u.metaDescription||d.metaDescription,colors:u.colors||d.colors};
347console.log("ð¢ Loaded tenant config:",{name:h.name,domain:o,logo:h.logo,colors:h.colors}),n(h)}else{console.log("â ï¸ No tenant config found, using fallback for:",o);const u=mu();console.log("ð¦ Fallback config:",{name:u.name,domain:u.domain}),n(u)}}catch(l){console.error("â Error fetching tenant config:",l),n(mu())}finally{s(!1)}})()},[]),B.useEffect(()=>{if(!r){const i=document.documentElement;console.log("ð¨ Applying tenant colors:",{primary:t.colors.primary,primaryForeground:t.colors.primaryForeground,accent:t.colors.accent}),i.style.setProperty("--primary",t.colors.primary),i.style.setProperty("--primary-foreground",t.colors.primaryForeground),i.style.setProperty("--accent",t.colors.accent);const o=getComputedStyle(i).getPropertyValue("--primary").trim();console.log("â
CSS variable --primary set to:",o);const l=document.querySelector('link[rel="icon"]');l&&(l.href=t.favicon),document.title=t.metaTitle,document.body.style.display="none",document.body.offsetHeight,document.body.style.display=""}},[t,r]),r?a.jsx("div",{className:"flex items-center justify-center min-h-screen",children:"Loading..."}):a.jsx(MC.Provider,{value:t,children:e})}function yh(){const e=m.useContext(MC);if(e===void 0)throw new Error("useTenant must be used within a TenantProvider");return e}function Ac(){const{user:e}=li(),[t,n]=m.useState(null),[r,s]=m.useState(!0);return m.useEffect(()=>{if(!e){n(null),s(!1);return}(async()=>{try{const{data:l,error:c}=await ae.from("user_roles").select("role").eq("user_id",e.id);if(c&&c.code!=="PGRST116"){console.error("Error fetching user role:",c),n("user");return}const u=l||[];let d="user";u.some(h=>h.role==="super_admin")?d="super_admin":u.some(h=>h.role==="admin")&&(d="admin"),console.log("Fetching role for user:",e.id),console.log("User roles found:",u),console.log("Setting user role to:",d),n(d)}catch(l){console.error("Error fetching user role:",l),n("user")}finally{s(!1)}})()},[e]),{role:t,loading:r,hasRole:o=>o==="admin"?t==="admin"||t==="super_admin":o==="super_admin"?t==="super_admin":t!==null,isSuperAdmin:t==="super_admin",isAdmin:t==="admin",isUser:t==="user"}}const be=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:J("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));be.displayName="Card";const qe=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:J("flex flex-col space-y-1.5 p-6",e),...t}));qe.displayName="CardHeader";const Ke=m.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:J("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ke.displayName="CardTitle";const sn=m.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:J("text-sm text-muted-foreground",e),...t}));sn.displayName="CardDescription";const $e=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:J("p-6 pt-0",e),...t}));$e.displayName="CardContent";const mz=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:J("flex items-center p-6 pt-0",e),...t}));mz.displayName="CardFooter";function Yf({children:e,adminOnly:t=!1}){const{user:n,loading:r}=li(),{hasRole:s,loading:i}=Ac();return r||i?a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:a.jsx(be,{className:"p-8",children:a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"}),a.jsx("p",{className:"text-muted-foreground",children:"Loading..."})]})})}):n?t&&!s("admin")?a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:a.jsx(be,{className:"p-8",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Access Denied"}),a.jsx("p",{className:"text-muted-foreground",children:"You don't have permission to access this area."})]})})}):a.jsx(a.Fragment,{children:e}):a.jsx(D4,{to:"/auth",replace:!0})}const gz=()=>{const[e,t]=m.useState(!0),[n,r]=m.useState(!1);return m.useEffect(()=>{t(navigator.onLine),r(!navigator.onLine);const s=()=>{t(!0),setTimeout(()=>r(!1),2e3)},i=()=>{t(!1),r(!0)};return window.addEventListener("online",s),window.addEventListener("offline",i),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}},[]),n?a.jsx("div",{className:`fixed top-0 left-0 right-0 z-50 px-4 py-2 text-center text-sm font-medium transition-all duration-300 ${e?"bg-green-600 text-white":"bg-amber-500 text-amber-950"}`,children:a.jsx("div",{className:"container mx-auto flex items-center justify-center gap-2",children:e?a.jsx(a.Fragment,{children:a.jsx("span",{children:"Back online"})}):a.jsxs(a.Fragment,{children:[a.jsx(pO,{className:"h-4 w-4"}),a.jsx("span",{children:"You're offline â some features may be unavailable"})]})})}):null},oy=_c("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),te=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?aI:"button";return a.jsx(o,{className:J(oy({variant:t,size:n,className:e})),ref:i,...s})});te.displayName="Button";function vz({title:e,description:t,path:n="/"}={}){const r=yh(),s=e||r.metaTitle,i=t||r.metaDescription,o=`https://${r.domain}${n}`;return a.jsxs(kk,{children:[a.jsx("title",{children:s}),a.jsx("meta",{name:"description",content:i}),a.jsx("link",{rel:"canonical",href:o}),a.jsx("meta",{property:"og:title",content:s}),a.jsx("meta",{property:"og:description",content:i}),a.jsx("meta",{property:"og:url",content:o}),a.jsx("meta",{property:"og:type",content:"website"}),a.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),a.jsx("meta",{name:"twitter:title",content:s}),a.jsx("meta",{name:"twitter:description",content:i})]})}const D0="pwa-banner-dismissed",yz=7*24*60*60*1e3,xz=()=>{const[e,t]=m.useState("desktop"),[n,r]=m.useState(null),[s,i]=m.useState(!0),[o,l]=m.useState(!0);m.useEffect(()=>{const d=navigator.userAgent.toLowerCase();/iphone|ipad|ipod/.test(d)?t("ios"):/android/.test(d)?t("android"):t("desktop");const h=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0;i(h);const p=localStorage.getItem(D0);if(p){const v=Date.now()-parseInt(p,10);l(v<yz)}else l(!1);const f=v=>{v.preventDefault(),r(v)};return window.addEventListener("beforeinstallprompt",f),()=>{window.removeEventListener("beforeinstallprompt",f)}},[]);const c=async()=>
347{if(n){await n.prompt();const{outcome:d}=await n.userChoice;d==="accepted"&&i(!0),r(null)}},u=()=>{localStorage.setItem(D0,Date.now().toString()),l(!0)};return e==="desktop"||s||o?null:a.jsx("div",{className:"bg-gradient-to-r from-orange-500 to-red-600 text-white px-4 py-3",children:a.jsxs("div",{className:"container mx-auto flex items-center justify-between gap-3",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsx(vd,{className:"h-5 w-5 flex-shrink-0"}),a.jsx("span",{className:"text-sm font-medium truncate",children:"Install for quick access"})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[n?a.jsx(te,{size:"sm",variant:"secondary",onClick:c,className:"bg-white text-orange-600 hover:bg-white/90",children:"Install"}):a.jsx(Fn,{to:"/install",children:a.jsx(te,{size:"sm",variant:"secondary",className:"bg-white text-orange-600 hover:bg-white/90",children:"Install"})}),a.jsx("button",{onClick:u,className:"p-1.5 hover:bg-white/20 rounded-full transition-colors","aria-label":"Dismiss install banner",children:a.jsx(rc,{className:"h-4 w-4"})})]})]})})},wz=()=>{const{user:e}=li(),t=yh(),n=ro(),r=()=>{n(e?"/coach":"/auth")};return a.jsxs(a.Fragment,{children:[a.jsx(vz,{}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("header",{className:"w-full",children:a.jsx("div",{className:"w-full",children:a.jsx("img",{src:t.headerImage,alt:`${t.name} - AI-powered coaching for personal and professional development`,className:"w-full h-auto object-contain",width:"1200",height:"400"})})}),a.jsx(xz,{}),a.jsxs("main",{className:"container mx-auto px-4 py-8 md:py-12 lg:py-16 max-w-4xl",children:[a.jsx("section",{className:"text-center mb-8 md:mb-12",children:a.jsxs("article",{className:"space-y-6",children:[a.jsxs("h1",{className:"text-2xl md:text-3xl lg:text-4xl font-bold text-foreground leading-tight",children:["Welcome to ",t.name]}),a.jsxs("div",{className:"prose prose-lg md:prose-xl max-w-none text-muted-foreground leading-relaxed",children:[a.jsx("p",{className:"mb-4",children:t.tagline}),t.introText?a.jsx(a.Fragment,{children:t.introText.split(` 348 349`).map((s,i)=>a.jsxs("p",{className:"mb-4",children:[s,s.includes("door is always open:")&&a.jsxs(a.Fragment,{children:[" ",a.jsxs("a",{href:t.bookingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1","aria-label":`Book a session with ${t.coachName}`,children:[t.bookingUrl.replace("https://",""),a.jsx(Ho,{className:"h-4 w-4"})]})]})]},i))}):a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"mb-4",children:["This isn't a human coach (yet), but it's pretty close. ",t.name," brings ",t.coachName,"' coaching style straight into your hands. It's here to challenge your thinking, spark reflection, and help you navigate what matters most right now."]}),a.jsxs("p",{className:"mb-4",children:["And when you're ready to take it deeper with a real conversation, ",t.coachName,"'s door is always open:"," ",a.jsxs("a",{href:t.bookingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1","aria-label":`Book a session with ${t.coachName}`,children:[t.bookingUrl.replace("https://",""),a.jsx(Ho,{className:"h-4 w-4"})]})]})]}),a.jsxs("p",{className:"font-medium text-foreground",children:["Let's get into it!",a.jsx("br",{})]})]})]})}),a.jsx("section",{className:"text-center",children:a.jsxs("div",{className:"space-y-4",children:[a.jsx(te,{onClick:r,size:"lg",className:"px-8 py-4 text-lg font-semibold h-auto bg-gradient-to-r from-orange-500 to-red-600 hover:from-orange-600 hover:to-red-700 text-white shadow-lg hover:shadow-xl transition-all duration-300","aria-label":"Start your AI coaching session now",children:"Start Your Coaching Session"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e?"Continue your journey with AI coaching":"Sign in to begin your coaching experience"})]})})]}),a.jsx("footer",{className:"border-t bg-muted/30 py-6 mt-12",children:a.jsx("div",{className:"container mx-auto px-4",children:a.jsxs("div",{className:"text-sm text-muted-foreground space-y-4",children:[a.jsxs("div",{className:"flex justify-center gap-6 flex-wrap",children:[a.jsx(Fn,{to:"/how-it-works",className:"hover:text-primary underline",children:"How It Works"}),a.jsx(Fn,{to:"/faq",className:"hover:text-primary underline",children:"FAQ"}),a.jsxs(Fn,{to:"/install",className:"hover:text-primary underline inline-flex items-center gap-1",children:[a.jsx(vd,{className:"h-3 w-3"}),"Install App"]}),a.jsx(Fn,{to:"/legal",className:"hover:text-primary underline",children:"Legal"})]}),a.jsxs("div",{className:"text-center",children:[a.jsxs("p",{children:["© 2026 ",t.companyName,". Powered by AI coaching technology."]}),a.jsxs("p",{className:"mt-2",children:["For human coaching sessions, visit"," ",a.jsx("a",{href:t.bookingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline",children:t.coachName})]})]})]})})})]})]})},Tr=m.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:J("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
349ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Tr.displayName="Textarea";var bz=m.createContext(void 0);function io(e){const t=m.useContext(bz);return e||t||"ltr"}function ng(e,[t,n]){return Math.min(n,Math.max(t,e))}function Sz(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var ay="ScrollArea",[LC,Uq]=mt(ay),[kz,Wn]=LC(ay),FC=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[l,c]=m.useState(null),[u,d]=m.useState(null),[h,p]=m.useState(null),[f,v]=m.useState(null),[y,b]=m.useState(null),[g,x]=m.useState(0),[w,S]=m.useState(0),[j,k]=m.useState(!1),[E,A]=m.useState(!1),I=pe(t,D=>c(D)),_=io(s);return a.jsx(kz,{scope:n,type:r,dir:_,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:d,content:h,onContentChange:p,scrollbarX:f,onScrollbarXChange:v,scrollbarXEnabled:j,onScrollbarXEnabledChange:k,scrollbarY:y,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:A,onCornerWidthChange:x,onCornerHeightChange:S,children:a.jsx(ee.div,{dir:_,...o,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});FC.displayName=ay;var $C="ScrollAreaViewport",zC=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=e,o=Wn($C,n),l=m.useRef(null),c=pe(t,l,o.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),a.jsx(ee.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});zC.displayName=$C;var Lr="ScrollAreaScrollbar",ly=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Wn(Lr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,l=e.orientation==="horizontal";return m.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),s.type==="hover"?a.jsx(jz,{...r,ref:t,forceMount:n}):s.type==="scroll"?a.jsx(Cz,{...r,ref:t,forceMount:n}):s.type==="auto"?a.jsx(BC,{...r,ref:t,forceMount:n}):s.type==="always"?a.jsx(cy,{...r,ref:t}):null});ly.displayName=Lr;var jz=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Wn(Lr,e.__scopeScrollArea),[i,o]=m.useState(!1);return m.useEffect(()=>{const l=s.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),a.jsx(yt,{present:n||i,children:a.jsx(BC,{"data-state":i?"visible":"hidden",...r,ref:t})})}),Cz=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Wn(Lr,e.__scopeScrollArea),i=e.orientation==="horizontal",o=wh(()=>c("SCROLL_END"),100),[l,c]=Sz("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return m.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,s.scrollHideDelay,c]),m.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let h=u[d];const p=()=>{const f=u[d];h!==f&&(c("SCROLL"),o()),h=f};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[s.viewport,i,c,o]),a.jsx(yt,{present:n||l!=="hidden",children:a.jsx(cy,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:K(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:K(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),BC=m.forwardRef((e,t)=>
vendor: 12,325 bytes, line 349
349{const n=Wn(Lr,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=m.useState(!1),l=e.orientation==="horizontal",c=wh(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?u:d)}},10);return Pa(n.viewport,c),Pa(n.content,c),a.jsx(yt,{present:r||i,children:a.jsx(cy,{"data-state":i?"visible":"hidden",...s,ref:t})})}),cy=m.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=Wn(Lr,e.__scopeScrollArea),i=m.useRef(null),o=m.useRef(0),[l,c]=m.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=qC(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:p=>o.current=p};function h(p,f){return Az(p,o.current,l,f)}return n==="horizontal"?a.jsx(_z,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const p=s.viewport.scrollLeft,f=M0(p,l,s.dir);i.current.style.transform=`translate3d(${f}px, 0, 0)`}},onWheelScroll:p=>{s.viewport&&(s.viewport.scrollLeft=p)},onDragScroll:p=>{s.viewport&&(s.viewport.scrollLeft=h(p,s.dir))}}):n==="vertical"?a.jsx(Ez,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const p=s.viewport.scrollTop,f=M0(p,l);i.current.style.transform=`translate3d(0, ${f}px, 0)`}},onWheelScroll:p=>{s.viewport&&(s.viewport.scrollTop=p)},onDragScroll:p=>{s.viewport&&(s.viewport.scrollTop=h(p))}}):null}),_z=m.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Wn(Lr,e.__scopeScrollArea),[o,l]=m.useState(),c=m.useRef(null),u=pe(t,c,i.onScrollbarXChange);return m.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(HC,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(i.viewport){const p=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),GC(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Pd(o.paddingLeft),paddingEnd:Pd(o.paddingRight)}})}})}),Ez=m.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=Wn(Lr,e.__scopeScrollArea),[o,l]=m.useState(),c=m.useRef(null),u=pe(t,c,i.onScrollbarYChange);return m.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),a.jsx(HC,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xh(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(i.viewport){const p=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),GC(p,h)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Pd(o.paddingTop),paddingEnd:Pd(o.paddingBottom)}})}})}),[Nz,UC]=LC(Lr),HC=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:h,...p}=e,f=Wn(Lr,n),[v,y]=m.useState(null),b=pe(t,I=>y(I)),g=m.useRef(null),x=m.useRef(""),w=f.viewport,S=r.content-r.viewport,j=it(d),k=it(c),E=wh(h,10);function A(I){if(g.current){const _=I.clientX-g.current.left,D=I.clientY-g.current.top;u({x:_,y:D})}}return m.useEffect(()=>{const I=_=>{const D=_.target;(v==null?void 0:v.contains(D))&&j(_,S)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[w,v,S,j]),m.useEffect(k,[r,k]),Pa(v,E),Pa(f.content,E),a.jsx(Nz,{scope:n,scrollbar:v,hasThumb:s,onThumbChange:it(i),onThumbPointerUp:it(o),onThumbPositionChange:k,onThumbPointerDown:it(l),children:a.jsx(ee.div,{...p,ref:b,style:{position:"absolute",...p.style},onPointerDown:K(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),g.current=v.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),A(I))}),onPointerMove:K(e.onPointerMove,A),onPointerUp:K(e.onPointerUp,I=>{const _=I.target;_.hasPointerCapture(I.pointerId)&&_.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,f.viewport&&(f.viewport.style.scrollBehavior=""),g.current=null})})})}),Td="ScrollAreaThumb",WC=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=UC(Td,e.__scopeScrollArea);return a.jsx(yt,{present:n||s.hasThumb,children:a.jsx(Tz,{ref:t,...r})})}),Tz=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=Wn(Td,n),o=UC(Td,n),{onThumbPositionChange:l}=o,c=pe(t,h=>o.onThumbChange(h)),u=m.useRef(void 0),d=wh(()=>{u.current&&(u.current(),u.current=void 0)},100);return m.useEffect(()=>{const h=i.viewport;if(h){const p=()=>{if(d(),!u.current){const f=Rz(h,l);u.current=f,l()}};return l(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,d,l]),a.jsx(ee.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:K(e.onPointerDownCapture,h=>{const f=h.target.getBoundingClientRect(),v=h.clientX-f.left,y=h.clientY-f.top;o.onThumbPointerDown({x:v,y})}),onPointerUp:K(e.onPointerUp,o.onThumbPointerUp)})});WC.displayName=Td;var uy="ScrollAreaCorner",VC=m.forwardRef((e,t)=>{const n=Wn(uy,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?a.jsx(Pz,{...e,ref:t}):null});VC.displayName=uy;var Pz=m.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=Wn(uy,n),[i,o]=m.useState(0),[l,c]=m.useState(0),u=!!(i&&l);return Pa(s.scrollbarX,()=>{var h;const d=((h=s.scrollbarX)==null?void 0:h.offsetHeight)||0;s.onCornerHeightChange(d),c(d)}),Pa(s.scrollbarY,()=>{var h;const d=((h=s.scrollbarY)==null?void 0:h.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?a.jsx(ee.div,{...r,ref:t,style:{width:i,height:l,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Pd(e){return e?parseInt(e,10):0}function qC(e,t){const n=e/t;return isNaN(n)?0:n}function xh(e){const t=qC(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Az(e,t,n,r="ltr"){const s=xh(n),i=s/2,o=t||i,l=s-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return KC([c,u],h)(e)}function M0(e,t,n="ltr"){const r=xh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,l=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=ng(e,c);return KC([0,o],[0,l])(u)}function KC(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function GC(e,t){return e>0&&e<t}var Rz=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,l=n.top!==i.top;(o||l)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function wh(e,t){const n=it(e),r=m.useRef(0);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),m.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Pa(e,t){const n=it(t);pt(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var YC=FC,Iz=zC,Oz=VC;const Rc=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(YC,{ref:r,className:J("relative overflow-hidden",e),...n,children:[a.jsx(Iz,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(QC,{}),a.jsx(Oz,{})]}));Rc.displayName=YC.displayName;const QC=m.forwardRef(({className:e,orientation:t="vertical",...n},r)=>a.jsx(ly,{ref:r,orientation:t,className:J("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:a.jsx(WC,{className:"relative flex-1 rounded-full bg-border"})}));QC.displayName=ly.displayName;var Qf="focusScope.autoFocusOnMount",Xf="focusScope.autoFocusOnUnmount",L0={bubbles:!1,cancelable:!0},Dz="FocusScope",bh=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[l,c]=m.useState(null),u=it(s),d=it(i),h=m.useRef(null),p=pe(t,y=>c(y)),f=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let y=function(w){if(f.paused||!l)return;const S=w.target;l.contains(S)?h.current=S:bs(h.current,{select:!0})},b=function(w){if(f.paused||!l)return;const S=w.relatedTarget;S!==null&&(l.contains(S)||bs(h.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const j of w)j.removedNodes.length>0&&bs(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const x=new MutationObserver(g);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),x.disconnect()}}},[r,l,f.paused]),m.useEffect(()=>{if(l){$0.add(f);const y=document.activeElement;if(!l.contains(y)){const g=new CustomEvent(Qf,L0);l.addEventListener(Qf,u),l.dispatchEvent(g),g.defaultPrevented||(Mz(Bz(XC(l)),{select:!0}),document.activeElement===y&&bs(l))}return()=>{l.removeEventListener(Qf,u),setTimeout(()=>{const g=new CustomEvent(Xf,L0);l.addEventListener(Xf,d),l.dispatchEvent(g),g.defaultPrevented||bs(y??document.body,{select:!0}),l.removeEventListener(Xf,d),$0.remove(f)},0)}}},[l,u,d,f]);const v=m.useCallback(y=>{if(!n&&!r||f.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(b&&g){const x=y.currentTarget,[w,S]=Lz(x);w&&S?!y.shiftKey&&g===S?(y.preventDefault(),n&&bs(w,{select:!0})):y.shiftKey&&g===w&&(y.preventDefault(),n&&bs(S,{select:!0})):g===x&&y.preventDefault()}},[n,r,f.paused]);return a.jsx(ee.div,{tabIndex:-1,...o,ref:p,onKeyDown:v})});bh.displayName=Dz;function Mz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bs(r,{select:t}),document.activeElement!==n)return}function Lz(e){const t=XC(e),n=F0(t,e),r=F0(t.reverse(),e);return[n,r]}function XC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F0(e,t){for(const n of e)if(!Fz(n,{upTo:t}))return n}function Fz(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $z(e){return e instanceof HTMLInputElement&&"select"in e}function bs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$z(e)&&t&&e.select()}}var $0=zz();function zz(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=z0(e,t),e.unshift(t)},remove(t){var n;e=z0(e,t),(n=e[0])==null||n.resume()}}}function z0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Bz(e){return e.filter(t=>t.tagName!=="A")}var Jf=0;function dy(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??B0()),document.body.insertAdjacentElement("beforeend",e[1]??B0()),Jf++,()=>{Jf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jf--}},[])}function B0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 349-364
349style.position="fixed",e.style.pointerEvents="none",e}var Er=function(){return Er=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Er.apply(this,arguments)};function JC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function Uz(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Hu="right-scroll-bar-position",Wu="width-before-scroll-bar",Hz="with-scroll-bars-hidden",Wz="--removed-body-scroll-bar-size";function Zf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Vz(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var qz=typeof window<"u"?m.useLayoutEffect:m.useEffect,U0=new WeakMap;function Kz(e,t){var n=Vz(null,function(r){return e.forEach(function(s){return Zf(s,r)})});return qz(function(){var r=U0.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(l){i.has(l)||Zf(l,null)}),i.forEach(function(l){s.has(l)||Zf(l,o)})}U0.set(n,e)},[e]),n}function Gz(e){return e}function Yz(e,t){t===void 0&&(t=Gz);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function Qz(e){e===void 0&&(e={});var t=Yz(null);return t.options=Er({async:!0,ssr:!1},e),t}var ZC=function(e){var t=e.sideCar,n=JC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,Er({},n))};ZC.isSideCarExport=!0;function Xz(e,t){return e.useMedium(t),ZC}var e_=Qz(),ep=function(){},Sh=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:ep,onWheelCapture:ep,onTouchMoveCapture:ep}),s=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,p=e.sideCar,f=e.noRelative,v=e.noIsolation,y=e.inert,b=e.allowPinchZoom,g=e.as,x=g===void 0?"div":g,w=e.gapMode,S=JC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=p,k=Kz([n,t]),E=Er(Er({},S),s);return m.createElement(m.Fragment,null,d&&m.createElement(j,{sideCar:e_,removeScrollBar:u,shards:h,noRelative:f,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:w}),o?m.cloneElement(m.Children.only(l),Er(Er({},E),{ref:k})):m.createElement(x,Er({},E,{className:c,ref:k}),l))});Sh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sh.classNames={fullWidth:Wu,zeroRight:Hu};var Jz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Zz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jz();return t&&e.setAttribute("nonce",t),e}function e3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var n3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zz())&&(e3(t,n),t3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},r3=function(){var e=n3();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},t_=function(){var e=r3(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},s3={left:0,top:0,right:0,gap:0},tp=function(e){return parseInt(e||"",10)||0},i3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[tp(n),tp(r),tp(s)]},o3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s3;var t=i3(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},a3=t_(),ta="data-scroll-locked",l3=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),` 350 .`.concat(Hz,` { 351 overflow: hidden `).concat(r,`; 352 padding-right: `).concat(l,"px ").concat(r,`; 353 } 354 body[`).concat(ta,`] { 355 overflow: hidden `).concat(r,`; 356 overscroll-behavior: contain; 357 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 358 padding-left: `.concat(s,`px; 359 padding-top: `).concat(i,`px; 360 padding-right: `).concat(o,`px; 361 margin-left:0; 362 margin-top:0; 363 margin-right: `).concat(l,"px ").concat(r,`; 364 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
364")].filter(Boolean).join(""),` 365 } 366 367 .`).concat(Hu,` { 368 right: `).concat(l,"px ").concat(r,`; 369 } 370 371 .`).concat(Wu,` { 372 margin-right: `).concat(l,"px ").concat(r,`; 373 } 374 375 .`).concat(Hu," .").concat(Hu,` { 376 right: 0 `).concat(r,`; 377 } 378 379 .`).concat(Wu," .").concat(Wu,` { 380 margin-right: 0 `).concat(r,`; 381 } 382 383 body[`).concat(ta,`] { 384 `).concat(Wz,": ").concat(l,`px; 385 } 386`)},H0=function(){var e=parseInt(document.body.getAttribute(ta)||"0",10);return isFinite(e)?e:0},c3=function(){m.useEffect(function(){return document.body.setAttribute(ta,(H0()+1).toString()),function(){var e=H0()-1;e<=0?document.body.removeAttribute(ta):document.body.setAttribute(ta,e.toString())}},[])},u3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;c3();var i=m.useMemo(function(){return o3(s)},[s]);return m.createElement(a3,{styles:l3(i,!t,s,n?"":"!important")})},rg=!1;if(typeof window<"u")try{var gu=Object.defineProperty({},"passive",{get:function(){return rg=!0,!0}});window.addEventListener("test",gu,gu),window.removeEventListener("test",gu,gu)}catch{rg=!1}var wo=rg?{passive:!1}:!1,d3=function(e){return e.tagName==="TEXTAREA"},n_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!d3(e)&&n[t]==="visible")},h3=function(e){return n_(e,"overflowY")},f3=function(e){return n_(e,"overflowX")},W0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=r_(e,r);if(s){var i=s_(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},p3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},m3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},r_=function(e,t){return e==="v"?h3(t):f3(t)},s_=function(e,t){return e==="v"?p3(t):m3(t)},g3=function(e,t){return e==="h"&&t==="rtl"?-1:1},v3=function(e,t,n,r,s){var i=g3(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,p=0;do{if(!l)break;var f=s_(e,l),v=f[0],y=f[1],b=f[2],g=y-b-i*v;(v||g)&&r_(e,l)&&(h+=g,p+=v);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(p)<1||!s))&&(u=!0),u},vu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},V0=function(e){return[e.deltaX,e.deltaY]},q0=function(e){return e&&"current"in e?e.current:e},y3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},x3=function(e){return` 387 .block-interactivity-`.concat(e,` {pointer-events: none;} 388 .allow-interactivity-`).concat(e,` {pointer-events: all;} 389`)},w3=0,bo=[];function b3(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(w3++)[0],i=m.useState(t_)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Uz([e.lockRef.current],(e.shards||[]).map(q0),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var g=vu(y),x=n.current,w="deltaX"in y?y.deltaX:x[0]-g[0],S="deltaY"in y?y.deltaY:x[1]-g[1],j,k=y.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in y&&E==="h"&&k.type==="range")return!1;var A=W0(E,k);if(!A)return!0;if(A?j=E:(j=E==="v"?"h":"v",A=W0(E,k)),!A)return!1;if(!r.current&&"changedTouches"in y&&(w||S)&&(r.current=j),!j)return!0;var I=r.current||j;return v3(I,b,y,I==="h"?w:S,!0)},[]),c=m.useCallback(function(y){var b=y;if(!(!bo.length||bo[bo.length-1]!==i)){var g="deltaY"in b?V0(b):vu(b),x=t.current.filter(function(j){return j.name===b.type&&(j.target===b.target||b.target===j.shadowParent)&&y3(j.delta,g)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}
vendor: 4,332 bytes, line 389
389if(!x){var w=(o.current.shards||[]).map(q0).filter(Boolean).filter(function(j){return j.contains(b.target)}),S=w.length>0?l(b,w[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=m.useCallback(function(y,b,g,x){var w={name:y,delta:b,target:g,should:x,shadowParent:S3(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=m.useCallback(function(y){n.current=vu(y),r.current=void 0},[]),h=m.useCallback(function(y){u(y.type,V0(y),y.target,l(y,e.lockRef.current))},[]),p=m.useCallback(function(y){u(y.type,vu(y),y.target,l(y,e.lockRef.current))},[]);m.useEffect(function(){return bo.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,wo),document.addEventListener("touchmove",c,wo),document.addEventListener("touchstart",d,wo),function(){bo=bo.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,wo),document.removeEventListener("touchmove",c,wo),document.removeEventListener("touchstart",d,wo)}},[]);var f=e.removeScrollBar,v=e.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:x3(s)}):null,f?m.createElement(u3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function S3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const k3=Xz(e_,b3);var kh=m.forwardRef(function(e,t){return m.createElement(Sh,Er({},e,{ref:t,sideCar:k3}))});kh.classNames=Sh.classNames;var j3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},So=new WeakMap,yu=new WeakMap,xu={},np=0,i_=function(e){return e&&(e.host||i_(e.parentNode))},C3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=i_(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_3=function(e,t,n,r){var s=C3(t,Array.isArray(e)?e:[e]);xu[n]||(xu[n]=new WeakMap);var i=xu[n],o=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(l.has(p))d(p);else try{var f=p.getAttribute(r),v=f!==null&&f!=="false",y=(So.get(p)||0)+1,b=(i.get(p)||0)+1;So.set(p,y),i.set(p,b),o.push(p),y===1&&v&&yu.set(p,!0),b===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return d(t),l.clear(),np++,function(){o.forEach(function(h){var p=So.get(h)-1,f=i.get(h)-1;So.set(h,p),i.set(h,f),p||(yu.has(h)||h.removeAttribute(r),yu.delete(h)),f||h.removeAttribute(n)}),np--,np||(So=new WeakMap,So=new WeakMap,yu=new WeakMap,xu={})}},hy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=j3(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),_3(r,s,n,"aria-hidden")):function(){return null}},jh="Dialog",[o_,a_]=mt(jh),[E3,vr]=o_(jh),l_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,l=m.useRef(null),c=m.useRef(null),[u,d]=En({prop:r,defaultProp:s??!1,onChange:i,caller:jh});return a.jsx(E3,{scope:t,triggerRef:l,contentRef:c,contentId:zn(),titleId:zn(),descriptionId:zn(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};l_.displayName=jh;var c_="DialogTrigger",u_=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vr(c_,n),i=pe(t,s.triggerRef);return a.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":my(s.open),...r,ref:i,onClick:K(e.onClick,s.onOpenToggle)})});u_.displayName=c_;var fy="DialogPortal",[N3,d_]=o_(fy,{forceMount:void 0}),h_=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=vr(fy,t);return a.jsx(N3,{scope:t,forceMount:n,children:m.Children.map(r,o=>a.jsx(yt,{present:n||i.open,children:a.jsx(jc,{asChild:!0,container:s,children:o})}))})};h_.displayName=fy;var Ad="DialogOverlay",f_=m.forwardRef((e,t)=>{const n=d_(Ad,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=vr(Ad,e.__scopeDialog);return i.modal?a.jsx(yt,{present:r||i.open,children:a.jsx(P3,{...s,ref:t})}):null});f_.displayName=Ad;var T3=Hi("DialogOverlay.RemoveScroll"),P3=m.forwardRef((e,t)=>
vendor: 4,634 bytes, lines 389-393
389{const{__scopeDialog:n,...r}=e,s=vr(Ad,n);return a.jsx(kh,{as:T3,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(ee.div,{"data-state":my(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ki="DialogContent",p_=m.forwardRef((e,t)=>{const n=d_(Ki,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=vr(Ki,e.__scopeDialog);return a.jsx(yt,{present:r||i.open,children:i.modal?a.jsx(A3,{...s,ref:t}):a.jsx(R3,{...s,ref:t})})});p_.displayName=Ki;var A3=m.forwardRef((e,t)=>{const n=vr(Ki,e.__scopeDialog),r=m.useRef(null),s=pe(t,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return hy(i)},[]),a.jsx(m_,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:K(e.onFocusOutside,i=>i.preventDefault())})}),R3=m.forwardRef((e,t)=>{const n=vr(Ki,e.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return a.jsx(m_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),m_=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,l=vr(Ki,n),c=m.useRef(null),u=pe(t,c);return dy(),a.jsxs(a.Fragment,{children:[a.jsx(bh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:a.jsx(Da,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":my(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(O3,{titleId:l.titleId}),a.jsx(M3,{contentRef:c,descriptionId:l.descriptionId})]})]})}),py="DialogTitle",g_=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vr(py,n);return a.jsx(ee.h2,{id:s.titleId,...r,ref:t})});g_.displayName=py;var v_="DialogDescription",y_=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vr(v_,n);return a.jsx(ee.p,{id:s.descriptionId,...r,ref:t})});y_.displayName=v_;var x_="DialogClose",w_=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vr(x_,n);return a.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>s.onOpenChange(!1))})});w_.displayName=x_;function my(e){return e?"open":"closed"}var b_="DialogTitleWarning",[I3,S_]=iI(b_,{contentName:Ki,titleName:py,docsSlug:"dialog"}),O3=({titleId:e})=>{const t=S_(b_),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 390 391If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 392 393For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},D3="DialogDescriptionWarning",M3=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${S_(D3).contentName}}.`;return m.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},k_=l_,j_=u_,C_=h_,gy=f_,vy=p_,yy=g_,xy=y_,wy=w_;const bn=k_,dr=j_,L3=C_,__=m.forwardRef(({className:e,...t},n)=>a.jsx(gy,{ref:n,className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));__.displayName=gy.displayName;const un=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(L3,{children:[a.jsx(__,{}),a.jsxs(vy,{ref:r,className:J("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
393nded-lg",e),...n,children:[t,a.jsxs(wy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[a.jsx(rc,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));un.displayName=vy.displayName;const Sn=({className:e,...t})=>a.jsx("div",{className:J("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Sn.displayName="DialogHeader";const kn=m.forwardRef(({className:e,...t},n)=>a.jsx(yy,{ref:n,className:J("text-lg font-semibold leading-none tracking-tight",e),...t}));kn.displayName=yy.displayName;const jn=m.forwardRef(({className:e,...t},n)=>a.jsx(xy,{ref:n,className:J("text-sm text-muted-foreground",e),...t}));jn.displayName=xy.displayName;var E_="AlertDialog",[F3,Hq]=mt(E_,[a_]),cs=a_(),N_=e=>{const{__scopeAlertDialog:t,...n}=e,r=cs(t);return a.jsx(k_,{...r,...n,modal:!0})};N_.displayName=E_;var $3="AlertDialogTrigger",T_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=cs(n);return a.jsx(j_,{...s,...r,ref:t})});T_.displayName=$3;var z3="AlertDialogPortal",P_=e=>{const{__scopeAlertDialog:t,...n}=e,r=cs(t);return a.jsx(C_,{...r,...n})};P_.displayName=z3;var B3="AlertDialogOverlay",A_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=cs(n);return a.jsx(gy,{...s,...r,ref:t})});A_.displayName=B3;var na="AlertDialogContent",[U3,H3]=F3(na),W3=Ck("AlertDialogContent"),R_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=cs(n),o=m.useRef(null),l=pe(t,o),c=m.useRef(null);return a.jsx(I3,{contentName:na,titleName:I_,docsSlug:"alert-dialog",children:a.jsx(U3,{scope:n,cancelRef:c,children:a.jsxs(vy,{role:"alertdialog",...i,...s,ref:l,onOpenAutoFocus:K(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[a.jsx(W3,{children:r}),a.jsx(q3,{contentRef:o})]})})})});R_.displayName=na;var I_="AlertDialogTitle",O_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=cs(n);return a.jsx(yy,{...s,...r,ref:t})});O_.displayName=I_;var D_="AlertDialogDescription",M_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=cs(n);return a.jsx(xy,{...s,...r,ref:t})});M_.displayName=D_;var V3="AlertDialogAction",L_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=cs(n);return a.jsx(wy,{...s,...r,ref:t})});L_.displayName=V3;var F_="AlertDialogCancel",$_=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=H3(F_,n),i=cs(n),o=pe(t,s);return a.jsx(wy,{...i,...r,ref:o})});$_.displayName=F_;var q3=({contentRef:e})=>{const t=`\`${na}\` requires a description for the component to be accessible for screen reader users. 394 395You can add a description to the \`${na}\` by passing a \`${D_}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 396 397Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${na}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 398 399For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},K3=N_,G3=T_,Y3=P_,z_=A_,B_=R_,U_=L_,H_=$_,W_=O_,V_=M_;const by=K3,q_=G3,Q3=Y3,K_=m.forwardRef(({className:e,...t},n)=>a.jsx(z_,{className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));K_.displayName=z_.displayName;const Ch=m.forwardRef(({className:e,...t},n)=>a.jsxs(Q3,{children:[a.jsx(K_,{}),a.jsx(B_,{ref:n,className:J("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
399nded-lg",e),...t})]}));Ch.displayName=B_.displayName;const _h=({className:e,...t})=>a.jsx("div",{className:J("flex flex-col space-y-2 text-center sm:text-left",e),...t});_h.displayName="AlertDialogHeader";const Eh=({className:e,...t})=>a.jsx("div",{className:J("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Eh.displayName="AlertDialogFooter";const Nh=m.forwardRef(({className:e,...t},n)=>a.jsx(W_,{ref:n,className:J("text-lg font-semibold",e),...t}));Nh.displayName=W_.displayName;const Th=m.forwardRef(({className:e,...t},n)=>a.jsx(V_,{ref:n,className:J("text-sm text-muted-foreground",e),...t}));Th.displayName=V_.displayName;const Ph=m.forwardRef(({className:e,...t},n)=>a.jsx(U_,{ref:n,className:J(oy(),e),...t}));Ph.displayName=U_.displayName;const Ah=m.forwardRef(({className:e,...t},n)=>a.jsx(H_,{ref:n,className:J(oy({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ah.displayName=H_.displayName;var rp="rovingFocusGroup.onEntryFocus",X3={bubbles:!1,cancelable:!0},Ic="RovingFocusGroup",[sg,G_,J3]=kc(Ic),[Z3,Va]=mt(Ic,[J3]),[e5,t5]=Z3(Ic),Y_=m.forwardRef((e,t)=>a.jsx(sg.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(sg.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(n5,{...e,ref:t})})}));Y_.displayName=Ic;var n5=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,p=m.useRef(null),f=pe(t,p),v=io(i),[y,b]=En({prop:o,defaultProp:l??null,onChange:c,caller:Ic}),[g,x]=m.useState(!1),w=it(u),S=G_(n),j=m.useRef(!1),[k,E]=m.useState(0);return m.useEffect(()=>{const A=p.current;if(A)return A.addEventListener(rp,w),()=>A.removeEventListener(rp,w)},[w]),a.jsx(e5,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:y,onItemFocus:m.useCallback(A=>b(A),[b]),onItemShiftTab:m.useCallback(()=>x(!0),[]),onFocusableItemAdd:m.useCallback(()=>E(A=>A+1),[]),onFocusableItemRemove:m.useCallback(()=>E(A=>A-1),[]),children:a.jsx(ee.div,{tabIndex:g||k===0?-1:0,"data-orientation":r,...h,ref:f,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{j.current=!0}),onFocus:K(e.onFocus,A=>{const I=!j.current;if(A.target===A.currentTarget&&I&&!g){const _=new CustomEvent(rp,X3);if(A.currentTarget.dispatchEvent(_),!_.defaultPrevented){const D=S().filter(z=>z.focusable),N=D.find(z=>z.active),F=D.find(z=>z.id===y),$=[N,F,...D].filter(Boolean).map(z=>z.ref.current);J_($,d)}}j.current=!1}),onBlur:K(e.onBlur,()=>x(!1))})})}),Q_="RovingFocusGroupItem",X_=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...l}=e,c=zn(),u=i||c,d=t5(Q_,n),h=d.currentTabStopId===u,p=G_(n),{onFocusableItemAdd:f,onFocusableItemRemove:v,currentTabStopId:y}=d;return m.useEffect(()=>{if(r)return f(),()=>v()}
vendor: 15,459 bytes, line 399
399,[r,f,v]),a.jsx(sg.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:a.jsx(ee.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:K(e.onMouseDown,b=>{r?d.onItemFocus(u):b.preventDefault()}),onFocus:K(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:K(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const g=i5(b,d.orientation,d.dir);if(g!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const S=w.indexOf(b.currentTarget);w=d.loop?o5(w,S+1):w.slice(S+1)}setTimeout(()=>J_(w))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:y!=null}):o})})});X_.displayName=Q_;var r5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function s5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function i5(e,t,n){const r=s5(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return r5[r]}function J_(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function o5(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Sy=Y_,ky=X_,ig=["Enter"," "],a5=["ArrowDown","PageUp","Home"],Z_=["ArrowUp","PageDown","End"],l5=[...a5,...Z_],c5={ltr:[...ig,"ArrowRight"],rtl:[...ig,"ArrowLeft"]},u5={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Oc="Menu",[uc,d5,h5]=kc(Oc),[oo,eE]=mt(Oc,[h5,$a,Va]),Rh=$a(),tE=Va(),[f5,ao]=oo(Oc),[p5,Dc]=oo(Oc),nE=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=e,l=Rh(t),[c,u]=m.useState(null),d=m.useRef(!1),h=it(i),p=io(s);return m.useEffect(()=>{const f=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",f,{capture:!0}),()=>{document.removeEventListener("keydown",f,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),a.jsx(Dj,{...l,children:a.jsx(f5,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:a.jsx(p5,{scope:t,onClose:m.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})};nE.displayName=Oc;var m5="MenuAnchor",jy=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Rh(n);return a.jsx(Uv,{...s,...r,ref:t})});jy.displayName=m5;var Cy="MenuPortal",[g5,rE]=oo(Cy,{forceMount:void 0}),sE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,i=ao(Cy,t);return a.jsx(g5,{scope:t,forceMount:n,children:a.jsx(yt,{present:n||i.open,children:a.jsx(jc,{asChild:!0,container:s,children:r})})})};sE.displayName=Cy;var Bn="MenuContent",[v5,_y]=oo(Bn),iE=m.forwardRef((e,t)=>{const n=rE(Bn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=ao(Bn,e.__scopeMenu),o=Dc(Bn,e.__scopeMenu);return a.jsx(uc.Provider,{scope:e.__scopeMenu,children:a.jsx(yt,{present:r||i.open,children:a.jsx(uc.Slot,{scope:e.__scopeMenu,children:o.modal?a.jsx(y5,{...s,ref:t}):a.jsx(x5,{...s,ref:t})})})})}),y5=m.forwardRef((e,t)=>{const n=ao(Bn,e.__scopeMenu),r=m.useRef(null),s=pe(t,r);return m.useEffect(()=>{const i=r.current;if(i)return hy(i)},[]),a.jsx(Ey,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),x5=m.forwardRef((e,t)=>{const n=ao(Bn,e.__scopeMenu);return a.jsx(Ey,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),w5=Hi("MenuContent.ScrollLock"),Ey=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,disableOutsideScroll:v,...y}=e,b=ao(Bn,n),g=Dc(Bn,n),x=Rh(n),w=tE(n),S=d5(n),[j,k]=m.useState(null),E=m.useRef(null),A=pe(t,E,b.onContentChange),I=m.useRef(0),_=m.useRef(""),D=m.useRef(0),N=m.useRef(null),F=m.useRef("right"),M=m.useRef(0),$=v?kh:m.Fragment,z=v?{as:w5,allowPinchZoom:!0}:void 0,Y=R=>{var H,W;const C=_.current+R,X=S().filter(ie=>!ie.disabled),Q=document.activeElement,T=(H=X.find(ie=>ie.ref.current===Q))==null?void 0:H.textValue,U=X.map(ie=>ie.textValue),ne=R5(U,C,T),se=(W=X.find(ie=>ie.textValue===ne))==null?void 0:W.ref.current;(function ie(oe){_.current=oe,window.clearTimeout(I.current),oe!==""&&(I.current=window.setTimeout(()=>ie(""),1e3))})(C),se&&setTimeout(()=>se.focus())};m.useEffect(()=>()=>window.clearTimeout(I.current),[]),dy();const O=m.useCallback(R=>{var X,Q;return F.current===((X=N.current)==null?void 0:X.side)&&O5(R,(Q=N.current)==null?void 0:Q.area)},[]);return a.jsx(v5,{scope:n,searchRef:_,onItemEnter:m.useCallback(R=>{O(R)&&R.preventDefault()},[O]),onItemLeave:m.useCallback(R=>{var C;O(R)||((C=E.current)==null||C.focus(),k(null))},[O]),onTriggerLeave:m.useCallback(R=>{O(R)&&R.preventDefault()},[O]),pointerGraceTimerRef:D,onPointerGraceIntentChange:m.useCallback(R=>{N.current=R},[]),children:a.jsx($,{...z,children:a.jsx(bh,{asChild:!0,trapped:s,onMountAutoFocus:K(i,R=>{var C;R.preventDefault(),(C=E.current)==null||C.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:a.jsx(Da,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,children:a.jsx(Sy,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:k,onEntryFocus:K(c,R=>{g.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Hv,{role:"menu","aria-orientation":"vertical","data-state":bE(b.open),"data-radix-menu-content":"",dir:g.dir,...x,...y,ref:A,style:{outline:"none",...y.style},onKeyDown:K(y.onKeyDown,R=>{const X=R.target.closest("[data-radix-menu-content]")===R.currentTarget,Q=R.ctrlKey||R.altKey||R.metaKey,T=R.key.length===1;X&&(R.key==="Tab"&&R.preventDefault(),!Q&&T&&Y(R.key));const U=E.current;if(R.target!==U||!l5.includes(R.key))return;R.preventDefault();const se=S().filter(H=>!H.disabled).map(H=>H.ref.current);Z_.includes(R.key)&&se.reverse(),P5(se)}),onBlur:K(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(I.current),_.current="")}),onPointerMove:K(e.onPointerMove,dc(R=>{const C=R.target,X=M.current!==R.clientX;if(R.currentTarget.contains(C)&&X){const Q=R.clientX>M.current?"right":"left";F.current=Q,M.current=R.clientX}}))})})})})})})});iE.displayName=Bn;var b5="MenuGroup",Ny=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(ee.div,{role:"group",...r,ref:t})});Ny.displayName=b5;var S5="MenuLabel",oE=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(ee.div,{...r,ref:t})});oE.displayName=S5;var Rd="MenuItem",K0="menu.itemSelect",Ih=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,i=m.useRef(null),o=Dc(Rd,e.__scopeMenu),l=_y(Rd,e.__scopeMenu),c=pe(t,i),u=m.useRef(!1),d=()=>{const h=i.current;if(!n&&h){const p=new CustomEvent(K0,{bubbles:!0,cancelable:!0});h.addEventListener(K0,f=>r==null?void 0:r(f),{once:!0}),bv(h,p),p.defaultPrevented?u.current=!1:o.onClose()}};return a.jsx(aE,{...s,ref:c,disabled:n,onClick:K(e.onClick,d),onPointerDown:h=>{var p;(p=e.onPointerDown)==null||p.call(e,h),u.current=!0},onPointerUp:K(e.onPointerUp,h=>{var p;u.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,h=>{const p=l.searchRef.current!=="";n||p&&h.key===" "||ig.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Ih.displayName=Rd;var aE=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=e,o=_y(Rd,n),l=tE(n),c=m.useRef(null),u=pe(t,c),[d,h]=m.useState(!1),[p,f]=m.useState("");return m.useEffect(()=>{const v=c.current;v&&f((v.textContent??"").trim())},[i.children]),a.jsx(uc.ItemSlot,{scope:n,disabled:r,textValue:s??p,children:a.jsx(ky,{asChild:!0,...l,focusable:!r,children:a.jsx(ee.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:K(e.onPointerMove,dc(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,dc(v=>o.onItemLeave(v))),onFocus:K(e.onFocus,()=>h(!0)),onBlur:K(e.onBlur,()=>h(!1))})})})}),k5="MenuCheckboxItem",lE=m.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return a.jsx(fE,{scope:e.__scopeMenu,checked:n,children:a.jsx(Ih,{role:"menuitemcheckbox","aria-checked":Id(n)?"mixed":n,...s,ref:t,"data-state":Py(n),onSelect:K(s.onSelect,()=>r==null?void 0:r(Id(n)?!0:!n),{checkForDefaultPrevented:!1})})})});lE.displayName=k5;var cE="MenuRadioGroup",[j5,C5]=oo(cE,{value:void 0,onValueChange:()=>{}}),uE=m.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,i=it(r);return a.jsx(j5,{scope:e.__scopeMenu,value:n,onValueChange:i,children:a.jsx(Ny,{...s,ref:t})})});uE.displayName=cE;var dE="MenuRadioItem",hE=m.forwardRef((e,t)=>{const{value:n,...r}=e,s=C5(dE,e.__scopeMenu),i=n===s.value;return a.jsx(fE,{scope:e.__scopeMenu,checked:i,children:a.jsx(Ih,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Py(i),onSelect:K(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});hE.displayName=dE;var Ty="MenuItemIndicator",[fE,_5]=oo(Ty,{checked:!1}),pE=m.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,i=_5(Ty,n);return a.jsx(yt,{present:r||Id(i.checked)||i.checked===!0,children:a.jsx(ee.span,{...s,ref:t,"data-state":Py(i.checked)})})});pE.displayName=Ty;var E5="MenuSeparator",mE=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});mE.displayName=E5;var N5="MenuArrow",gE=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Rh(n);return a.jsx(Wv,{...s,...r,ref:t})});gE.displayName=N5;var T5="MenuSub",[Wq,vE]=oo(T5),xl="MenuSubTrigger",yE=m.forwardRef((e,t)=>{const n=ao(xl,e.__scopeMenu),r=Dc(xl,e.__scopeMenu),s=vE(xl,e.__scopeMenu),i=_y(xl,e.__scopeMenu),o=m.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=m.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return m.useEffect(()=>d,[d]),m.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),a.jsx(jy,{asChild:!0,...u,children:a.jsx(aE,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":bE(n.open),...e,ref:rh(t,s.onTriggerChange),onClick:h=>{var p;(p=e.onClick)==null||p.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,dc(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:K(e.onPointerLeave,dc(h=>{var f,v;d();const p=(f=n.content)==null?void 0:f.getBoundingClientRect();if(p){const y=(v=n.content)==null?void 0:v.dataset.side,b=y==="right",g=b?-5:5,x=p[b?"left":"right"],w=p[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+g,y:h.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,y:p.bottom},{x,y:p.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,h=>{var f;const p=i.searchRef.current!=="";e.disabled||p&&h.key===" "||c5[r.dir].includes(h.key)&&(n.onOpenChange(!0),(f=n.content)==null||f.focus(),h.preventDefault())})})})});yE.displayName=xl;var xE="MenuSubContent",wE=m.forwardRef((e,t)=>{const n=rE(Bn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=ao(Bn,e.__scopeMenu),o=Dc(Bn,e.__scopeMenu),l=vE(xE,e.__scopeMenu),c=m.useRef(null),u=pe(t,c);return a.jsx(uc.Provider,{scope:e.__scopeMenu,children:a.jsx(yt,{present:r||i.open,children:a.jsx(uc.Slot,{scope:e.__scopeMenu,children:a.jsx(Ey,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:K(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:K(e.onKeyDown,d=>{var f;const h=d.currentTarget.contains(d.target),p=u5[o.dir].includes(d.key);h&&p&&(i.onOpenChange(!1),(f=l.trigger)==null||f.focus(),d.preventDefault())})})})})})});wE.displayName=xE;function bE(e){return e?"open":"closed"}function Id(e){return e==="indeterminate"}function Py(e){return Id(e)?"indeterminate":e?"checked":"unchecked"}function P5(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function A5(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function R5(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=A5(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function I5(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,h=c.x,p=c.y;d>r!=p>r&&n<(h-u)*(r-d)/(p-d)+u&&(s=!s)}return s}function O5(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return I5(n,t)}function dc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var D5=nE,M5=jy,L5=sE,F5=iE,$5=Ny,z5=oE,B5=Ih,U5=lE,H5=uE,W5=hE,V5=pE,q5=mE,K5=gE,G5=yE,Y5=wE,Oh="DropdownMenu",[Q5,Vq]=mt(Oh,[eE]),Yt=eE(),[X5,SE]=Q5(Oh),kE=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=Yt(t),u=m.useRef(null),[d,h]=En({prop:s,defaultProp:i??!1,onChange:o,caller:Oh});return a.jsx(X5,{scope:t,triggerId:zn(),triggerRef:u,contentId:zn(),open:d,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(p=>!p),[h]),modal:l,children:a.jsx(D5,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};kE.displayName=Oh;var jE="DropdownMenuTrigger",CE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,i=SE(jE,n),o=Yt(n);return a.jsx(M5,{asChild:!0,...o,children:a.jsx(ee.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:rh(t,i.triggerRef),onPointerDown:K(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:K(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});CE.displayName=jE;var J5="DropdownMenuPortal",_E=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Yt(t);return a.jsx(L5,{...r,...n})};_E.displayName=J5;var EE="DropdownMenuContent",NE=m.forwardRef((e,t)=>
399{const{__scopeDropdownMenu:n,...r}=e,s=SE(EE,n),i=Yt(n),o=m.useRef(!1);return a.jsx(F5,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,l=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:K(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});NE.displayName=EE;var Z5="DropdownMenuGroup",eB=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx($5,{...s,...r,ref:t})});eB.displayName=Z5;var tB="DropdownMenuLabel",TE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(z5,{...s,...r,ref:t})});TE.displayName=tB;var nB="DropdownMenuItem",PE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(B5,{...s,...r,ref:t})});PE.displayName=nB;var rB="DropdownMenuCheckboxItem",AE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(U5,{...s,...r,ref:t})});AE.displayName=rB;var sB="DropdownMenuRadioGroup",iB=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(H5,{...s,...r,ref:t})});iB.displayName=sB;var oB="DropdownMenuRadioItem",RE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(W5,{...s,...r,ref:t})});RE.displayName=oB;var aB="DropdownMenuItemIndicator",IE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(V5,{...s,...r,ref:t})});IE.displayName=aB;var lB="DropdownMenuSeparator",OE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(q5,{...s,...r,ref:t})});OE.displayName=lB;var cB="DropdownMenuArrow",uB=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(K5,{...s,...r,ref:t})});uB.displayName=cB;var dB="DropdownMenuSubTrigger",DE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(G5,{...s,...r,ref:t})});DE.displayName=dB;var hB="DropdownMenuSubContent",ME=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Yt(n);return a.jsx(Y5,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ME.displayName=hB;var fB=kE,pB=CE,mB=_E,LE=NE,FE=TE,$E=PE,zE=AE,BE=RE,UE=IE,HE=OE,WE=DE,VE=ME;const gB=fB,vB=pB,yB=m.forwardRef(({className:e,inset:t,children:n,...r},s)=>a.jsxs(WE,{ref:s,className:J("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,a.jsx(ZI,{className:"ml-auto h-4 w-4"})]}));yB.displayName=WE.displayName;const xB=m.forwardRef(({className:e,...t},n)=>a.jsx(VE,{ref:n,className:J("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));xB.displayName=VE.displayName;const qE=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(mB,{children:a.jsx(LE,{ref:r,sideOffset:t,className:J("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
399de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));qE.displayName=LE.displayName;const xi=m.forwardRef(({className:e,inset:t,...n},r)=>a.jsx($E,{ref:r,className:J("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));xi.displayName=$E.displayName;const wB=m.forwardRef(({className:e,children:t,checked:n,...r},s)=>a.jsxs(zE,{ref:s,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(UE,{children:a.jsx(_v,{className:"h-4 w-4"})})}),t]}));wB.displayName=zE.displayName;const bB=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(BE,{ref:r,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(UE,{children:a.jsx(Zk,{className:"h-2 w-2 fill-current"})})}),t]}));bB.displayName=BE.displayName;const SB=m.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(FE,{ref:r,className:J("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));SB.displayName=FE.displayName;const kB=m.forwardRef(({className:e,...t},n)=>a.jsx(HE,{ref:n,className:J("-mx-1 my-1 h-px bg-muted",e),...t}));kB.displayName=HE.displayName;function Dh(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ay="Radio",[jB,KE]=mt(Ay),[CB,_B]=jB(Ay),GE=m.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:o,value:l="on",onCheck:c,form:u,...d}=e,[h,p]=m.useState(null),f=pe(t,b=>p(b)),v=m.useRef(!1),y=h?u||!!h.closest("form"):!0;return a.jsxs(CB,{scope:n,checked:s,disabled:o,children:[a.jsx(ee.button,{type:"button",role:"radio","aria-checked":s,"data-state":JE(s),"data-disabled":o?"":void 0,disabled:o,value:l,...d,ref:f,onClick:K(e.onClick,b=>{s||c==null||c(),y&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),y&&a.jsx(XE,{control:h,bubbles:!v.current,name:r,value:l,checked:s,required:i,disabled:o,form:u,style:{transform:"translateX(-100%)"}})]})});GE.displayName=Ay;var YE="RadioIndicator",QE=m.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...s}=e,i=_B(YE,n);return a.jsx(yt,{present:r||i.checked,children:a.jsx(ee.span,{"data-state":JE(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t})})});QE.displayName=YE;var EB="RadioBubbleInput",XE=m.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...s},i)=>{const o=m.useRef(null),l=pe(o,i),c=Dh(n),u=ch(t);return m.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&f){const v=new Event("click",{bubbles:r});f.call(d,n),d.dispatchEvent(v)}},[c,n,r]),a.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});XE.displayName=EB;function JE(e){return e?"checked":"unchecked"}var NB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mh="RadioGroup",[TB,qq]=mt(Mh,[Va,KE]),ZE=Va(),eN=KE(),[PB,AB]=TB(Mh),tN=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:o=!1,disabled:l=!1,orientation:c,dir:u,loop:d=!0,onValueChange:h,...p}=e,f=ZE(n),v=io(u),[y,b]=En({prop:i,defaultProp:s??null,onChange:h,caller:Mh});return a.jsx(PB,{scope:n,name:r,required:o,disabled:l,value:y,onValueChange:b,children:a.jsx(Sy,{asChild:!0,...f,orientation:c,dir:v,loop:d,children:a.jsx(ee.div,{role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":l?"":void 0,dir:v,...p,ref:t})})})});tN.displayName=Mh;var nN="RadioGroupItem",rN=m.forwardRef((e,t)=>
vendor: 6,504 bytes, line 399
399{const{__scopeRadioGroup:n,disabled:r,...s}=e,i=AB(nN,n),o=i.disabled||r,l=ZE(n),c=eN(n),u=m.useRef(null),d=pe(t,u),h=i.value===s.value,p=m.useRef(!1);return m.useEffect(()=>{const f=y=>{NB.includes(y.key)&&(p.current=!0)},v=()=>p.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",v)}},[]),a.jsx(ky,{asChild:!0,...l,focusable:!o,active:h,children:a.jsx(GE,{disabled:o,required:i.required,checked:h,...c,...s,name:i.name,ref:d,onCheck:()=>i.onValueChange(s.value),onKeyDown:K(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:K(s.onFocus,()=>{var f;p.current&&((f=u.current)==null||f.click())})})})});rN.displayName=nN;var RB="RadioGroupIndicator",sN=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,s=eN(n);return a.jsx(QE,{...s,...r,ref:t})});sN.displayName=RB;var iN=tN,oN=rN,IB=sN;const og=m.forwardRef(({className:e,...t},n)=>a.jsx(iN,{className:J("grid gap-2",e),...t,ref:n}));og.displayName=iN.displayName;const No=m.forwardRef(({className:e,...t},n)=>a.jsx(oN,{ref:n,className:J("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(IB,{className:"flex items-center justify-center",children:a.jsx(Zk,{className:"h-2.5 w-2.5 fill-current text-current"})})}));No.displayName=oN.displayName;var OB="Label",aN=m.forwardRef((e,t)=>a.jsx(ee.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));aN.displayName=OB;var lN=aN;const DB=_c("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ue=m.forwardRef(({className:e,...t},n)=>a.jsx(lN,{ref:n,className:J(DB(),e),...t}));ue.displayName=lN.displayName;var Lh="Checkbox",[MB,Kq]=mt(Lh),[LB,Ry]=MB(Lh);function FB(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:s,disabled:i,form:o,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[p,f]=En({prop:n,defaultProp:s??!1,onChange:c,caller:Lh}),[v,y]=m.useState(null),[b,g]=m.useState(null),x=m.useRef(!1),w=v?!!o||!!v.closest("form"):!0,S={checked:p,disabled:i,setChecked:f,control:v,setControl:y,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Qs(s)?!1:s,isFormControl:w,bubbleInput:b,setBubbleInput:g};return a.jsx(LB,{scope:t,...S,children:$B(h)?h(S):r})}var cN="CheckboxTrigger",uN=m.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},s)=>{const{control:i,value:o,disabled:l,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:p,isFormControl:f,bubbleInput:v}=Ry(cN,e),y=pe(s,d),b=m.useRef(c);return m.useEffect(()=>{const g=i==null?void 0:i.form;if(g){const x=()=>h(b.current);return g.addEventListener("reset",x),()=>g.removeEventListener("reset",x)}},[i,h]),a.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":Qs(c)?"mixed":c,"aria-required":u,"data-state":mN(c),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:y,onKeyDown:K(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:K(n,g=>{h(x=>Qs(x)?!0:!x),v&&f&&(p.current=g.isPropagationStopped(),p.current||g.stopPropagation())})})});uN.displayName=cN;var Iy=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:u,form:d,...h}=e;return a.jsx(FB,{__scopeCheckbox:n,checked:s,defaultChecked:i,disabled:l,required:o,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:p})=>a.jsxs(a.Fragment,{children:[a.jsx(uN,{...h,ref:t,__scopeCheckbox:n}),p&&a.jsx(pN,{__scopeCheckbox:n})]})})});Iy.displayName=Lh;var dN="CheckboxIndicator",hN=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...s}=e,i=Ry(dN,n);return a.jsx(yt,{present:r||Qs(i.checked)||i.checked===!0,children:a.jsx(ee.span,{"data-state":mN(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});hN.displayName=dN;var fN="CheckboxBubbleInput",pN=m.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:s,checked:i,defaultChecked:o,required:l,disabled:c,name:u,value:d,form:h,bubbleInput:p,setBubbleInput:f}=Ry(fN,e),v=pe(n,f),y=Dh(i),b=ch(r);m.useEffect(()=>{const x=p;if(!x)return;const w=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(w,"checked").set,k=!s.current;if(y!==i&&j){const E=new Event("click",{bubbles:k});x.indeterminate=Qs(i),j.call(x,Qs(i)?!1:i),x.dispatchEvent(E)}},[p,y,i,s]);const g=m.useRef(Qs(i)?!1:i);return a.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??g.current,required:l,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:v,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pN.displayName=fN;function $B(e){return typeof e=="function"}function Qs(e){return e==="indeterminate"}function mN(e){return Qs(e)?"indeterminate":e?"checked":"unchecked"}const gN=m.forwardRef(({className:e,...t},n)=>a.jsx(Iy,{ref:n,className:J("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(hN,{className:J("flex items-center justify-center text-current"),children:a.jsx(_v,{className:"h-4 w-4"})})}));gN.displayName=Iy.displayName;function zB({onSetupComplete:e}){const[t,n]=m.useState(null),[r,s]=m.useState(null),[i,o]=m.useState(!0),l=()=>{t&&r&&e({style:t,duration:r,storeSession:i})};return a.jsx("div",{className:"min-h-screen bg-background font-ubuntu flex items-center justify-center p-4",children:a.jsxs(be,{className:"w-full max-w-md p-6 space-y-6",children:[a.jsxs("div",{className:"text-center space-y-2",children:[a.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Welcome to Coach Bernhard"}),a.jsx("p",{className:"text-muted-foreground",children:"Let's set up your coaching session"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ue,{className:"text-sm font-medium mb-3 block",children:"What c
399oaching style would you prefer today?"}),a.jsxs(og,{value:t||"",onValueChange:c=>n(c),children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(No,{value:"direct",id:"direct"}),a.jsx(ue,{htmlFor:"direct",className:"cursor-pointer",children:"Direct and challenging - Push me to think deeper"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(No,{value:"gentle",id:"gentle"}),a.jsx(ue,{htmlFor:"gentle",className:"cursor-pointer",children:"Gentle and exploratory - Guide me with care"})]})]})]}),a.jsxs("div",{children:[a.jsx(ue,{className:"text-sm font-medium mb-3 block",children:"How much time do you have today?"}),a.jsxs(og,{value:(r==null?void 0:r.toString())||"",onValueChange:c=>s(parseInt(c)),children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(No,{value:"5",id:"5min"}),a.jsx(ue,{htmlFor:"5min",className:"cursor-pointer",children:"5 minutes - Quick reflection"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(No,{value:"20",id:"20min"}),a.jsx(ue,{htmlFor:"20min",className:"cursor-pointer",children:"20 minutes - Focused session"})]}),a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx(No,{value:"45",id:"45min"}),a.jsx(ue,{htmlFor:"45min",className:"cursor-pointer",children:"45 minutes - Deep dive"})]})]})]}),a.jsx("div",{className:"space-y-3 border-t pt-4",children:a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx(gN,{id:"store-session",checked:i,onCheckedChange:c=>o(c===!0),className:"mt-1"}),a.jsxs("div",{className:"flex-1",children:[a.jsx(ue,{htmlFor:"store-session",className:"text-sm font-medium cursor-pointer",children:"Session Storage"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:"We save anonymous session data to help you continue where you left off and to improve our service. You can turn this off by unchecking the box."})]})]})})]}),a.jsx(te,{onClick:l,disabled:!t||!r,className:"w-full",children:"Start Coaching Session"}),a.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Remember, you can end the session early at any time and it will still close with proper reflection."})]})})}const Ee=m.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:J("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ee.displayName="Input";const BB=_c("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Qe({className:e,variant:t,...n}){return a.jsx("div",{className:J(BB({variant:t}),e),...n})}function sp({onSessionLoad:e,onNewSession:t,currentSessionId:n}){const[r,s]=m.useState([]),[i,o]=m.useState(!0),[l,c]=m.useState(!1),[u,d]=m.useState(""),{user:h}=li(),{toast:p}=gr();m.useEffect(()=>{f()},[h]);const f=async()=>{if(h)try{const{data:x,error:w}=await ae.from("coaching_sessions").select("*").eq("user_id",h.id).order("updated_at",{ascending:!1});if(w)throw w;s((x||[]).map(S=>({...S,messages:Array.isArray(S.messages)?S.messages:[]})))}catch(x){console.error("Error loading sessions:",x),p({title:"Error",description:"Failed to load sessions",variant:"destructive"})}finally{o(!1)}},v=async()=>{if(!(!h||!u.trim()))try{const{data:x,error:w}=await ae.from("coaching_sessions").insert({user_id:h.id,title:u.trim(),messages:[],session_data:{},status:"active"}).select().single();if(w)throw w;const S={...x,messages:Array.isArray(x.messages)?x.messages:[]};p({title:"Session created",description:`New session "${u}" created successfully`}),d(""),c(!1),s(j=>[S,...j]),e(S)}catch(x){console.error("Error creating session:",x),p({title:"Error",description:"Failed to create new session",variant:"destructive"})}},y=async x=>{try{const{error:w}=await ae.from("coaching_sessions").delete().eq("id",x);if(w)throw w;s(S=>S.filter(j=>j.id!==x)),p({title:"Session deleted",description:"Session deleted successfully"}),n===x&&t()}catch(w){console.error("Error deleting session:",w),p({title:"Error",description:"Failed to delete session",variant:"destructive"})}},b=x=>new Date(x).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),g=x=>{switch(x){case"active":return"bg-green-100 text-green-800";
399case"completed":return"bg-blue-100 text-blue-800";case"paused":return"bg-yellow-100 text-yellow-800";default:return"bg-gray-100 text-gray-800"}};return i?a.jsx(be,{children:a.jsx($e,{className:"p-6",children:a.jsx("div",{className:"text-center",children:"Loading sessions..."})})}):a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"mb-4",children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Your Coaching Sessions"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Continue previous sessions or start a new one"})]}),a.jsxs(bn,{open:l,onOpenChange:c,children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{className:"w-full sm:w-auto",children:[a.jsx(Nv,{className:"w-4 h-4 mr-2"}),"New Session"]})}),a.jsxs(un,{className:"w-[90vw] max-w-md",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Create New Session"}),a.jsx(jn,{children:"Give your new coaching session a title to help you identify it later."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(Ee,{placeholder:"Session title (e.g., 'Career planning discussion')",value:u,onChange:x=>d(x.target.value),onKeyPress:x=>x.key==="Enter"&&v()}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[a.jsx(te,{variant:"outline",className:"flex-1",onClick:()=>c(!1),children:"Cancel"}),a.jsx(te,{className:"flex-1",onClick:v,disabled:!u.trim(),children:"Create Session"})]})]})]})]})]})}),r.length===0?a.jsxs("div",{className:"text-center py-8",children:[a.jsx(Xr,{className:"w-12 h-12 mx-auto text-muted-foreground mb-4"}),a.jsx("p",{className:"text-muted-foreground mb-4",children:"No previous sessions found"}),a.jsx(te,{onClick:()=>c(!0),className:"w-full sm:w-auto",children:"Start Your First Session"})]}):a.jsx(Rc,{className:"h-[50vh] sm:h-[400px]",children:a.jsx("div",{className:"space-y-3 pr-4",children:r.map(x=>a.jsx("div",{className:`p-3 sm:p-4 border rounded-lg hover:bg-muted/50 transition-colors ${n===x.id?"border-primary bg-primary/5":""}`,children:a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start justify-between gap-3",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"font-medium text-sm sm:text-base break-words",children:x.title}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-1 text-xs sm:text-sm text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(to,{className:"w-3 h-3"}),b(x.updated_at)]}),a.jsx("span",{className:"hidden sm:inline",children:"â¢"}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(Xr,{className:"w-3 h-3"}),x.messages.length," messages"]})]}),a.jsx(Qe,{className:`mt-2 text-xs ${g(x.status)}`,children:x.status})]}),a.jsxs("div",{className:"flex items-center gap-2 w-full sm:w-auto sm:ml-4",children:[a.jsx(te,{variant:"outline",size:"sm",onClick:()=>e(x),disabled:n===x.id,className:"flex-1 sm:flex-initial",children:n===x.id?"Current":"Continue"}),a.jsx(te,{variant:"ghost",size:"sm",onClick:()=>y(x.id),className:"shrink-0",children:a.jsx(Pv,{className:"w-4 h-4"})})]})]})},x.id))})})]})}function UB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const HB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VB={};function G0(e,t){return(VB.jsx?WB:HB).test(e)}const qB=/[ \t\n\f\r]/g;function KB(e){return typeof e=="object"?e.type==="text"?Y0(e.value):!1:Y0(e)}function Y0(e){return e.replace(qB,"")===""}class Mc{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Mc.prototype.normal={};Mc.prototype.property={};Mc.prototype.space=void 0;function vN(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Mc(n,r,t)}function ag(e){return e.toLowerCase()}class dn{constructor(t,n){this.attribute=n,this.property=t}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let GB=0;const we=lo(),at=lo(),lg=lo(),q=lo(),Fe=lo(),ra=lo(),pn=lo();function lo(){return 2**++GB}const cg=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:at,commaOrSpaceSeparated:pn,commaSeparated:ra,number:q,overloadedBoolean:lg,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),ip=Object.keys(cg);class Oy extends dn{constructor(t,n,r,s){let i=-1;
vendor: 4,243 bytes, line 399
399if(super(t,n),Q0(this,"space",s),typeof r=="number")for(;++i<ip.length;){const o=ip[i];Q0(this,ip[i],(r&cg[o])===cg[o])}}}Oy.prototype.defined=!0;function Q0(e,t,n){n&&(e[t]=n)}function qa(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const i=new Oy(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[ag(r)]=r,n[ag(i.attribute)]=r}return new Mc(t,n,e.space)}const yN=qa({properties:{ariaActiveDescendant:null,ariaAtomic:at,ariaAutoComplete:null,ariaBusy:at,ariaChecked:at,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:at,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:at,ariaFlowTo:Fe,ariaGrabbed:at,ariaHasPopup:null,ariaHidden:at,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:q,ariaLive:null,ariaModal:at,ariaMultiLine:at,ariaMultiSelectable:at,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:at,ariaReadOnly:at,ariaRelevant:null,ariaRequired:at,ariaRoleDescription:Fe,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:at,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function xN(e,t){return t in e?e[t]:t}function wN(e,t){return xN(e,t.toLowerCase())}const YB=qa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ra,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Fe,autoFocus:we,autoPlay:we,blocking:Fe,capture:null,charSet:null,checked:we,cite:null,className:Fe,cols:q,colSpan:null,content:null,contentEditable:at,controls:we,controlsList:Fe,coords:q|ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:lg,draggable:at,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Fe,height:q,hidden:lg,high:q,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:we,itemType:Fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:we,optimum:q,pattern:null,ping:Fe,placeholder:null,playsInl
399ine:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Fe,required:we,reversed:we,rows:q,rowSpan:q,sandbox:Fe,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:at,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:at,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:at,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:we,disableRemotePlayback:we,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:wN}),QB=qa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
399-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pn,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:Fe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ra,g2
399:ra,glyphName:ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pn,rev:pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pn,requiredFeatures:pn,requiredFonts:pn,requiredFormats:pn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pn,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:xN}),bN=qa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 4,024 bytes, lines 399-400
399,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),SN=qa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wN}),kN=qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XB={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},JB=/[A-Z]/g,X0=/-[a-z]/g,ZB=/^data[-\w.:]+$/i;function eU(e,t){const n=ag(t);let r=t,s=dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZB.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(X0,nU);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!X0.test(i)){let o=i.replace(JB,tU);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=Oy}return new s(r,t)}function tU(e){return"-"+e.toLowerCase()}function nU(e){return e.charAt(1).toUpperCase()}const rU=vN([yN,YB,bN,SN,kN],"html"),Dy=vN([yN,QB,bN,SN,kN],"svg");function sU(e){return e.join(" ").trim()}var My={},J0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,iU=/\n/g,oU=/^\s*/,aU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lU=/^:\s*/,cU=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,uU=/^[;\s]*/,dU=/^\s+|\s+$/g,hU=` 400`,Z0="/",eb="*",bi="",fU="comment",pU="declaration",mU=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function s(v){var y=v.match(iU);y&&(n+=y.length);var b=v.lastIndexOf(hU);r=~b?v.length-b:r+v.length}function i(){var v={line:n,column:r};return function(y){return y.position=new o(v),u(),y}}function o(v){this.start=v,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function l(v){var y=new Error(t.source+":"+n+":"+r+": "+v);if(y.reason=v,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function c(v){var y=v.exec(e);if(y){var b=y[0];return s(b),e=e.slice(b.length),y}}function u(){c(oU)}function d(v){var y;for(v=v||[];y=h();)y!==!1&&v.push(y);return v}function h(){var v=i();if(!(Z0!=e.charAt(0)||eb!=e.charAt(1))){for(var y=2;bi!=e.charAt(y)&&(eb!=e.charAt(y)||Z0!=e.charAt(y+1));)++y;if(y+=2,bi===e.charAt(y-1))return l("End of comment missing");var b=e.slice(2,y-2);return r+=2,s(b),e=e.slice(y),r+=2,v({type:fU,comment:b})}}function p(){var v=i(),y=c(aU);if(y){if(h(),!c(lU))return l("property missing ':'");var b=c(cU),g=v({type:pU,property:tb(y[0].replace(J0,bi)),value:b?tb(b[0].replace(J0,bi)):bi});return c(uU),g}}function f(){var v=[];d(v);for(var y;y=p();)y!==!1&&(v.push(y),d(v));return v}return u(),f()};function tb(e){return e?e.replace(dU,bi):bi}var gU=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(My,"__esModule",{value:!0});My.default=yU;var vU=gU(mU);function yU(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,vU.default)(e),s=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var o=i.property,l=i.value;s?t(o,l,i):l&&(n=n||{},n[o]=l)}}),n}var Fh={};Object.defineProperty(Fh,"__esModule",{value:!0});Fh.camelCase=void 0;var xU=/^--[a-zA-Z0-9_-]+$/,wU=/-([a-z])/g,bU=/^[^-]+$/,SU=/^-(webkit|moz|ms|o|khtml)-/,kU=/^-(ms)-/,jU=function(e){return!e||bU.test(e)||xU.test(e)},CU=function(e,t){return t.toUpperCase()},nb=function(e,t){return"".concat(t,"-")},_U=function(e,t){return t===void 0&&(t={}),jU(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(kU,nb):e=e.replace(SU,nb),e.replace(wU,CU))};Fh.camelCase=_U;var EU=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},NU=EU(My),TU=Fh;function ug(e,t){var n={};return!e||typeof e!="string"||(0,NU.default)(e,function(r,s){r&&s&&(n[(0,TU.camel
vendor: 2,639 bytes, line 400
400Case)(r,t)]=s)}),n}ug.default=ug;var PU=ug;const AU=Xi(PU),jN=CN("end"),Ly=CN("start");function CN(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function RU(e){const t=Ly(e),n=jN(e);if(t&&n)return{start:t,end:n}}function Ml(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rb(e.position):"start"in e||"end"in e?rb(e):"line"in e||"column"in e?dg(e):""}function dg(e){return sb(e&&e.line)+":"+sb(e&&e.column)}function rb(e){return dg(e&&e.start)+"-"+dg(e&&e.end)}function sb(e){return e&&typeof e=="number"?e:1}class Ft extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?s=t:!i.cause&&t&&(o=!0,s=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Ml(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const Fy={}.hasOwnProperty,IU=new Map,OU=/[A-Z]/g,DU=new Set(["table","tbody","thead","tfoot","tr"]),MU=new Set(["td","th"]),_N="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function LU(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=VU(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 10,529 bytes, line 400
400if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=WU(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Dy:rU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=EN(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function EN(e,t,n){if(t.type==="element")return FU(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return $U(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return BU(e,t,n);if(t.type==="mdxjsEsm")return zU(e,t);if(t.type==="root")return UU(e,t,n);if(t.type==="text")return HU(e,t)}function FU(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Dy,e.schema=s),e.ancestors.push(t);const i=TN(e,t.tagName,!1),o=qU(e,t);let l=zy(e,t);return DU.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!KB(c):!0})),NN(e,o,i,t),$y(o,l),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function $U(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}hc(e,t.position)}function zU(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hc(e,t.position)}function BU(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=Dy,e.schema=s),e.ancestors.push(t);const i=t.name===null?e.Fragment:TN(e,t.name,!0),o=KU(e,t),l=zy(e,t);return NN(e,o,i,t),$y(o,l),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function UU(e,t,n){const r={};return $y(r,zy(e,t)),e.create(t,e.Fragment,r,n)}function HU(e,t){return t.value}function NN(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $y(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function WU(e,t,n){return r;function r(s,i,o,l){const u=Array.isArray(o.children)?n:t;return l?u(i,o,l):u(i,o)}}function VU(e,t){return n;function n(r,s,i,o){const l=Array.isArray(i.children),c=Ly(r);return t(s,i,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function qU(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Fy.call(t.properties,s)){const i=GU(e,s,t.properties[s]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&MU.has(t.tagName)?r=l:n[o]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function KU(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else hc(e,t.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else hc(e,t.position);else i=r.value===null?!0:r.value;n[s]=i}return n}function zy(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:IU;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=s.get(c)||0;o=c+"-"+u,s.set(c,u+1)}}const l=EN(e,i,o);l!==void 0&&n.push(l)}return n}function GU(e,t,n){const r=eU(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?UB(n):sU(n)),r.property==="style"){let s=typeof n=="object"?n:YU(e,String(n));return e.stylePropertyNameCase==="css"&&(s=QU(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?XB[r.property]||r.property:r.attribute,n]}}function YU(e,t){try{return AU(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Ft("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=_N+"#cannot-parse-style-attribute",s}}function TN(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let i=-1,o;for(;++i<s.length;){const l=G0(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=o}else r=G0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Fy.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);hc(e)}function hc(e,t){const n=new Ft("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=_N+"#cannot-handle-mdx-estrees-without-createevaluater",n}function QU(e){const t={};let n;for(n in e)Fy.call(e,n)&&(t[XU(n)]=e[n]);return t}function XU(e){let t=e.replace(OU,JU);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function JU(e){return"-"+e.toLowerCase()}const op={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ZU={};function By(e,t){const n=ZU,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return PN(e,r,s)}function PN(e,t,n){if(e6(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ib(e.children,t,n)}return Array.isArray(e)?ib(e,t,n):""}function ib(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=PN(e[s],t,n);return r.join("")}function e6(e){return!!(e&&typeof e=="object")}const ob=document.createElement("i");function Uy(e){const t="&"+e+";";ob.innerHTML=t;const n=ob.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Cn(e,t,n,r){const s=e.length;let i=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Mn(e,t){return e.length>0?(Cn(e,e.length,0,t),e):t}const ab={}.hasOwnProperty;function AN(e){const t={};let n=-1;for(;++n<e.length;)t6(t,e[n]);return t}function t6(e,t){let n;for(n in t){const s=(ab.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){ab.call(s,o)||(s[o]=[]);const l=i[o];n6(s[o],Array.isArray(l)?l:l?[l]:[])}}}function n6(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Cn(e,0,0,r)}function RN(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function hr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vt=ci(/[A-Za-z]/),Dt=ci(/[\dA-Za-z]/),r6=ci(/[#-'*+\--9=?A-Z^-~]/);function Od(e){return e!==null&&(e<32||e===127)}const hg=ci(/\d/),s6=ci(/[\dA-Fa-f]/),i6=ci(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const $h=ci(new RegExp("\\p{P}|\\p{S}","u")),Gi=ci(/\s/);function ci(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ka(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&Dt(e.charCodeAt(n+1))&&Dt(e.charCodeAt(n+2)))s=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(o=String.fromCharCode(i,l),s=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+s+1,o=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Te(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(c){return Ce(c)?(e.enter(n),l(c)):t(c)}function l(c){return Ce(c)&&i++<s?(e.consume(c),l):(e.exit(n),t(c))}}const o6={tokenize:a6};function a6(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Te(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return de(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),o)}}const l6={tokenize:c6},lb={tokenize:u6};function c6(e){const t=this,n=[];let r=0,s,i,o;return l;function l(w){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(w)}return u(w)}function c(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&x();const S=t.events.length;let j=S,k;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){k=t.events[j][1].end;break}g(r);let E=S;for(;E<t.events.length;)t.events[E][1].end={...k},E++;return Cn(t.events,j+1,0,t.events.slice(S)),t.events.length=E,u(w)}return l(w)}function u(w){if(r===n.length){if(!s)return p(w);if(s.currentConstruct&&s.currentConstruct.concrete)return v(w);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lb,d,h)(w)}function d(w){return s&&x(),g(r),p(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,v(w)}function p(w){return t.containerState={},e.attempt(lb,f,v)(w)}function f(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function v(w){if(w===null){s&&x(),g(0),e.consume(w);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:i}),y(w)}function y(w){if(w===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(w);return}return de(w)?(e.consume(w),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(w),y)}function b(w,S){const j=t.sliceStream(w);
vendor: 8,775 bytes, line 400
400if(S&&j.push(null),w.previous=i,i&&(i.next=w),i=w,s.defineSkip(w.start),s.write(j),t.parser.lazy[w.start.line]){let k=s.events.length;for(;k--;)if(s.events[k][1].start.offset<o&&(!s.events[k][1].end||s.events[k][1].end.offset>o))return;const E=t.events.length;let A=E,I,_;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(I){_=t.events[A][1].end;break}I=!0}for(g(r),k=E;k<t.events.length;)t.events[k][1].end={..._},k++;Cn(t.events,A+1,0,t.events.slice(E)),t.events.length=k}}function g(w){let S=n.length;for(;S-- >w;){const j=n[S];t.containerState=j[1],j[0].exit.call(t,e)}n.length=w}function x(){s.write([null]),i=void 0,s=void 0,t.containerState._closeFlow=void 0}}function u6(e,t,n){return Te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Aa(e){if(e===null||Me(e)||Gi(e))return 1;if($h(e))return 2}function zh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const i=e[s].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const fg={name:"attention",resolveAll:d6,tokenize:h6};function d6(e,t){let n=-1,r,s,i,o,l,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};cb(h,-c),cb(p,c),o={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Mn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Mn(u,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Mn(u,zh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Mn(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Mn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Cn(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function h6(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Aa(r);let i;return o;function o(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=Aa(c),h=!d||d===2&&s||n.includes(c),p=!s||s===2&&d||n.includes(r);return u._open=!!(i===42?h:h&&(s||!p)),u._close=!!(i===42?p:p&&(d||!h)),t(c)}}function cb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const f6={name:"autolink",tokenize:p6};function p6(e,t,n){let r=0;return s;function s(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return Vt(f)?(e.consume(f),o):f===64?n(f):u(f)}function o(f){return f===43||f===45||f===46||Dt(f)?(r=1,l(f)):u(f)}function l(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||Dt(f))&&r++<32?(e.consume(f),l):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Od(f)?n(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),d):r6(f)?(e.consume(f),u):n(f)}function d(f){return Dt(f)?h(f):n(f)}function h(f){return f===46?(e.consume(f),r=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Dt(f))&&r++<63){const v=f===45?p:h;return e.consume(f),v}return n(f)}}const Lc={partial:!0,tokenize:m6};function m6(e,t,n){return r;function r(i){return Ce(i)?Te(e,s,"linePrefix")(i):s(i)}function s(i){return i===null||de(i)?t(i):n(i)}}const IN={continuation:{tokenize:v6},exit:y6,name:"blockQuote",tokenize:g6};function g6(e,t,n){const r=this;return s;function s(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return Ce(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function v6(e,t,n){const r=this;return s;function s(o){return Ce(o)?Te(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(IN,t,n)(o)}}function y6(e){e.exit("blockQuote")}const ON={name:"characterEscape",tokenize:x6};function x6(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),s}function s(i){return i6(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const DN={name:"characterReference",tokenize:w6};function w6(e,t,n){const r=this;let s=0,i,o;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=Dt,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=s6,d):(e.enter("characterReferenceValue"),i=7,o=hg,d(h))}function d(h){if(h===59&&s){const p=e.exit("characterReferenceValue");return o===Dt&&!Uy(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(h)&&s++<i?(e.consume(h),d):n(h)}}const ub={partial:!0,tokenize:S6},db={concrete:!0,name:"codeFenced",tokenize:b6};function b6(e,t,n){const r=this,s={partial:!0,tokenize:j};let i=0,o=0,l;return c;function c(k){return u(k)}function u(k){const E=r.events[r.events.length-1];return i=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(k)}function d(k){return k===l?(o++,e.consume(k),d):o<3?n(k):(e.exit("codeFencedFenceSequence"),Ce(k)?Te(e,h,"whitespace")(k):h(k))}function h(k){return k===null||de(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(ub,y,S)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(k)):Ce(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Te(e,f,"whitespace")(k)):k===96&&k===l?n(k):(e.consume(k),p)}function f(k){return k===null||de(k)?h(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===null||de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(k)):k===96&&k===l?n(k):(e.consume(k),v)}function y(k){return e.attempt(s,S,b)(k)}function b(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),g}function g(k){return i>0&&Ce(k)?Te(e,x,"linePrefix",i+1)(k):x(k)}function x(k){return k===null||de(k)?e.check(ub,y,S)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||de(k)?(e.exit("codeFlowValue"),x(k)):(e.consume(k),w)}function S(k){return e.exit("codeFenced"),t(k)}function j(k,E,A){let I=0;return _;function _($){return k.enter("lineEnding"),k.consume($),k.exit("lineEnding"),D}function D($){return k.enter("codeFencedFence"),Ce($)?Te(k,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):N($)}function N($){return $===l?(k.enter("codeFencedFenceSequence"),F($)):A($)}function F($){return $===l?(I++,k.consume($),F):I>=o?(k.exit("codeFencedFenceSequence"),Ce($)?Te(k,M,"whitespace")($):M($)):A($)}function M($){return $===null||de($)?(k.exit("codeFencedFence"),E($)):A($)}}}function S6(e,t,n){const r=this;return s;function s(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const ap={name:"codeIndented",tokenize:j6},k6={partial:!0,tokenize:C6};function j6(e,t,n){const r=this;return s;
vendor: 5,057 bytes, line 400
400function s(u){return e.enter("codeIndented"),Te(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?c(u):de(u)?e.attempt(k6,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||de(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function C6(e,t,n){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?n(o):de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):Te(e,i,"linePrefix",5)(o)}function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):de(o)?s(o):n(o)}}const _6={name:"codeText",previous:N6,resolve:E6,tokenize:T6};function E6(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function N6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function T6(e,t,n){let r=0,s,i;return o;function o(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(i=e.enter("codeTextSequence"),s=0,d(h)):de(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||de(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),s++,d):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(i.type="codeTextData",u(h))}}class P6{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&dl(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),dl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),dl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);dl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);dl(this.left,n.reverse())}}}function dl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function MN(e){const t={};let n=-1,r,s,i,o,l,c,u;const d=new P6(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,A6(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,s=void 0;i--;)if(o=d.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(d.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(r[1].end={...d.get(s)[1].start},l=d.slice(s,n),l.unshift(r),d.splice(s,n-s+1,l))}}return Cn(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function A6(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let d,h,p=-1,f=n,v=0,y=0;const b=[y];for(;f;){for(;e.get(++s)[1]!==f;);i.push(s),f._tokenizer||(d=r.sliceStream(f),f.next||d.push(null),h&&o.defineSki
vendor: 18,552 bytes, line 400
400p(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(y=p+1,b.push(y),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):b.pop(),p=b.length;p--;){const g=l.slice(b[p],b[p+1]),x=i.pop();c.push([x,x+g.length-1]),e.splice(x,2,g)}for(c.reverse(),p=-1;++p<c.length;)u[v+c[p][0]]=v+c[p][1],v+=c[p][1]-c[p][0]-1;return u}const R6={resolve:O6,tokenize:D6},I6={partial:!0,tokenize:M6};function O6(e){return MN(e),e}function D6(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?i(l):de(l)?e.check(I6,o,i)(l):(e.consume(l),s)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function M6(e,t,n){const r=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Te(e,i,"linePrefix")}function i(o){if(o===null||de(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function LN(e,t,n,r,s,i,o,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(g){return g===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(g),e.exit(i),p):g===null||g===32||g===41||Od(g)?n(g):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(g))}function p(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(l),p(g)):g===null||g===60||de(g)?n(g):(e.consume(g),g===92?v:f)}function v(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function y(g){return!d&&(g===null||g===41||Me(g))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(g)):d<u&&g===40?(e.consume(g),d++,y):g===41?(e.consume(g),d--,y):g===null||g===32||g===40||Od(g)?n(g):(e.consume(g),g===92?b:y)}function b(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function FN(e,t,n,r,s,i){const o=this;let l=0,c;return u;function u(f){return e.enter(r),e.enter(s),e.consume(f),e.exit(s),e.enter(i),d}function d(f){return l>999||f===null||f===91||f===93&&!c||f===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(i),e.enter(s),e.consume(f),e.exit(s),e.exit(r),t):de(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||de(f)||l++>999?(e.exit("chunkString"),d(f)):(e.consume(f),c||(c=!Ce(f)),f===92?p:h)}function p(f){return f===91||f===92||f===93?(e.consume(f),l++,h):h(f)}}function $N(e,t,n,r,s,i){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(s),e.consume(p),e.exit(s),o=p===40?41:p,c):n(p)}function c(p){return p===o?(e.enter(s),e.consume(p),e.exit(s),e.exit(r),t):(e.enter(i),u(p))}function u(p){return p===o?(e.exit(i),c(o)):p===null?n(p):de(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Te(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===o||p===null||de(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:d)}function h(p){return p===o||p===92?(e.consume(p),d):d(p)}}function Ll(e,t){let n;return r;function r(s){return de(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ce(s)?Te(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const L6={name:"definition",tokenize:$6},F6={partial:!0,tokenize:z6};function $6(e,t,n){const r=this;let s;return i;function i(f){return e.enter("definition"),o(f)}function o(f){return FN.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return s=hr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):n(f)}function c(f){return Me(f)?Ll(e,u)(f):u(f)}function u(f){return LN(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(F6,h,h)(f)}function h(f){return Ce(f)?Te(e,p,"whitespace")(f):p(f)}function p(f){return f===null||de(f)?(e.exit("definition"),r.parser.defined.push(s),t(f)):n(f)}}function z6(e,t,n){return r;function r(l){return Me(l)?Ll(e,s)(l):n(l)}function s(l){return $N(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Ce(l)?Te(e,o,"whitespace")(l):o(l)}function o(l){return l===null||de(l)?t(l):n(l)}}const B6={name:"hardBreakEscape",tokenize:U6};function U6(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return de(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const H6={name:"headingAtx",resolve:W6,tokenize:V6};function W6(e,t){let n=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Cn(e,r,n-r+1,[["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t]])),e}function V6(e,t,n){let r=0;return s;function s(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||Me(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||de(d)?(e.exit("atxHeading"),t(d)):Ce(d)?Te(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||Me(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const q6=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hb=["pre","script","style","textarea"],K6={concrete:!0,name:"htmlFlow",resolveTo:Q6,tokenize:X6},G6={partial:!0,tokenize:Z6},Y6={partial:!0,tokenize:J6};function Q6(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function X6(e,t,n){const r=this;let s,i,o,l,c;return u;function u(T){return d(T)}function d(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),h}function h(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),i=!0,y):T===63?(e.consume(T),s=3,r.interrupt?t:C):Vt(T)?(e.consume(T),o=String.fromCharCode(T),b):n(T)}function p(T){return T===45?(e.consume(T),s=2,f):T===91?(e.consume(T),s=5,l=0,v):Vt(T)?(e.consume(T),s=4,r.interrupt?t:C):n(T)}function f(T){return T===45?(e.consume(T),r.interrupt?t:C):n(T)}function v(T){const U="CDATA[";return T===U.charCodeAt(l++)?(e.consume(T),l===U.length?r.interrupt?t:N:v):n(T)}function y(T){return Vt(T)?(e.consume(T),o=String.fromCharCode(T),b):n(T)}function b(T){if(T===null||T===47||T===62||Me(T)){const U=T===47,ne=o.toLowerCase();return!U&&!i&&hb.includes(ne)?(s=1,r.interrupt?t(T):N(T)):q6.includes(o.toLowerCase())?(s=6,U?(e.consume(T),g):r.interrupt?t(T):N(T)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):i?x(T):w(T))}return T===45||Dt(T)?(e.consume(T),o+=String.fromCharCode(T),b):n(T)}function g(T){return T===62?(e.consume(T),r.interrupt?t:N):n(T)}function x(T){return Ce(T)?(e.consume(T),x):_(T)}function w(T){return T===47?(e.consume(T),_):T===58||T===95||Vt(T)?(e.consume(T),S):Ce(T)?(e.consume(T),w):_(T)}function S(T){return T===45||T===46||T===58||T===95||Dt(T)?(e.consume(T),S):j(T)}function j(T){return T===61?(e.consume(T),k):Ce(T)?(e.consume(T),j):w(T)}function k(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),c=T,E):Ce(T)?(e.consume(T),k):A(T)}function E(T){return T===c?(e.consume(T),c=null,I):T===null||de(T)?n(T):(e.consume(T),E)}function A(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Me(T)?j(T):(e.consume(T),A)}function I(T){return T===47||T===62||Ce(T)?w(T):n(T)}function _(T){return T===62?(e.consume(T),D):n(T)}function D(T){return T===null||de(T)?N(T):Ce(T)?(e.consume(T),D):n(T)}function N(T){return T===45&&s===2?(e.consume(T),z):T===60&&s===1?(e.consume(T),Y):T===62&&s===4?(e.consume(T),X):T===63&&s===3?(e.consume(T),C):T===93&&s===5?(e.consume(T),R):de(T)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(G6,Q,F)(T)):T===null||de(T)?(e.exit("htmlFlowData"),F(T)):(e.consume(T),N)}function F(T){return e.check(Y6,M,Q)(T)}function M(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),$}function $(T){return T===null||de(T)?F(T):(e.enter("htmlFlowData"),N(T))}function z(T){return T===45?(e.consume(T),C):N(T)}function Y(T){return T===47?(e.consume(T),o="",O):N(T)}function O(T){if(T===62){const U=o.toLowerCase();return hb.includes(U)?(e.consume(T),X):N(T)}return Vt(T)&&o.length<8?(e.consume(T),o+=String.fromCharCode(T),O):N(T)}function R(T){return T===93?(e.consume(T),C):N(T)}function C(T){return T===62?(e.consume(T),X):T===45&&s===2?(e.consume(T),C):N(T)}function X(T){return T===null||de(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),X)}function Q(T){return e.exit("htmlFlow"),t(T)}}function J6(e,t,n){const r=this;return s;function s(o){return de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Z6(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Lc,t,n)}}const e8={name:"htmlText",tokenize:t8};function t8(e,t,n){const r=this;let s,i,o;return l;function l(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),u):C===47?(e.consume(C),j):C===63?(e.consume(C),w):Vt(C)?(e.consume(C),A):n(C)}function u(C){return C===45?(e.consume(C),d):C===91?(e.consume(C),i=0,v):Vt(C)?(e.consume(C),x):n(C)}function d(C){return C===45?(e.consume(C),f):n(C)}function h(C){return C===null?n(C):C===45?(e.consume(C),p):de(C)?(o=h,Y(C)):(e.consume(C),h)}function p(C){return C===45?(e.consume(C),f):h(C)}function f(C){return C===62?z(C):C===45?p(C):h(C)}function v(C){const X="CDATA[";return C===X.charCodeAt(i++)?(e.consume(C),i===X.length?y:v):n(C)}function y(C){return C===null?n(C):C===93?(e.consume(C),b):de(C)?(o=y,Y(C)):(e.consume(C),y)}function b(C){return C===93?(e.consume(C),g):y(C)}function g(C){return C===62?z(C):C===93?(e.consume(C),g):y(C)}function x(C){return C===null||C===62?z(C):de(C)?(o=x,Y(C)):(e.consume(C),x)}function w(C){return C===null?n(C):C===63?(e.consume(C),S):de(C)?(o=w,Y(C)):(e.consume(C),w)}function S(C){return C===62?z(C):w(C)}function j(C){return Vt(C)?(e.consume(C),k):n(C)}function k(C){return C===45||Dt(C)?(e.consume(C),k):E(C)}function E(C){return de(C)?(o=E,Y(C)):Ce(C)?(e.consume(C),E):z(C)}function A(C){return C===45||Dt(C)?(e.consume(C),A):C===47||C===62||Me(C)?I(C):n(C)}function I(C){return C===47?(e.consume(C),z):C===58||C===95||Vt(C)?(e.consume(C),_):de(C)?(o=I,Y(C)):Ce(C)?(e.consume(C),I):z(C)}function _(C){return C===45||C===46||C===58||C===95||Dt(C)?(e.consume(C),_):D(C)}function D(C){return C===61?(e.consume(C),N):de(C)?(o=D,Y(C)):Ce(C)?(e.consume(C),D):I(C)}function N(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,F):de(C)?(o=N,Y(C)):Ce(C)?(e.consume(C),N):(e.consume(C),M)}function F(C){return C===s?(e.consume(C),s=void 0,$):C===null?n(C):de(C)?(o=F,Y(C)):(e.consume(C),F)}function M(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||Me(C)?I(C):(e.consume(C),M)}function $(C){return C===47||C===62||Me(C)?I(C):n(C)}function z(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function Y(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),O}function O(C){return Ce(C)?Te(e,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):R(C)}function R(C){return e.enter("htmlTextData"),o(C)}}const Hy={name:"labelEnd",resolveAll:i8,resolveTo:o8,tokenize:a8},n8={tokenize:l8},r8={tokenize:c8},s8={tokenize:u8};function i8(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Cn(e,0,e.length,n),e}function o8(e,t){let n=e.length,r=0,s,i,o,l;for(;n--;)if(s=e[n][1],i){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(i=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(o=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=Mn(l,e.slice(i+1,i+r+3)),l=Mn(l,[["enter",d,t]]),l=Mn(l,zh(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),l=Mn(l,[["exit",d,t],e[o-2],e[o-1],["exit",u,t]]),l=Mn(l,e.slice(o+1)),l=Mn(l,[["exit",c,t]]),Cn(e,i,e.length,l),e}function a8(e,t,n){const r=this;let s=r.events.length,i,o;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){i=r.events[s][1];break}return l;function l(p){return i?i._inactive?h(p):(o=r.parser.defined.includes(hr(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(n8,d,o?d:h)(p):p===91?e.attempt(r8,d,o?u:h)(p):o?d(p):h(p)}function u(p){return e.attempt(s8,d,h)(p)}function d(p){return t(p)}function h(p){return i._balanced=!0,n(p)}}function l8(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),s}function s(h){return Me(h)?Ll(e,i)(h):i(h)}function i(h){return h===41?d(h):LN(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function o(h){return Me(h)?Ll(e,c)(h):d(h)}function l(h){return n(h)}function c(h){return h===34||h===39||h===40?$N(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return Me(h)?Ll(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function c8(e,t,n){const r=this;return s;function s(l){return FN.call(r,e,i,o,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(hr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function u8(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),s}function s(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const d8={name:"labelStartImage",resolveAll:Hy.resolveAll,tokenize:h8};function h8(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const f8={name:"labelStartLink",resolveAll:Hy.resolveAll,tokenize:p8};function p8(e,t,n){const r=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const lp={name:"lineEnding",tokenize:m8};function m8(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Te(e,t,"linePrefix")}}const Vu={name:"thematicBreak",tokenize:g8};function g8(e,t,n){let r=0,s;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return s=u,l(u)}function l(u){return u===s?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||de(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Ce(u)?Te(e,l,"whitespace")(u):l(u))}}const Xt={continuation:{tokenize:w8},exit:S8,name:"list",tokenize:x8},v8={partial:!0,tokenize:k8},y8={partial:!0,tokenize:b8};function x8(e,t,n){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(f){const v=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:hg(f)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Vu,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return n(f)}function c(f){return hg(f)&&++o<10?(e.consume(f),c):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Lc,r.interrupt?n:d,e.attempt(v8,p,h))}
vendor: 5,359 bytes, line 400
400function d(f){return r.containerState.initialBlankLine=!0,i++,p(f)}function h(f){return Ce(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function w8(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Lc,s,i);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Te(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!Ce(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(y8,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Te(e,e.attempt(Xt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function b8(e,t,n){const r=this;return Te(e,s,"listItemIndent",r.containerState.size+1);function s(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function S8(e){e.exit(this.containerState.type)}function k8(e,t,n){const r=this;return Te(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const o=r.events[r.events.length-1];return!Ce(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const fb={name:"setextUnderline",resolveTo:j8,tokenize:C8};function j8(e,t){let n=e.length,r,s,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function C8(e,t,n){const r=this;let s;return i;function i(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),s=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===s?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Ce(u)?Te(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||de(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const _8={tokenize:E8};function E8(e){const t=this,n=e.attempt(Lc,r,e.attempt(this.parser.constructs.flowInitial,s,Te(e,e.attempt(this.parser.constructs.flow,s,e.attempt(R6,s)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const N8={resolveAll:BN()},T8=zN("string"),P8=zN("text");function zN(e){return{resolveAll:BN(e==="text"?A8:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],i=n.attempt(s,o,l);return o;function o(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=s[d];let p=-1;if(h)for(;++p<h.length;){const f=h[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function BN(e){return t;function t(n,r){let s=-1,i;for(;++s<=n.length;)i===void 0?n[s]&&n[s][1].type==="data"&&(i=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==i+2&&(n[i][1].end=n[s-1][1].end,n.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(n,r):n}}function A8(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let i=s.length,o=-1,l=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const R8={42:Xt,43:Xt,45:Xt,48:Xt,49:Xt,50:Xt,51:Xt,52:Xt,53:Xt,54:Xt,55:Xt,56:Xt,57:Xt,62:IN},I8={91:L6},O8={[-2]:ap,[-1]:ap,32:ap},D8={35:H6,42:Vu,45:[fb,Vu],60:K6,61:fb,95:Vu,96:db,126:db},M8={38:DN,92:ON},L8={[-5]:lp,[-4]:lp,[-3]:lp,33:d8,38:DN,42:fg,60:[f6,e8],91:f8,92:[B6,ON],93:Hy,95:fg,96:_6},F8={null:[fg,N8]},$8={null:[42,95]},z8={null:[]},B8=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$8,contentInitial:I8,disable:z8,document:R8,flow:D8,flowInitial:O8,insideSpan:F8,string:M8,text:L8},Symbol.toStringTag,{value:"Module"}));function U8(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 19,075 bytes, lines 400-406
400olumn:n&&n.column||1,offset:n&&n.offset||0};const s={},i=[];let o=[],l=[];const c={attempt:E(j),check:E(k),consume:x,enter:w,exit:S,interrupt:E(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:v,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function h(D){return o=Mn(o,D),b(),o[o.length-1]!==null?[]:(A(t,0),u.events=zh(i,u.events,u),u.events)}function p(D,N){return W8(f(D),N)}function f(D){return H8(o,D)}function v(){const{_bufferIndex:D,_index:N,line:F,column:M,offset:$}=r;return{_bufferIndex:D,_index:N,line:F,column:M,offset:$}}function y(D){s[D.line]=D.column,_()}function b(){let D;for(;r._index<o.length;){const N=o[r._index];if(typeof N=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<N.length;)g(N.charCodeAt(r._bufferIndex));else g(N)}}function g(D){d=d(D)}function x(D){de(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,_()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function w(D,N){const F=N||{};return F.type=D,F.start=v(),u.events.push(["enter",F,u]),l.push(F),F}function S(D){const N=l.pop();return N.end=v(),u.events.push(["exit",N,u]),N}function j(D,N){A(D,N.from)}function k(D,N){N.restore()}function E(D,N){return F;function F(M,$,z){let Y,O,R,C;return Array.isArray(M)?Q(M):"tokenize"in M?Q([M]):X(M);function X(se){return H;function H(W){const ie=W!==null&&se[W],oe=W!==null&&se.null,he=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return Q(he)(W)}}function Q(se){return Y=se,O=0,se.length===0?z:T(se[O])}function T(se){return H;function H(W){return C=I(),R=se,se.partial||(u.currentConstruct=se),se.name&&u.parser.constructs.disable.null.includes(se.name)?ne():se.tokenize.call(N?Object.assign(Object.create(u),N):u,c,U,ne)(W)}}function U(se){return D(R,C),$}function ne(se){return C.restore(),++O<Y.length?T(Y[O]):z}}}function A(D,N){D.resolveAll&&!i.includes(D)&&i.push(D),D.resolve&&Cn(u.events,N,u.events.length-N,D.resolve(u.events.slice(N),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function I(){const D=v(),N=u.previous,F=u.currentConstruct,M=u.events.length,$=Array.from(l);return{from:M,restore:z};function z(){r=D,u.previous=N,u.currentConstruct=F,u.events.length=M,l=$,_()}}function _(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function H8(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;let o;if(n===s)o=[e[n].slice(r,i)];else{if(o=e.slice(n,s),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}i>0&&o.push(e[s].slice(0,i))}return o}function W8(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=` 401`;break}case-3:{o=`\r 402`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(i)}s=i===-2,r.push(o)}return r.join("")}function V8(e){const r={constructs:AN([B8,...(e||{}).extensions||[]]),content:s(o6),defined:[],document:s(l6),flow:s(_8),lazy:{},string:s(T8),text:s(P8)};return r;function s(i){return o;function o(l){return U8(r,i,l)}}}function q8(e){for(;!MN(e););return e}const pb=/[\0\t\n\r]/g;function K8(){let e=1,t="",n=!0,r;return s;function s(i,o,l){const c=[];let u,d,h,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),h=0,t="",n&&(i.charCodeAt(0)===65279&&h++,n=void 0);h<i.length;){if(pb.lastIndex=h,u=pb.exec(i),p=u&&u.index!==void 0?u.index:i.length,f=i.charCodeAt(p),!u){t=i.slice(h);break}if(f===10&&h===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<p&&(c.push(i.slice(h,p)),e+=p-h),f){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const G8=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Y8(e){return e.replace(G8,Q8)}function Q8(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),i=s===120||s===88;return RN(n.slice(i?2:1),i?16:10)}return Uy(n)||e}const UN={}.hasOwnProperty;function X8(e,t,n){return typeof t!="string"&&(n=t,t=void 0),J8(n)(q8(V8(n).document().write(K8()(e,t,!0))))}function J8(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(hn),autolinkProtocol:I,autolinkEmail:I,atxHeading:i(xt),blockQuote:i(oe),characterEscape:I,characterReference:I,codeFenced:i(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(he,o),codeText:i(fe,o),codeTextData:I,data:I,codeFlowValue:I,definition:i(Be),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(nt),hardBreakEscape:i(jt),hardBreakTrailing:i(jt),htmlFlow:i(Ze,o),htmlFlowData:I,htmlText:i(Ze,o),htmlTextData:I,image:i(Ct),label:o,link:i(hn),listItem:i(Pn),listItemValue:p,listOrdered:i($r,h),listUnordered:i($r),paragraph:i(ds),reference:T,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(xt),strong:i(Vn),thematicBreak:i(co)},exit:{atxHeading:c(),atxHeadingSequence:j,autolink:c(),autolinkEmail:ie,autolinkProtocol:W,blockQuote:c(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:se,characterReference:H,codeFenced:c(b),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:v,codeFlowValue:_,codeIndented:c(g),codeText:c($),codeTextData:_,data:_,definition:c(),definitionDestinationString:S,definitionLabelString:x,definitionTitleString:w,emphasis:c(),hardBreakEscape:c(N),hardBreakTrailing:c(N),htmlFlow:c(F),htmlFlowData:_,htmlText:c(M),htmlTextData:_,image:c(Y),label:R,labelText:O,lineEnding:D,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:U,resourceDestinationString:C,resourceTitleString:X,resource:Q,setextHeading:c(A),setextHeadingLineSequence:E,setextHeadingText:k,strong:c(),thematicBreak:c()}};HN(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(L){let G={type:"root",children:[]};const le={stack:[G],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:d,data:n},ye=[];let ke=-1;for(;++ke<L.length;)if(L[ke][1].type==="listOrdered"||L[ke][1].type==="listUnordered")if(L[ke][0]==="enter")ye.push(ke);else{const wt=ye.pop();ke=s(L,wt,ke)}for(ke=-1;++ke<L.length;){const wt=t[L[ke][0]];UN.call(wt,L[ke][1].type)&&wt[L[ke][1].type].call(Object.assign({sliceSerialize:L[ke][2].sliceSerialize},le),L[ke][1])}if(le.tokenStack.length>0){const wt=le.tokenStack[le.tokenStack.length-1];(wt[1]||mb).call(le,void 0,wt[0])}for(G.position={start:ys(L.length>0?L[0][1].start:{line:1,column:1,offset:0}),end:ys(L.length>0?L[L.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke<t.transforms.length;)G=t.transforms[ke](G)||G;return G}function s(L,G,le){let ye=G-1,ke=-1,wt=!1,fn,_t,rt,$t;for(;++ye<=le;){const Re=L[ye];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?ke++:ke--,$t=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(fn&&!$t&&!ke&&!rt&&(rt=ye),$t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$t=void 0}if(!ke&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||ke===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(fn){let Et=ye;for(_t=void 0;Et--;){const Qt=L[Et];if(Qt[1].type==="lineEnding"||Qt[1].type==="lineEndingBlank"){if(Qt[0]==="exit")continue;_t&&(L[_t][1].type="lineEndingBlank",wt=!0),Qt[1].type="lineEnding",_t=Et}else if(!(Qt[1].type==="linePrefix"||Qt[1].type==="blockQuotePrefix"||Qt[1].type==="blockQuotePrefixWhitespace"||Qt[1].type==="blockQuoteMarker"||Qt[1].type==="listItemIndent"))break}rt&&(!_t||rt<_t)&&(fn._spread=!0),fn.end=Object.assign({},_t?L[_t][1].start:Re[1].end),L.splice(_t||ye,0,["exit",fn,Re[2]]),ye++,le++}if(Re[1].type==="listItemPrefix"){const Et={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};fn=Et,L.splice(ye,0,["enter",Et,Re[2]]),ye++,le++,rt=void 0,$t=!0}}}return L[G][1]._spread=wt,le}function i(L,G){return le;function le(ye){l.call(this,L(ye),ye),G&&G.call(this,ye)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(L,G,le){this.stack[this.stack.length-1].children.push(L),this.stack.push(L),this.tokenStack.push([G,le||void 0]),L.position={start:ys(G.start),end:void 0}}function c(L){return G;function G(le){L&&L.call(this,le),u.call(this,le)}}function u(L,G){const le=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==L.type&&(G?G.call(this,L,ye[0]):(ye[1]||mb).call(this,L,ye[0]));else throw new Error("Cannot close `"+L.type+"` ("+Ml({start:L.start,end:L.end})+"): itâs not open");le.position.end=ys(L.end)}function d(){return By(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(L){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(L),10),this.data.expectingFirstListItemValue=void 0}}function f(){const L=this.resume(),G=this.stack[this.stack.length-1];G.lang=L}function v(){const L=this.resume(),G=this.stack[this.stack.length-1];G.meta=L}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const L=this.resume(),G=this.stack[this.stack.length-1];G.value=L.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const L=this.resume(),G=this.stack[this.stack.length-1];G.value=L.replace(/(\r?\n|\r)$/g,"")}function x(L){const G=this.resume(),le=this.stack[this.stack.length-1];le.label=G,le.identifier=hr(this.sliceSerialize(L)).toLowerCase()}function w(){const L=this.resume(),G=this.stack[this.stack.length-1];G.title=L}function S(){const L=this.resume(),G=this.stack[this.stack.length-1];G.url=L}function j(L){const G=this.stack[this.stack.length-1];if(!G.depth){const le=this.sliceSerialize(L).length;G.depth=le}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function E(L){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(L).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function I(L){const le=this.stack[this.stack.length-1].children;let ye=le[le.length-1];(!ye||ye.type!=="text")&&(ye=qn(),ye.position={start:ys(L.start),end:void 0},le.push(ye)),this.stack.push(ye)}function _(L){const G=this.stack.pop();G.value+=this.sliceSerialize(L),G.position.end=ys(L.end)}function D(L){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=G.children[G.children.length-1];le.position.end=ys(L.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(I.call(this,L),_.call(this,L))}function N(){this.data.atHardBreak=!0}function F(){const L=this.resume(),G=this.stack[this.stack.length-1];G.value=L}function M(){const L=this.resume(),G=this.stack[this.stack.length-1];G.value=L}function $(){const L=this.resume(),G=this.stack[this.stack.length-1];G.value=L}function z(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=G,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function Y(){const L=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";L.type+="Reference",L.referenceType=G,delete L.url,delete L.title}else delete L.identifier,delete L.label;this.data.referenceType=void 0}function O(L){const G=this.sliceSerialize(L),le=this.stack[this.stack.length-2];le.label=Y8(G),le.identifier=hr(G).toLowerCase()}function R(){const L=this.stack[this.stack.length-1],G=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const ye=L.children;le.children=ye}else le.alt=G}function C(){const L=this.resume(),G=this.stack[this.stack.length-1];G.url=L}function X(){const L=this.resume(),G=this.stack[this.stack.length-1];G.title=L}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function U(L){const G=this.resume(),le=this.stack[this.stack.length-1];le.label=G,le.identifier=hr(this.sliceSerialize(L)).toLowerCase(),this.data.referenceType="full"}function ne(L){this.data.characterReferenceType=L.type}function se(L){const G=this.sliceSerialize(L),le=this.data.characterReferenceType;let ye;le?(ye=RN(G,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Uy(G);const ke=this.stack[this.stack.length-1];ke.value+=ye}function H(L){const G=this.stack.pop();G.position.end=ys(L.end)}function W(L){_.call(this,L);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(L)}function ie(L){_.call(this,L);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(L)}function oe(){return{type:"blockquote",children:[]}}function he(){return{type:"code",lang:null,meta:null,value:""}}function fe(){return{type:"inlineCode",value:""}}function Be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function nt(){return{type:"emphasis",children:[]}}function xt(){return{type:"heading",depth:0,children:[]}}function jt(){return{type:"break"}}function Ze(){return{type:"html",value:""}}function Ct(){return{type:"image",title:null,url:"",alt:null}}function hn(){return{type:"link",title:null,url:"",children:[]}}function $r(L){return{type:"list",ordered:L.type==="listOrdered",start:null,spread:L._spread,children:[]}}function Pn(L){return{type:"listItem",spread:L._spread,checked:null,children:[]}}function ds(){return{type:"paragraph",children:[]}}function Vn(){return{type:"strong",children:[]}}function qn(){return{type:"text",value:""}}function co(){return{type:"thematicBreak"}}}function ys(e){return{line:e.line,column:e.column,offset:e.offset}}function HN(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?HN(e,r):Z8(e,r)}}function Z8(e,t){let n;for(n in t)if(UN.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function mb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ml({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ml({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ml({start:t.start,end:t.end})+") is still open")}function eH(e){const t=this;t.parser=n;function n(r){return X8(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tH(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function nH(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 403`}]}function rH(e,t){const n=t.value?t.value+` 404`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function sH(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iH(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oH(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ka(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function aH(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lH(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function WN(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function cH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return WN(e,t);const s={src:Ka(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function uH(e,t){const n={src:Ka(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function dH(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function hH(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return WN(e,t);const s={href:Ka(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function fH(e,t){const n={href:Ka(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function pH(e,t,n){const r=e.all(t),s=n?mH(n):VN(t),i={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(s||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:` 405`}),d.type==="element"&&d.tagName==="p"&&!s?o.push(...d.children):o.push(d)}const c=r[r.length-1];c&&(s||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:` 406`});const u={type:"element",tagName:"li",properties:i,children:o};
vendor: 4,561 bytes, line 406
406return e.patch(t,u),e.applyData(t,u)}function mH(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=VN(n[r])}return t}function VN(e){const t=e.spread;return t??e.children.length>1}function gH(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const o=r[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function vH(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yH(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xH(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wH(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),s.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ly(t.children[1]),c=jN(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),s.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,i),e.applyData(t,i)}function bH(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const h=t.children[c],p={},f=o?o[c]:void 0;f&&(p.align=f);let v={type:"element",tagName:i,properties:p,children:[]};h&&(v.children=e.all(h),e.patch(h,v),v=e.applyData(h,v)),u.push(v)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function SH(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const gb=9,vb=32;function kH(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const i=[];for(;r;)i.push(yb(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return i.push(yb(t.slice(s),s>0,!1)),i.join("")}function yb(e,t,n){let r=0,s=e.length;if(t){let i=e.codePointAt(r);for(;i===gb||i===vb;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(s-1);for(;i===gb||i===vb;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function jH(e,t){const n={type:"text",value:kH(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function CH(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const _H={blockquote:tH,break:nH,code:rH,delete:sH,emphasis:iH,footnoteReference:oH,heading:aH,html:lH,imageReference:cH,image:uH,inlineCode:dH,linkReference:hH,link:fH,listItem:pH,list:gH,paragraph:vH,root:yH,strong:xH,table:wH,tableCell:SH,tableRow:bH,text:jH,thematicBreak:CH,toml:wu,yaml:wu,definition:wu,footnoteDefinition:wu};function wu(){}const qN=-1,Bh=0,Fl=1,Dd=2,Wy=3,Vy=4,qy=5,Ky=6,KN=7,GN=8,xb=typeof self=="object"?self:globalThis,EH=(e,t)=>{const n=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,o]=t[s];switch(i){case Bh:case qN:return n(o,s);case Fl:{const l=n([],s);for(const c of o)l.push(r(c));return l}case Dd:{const l=n({},s);for(const[c,u]of o)l[r(c)]=r(u);return l}case Wy:return n(new Date(o),s);case Vy:{const{source:l,flags:c}=o;return n(new RegExp(l,c),s)}case qy:{const l=n(new Map,s);for(const[c,u]of o)l.set(r(c),r(u));return l}case Ky:{const l=n(new Set,s);for(const c of o)l.add(r(c));return l}case KN:{const{name:l,message:c}=o;return n(new xb[l](c),s)}case GN:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new xb[i](o),s)};return r},wb=e=>EH(new Map,e)(0),ko="",{toString:NH}={},{keys:TH}=Object,hl=e=>{const t=typeof e;if(t!=="object"||!e)return[Bh,t];const n=NH.call(e).slice(8,-1);switch(n){case"Array":return[Fl,ko];case"Object":return[Dd,ko];case"Date":return[Wy,ko];case"RegExp":return[Vy,ko];case"Map":return[qy,ko];case"Set":return[Ky,ko];case"DataView":return[Fl,n]}return n.includes("Array")?[Fl,n]:n.includes("Error")?[KN,n]:[Dd,n]},bu=([e,t])=>e===Bh&&(t==="function"||t==="symbol"),PH=(e,t,n,r)=>{const s=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},i=o=>
vendor: 4,708 bytes, lines 406-408
406{if(n.has(o))return n.get(o);let[l,c]=hl(o);switch(l){case Bh:{let d=o;switch(c){case"bigint":l=GN,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([qN],o)}return s([l,d],o)}case Fl:{if(c){let p=o;return c==="DataView"?p=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(o)),s([c,[...p]],o)}const d=[],h=s([l,d],o);for(const p of o)d.push(i(p));return h}case Dd:{if(c)switch(c){case"BigInt":return s([c,o.toString()],o);case"Boolean":case"Number":case"String":return s([c,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());const d=[],h=s([l,d],o);for(const p of TH(o))(e||!bu(hl(o[p])))&&d.push([i(p),i(o[p])]);return h}case Wy:return s([l,o.toISOString()],o);case Vy:{const{source:d,flags:h}=o;return s([l,{source:d,flags:h}],o)}case qy:{const d=[],h=s([l,d],o);for(const[p,f]of o)(e||!(bu(hl(p))||bu(hl(f))))&&d.push([i(p),i(f)]);return h}case Ky:{const d=[],h=s([l,d],o);for(const p of o)(e||!bu(hl(p)))&&d.push(i(p));return h}}const{message:u}=o;return s([l,{name:c,message:u}],o)};return i},bb=(e,{json:t,lossy:n}={})=>{const r=[];return PH(!(t||n),!!t,new Map,r)(e),r},Md=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?wb(bb(e,t)):structuredClone(e):(e,t)=>wb(bb(e,t));function AH(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function RH(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function IH(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||AH,r=e.options.footnoteBackLabel||RH,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),p=Ka(h.toLowerCase());let f=0;const v=[],y=e.footnoteCounts.get(h);for(;y!==void 0&&++f<=y;){v.length>0&&v.push({type:"text",value:" "});let x=typeof n=="string"?n:n(c,f);typeof x=="string"&&(x={type:"text",value:x}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,f),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const b=d[d.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const x=b.children[b.children.length-1];x&&x.type==="text"?x.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...v)}else d.push(...v);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Md(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` 407`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` 408`}]}}const Uh=function(e){if(e==null)return LH;if(typeof e=="function")return Hh(e);if(typeof e=="object")return Array.isArray(e)?OH(e):DH(e);if(typeof e=="string")return MH(e);throw new Error("Expected function, string, or object as test")};function OH(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Uh(e[n]);return Hh(r);function r(...s){let i=-1;for(;++i<t.length;)if(t[i].apply(this,s))return!0;return!1}}function DH(e){const t=e;return Hh(n);function n(r){const s=r;let i;for(i in e)if(s[i]!==t[i])return!1;return!0}}function MH(e){return Hh(t);function t(n){return n&&n.type===e}}function Hh(e){return t;function t(n,r,s){return!!(FH(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function LH(){return!0}function FH(e){return e!==null&&typeof e=="object"&&"type"in e}const YN=[],$H=!0,pg=!1,zH="skip";function QN(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const i=Uh(s),o=r?-1:1;l(e,void 0,[])();function l(c,u,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=YN,v,y,b;if((!t||i(c,u,d[d.length-1]||void 0))&&(f=BH(n(c,d)),f[0]===pg))return f;if("children"in c&&c.children){const g=c;if(g.children&&f[0]!==zH)for(y=(r?g.children.length:-1)+o,b=d.concat(g);y>-1&&y<g.children.length;){const x=g.children[y];if(v=l(x,y,b)(),v[0]===pg)return v;y=typeof v[1]=="number"?v[1]:y+o}}return f}}}function BH(e){return Array.isArray(e)?e:typeof e=="number"?[$H,e]:e
vendor: 16,325 bytes, lines 408-412
408==null?YN:[e]}function Gy(e,t,n,r){let s,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,s=n):(i=t,o=n,s=r),QN(e,i,l,s);function l(c,u){const d=u[u.length-1],h=d?d.children.indexOf(c):void 0;return o(c,h,d)}}const mg={}.hasOwnProperty,UH={};function HH(e,t){const n=t||UH,r=new Map,s=new Map,i=new Map,o={..._H,...n.handlers},l={all:u,applyData:VH,definitionById:r,footnoteById:s,footnoteCounts:i,footnoteOrder:[],handlers:o,one:c,options:n,patch:WH,wrap:KH};return Gy(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:s,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),l;function c(d,h){const p=d.type,f=l.handlers[p];if(mg.call(l.handlers,p)&&f)return f(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in d){const{children:y,...b}=d,g=Md(b);return g.children=l.all(d),g}return Md(d)}return(l.options.unknownHandler||qH)(l,d,h)}function u(d){const h=[];if("children"in d){const p=d.children;let f=-1;for(;++f<p.length;){const v=l.one(p[f],d);if(v){if(f&&p[f-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=Sb(v.value)),!Array.isArray(v)&&v.type==="element")){const y=v.children[0];y&&y.type==="text"&&(y.value=Sb(y.value))}Array.isArray(v)?h.push(...v):h.push(v)}}}return h}}function WH(e,t){e.position&&(t.position=RU(e))}function VH(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&i&&Object.assign(n.properties,Md(i)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function qH(e,t){const n=t.data||{},r="value"in t&&!(mg.call(n,"hProperties")||mg.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function KH(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 409`});++r<e.length;)r&&n.push({type:"text",value:` 410`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 411`}),n}function Sb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function kb(e,t){const n=HH(e,t),r=n.one(e,void 0),s=IH(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` 412`},s),i}function GH(e,t){return e&&"run"in e?async function(n,r){const s=kb(n,{file:r,...t});await e.run(s,r)}:function(n,r){return kb(n,{file:r,...e||t})}}function jb(e){if(e)throw e}var qu=Object.prototype.hasOwnProperty,XN=Object.prototype.toString,Cb=Object.defineProperty,_b=Object.getOwnPropertyDescriptor,Eb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):XN.call(t)==="[object Array]"},Nb=function(t){if(!t||XN.call(t)!=="[object Object]")return!1;var n=qu.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&qu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var s;for(s in t);return typeof s>"u"||qu.call(t,s)},Tb=function(t,n){Cb&&n.name==="__proto__"?Cb(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Pb=function(t,n){if(n==="__proto__")if(qu.call(t,n)){if(_b)return _b(t,n).value}else return;return t[n]},YH=function e(){var t,n,r,s,i,o,l=arguments[0],c=1,u=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=Pb(l,n),s=Pb(t,n),l!==s&&(d&&s&&(Nb(s)||(i=Eb(s)))?(i?(i=!1,o=r&&Eb(r)?r:[]):o=r&&Nb(r)?r:{},Tb(l,{name:n,newValue:e(d,o,s)})):typeof s<"u"&&Tb(l,{name:n,newValue:s}));return l};const cp=Xi(YH);function gg(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function QH(){const e=[],t={run:n,use:r};return t;function n(...s){let i=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...s);function l(c,...u){const d=e[++i];let h=-1;if(c){o(c);return}for(;++h<s.length;)(u[h]===null||u[h]===void 0)&&(u[h]=s[h]);s=u,d?XH(d,l)(...u):o(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function XH(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(s);try{c=e.apply(this,o)}catch(u){const d=u;if(l&&n)throw d;return s(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(o,...l){n||(n=!0,t(o,...l))}function i(o){s(null,o)}}const Sr={basename:JH,dirname:ZH,extname:eW,join:tW,sep:"/"};function JH(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fc(e);let n=0,r=-1,s=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else o<0&&(i=!0,o=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ZH(e){if(Fc(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function eW(e){Fc(e);let t=e.length,n=-1,r=0,s=-1,i=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?s<0?s=t:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||n<0||i===0||i===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function tW(...e){let t=-1,n;for(;++t<e.length;)Fc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":nW(n)}function nW(e){Fc(e);const t=e.codePointAt(0)===47;let n=rW(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rW(e,t){let n="",r=0,s=-1,i=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(s===o-1||i===1))if(s!==o-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),s=o,i=0;continue}}else if(n.length>0){n="",r=0,s=o,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,o):n=e.slice(s+1,o),r=o-s-1;s=o,i=0}else l===46&&i>-1?i++:i=-1}return n}function Fc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sW={cwd:iW};function iW(){return"/"}function vg(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oW(e){if(typeof e=="string")e=new URL(e);else if(!vg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return aW(e)}function aW(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const up=["history","path","basename","stem","extname","dirname"];class JN{constructor(t){let n;t?vg(t)?n={path:t}:typeof t=="string"||lW(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sW.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<up.length;){const i=up[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let s;for(s in n)up.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Sr.basename(this.path):void 0}set basename(t){hp(t,"basename"),dp(t,"basename"),this.path=Sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Sr.dirname(this.path):void 0}set dirname(t){Ab(this.basename,"dirname"),this.path=Sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Sr.extname(this.path):void 0}set extname(t){if(dp(t,"extname"),Ab(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vg(t)&&(t=oW(t)),hp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Sr.basename(this.path,this.extname):void 0}set stem(t){hp(t,"stem"),dp(t,"stem"),this.path=Sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new Ft(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function dp(e,t){if(e&&e.includes(Sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sr.sep+"`")}function hp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ab(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cW=function(e){const r=this.constructor.prototype,s=r[e],i=function(){return s.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},uW={}.hasOwnProperty;class Yy extends cW{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=QH()}copy(){const t=new Yy;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(cp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(mp("data",this.frozen),this.namespace[t]=n,this):uW.call(this.namespace,t)&&this.namespace[t]||void 0:t?(mp("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Su(t),r=this.parser||this.Parser;return fp("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),fp("process",this.parser||this.Parser),pp("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(i,o){const l=Su(t),c=r.parse(l);r.run(c,l,function(d,h,p){if(d||!h||!p)return u(d);const f=h,v=r.stringify(f,p);fW(v)?p.value=v:p.result=v,u(d,p)});function u(d,h){d||!h?o(d):i?i(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),fp("processSync",this.parser||this.Parser),pp("processSync",this.compiler||this.Compiler),this.process(t,s),Ib("processSync","process",n),r;function s(i,o){n=!0,jb(i),r=o}}run(t,n,r){Rb(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(o,l){const c=Su(n);s.run(t,c,u);function u(d,h,p){const f=h||t;d?l(d):o?o(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,s;return this.run(t,n,i),Ib("runSync","run",r),s;function i(o,l){jb(o),s=l,r=!0}}stringify(t,n){this.freeze();const r=Su(n),s=this.compiler||this.Compiler;return pp("stringify",s),Rb(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(mp("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;c(d,h)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(s.settings=cp(!0,s.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];i(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===u){p=h;break}if(p===-1)r.push([u,...d]);else if(d.length>0){let[f,...v]=d;const y=r[p][1];gg(y)&&gg(f)&&(f=cp(!0,y,f)),r[p]=[u,f,...v]}}}}const dW=new Yy().freeze();function fp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function pp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mp(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rb(e){if(!gg(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ib(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Su(e){return hW(e)?e:new JN(e)}function hW(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fW(e){return typeof e=="string"||pW(e)}function pW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const mW="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ob=[],Db={allowDangerousHtml:!0},gW=/^(https?|ircs?|mailto|xmpp)$/i,vW=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yW(e){const t=xW(e),n=wW(e);return bW(t.runSync(t.parse(n),n),e)}function xW(e){const t=e.rehypePlugins||Ob,n=e.remarkPlugins||Ob,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Db}:Db;return dW().use(eH).use(n).use(GH,r).use(t)}function wW(e){const t=e.children||"",n=new JN;return typeof t=="string"&&(n.value=t),n}function bW(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,i=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||SW;for(const d of vW)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+mW+d.id,void 0);return Gy(e,u),LU(e,{Fragment:a.Fragment,components:s,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function u(d,h,p){if(d.type==="raw"&&p&&typeof h=="number")return o?p.children.splice(h,1):p.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let f;
vendor: 6,046 bytes, lines 412-413
412for(f in op)if(Object.hasOwn(op,f)&&Object.hasOwn(d.properties,f)){const v=d.properties[f],y=op[f];(y===null||y.includes(d.tagName))&&(d.properties[f]=c(String(v||""),f,d))}}if(d.type==="element"){let f=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!f&&r&&typeof h=="number"&&(f=!r(d,h,p)),f&&p&&typeof h=="number")return l&&d.children?p.children.splice(h,1,...d.children):p.children.splice(h,1),h}}}function SW(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||gW.test(e.slice(0,t))?e:""}function Mb(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function kW(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jW(e,t,n){const s=Uh((n||{}).ignore||[]),i=CW(t);let o=-1;for(;++o<i.length;)QN(e,"text",l);function l(u,d){let h=-1,p;for(;++h<d.length;){const f=d[h],v=p?p.children:void 0;if(s(f,v?v.indexOf(f):void 0,p))return;p=f}if(p)return c(u,d)}function c(u,d){const h=d[d.length-1],p=i[o][0],f=i[o][1];let v=0;const b=h.children.indexOf(u);let g=!1,x=[];p.lastIndex=0;let w=p.exec(u.value);for(;w;){const S=w.index,j={index:w.index,input:w.input,stack:[...d,u]};let k=f(...w,j);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=S+1:(v!==S&&x.push({type:"text",value:u.value.slice(v,S)}),Array.isArray(k)?x.push(...k):k&&x.push(k),v=S+w[0].length,g=!0),!p.global)break;w=p.exec(u.value)}return g?(v<u.value.length&&x.push({type:"text",value:u.value.slice(v)}),h.children.splice(b,1,...x)):x=[u],b+x.length}}function CW(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([_W(s[0]),EW(s[1])])}return t}function _W(e){return typeof e=="string"?new RegExp(kW(e),"g"):e}function EW(e){return typeof e=="function"?e:function(){return e}}const gp="phrasing",vp=["autolink","link","image","label"];function NW(){return{transforms:[DW],enter:{literalAutolink:PW,literalAutolinkEmail:yp,literalAutolinkHttp:yp,literalAutolinkWww:yp},exit:{literalAutolink:OW,literalAutolinkEmail:IW,literalAutolinkHttp:AW,literalAutolinkWww:RW}}}function TW(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:gp,notInConstruct:vp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:gp,notInConstruct:vp},{character:":",before:"[ps]",after:"\\/",inConstruct:gp,notInConstruct:vp}]}}function PW(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function yp(e){this.config.enter.autolinkProtocol.call(this,e)}function AW(e){this.config.exit.autolinkProtocol.call(this,e)}function RW(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function IW(e){this.config.exit.autolinkEmail.call(this,e)}function OW(e){this.exit(e)}function DW(e){jW(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,MW],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),LW]],{ignore:["link","linkReference"]})}function MW(e,t,n,r,s){let i="";if(!ZN(s)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!FW(n)))return!1;const o=$W(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:i+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function LW(e,t,n,r){return!ZN(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function FW(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $W(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Mb(e,"(");let i=Mb(e,")");for(;r!==-1&&s>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function ZN(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gi(n)||$h(n))&&(!t||n!==47)}eT.peek=GW;function zW(){this.buffer()}function BW(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function UW(){this.buffer()}function HW(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function WW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function VW(e){this.exit(e)}function qW(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function KW(e){this.exit(e)}function GW(){return"["}function eT(e,t,n,r){const s=n.createTracker(r);let i=s.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return i+=s.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),o(),i+=s.move("]"),i}function YW(){return{enter:{gfmFootnoteCallString:zW,gfmFootnoteCall:BW,gfmFootnoteDefinitionLabelString:UW,gfmFootnoteDefinition:HW},exit:{gfmFootnoteCallString:WW,gfmFootnoteCall:VW,gfmFootnoteDefinitionLabelString:qW,gfmFootnoteDefinition:KW}}}function QW(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:eT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,i,o){const l=i.createTracker(o);let c=l.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=l.move(i.safe(i.associationId(r),{before:c,after:"]"})),d(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?` 413`:" ")+i.indentLines(i.containerFlow(r,l.current()),t?tT:XW))),u(),c}}function XW(e,t,n){return t===0?e:tT(e,t,n)}function tT(e,t,n){return(n?"":" ")+e}const JW=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];nT.peek=r9;
vendor: 8,833 bytes, lines 413-425
413function ZW(){return{canContainEols:["delete"],enter:{strikethrough:t9},exit:{strikethrough:n9}}}function e9(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JW}],handlers:{delete:nT}}}function t9(e){this.enter({type:"delete",children:[]},e)}function n9(e){this.exit(e)}function nT(e,t,n,r){const s=n.createTracker(r),i=n.enter("strikethrough");let o=s.move("~~");return o+=n.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),i(),o}function r9(){return"~"}function s9(e){return e.length}function i9(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||s9,i=[],o=[],l=[],c=[];let u=0,d=-1;for(;++d<e.length;){const y=[],b=[];let g=-1;for(e[d].length>u&&(u=e[d].length);++g<e[d].length;){const x=o9(e[d][g]);if(n.alignDelimiters!==!1){const w=s(x);b[g]=w,(c[g]===void 0||w>c[g])&&(c[g]=w)}y.push(x)}o[d]=y,l[d]=b}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)i[h]=Lb(r[h]);else{const y=Lb(r);for(;++h<u;)i[h]=y}h=-1;const p=[],f=[];for(;++h<u;){const y=i[h];let b="",g="";y===99?(b=":",g=":"):y===108?b=":":y===114&&(g=":");let x=n.alignDelimiters===!1?1:Math.max(1,c[h]-b.length-g.length);const w=b+"-".repeat(x)+g;n.alignDelimiters!==!1&&(x=b.length+x+g.length,x>c[h]&&(c[h]=x),f[h]=x),p[h]=w}o.splice(1,0,p),l.splice(1,0,f),d=-1;const v=[];for(;++d<o.length;){const y=o[d],b=l[d];h=-1;const g=[];for(;++h<u;){const x=y[h]||"";let w="",S="";if(n.alignDelimiters!==!1){const j=c[h]-(b[h]||0),k=i[h];k===114?w=" ".repeat(j):k===99?j%2?(w=" ".repeat(j/2+.5),S=" ".repeat(j/2-.5)):(w=" ".repeat(j/2),S=w):S=" ".repeat(j)}n.delimiterStart!==!1&&!h&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||h)&&g.push(" "),n.alignDelimiters!==!1&&g.push(w),g.push(x),n.alignDelimiters!==!1&&g.push(S),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&g.push("|")}v.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return v.join(` 414`)}function o9(e){return e==null?"":String(e)}function Lb(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function a9(e,t,n,r){const s=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const o=n.indentLines(n.containerFlow(e,i.current()),l9);return s(),o}function l9(e,t,n){return">"+(n?"":" ")+e}function c9(e,t){return Fb(e,t.inConstruct,!0)&&!Fb(e,t.notInConstruct,!1)}function Fb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $b(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===` 415`&&c9(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\ 416`}function u9(e,t){const n=String(e);let r=n.indexOf(t),s=r,i=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++i>o&&(o=i):i=1,s=r+t.length,r=n.indexOf(t,s);return o}function d9(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function h9(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function f9(e,t,n,r){const s=h9(n),i=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(d9(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(i,p9);return h(),p}const l=n.createTracker(r),c=s.repeat(Math.max(u9(i,s)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:` 417`,encode:["`"],...l.current()})),h()}return d+=l.move(` 418`),i&&(d+=l.move(i+` 419`)),d+=l.move(c),u(),d}function p9(e,t,n){return(n?"":" ")+e}function Qy(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function m9(e,t,n,r){const s=Qy(n),i=s==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":` 420`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),l()),o(),u}function g9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ld(e,t,n){const r=Aa(e),s=Aa(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}rT.peek=v9;function rT(e,t,n,r){const s=g9(n),i=n.enter("emphasis"),o=n.createTracker(r),l=o.move(s);let c=o.move(n.containerPhrasing(e,{after:s,before:l,...o.current()}));const u=c.charCodeAt(0),d=Ld(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=fc(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=Ld(r.after.charCodeAt(0),h,s);p.inside&&(c=c.slice(0,-1)+fc(h));const f=o.move(s);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+c+f}function v9(e,t,n){return n.options.emphasis||"*"}function y9(e,t){let n=!1;return Gy(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,pg}),!!((!e.depth||e.depth<3)&&By(e)&&(t.options.setext||n))}function x9(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(y9(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:` 421`,after:` 422`});return h(),d(),p+` 423`+(s===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(` 424`))+1))}const o="#".repeat(s),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:` 425`,...i.current()});return/^[\t ]/.test(u)&&(u=fc(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),c(),l(),u}sT.peek=w9;function sT(e){return e.value||""}function w9(){return"<"}iT.peek=b9;function iT(e,t,n,r){const s=Qy(n),i=s==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),l()),u+=c.move(")"),o(),u}function b9(){return"!"}oT.peek=S9;function oT(e,t,n,r){const s=e.referenceType,i=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,i(),s==="full"||!u||u!==h?c+=l.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function S9(){return"!"}aT.peek=k9;function aT(e,t,n){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const o=n.unsafe[i],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return s+r+s}function k9(){return"`"}function lT(e,t){const n=By(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}cT.peek=j9;function cT(e,t,n,r){const s=Qy(n),i=s==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(lT(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=o.move("<");return h+=o.move(n.containerPhrasing(e,{before:h,after:">",...o.current()})),h+=o.move(">
425"),l(),n.stack=d,h}l=n.enter("link"),c=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(c=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=o.move(" "+s),u+=o.move(n.safe(e.title,{before:u,after:s,...o.current()})),u+=o.move(s),c()),u+=o.move(")"),l(),u}function j9(e,t,n){return lT(e,n)?"<":"["}uT.peek=C9;function uT(e,t,n,r){const s=e.referenceType,i=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,i(),s==="full"||!u||u!==h?c+=l.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function C9(){return"["}function Xy(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _9(e){const t=Xy(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function E9(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function dT(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function N9(e,t,n,r){const s=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?E9(n):Xy(n);const l=e.ordered?o==="."?")":".":_9(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),dT(n)===o&&d){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=i,s(),u}function T9(e){const t=e.options.listItemIndent||"one";
vendor: 6,067 bytes, lines 425-427
425if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function P9(e,t,n,r){const s=T9(n);let i=n.bulletCurrent||Xy(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(o-i.length)),l.shift(o);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(h,p,f){return p?(f?"":" ".repeat(o))+h:(f?i:i+" ".repeat(o-i.length))+h}}function A9(e,t,n,r){const s=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),s(),o}const R9=Uh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function I9(e,t,n,r){return(e.children.some(function(o){return R9(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function O9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hT.peek=D9;function hT(e,t,n,r){const s=O9(n),i=n.enter("strong"),o=n.createTracker(r),l=o.move(s+s);let c=o.move(n.containerPhrasing(e,{after:s,before:l,...o.current()}));const u=c.charCodeAt(0),d=Ld(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=fc(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=Ld(r.after.charCodeAt(0),h,s);p.inside&&(c=c.slice(0,-1)+fc(h));const f=o.move(s+s);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+c+f}function D9(e,t,n){return n.options.strong||"*"}function M9(e,t,n,r){return n.safe(e.value,r)}function L9(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function F9(e,t,n){const r=(dT(n)+(n.options.ruleSpaces?" ":"")).repeat(L9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const fT={blockquote:a9,break:$b,code:f9,definition:m9,emphasis:rT,hardBreak:$b,heading:x9,html:sT,image:iT,imageReference:oT,inlineCode:aT,link:cT,linkReference:uT,list:N9,listItem:P9,paragraph:A9,root:I9,strong:hT,text:M9,thematicBreak:F9};function $9(){return{enter:{table:z9,tableData:zb,tableHeader:zb,tableRow:U9},exit:{codeText:H9,table:B9,tableData:xp,tableHeader:xp,tableRow:xp}}}function z9(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function B9(e){this.exit(e),this.data.inTable=void 0}function U9(e){this.enter({type:"tableRow",children:[]},e)}function xp(e){this.exit(e)}function zb(e){this.enter({type:"tableCell",children:[]},e)}function H9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,W9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function W9(e,t){return t==="|"?t:e}function V9(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 426`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:c,tableRow:l}};function o(f,v,y,b){return u(d(f,y,b),f.align)}function l(f,v,y,b){const g=h(f,y,b),x=u([g]);return x.slice(0,x.indexOf(` 427`))}function c(f,v,y,b){const g=y.enter("tableCell"),x=y.enter("phrasing"),w=y.containerPhrasing(f,{...b,before:i,after:i});return x(),g(),w}function u(f,v){return i9(f,{align:v,alignDelimiters:r,padding:n,stringLength:s})}function d(f,v,y){const b=f.children;let g=-1;const x=[],w=v.enter("table");for(;++g<b.length;)x[g]=h(b[g],v,y);return w(),x}function h(f,v,y){const b=f.children;let g=-1;const x=[],w=v.enter("tableRow");for(;++g<b.length;)x[g]=c(b[g],f,v,y);return w(),x}function p(f,v,y){let b=fT.inlineCode(f,v,y);return y.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function q9(){return{exit:{taskListCheckValueChecked:Bb,taskListCheckValueUnchecked:Bb,paragraph:G9}}}function K9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Y9}}}function Bb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let i=-1,o;for(;++i<s.length;){const l=s[i];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Y9(e,t,n,r){const s=e.children[0],i=typeof e.checked=="boolean"&&s&&s.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(o);let c=fT.listItem(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+o}}function Q9(){return[NW(),YW(),ZW(),$9(),q9()]}function X9(e){return{extensions:[TW(),QW(e),e9(),V9(e),K9()]}}const J9={tokenize:sV,partial:!0},pT={tokenize:iV,partial:!0},mT={tokenize:oV,partial:!0},gT={tokenize:aV,partial:!0},Z9={tokenize:lV,partial:!0},vT={name:"wwwAutolink",tokenize:nV,previous:xT},yT={name:"protocolAutolink",tokenize:rV,previous:wT},us={name:"emailAutolink",tokenize:tV,previous:bT},Fr={};function eV(){return{text:Fr}}let mi=48;for(;mi<123;)Fr[mi]=us,mi++,mi===58?mi=65:mi===91&&(mi=97);Fr[43]=us;Fr[45]=us;Fr[46]=us;Fr[95]=us;Fr[72]=[us,yT];Fr[104]=[us,yT];Fr[87]=[us,vT];Fr[119]=[us,vT];
vendor: 9,200 bytes, line 427
427function tV(e,t,n){const r=this;let s,i;return o;function o(h){return!yg(h)||!bT.call(r,r.previous)||Jy(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return yg(h)?(e.consume(h),l):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(Z9,d,u)(h):h===45||h===95||Dt(h)?(i=!0,e.consume(h),c):d(h)}function u(h){return e.consume(h),s=!0,c}function d(h){return i&&s&&Vt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function nV(e,t,n){const r=this;return s;function s(o){return o!==87&&o!==119||!xT.call(r,r.previous)||Jy(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(J9,e.attempt(pT,e.attempt(mT,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function rV(e,t,n){const r=this;let s="",i=!1;return o;function o(h){return(h===72||h===104)&&wT.call(r,r.previous)&&!Jy(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(h),e.consume(h),l):n(h)}function l(h){if(Vt(h)&&s.length<5)return s+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const p=s.toLowerCase();if(p==="http"||p==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),i?u:(i=!0,c)):n(h)}function u(h){return h===null||Od(h)||Me(h)||Gi(h)||$h(h)?n(h):e.attempt(pT,e.attempt(mT,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function sV(e,t,n){let r=0;return s;function s(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),s):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function iV(e,t,n){let r,s,i;return o;function o(u){return u===46||u===95?e.check(gT,c,l)(u):u===null||Me(u)||Gi(u)||u!==45&&$h(u)?c(u):(i=!0,e.consume(u),o)}function l(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),o}function c(u){return s||r||!i?n(u):t(u)}}function oV(e,t){let n=0,r=0;return s;function s(o){return o===40?(n++,e.consume(o),s):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(gT,t,i)(o):o===null||Me(o)||Gi(o)?t(o):(e.consume(o),s)}function i(o){return o===41&&r++,e.consume(o),s}}function aV(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),s):l===60||l===null||Me(l)||Gi(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||Me(l)||Gi(l)?t(l):r(l)}function i(l){return Vt(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Vt(l)?(e.consume(l),o):n(l)}}function lV(e,t,n){return r;function r(i){return e.consume(i),s}function s(i){return Dt(i)?n(i):t(i)}}function xT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function wT(e){return!Vt(e)}function bT(e){return!(e===47||yg(e))}function yg(e){return e===43||e===45||e===46||e===95||Dt(e)}function Jy(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const cV={tokenize:vV,partial:!0};function uV(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pV,continuation:{tokenize:mV},exit:gV}},text:{91:{name:"gfmFootnoteCall",tokenize:fV},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dV,resolveTo:hV}}}}function dV(e,t,n){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const u=hr(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function hV(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function fV(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(i>999||h===93&&!o||h===null||h===91||Me(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(hr(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Me(h)||(o=!0),i++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),i++,u):u(h)}}function pV(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,l;return c;function c(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(v)}function d(v){if(o>999||v===93&&!l||v===null||v===91||Me(v))return n(v);if(v===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=hr(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Me(v)||(l=!0),o++,e.consume(v),v===92?h:d}function h(v){return v===91||v===92||v===93?(e.consume(v),o++,d):d(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),s.includes(i)||s.push(i),Te(e,f,"gfmFootnoteDefinitionWhitespace")):n(v)}function f(v){return t(v)}}function mV(e,t,n){return e.check(Lc,t,e.attempt(cV,t,n))}function gV(e){e.exit("gfmFootnoteDefinition")}function vV(e,t,n){const r=this;return Te(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function yV(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},h={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},p=[["enter",d,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",h,l]],f=l.parser.constructs.insideSpan.null;f&&Cn(p,p.length,0,zh(f,o.slice(u+1,c),l)),Cn(p,p.length,0,[["exit",h,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",d,l]]),Cn(o,u-1,c-u+3,p),c=u+p.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function i(o,l,c){const u=this.previous,d=this.events;let h=0;return p;function p(v){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(v):(o.enter("strikethroughSequenceTemporary"),f(v))}function f(v){const y=Aa(u);if(v===126)return h>1?c(v):(o.consume(v),h++,f);if(h<2&&!n)return c(v);const b=o.exit("strikethroughSequenceTemporary"),g=Aa(v);return b._open=!g||g===2&&!!y,b._close=!y||y===2&&!!g,l(v)}}}class xV{constructor(){this.map=[]}add(t,n,r){wV(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];
vendor: 5,153 bytes, line 427
427r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const i of s)t.push(i);s=r.pop()}this.map.length=0}}function wV(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function bV(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function SV(){return{flow:{null:{name:"table",tokenize:kV,resolveAll:jV}}}}function kV(e,t,n){const r=this;let s=0,i=0,o;return l;function l(_){let D=r.events.length-1;for(;D>-1;){const M=r.events[D][1].type;if(M==="lineEnding"||M==="linePrefix")D--;else break}const N=D>-1?r.events[D][1].type:null,F=N==="tableHead"||N==="tableRow"?k:c;return F===k&&r.parser.lazy[r.now().line]?n(_):F(_)}function c(_){return e.enter("tableHead"),e.enter("tableRow"),u(_)}function u(_){return _===124||(o=!0,i+=1),d(_)}function d(_){return _===null?n(_):de(_)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),f):n(_):Ce(_)?Te(e,d,"whitespace")(_):(i+=1,o&&(o=!1,s+=1),_===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),h(_)))}function h(_){return _===null||_===124||Me(_)?(e.exit("data"),d(_)):(e.consume(_),_===92?p:h)}function p(_){return _===92||_===124?(e.consume(_),h):h(_)}function f(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(_):(e.enter("tableDelimiterRow"),o=!1,Ce(_)?Te(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):v(_))}function v(_){return _===45||_===58?b(_):_===124?(o=!0,e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),y):j(_)}function y(_){return Ce(_)?Te(e,b,"whitespace")(_):b(_)}function b(_){return _===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),g):_===45?(i+=1,g(_)):_===null||de(_)?S(_):j(_)}function g(_){return _===45?(e.enter("tableDelimiterFiller"),x(_)):j(_)}function x(_){return _===45?(e.consume(_),x):_===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(_))}function w(_){return Ce(_)?Te(e,S,"whitespace")(_):S(_)}function S(_){return _===124?v(_):_===null||de(_)?!o||s!==i?j(_):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(_)):j(_)}function j(_){return n(_)}function k(_){return e.enter("tableRow"),E(_)}function E(_){return _===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),E):_===null||de(_)?(e.exit("tableRow"),t(_)):Ce(_)?Te(e,E,"whitespace")(_):(e.enter("data"),A(_))}function A(_){return _===null||_===124||Me(_)?(e.exit("data"),E(_)):(e.consume(_),_===92?I:A)}function I(_){return _===92||_===124?(e.consume(_),A):A(_)}}function jV(e,t){let n=-1,r=!0,s=0,i=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,u,d,h;const p=new xV;for(;++n<e.length;){const f=e[n],v=f[1];f[0]==="enter"?v.type==="tableHead"?(l=!1,c!==0&&(Ub(p,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,h=void 0,i=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",d,t]])),s=v.type==="tableDelimiterRow"?2:d?3:1):s&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],h=ku(p,t,i,s,void 0,h),i=[0,0,0,0]),o[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],h=ku(p,t,i,s,void 0,h)),i=o,o=[i[1],n,0,0])):v.type==="tableHead"?(l=!0,c=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(c=n,i[1]!==0?(o[0]=o[1],h=ku(p,t,i,s,n,h)):o[1]!==0&&(h=ku(p,t,o,s,n,h)),s=0):s&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&Ub(p,t,c,u,d),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=bV(t.events,n))}return e}function ku(e,t,n,r,s,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},To(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=To(t.events,n[1]);if(i={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=To(t.events,n[2]),d=To(t.events,n[3]),h={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,y=n[3]-n[2]-1;e.add(v,y,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return s!==void 0&&(i.end=Object.assign({},To(t.events,s)),e.add(s,0,[["exit",i,t]]),i=void 0),i}
427function Ub(e,t,n,r,s){const i=[],o=To(t.events,n);s&&(s.end=Object.assign({},o),i.push(["exit",s,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function To(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const CV={name:"tasklistCheck",tokenize:EV};function _V(){return{text:{91:CV}}}function EV(e,t,n){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Me(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return de(c)?t(c):Ce(c)?e.check({tokenize:NV},t,n)(c):n(c)}}function NV(e,t,n){return Te(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function TV(e){return AN([eV(),uV(),yV(e),SV(),_V()])}const PV={};function AV(e){const t=this,n=e||PV,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(TV(n)),i.push(Q9()),o.push(X9(n))}function Zy({content:e,className:t=""}){return a.jsx("div",{className:`prose prose-sm dark:prose-invert max-w-none ${t}`,children:a.jsx(yW,{remarkPlugins:[AV],components:{h1:({children:n})=>a.jsx("h1",{className:"text-lg font-semibold mb-2 mt-3 first:mt-0",children:n}),h2:({children:n})=>a.jsx("h2",{className:"text-base font-semibold mb-2 mt-3 first:mt-0",children:n}),h3:({children:n})=>a.jsx("h3",{className:"text-sm font-semibold mb-1 mt-2 first:mt-0",children:n}),p:({children:n})=>a.jsx("p",{className:"text-sm leading-relaxed mb-2 last:mb-0",children:n}),ul:({children:n})=>a.jsx("ul",{className:"list-disc list-inside space-y-1 mb-2 text-sm",children:n}),ol:({children:n})=>a.jsx("ol",{className:"list-decimal list-inside space-y-1 mb-2 text-sm",children:n}),li:({children:n})=>a.jsx("li",{className:"leading-relaxed",children:n}),strong:({children:n})=>a.jsx("strong",{className:"font-semibold",children:n}),em:({children:n})=>a.jsx("em",{className:"italic",children:n}),a:({href:n,children:r})=>a.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline hover:text-primary/80 transition-colors",children:r}),code:({children:n})=>a.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-xs font-mono",children:n}),blockquote:({children:n})=>a.jsx("blockquote",{className:"border-l-2 border-muted-foreground pl-3 py-1 my-2 italic text-muted-foreground",children:n})},children:e})})}const RV=({className:e=""})=>a.jsxs("div",{className:`flex items-center gap-1 ${e}`,children:[a.jsxs("div",{className:"flex gap-1",children:[a.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce [animation-delay:-0.3s]"}),a.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce [animation-delay:-0.15s]"}),a.jsx("span",{className:"w-2 h-2 bg-primary rounded-full animate-bounce"})]}),a.jsx("span",{className:"text-sm text-muted-foreground ml-2",children:"Thinking"})]});function ti(){const e=yh();return a.jsx("footer",{className:"bg-card border-t border-border py-4 px-4",children:a.jsx("div",{className:"max-w-4xl mx-auto text-center",children:a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs",children:[a.jsx(Fn,{to:"/legal",className:"text-muted-foreground hover:text-primary transition-colors",children:"Legal Information"}),a.jsx("span",{className:"text-muted-foreground",children:"â¢"}),a.jsx("a",{href:`mailto:${e.contactEmail}`,className:"text-muted-foreground hover:text-primary transition-colors",children:"Contact"}),a.jsx("span",{className:"text-muted-foreground",children:"â¢"}),a.jsx("a",{href:e.bookingUrl,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors",children:"Human Coaching"})]}),a.jsxs("div",{className:"text-xs text-muted-foreground",children:["© 2026 ",e.companyName,". All rights reserved."]})]})})})}function IV(){const[e,t]=m.useState(null),[n,r]=m.useState([]),[s,i]=m.useState(!1),[o,l]=m.useState(!0),{user:c}=li(),{toast:u}=gr(),d=m.useRef(null),h=m.useRef(0);m.useEffect(()=>{if(e&&n.length>
4270&&c&&o){if(n.length===h.current)return;d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{f()},2e3)}return()=>{d.current&&clearTimeout(d.current)}},[n,e,o]);const p=async()=>{if(!e||!c||e.id.startsWith("local-")===!1)return{success:!1,error:"Not a local session"};try{const{data:S,error:j}=await ae.from("coaching_sessions").insert({user_id:c.id,title:e.title,messages:n.map(E=>({id:E.id,content:E.content,sender:E.sender,timestamp:E.timestamp.toISOString()})),session_data:e.session_data,status:"active"}).select().single();if(j)throw j;const k={...S,messages:Array.isArray(S.messages)?S.messages:[]};return t(k),l(!0),u({title:"Session Saved!",description:"Your conversation is now stored and will auto-save automatically."}),{success:!0,data:S}}catch(S){return console.error("Error converting session:",S),u({title:"Save Failed",description:"Unable to save session to database. Please try again.",variant:"destructive"}),{success:!1,error:S}}},f=async()=>{var S;if(!e||!c||s)return{needsConversion:!1};if(!o||e.id.startsWith("local-"))return{needsConversion:!0};if(n.length===h.current)return{needsConversion:!1};i(!0);try{const j=n.slice(h.current),{error:k}=await ae.from("coaching_sessions").update({messages:n.map(E=>({id:E.id,content:E.content,sender:E.sender,timestamp:E.timestamp.toISOString()})),updated_at:new Date().toISOString()}).eq("id",e.id);if(k)throw k;return h.current=n.length,{needsConversion:!1}}catch(j){return console.error("Error saving session:",j),(S=j==null?void 0:j.message)!=null&&S.includes("timeout")||(j==null?void 0:j.code)==="PGRST301"?u({title:"Save Timeout",description:"Session save is taking longer than expected. Will retry automatically.",variant:"destructive"}):u({title:"Save Error",description:"Failed to save session. Will retry automatically.",variant:"destructive"}),{needsConversion:!1}}finally{i(!1)}};return{currentSession:e,messages:n,setMessages:r,isAutoSaving:s,storageEnabled:o,loadSession:S=>{t(S);const j=S.messages.map(k=>({id:k.id,content:k.content,sender:k.sender,timestamp:new Date(k.timestamp)}));r(j),h.current=j.length},createNewSession:async S=>{if(!c)return null;try{const{data:j,error:k}=await ae.from("coaching_sessions").insert({user_id:c.id,title:S,messages:[],session_data:{},status:"active"}).select().single();if(k)throw k;const E={...j,messages:Array.isArray(j.messages)?j.messages:[]};return t(E),r([]),E}catch(j){return console.error("Error creating session:",j),u({title:"Error",description:"Failed to create new session",variant:"destructive"}),null}},createLocalSession:S=>{const j={id:`local-${Date.now()}`,title:S,messages:[],session_data:{},status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return t(j),r([]),j},updateSessionStatus:async S=>{if(e)try{const{error:j}=await ae.from("coaching_sessions").update({status:S}).eq("id",e.id);if(j)throw j;t(k=>k?{...k,status:S}:null)}catch(j){console.error("Error updating session status:",j),u({title:"Error",description:"Failed to update session status",variant:"destructive"})}},clearSession:()=>{t(null),r([]),h.current=0},saveSession:f,convertLocalToStored:p,enableStorage:S=>{l(S)}}}const OV=e=>{const t=[],n=["what","how","why","when","where","which","who","could","would","can","will"],r=e.split(/[.!?]+/).filter(s=>s.trim());for(const s of r){const i=s.toLowerCase().trim();n.some(o=>i.startsWith(o))&&!s.includes("?")&&t.push(`Missing question mark: "${s.trim()}"`)}return e.trim().length>0&&!e.trim().match(/[.!?]$/)&&t.push("Response may be incomplete (no ending punctuation)"),{isValid:t.length===0,issues:t}};function DV(){const[e,t]=m.useState(!1),[n,r]=m.useState(null),[s,i]=m.useState(""),[o,l]=m.useState(!1),[c,u]=m.useState(null),[d,h]=m.useState(!1),[p,f]=m.useState(!1),v=m.useRef(null),y=m.useRef(null),{user:b,signOut:g}=li(),{isAdmin:x}=Ac(),w=yh(),{toast:S}=gr(),{currentSession:j,messages:k,setMessages:E,isAutoSaving:A,storageEnabled:I,loadSession:_,createNewSession:D,createLocalSession:N,updateSessionStatus:F,clearSession:M,saveSession:$,convertLocalToStored:z,enableStorage:Y}=IV();m.useEffect(()=>{if(v.current){const W=v.current.querySelector("[data-radix-scroll-area-viewport]");W&&(W.scrollTop=W.scrollHeight)}}
427,[k,o]),m.useEffect(()=>{e&&y.current&&y.current.focus()},[e,k,o]);const O=async W=>{r(W),Y(W.storeSession);let ie=null;if(W.storeSession){if(ie=await D(`${W.style} coaching session`),!ie)return}else ie=N(`${W.style} coaching session`);t(!0),u(new Date);const oe={id:"1",content:`Perfect! I understand you'd like a ${W.style} coaching style for ${W.duration} minutes. I'm here to support your growth through thoughtful questions and reflection. What would you like to explore today?`,sender:"coach",timestamp:new Date};E([oe])},R=async(W,ie,oe,he=0,fe)=>{var xt,jt;try{console.log("Sending message to AI coach (streaming):",W);const Ze=c?(Date.now()-c.getTime())/1e3/60:0,Ct=ie.slice(-6);console.log(`Sending ${Ct.length} recent messages (reduced from ${ie.length})`);const hn={message:W,conversationHistory:Ct.map(rt=>({role:rt.sender==="user"?"user":"assistant",content:rt.content})),sessionConfig:n,elapsedMinutes:Ze},{data:{session:$r}}=await ae.auth.getSession(),Pn=await fetch("https://sscdpwbgnatztoyfxnnf.supabase.co/functions/v1/ai-coach",{method:"POST",headers:{Authorization:`Bearer ${$r==null?void 0:$r.access_token}`,apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNzY2Rwd2JnbmF0enRveWZ4bm5mIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTc3ODc2MjgsImV4cCI6MjA3MzM2MzYyOH0.2YAtN3FsmwS5KroEJ656N2M67mUct5VxEBnCEIa2_fU","Content-Type":"application/json"},body:JSON.stringify(hn)});if(!Pn.ok)throw new Error(`HTTP ${Pn.status}: ${Pn.statusText}`);const ds=(xt=Pn.body)==null?void 0:xt.getReader();if(!ds)throw new Error("No response body");const Vn=new TextDecoder;let qn="",co=Date.now(),L=null;const G=()=>{L=setTimeout(()=>{Date.now()-co>3e4&&qn.length>0&&(console.warn("Stream timeout - no tokens received for",3e4,"ms"),ds.cancel())},3e4)};G();let le="",ye=!1,ke=null,wt=null;const fn=rt=>{var Ya,Qa,$c,uo,Kn;if(!rt.startsWith("data:"))return;const $t=rt.slice(5).trim();if(!$t)return;if($t==="[DONE]"){console.log("Received [DONE] signal"),ye=!0;return}let Re;try{Re=JSON.parse($t)}catch{console.debug("Skipping invalid JSON chunk:",$t.substring(0,50));return}if(Re.error){wt=String(Re.error);return}const Et=($c=(Qa=(Ya=Re.choices)==null?void 0:Ya[0])==null?void 0:Qa.delta)==null?void 0:$c.content;Et&&(qn+=Et,co=Date.now(),L&&(clearTimeout(L),G()),oe&&oe(Et));const Qt=(Kn=(uo=Re.choices)==null?void 0:uo[0])==null?void 0:Kn.finish_reason;Qt&&(ke=Qt)};try{for(;;){const{done:rt,value:$t}=await ds.read();if(rt){if(console.log("Stream ended (done flag)"),le.trim())for(const Et of le.split(` 428`))fn(Et);le="";break}le+=Vn.decode($t,{stream:!0});let Re=le.indexOf(` 429`);for(;Re!==-1;){const Et=le.slice(0,Re);le=le.slice(Re+1),fn(Et),Re=le.indexOf(` 430`)}}}finally{L&&clearTimeout(L)}if(ke==="length"&&(console.warn("â ï¸ Response was truncated (finish_reason: length)"),S({title:"Response may be incomplete",description:"The AI response was cut short. Try rephrasing with a shorter question.",variant:"destructive"})),!qn)throw new Error("No response from AI");if(wt||!ye&&!ke)throw console.warn("Stream interrupted before completion",{streamError:wt,sawDone:ye,finishReason:ke}),new Error("Response was interrupted before it finished. Please try again.");console.log("Streaming complete, total length:",qn.length);const _t=OV(qn);return _t.isValid?console.log("â AI response quality validated"):(console.warn("â ï¸ AI Response Quality Issues Detected:",_t.issues),console.warn("Full response:",qn)),qn}catch(Ze){return console.error("Error in sendToAI:",Ze),he<2?(console.log(`Retrying (${he+1}/2)...`),await new Promise(Ct=>setTimeout(Ct,1e3*(he+1))),fe==null||fe(),R(W,ie,oe,he+1,fe)):(jt=Ze==null?void 0:Ze.message)!=null&&jt.includes("timeout")?"The request took too long to process. Please try again.":"I'm experiencing some technical difficulties. Could you please try again?"}},C=async()=>{if(!s.trim()||o)return;const W={id:Date.now().toString(),content:s,sender:"user",timestamp:new Date},ie=[...k,W];E(ie),i(""),l(!0);const oe=(Date.now()+1).toString(),he={id:oe,content:"__TYPING_INDICATOR__",sender:"coach",timestamp:new Date};E(fe=>[...fe,he]);try{let fe="";const Be=xt=>{E(jt=>{const Ze=[...jt],Ct=Ze.findIndex(hn=>hn.id===oe);return Ct!==-1&&(Ze[Ct]={...Ze[Ct],content:xt}),Ze})},nt=await R(s,ie,xt=>{fe+=xt,Be(fe)},0,()=>{fe="",Be("__TYPING_INDICATOR__")});nt&&nt!==fe&&Be(nt)}catch(fe){console.error("Failed to send message:",fe),E(Be=>Be.filter(nt=>
430nt.id!==oe)),S({title:"Connection Error",description:"Failed to get a response. Please try again.",variant:"destructive"})}finally{l(!1)}},X=W=>{W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),C())},Q=()=>{if(!c)return"0:00";const W=Math.floor((Date.now()-c.getTime())/1e3),ie=Math.floor(W/60),oe=W%60;return`${ie}:${oe.toString().padStart(2,"0")}`},T=()=>{t(!1),r(null),u(null),M()},U=W=>{var ie;_(W),t(!0),u(new Date(W.created_at)),r(((ie=W.session_data)==null?void 0:ie.config)||{style:"Supportive",duration:"30",focus:"General coaching"}),h(!1)},ne=async()=>{const W=await $();W!=null&&W.needsConversion&&f(!0)},se=async()=>{await z(),f(!1)},H=(j==null?void 0:j.id.startsWith("local-"))||!1;return e?a.jsxs("div",{className:"h-screen bg-background font-ubuntu flex flex-col",children:[a.jsx("header",{className:"bg-card border-b p-4 flex-shrink-0",children:a.jsxs("div",{className:"flex items-center justify-between max-w-4xl mx-auto",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("img",{src:w.logoBW,alt:`${w.name}`,className:"h-8"}),a.jsxs("div",{className:"hidden sm:block text-sm text-muted-foreground",children:[n==null?void 0:n.style," style ⢠",n==null?void 0:n.duration," minutes"]})]}),a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx(to,{className:"w-4 h-4"}),Q(),A&&a.jsx("span",{className:"text-xs",children:"(saving...)"})]}),a.jsxs("div",{className:"hidden md:flex items-center gap-2",children:[a.jsxs(te,{variant:H?"default":"outline",size:"sm",onClick:ne,children:[a.jsx(Lw,{className:"w-4 h-4 mr-2"}),H?"Save Session":"Save"]}),a.jsxs(bn,{open:d,onOpenChange:h,children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{variant:"outline",size:"sm",children:[a.jsx(Rf,{className:"w-4 h-4 mr-2"}),"Sessions"]})}),a.jsxs(un,{className:"w-[95vw] max-w-2xl max-h-[85vh] overflow-hidden",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Session History"}),a.jsx(jn,{children:"Switch between sessions or create a new one"})]}),a.jsx(sp,{onSessionLoad:U,onNewSession:T,currentSessionId:j==null?void 0:j.id})]})]}),a.jsx(te,{variant:"outline",size:"sm",onClick:T,children:"New Session"}),x&&a.jsxs(te,{variant:"outline",size:"sm",onClick:()=>{ae.functions.invoke("process-all-materials",{body:{}}).then(()=>console.log("Processing triggered")).catch(console.error)},children:[a.jsx(yd,{className:"w-4 h-4 mr-2"}),"Process Materials"]}),x&&a.jsx(te,{variant:"ghost",size:"sm",onClick:()=>window.location.href="/admin",children:"Admin"}),a.jsxs(te,{variant:"ghost",size:"sm",onClick:g,children:[a.jsx(If,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]}),a.jsxs(gB,{children:[a.jsx(vB,{asChild:!0,children:a.jsx(te,{variant:"outline",size:"sm",className:"md:hidden",children:a.jsx(lO,{className:"w-4 h-4"})})}),a.jsxs(qE,{align:"end",className:"w-48",children:[a.jsxs(xi,{onClick:ne,children:[a.jsx(Lw,{className:"w-4 h-4 mr-2"}),H?"Save Session":"Save"]}),a.jsxs(xi,{onClick:()=>h(!0),children:[a.jsx(Rf,{className:"w-4 h-4 mr-2"}),"Sessions"]}),a.jsx(xi,{onClick:T,children:"New Session"}),x&&a.jsxs(xi,{onClick:()=>{ae.functions.invoke("process-all-materials",{body:{}}).then(()=>console.log("Processing triggered")).catch(console.error)},children:[a.jsx(yd,{className:"w-4 h-4 mr-2"}),"Process Materials"]}),x&&a.jsx(xi,{onClick:()=>window.location.href="/admin",children:"Admin"}),a.jsxs(xi,{onClick:g,children:[a.jsx(If,{className:"w-4 h-4 mr-2"}),"Sign Out"]})]})]}),a.jsx(bn,{open:d,onOpenChange:h,children:a.jsxs(un,{className:"w-[95vw] max-w-2xl max-h-[85vh] overflow-hidden",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Session History"}),a.jsx(jn,{children:"Switch between sessions or create a new one"})]}),a.jsx(sp,{onSessionLoad:U,onNewSession:T,currentSessionId:j==null?void 0:j.id})]})})]})]})}),a.jsx("main",{className:"flex-1 max-w-4xl mx-auto p-4 flex flex-col min-h-0",children:a.jsxs(be,{className:"flex-1 flex flex-col min-h-0",children:[a.jsx(Rc,{className:"flex-1 p-4",ref:v,children:a.jsx("div",{className:"space-y-4",children:k.map(W=>a.jsx("div",{className:`flex gap-3 ${W.sender==="user"?"justify-end":"justify-start"}`,children:a.jsxs("div",{className:`flex gap-3 max-w-[80%] ${W.sender==="user"?"flex-row-reverse":"flex-row"}`,children:[a.jsx("div",{className:"flex-shrink-0",children:W.sender==="user"?a.jsx("div",{className:"w-8 h-8 bg-secondary rounded-full flex items-center justify-center",children:a.jsx(Av,{className:"w-4 h-4"})}):a.jsx("div",{className:"w-8 h-8 bg-primary rounded-full flex items-center justify-center",children:a.jsx(Cv,{className:"w-4 h-4 text-primary-foreground"})})}),a.jsx("div",{className:`px-4 py-3 rounded-lg ${W.sender==="user"?"bg-primary text-primary-foreground":"bg-muted"}`,children:W.content==="__TYPING_INDICATOR__"?a.jsx(RV,{}):a.jsxs(a.Fragment,{children:[a.jsx(Zy,{content:W.content}),a.jsx("p",{className:"text-xs opacity-60 mt-2",children:W.timestamp.toLocaleTimeString()})]})})]})},W.id))})}),a.jsx("div",{className:"border-t border-border p-4 flex-shrink-0",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Tr,{ref:y,value:s,onChange:W=>i(W.target.value),onKeyPress:X,placeholder:"Share your thoughts or explore what's on your mind...",className:"flex-1 min-h-[60
430px] resize-none",disabled:o}),a.jsx(te,{onClick:C,disabled:!s.trim()||o,size:"icon",className:"self-end",children:a.jsx(nj,{className:"w-4 h-4"})})]})})]})}),a.jsx(ti,{}),a.jsx(by,{open:p,onOpenChange:f,children:a.jsxs(Ch,{children:[a.jsxs(_h,{children:[a.jsx(Nh,{children:"Save This Session?"}),a.jsx(Th,{children:"This session is currently not being stored. Would you like to save it now? Once saved, your conversation will be stored in the database and automatically saved going forward."})]}),a.jsxs(Eh,{children:[a.jsx(Ah,{children:"Keep Local"}),a.jsx(Ph,{onClick:se,children:"Save Session"})]})]})})]}):a.jsxs("div",{className:"min-h-screen bg-background font-ubuntu",children:[a.jsx("header",{className:"bg-card border-b p-4",children:a.jsxs("div",{className:"flex items-center justify-between max-w-4xl mx-auto",children:[a.jsx("img",{src:w.logoBW,alt:`${w.name}`,className:"h-8"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(bn,{open:d,onOpenChange:h,children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{variant:"outline",size:"sm",children:[a.jsx(Rf,{className:"w-3 h-3 mr-1"}),a.jsx("span",{className:"hidden sm:inline",children:"Sessions"})]})}),a.jsxs(un,{className:"w-[95vw] max-w-2xl max-h-[85vh] overflow-hidden",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Session History"}),a.jsx(jn,{children:"Continue a previous session or start a new one"})]}),a.jsx(sp,{onSessionLoad:U,onNewSession:()=>h(!1),currentSessionId:j==null?void 0:j.id})]})]}),a.jsxs(te,{variant:"outline",size:"sm",onClick:g,children:[a.jsx(If,{className:"w-3 h-3 mr-1"}),a.jsx("span",{className:"hidden sm:inline",children:"Sign Out"})]})]})]})}),a.jsx("main",{className:"max-w-4xl mx-auto p-4",children:a.jsx(zB,{onSetupComplete:O})}),a.jsx(ti,{})]})}const MV=()=>a.jsx(DV,{});function LV({}){const[e,t]=m.useState({sessionsLast7Days:0,totalUsers:0,recentUploads:0,activeMaterials:0,whatsappConversations:0}),[n,r]=m.useState(!0);m.useEffect(()=>{s()},[]);const s=async()=>{try{const i=new Date;i.setDate(i.getDate()-7);const{count:o}=await ae.from("coaching_sessions").select("*",{count:"exact",head:!0}).gte("created_at",i.toISOString()),{count:l}=await ae.from("coaching_materials").select("*",{count:"exact",head:!0}).eq("is_active",!0),{count:c}=await ae.from("user_roles").select("*",{count:"exact",head:!0}),u=new Date;u.setDate(u.getDate()-7);const{count:d}=await ae.from("coaching_materials").select("*",{count:"exact",head:!0}).gte("uploaded_at",u.toISOString()),{count:h}=await ae.from("whatsapp_conversations").select("*",{count:"exact",head:!0});t({sessionsLast7Days:o||0,totalUsers:c||0,recentUploads:d||0,activeMaterials:l||0,whatsappConversations:h||0})}catch(i){console.error("Error fetching stats:",i)}finally{r(!1)}};return n?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[...Array(5)].map((i,o)=>a.jsx(be,{className:"p-4",children:a.jsxs("div",{className:"animate-pulse",children:[a.jsx("div",{className:"h-4 bg-muted rounded w-3/4 mb-2"}),a.jsx("div",{className:"h-8 bg-muted rounded w-1/2"})]})},o))}):a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[a.jsx(be,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"Sessions Last 7 Days"}),a.jsx("p",{className:"text-2xl font-bold",children:e.sessionsLast7Days})]}),a.jsx(Jk,{className:"w-5 h-5 text-muted-foreground"})]})}),a.jsx(be,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"Active Users"}),a.jsx("p",{className:"text-2xl font-bold",children:e.totalUsers})]}),a.jsx(Fw,{className:"w-5 h-5 text-muted-foreground"})]})}),a.jsx(be,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"Recent Uploads"}),a.jsx("p",{className:"text-2xl font-bold",children:e.recentUploads})]}),a.jsx(to,{className:"w-5 h-5 text-muted-foreground"})]})}),a.jsx(be,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"Active Materials"}),a.jsx("p",{className:"text-2xl font-bold",children:e.activeMaterials})]}),a.jsx(fO,{className:"w-5 h-5 text-muted-foreground"})]})}),a.jsx(be,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"WhatsApp Chats"}),a.jsx("p",{className:"text-2xl font-bold",children:e.whatsappConversations})]}),a.jsx(Fw,{className:"w-5 h-5 text-muted-foreground"})]})})]})}var FV="Separator",Hb="horizontal",$V=["horizontal","vertical"],ST=m.forwardRef((e,t)=>
vendor: 21,112 bytes, line 430
430{const{decorative:n,orientation:r=Hb,...s}=e,i=zV(r)?r:Hb,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return a.jsx(ee.div,{"data-orientation":i,...l,...s,ref:t})});ST.displayName=FV;function zV(e){return $V.includes(e)}var kT=ST;const Po=m.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(kT,{ref:s,decorative:n,orientation:t,className:J("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Po.displayName=kT.displayName;var Wh="Switch",[BV,Gq]=mt(Wh),[UV,HV]=BV(Wh),jT=m.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[p,f]=m.useState(null),v=pe(t,w=>f(w)),y=m.useRef(!1),b=p?d||!!p.closest("form"):!0,[g,x]=En({prop:s,defaultProp:i??!1,onChange:u,caller:Wh});return a.jsxs(UV,{scope:n,checked:g,disabled:l,children:[a.jsx(ee.button,{type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":NT(g),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:v,onClick:K(e.onClick,w=>{x(S=>!S),b&&(y.current=w.isPropagationStopped(),y.current||w.stopPropagation())})}),b&&a.jsx(ET,{control:p,bubbles:!y.current,name:r,value:c,checked:g,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});jT.displayName=Wh;var CT="SwitchThumb",_T=m.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=HV(CT,n);return a.jsx(ee.span,{"data-state":NT(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});_T.displayName=CT;var WV="SwitchBubbleInput",ET=m.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},i)=>{const o=m.useRef(null),l=pe(o,i),c=Dh(n),u=ch(t);return m.useEffect(()=>{const d=o.current;if(!d)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==n&&f){const v=new Event("click",{bubbles:r});f.call(d,n),d.dispatchEvent(v)}},[c,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ET.displayName=WV;function NT(e){return e?"checked":"unchecked"}var TT=jT,VV=_T;const sa=m.forwardRef(({className:e,...t},n)=>a.jsx(TT,{className:J("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:a.jsx(VV,{className:J("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));sa.displayName=TT.displayName;var qV=[" ","Enter","ArrowUp","ArrowDown"],KV=[" ","Enter"],Yi="Select",[Vh,qh,GV]=kc(Yi),[Ga,Yq]=mt(Yi,[GV,$a]),Kh=$a(),[YV,ui]=Ga(Yi),[QV,XV]=Ga(Yi),PT=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:p,required:f,form:v}=e,y=Kh(t),[b,g]=m.useState(null),[x,w]=m.useState(null),[S,j]=m.useState(!1),k=io(u),[E,A]=En({prop:r,defaultProp:s??!1,onChange:i,caller:Yi}),[I,_]=En({prop:o,defaultProp:l,onChange:c,caller:Yi}),D=m.useRef(null),N=b?v||!!b.closest("form"):!0,[F,M]=m.useState(new Set),$=Array.from(F).map(z=>z.props.value).join(";");return a.jsx(Dj,{...y,children:a.jsxs(YV,{required:f,scope:t,trigger:b,onTriggerChange:g,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:zn(),value:I,onValueChange:_,open:E,onOpenChange:A,dir:k,triggerPointerDownPosRef:D,disabled:p,children:[a.jsx(Vh.Provider,{scope:t,children:a.jsx(QV,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(z=>{M(Y=>new Set(Y).add(z))},[]),onNativeOptionRemove:m.useCallback(z=>{M(Y=>{const O=new Set(Y);return O.delete(z),O})},[]),children:n})}),N?a.jsxs(eP,{"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:h,value:I,onChange:z=>_(z.target.value),disabled:p,form:v,children:[I===void 0?a.jsx("option",{value:""}):null,Array.from(F)]},$):null]})})};PT.displayName=Yi;var AT="SelectTrigger",RT=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=Kh(n),o=ui(AT,n),l=o.disabled||r,c=pe(t,o.onTriggerChange),u=qh(n),d=m.useRef("touch"),[h,p,f]=nP(y=>{const b=u().filter(w=>!w.disabled),g=b.find(w=>w.value===o.value),x=rP(b,y,g);x!==void 0&&o.onValueChange(x.value)}),v=y=>{l||(o.onOpenChange(!0),f()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return a.jsx(Uv,{asChild:!0,...i,children:a.jsx(ee.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":tP(o.value)?"":void 0,...s,ref:c,onClick:K(s.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&v(y)}),onPointerDown:K(s.onPointerDown,y=>{d.current=y.pointerType;const b=y.target;b.hasPointerCapture(y.pointerId)&&b.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(v(y),y.preventDefault())}),onKeyDown:K(s.onKeyDown,y=>{const b=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&p(y.key),!(b&&y.key===" ")&&qV.includes(y.key)&&(v(),y.preventDefault())})})})});RT.displayName=AT;var IT="SelectValue",OT=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...l}=e,c=ui(IT,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,h=pe(t,c.onValueNodeChange);return pt(()=>{u(d)},[u,d]),a.jsx(ee.span,{...l,ref:h,style:{pointerEvents:"none"},children:tP(c.value)?a.jsx(a.Fragment,{children:o}):i})});OT.displayName=IT;var JV="SelectIcon",DT=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return a.jsx(ee.span,{"aria-hidden":!0,...s,ref:t,children:r||"â¼"})});DT.displayName=JV;var ZV="SelectPortal",MT=e=>a.jsx(jc,{asChild:!0,...e});MT.displayName=ZV;var Qi="SelectContent",LT=m.forwardRef((e,t)=>{const n=ui(Qi,e.__scopeSelect),[r,s]=m.useState();if(pt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?eo.createPortal(a.jsx(FT,{scope:e.__scopeSelect,children:a.jsx(Vh.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),i):null}return a.jsx($T,{...e,ref:t})});LT.displayName=Qi;var tr=10,[FT,di]=Ga(Qi),e7="SelectContentImpl",t7=Hi("SelectContent.RemoveScroll"),$T=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:v,hideWhenDetached:y,avoidCollisions:b,...g}=e,x=ui(Qi,n),[w,S]=m.useState(null),[j,k]=m.useState(null),E=pe(t,H=>S(H)),[A,I]=m.useState(null),[_,D]=m.useState(null),N=qh(n),[F,M]=m.useState(!1),$=m.useRef(!1);m.useEffect(()=>{if(w)return hy(w)},[w]),dy();const z=m.useCallback(H=>{const[W,...ie]=N().map(fe=>fe.ref.current),[oe]=ie.slice(-1),he=document.activeElement;for(const fe of H)if(fe===he||(fe==null||fe.scrollIntoView({block:"nearest"}),fe===W&&j&&(j.scrollTop=0),fe===oe&&j&&(j.scrollTop=j.scrollHeight),fe==null||fe.focus(),document.activeElement!==he))return},[N,j]),Y=m.useCallback(()=>z([A,w]),[z,A,w]);m.useEffect(()=>{F&&Y()},[F,Y]);const{onOpenChange:O,triggerPointerDownPosRef:R}=x;m.useEffect(()=>{if(w){let H={x:0,y:0};const W=oe=>{var he,fe;H={x:Math.abs(Math.round(oe.pageX)-(((he=R.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((fe=R.current)==null?void 0:fe.y)??0))}},ie=oe=>{H.x<=10&&H.y<=10?oe.preventDefault():w.contains(oe.target)||O(!1),document.removeEventListener("pointermove",W),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",ie,{capture:!0})}}},[w,O,R]),m.useEffect(()=>{const H=()=>O(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[O]);const[C,X]=nP(H=>{const W=N().filter(he=>!he.disabled),ie=W.find(he=>he.ref.current===document.activeElement),oe=rP(W,H,ie);oe&&setTimeout(()=>oe.ref.current.focus())}),Q=m.useCallback((H,W,ie)=>{const oe=!$.current&&!ie;(x.value!==void 0&&x.value===W||oe)&&(I(H),oe&&($.current=!0))},[x.value]),T=m.useCallback(()=>w==null?void 0:w.focus(),[w]),U=m.useCallback((H,W,ie)=>{const oe=!$.current&&!ie;(x.value!==void 0&&x.value===W||oe)&&D(H)},[x.value]),ne=r==="popper"?xg:zT,se=ne===xg?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:v,hideWhenDetached:y,avoidCollisions:b}:{};return a.jsx(FT,{scope:n,content:w,viewport:j,onViewportChange:k,itemRefCallback:Q,selectedItem:A,onItemLeave:T,itemTextRefCallback:U,focusSelectedItem:Y,selectedItemText:_,position:r,isPositioned:F,searchRef:C,children:a.jsx(kh,{as:t7,allowPinchZoom:!0,children:a.jsx(bh,{asChild:!0,trapped:x.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:K(s,H=>{var W;(W=x.trigger)==null||W.focus({preventScroll:!0}),H.preventDefault()}),children:a.jsx(Da,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:a.jsx(ne,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:H=>H.preventDefault(),...g,...se,onPlaced:()=>M(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:K(g.onKeyDown,H=>{const W=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!W&&H.key.length===1&&X(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let oe=N().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(H.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const he=H.target,fe=oe.indexOf(he);oe=oe.slice(fe+1)}setTimeout(()=>z(oe)),H.preventDefault()}})})})})})})});$T.displayName=e7;var n7="SelectItemAlignedPosition",zT=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=ui(Qi,n),o=di(Qi,n),[l,c]=m.useState(null),[u,d]=m.useState(null),h=pe(t,E=>d(E)),p=qh(n),f=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:g,focusSelectedItem:x}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&y&&b&&g){const E=i.trigger.getBoundingClientRect(),A=u.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),_=g.getBoundingClientRect();if(i.dir!=="rtl"){const he=_.left-A.left,fe=I.left-he,Be=E.left-fe,nt=E.width+Be,xt=Math.max(nt,A.width),jt=window.innerWidth-tr,Ze=ng(fe,[tr,Math.max(tr,jt-xt)]);l.style.minWidth=nt+"px",l.style.left=Ze+"px"}else{const he=A.right-_.right,fe=window.innerWidth-I.right-he,Be=window.innerWidth-E.right-fe,nt=E.width+Be,xt=Math.max(nt,A.width),jt=window.innerWidth-tr,Ze=ng(fe,[tr,Math.max(tr,jt-xt)]);l.style.minWidth=nt+"px",l.style.right=Ze+"px"}const D=p(),N=window.innerHeight-tr*2,F=y.scrollHeight,M=window.getComputedStyle(u),$=parseInt(M.borderTopWidth,10),z=parseInt(M.paddingTop,10),Y=parseInt(M.borderBottomWidth,10),O=parseInt(M.paddingBottom,10),R=$+z+F+O+Y,C=Math.min(b.offsetHeight*5,R),X=window.getComputedStyle(y),Q=parseInt(X.paddingTop,10),T=parseInt(X.paddingBottom,10),U=E.top+E.height/2-tr,ne=N-U,se=b.offsetHeight/2,H=b.offsetTop+se,W=$+z+H,ie=R-W;if(W<=U){const he=D.length>0&&b===D[D.length-1].ref.current;l.style.bottom="0px";const fe=u.clientHeight-y.offsetTop-y.offsetHeight,Be=Math.max(ne,se+(he?T:0)+fe+Y),nt=W+Be;l.style.height=nt+"px"}else{const he=D.length>0&&b===D[0].ref.current;l.style.top="0px";const Be=Math.max(U,$+y.offsetTop+(he?Q:0)+se)+ie;l.style.height=Be+"px",y.scrollTop=W-U+y.offsetTop}l.style.margin=`${tr}px 0`,l.style.minHeight=C+"px",l.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>f.current=!0)}},[p,i.trigger,i.valueNode,l,u,y,b,g,i.dir,r]);pt(()=>w(),[w]);const[S,j]=m.useState();pt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const k=m.useCallback(E=>{E&&v.current===!0&&(w(),x==null||x(),v.current=!1)},[w,x]);return a.jsx(s7,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:f,onScrollButtonChange:k,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(ee.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});zT.displayName=n7;var r7="SelectPopperPosition",xg=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=tr,...i}=e,o=Kh(n);return a.jsx(Hv,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xg.displayName=r7;var[s7,ex]=Ga(Qi,{}),wg="SelectViewport",BT=m.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=di(wg,n),o=ex(wg,n),l=pe(t,i.onViewportChange),c=m.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(Vh.Slot,{scope:n,children:a.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:K(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&h){const f=Math.abs(c.current-d.scrollTop);if(f>0){const v=window.innerHeight-tr*2,y=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),g=Math.max(y,b);if(g<v){const x=g+f,w=Math.min(v,x),S=x-w;h.style.height=w+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});BT.displayName=wg;var UT="SelectGroup",[i7,o7]=Ga(UT),a7=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=zn();return a.jsx(i7,{scope:n,id:s,children:a.jsx(ee.div,{role:"group","aria-labelledby":s,...r,ref:t})})});a7.displayName=UT;var HT="SelectLabel",WT=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=o7(HT,n);return a.jsx(ee.div,{id:s.id,...r,ref:t})});WT.displayName=HT;var Fd="SelectItem",[l7,VT]=Ga(Fd),qT=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,l=ui(Fd,n),c=di(Fd,n),u=l.value===r,[d,h]=m.useState(i??""),[p,f]=m.useState(!1),v=pe(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,s)}),y=zn(),b=m.useRef("touch"),g=()=>{s||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(l7,{scope:n,value:r,disabled:s,textId:y,isSelected:u,onItemTextChange:m.useCallback(x=>{h(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:a.jsx(Vh.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:a.jsx(ee.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:v,onFocus:K(o.onFocus,()=>f(!0)),onBlur:K(o.onBlur,()=>f(!1)),onClick:K(o.onClick,()=>{b.current!=="mouse"&&g()}),onPointerUp:K(o.onPointerUp,()=>{b.current==="mouse"&&g()}),onPointerDown:K(o.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:K(o.onPointerMove,x=>{var w;b.current=x.pointerType,s?(w=c.onItemLeave)==null||w.call(c):b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(o.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:K(o.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(KV.includes(x.key)&&g(),x.key===" "&&x.preventDefault())})})})})});qT.displayName=Fd;var wl="SelectItemText",KT=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=ui(wl,n),l=di(wl,n),c=VT(wl,n),u=XV(wl,n),[d,h]=m.useState(null),p=pe(t,g=>h(g),c.onItemTextChange,g=>{var x;return(x=l.itemTextRefCallback)==null?void 0:x.call(l,g,c.value,c.disabled)}),f=d==null?void 0:d.textContent,v=m.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:f},c.value),[c.disabled,c.value,f]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=u;return pt(()=>(y(v),()=>b(v)),[y,b,v]),a.jsxs(a.Fragment,{children:[a.jsx(ee.span,{id:c.textId,...i,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?eo.createPortal(i.children,o.valueNode):null]})});KT.displayName=wl;var GT="SelectItemIndicator",YT=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return VT(GT,n).isSelected?a.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});YT.displayName=GT;var bg="SelectScrollUpButton",QT=m.forwardRef((e,t)=>{const n=di(bg,e.__scopeSelect),r=ex(bg,e.__scopeSelect),[s,i]=m.useState(!1),o=pe(t,r.onScrollButtonChange);return pt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(JT,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});QT.displayName=bg;var Sg="SelectScrollDownButton",XT=m.forwardRef((e,t)=>{const n=di(Sg,e.__scopeSelect),r=ex(Sg,e.__scopeSelect),[s,i]=m.useState(!1),o=pe(t,r.onScrollButtonChange);return pt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(JT,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});XT.displayName=Sg;var JT=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=di("SelectScrollButton",n),o=m.useRef(null),l=qh(n),c=m.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),pt(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(ee.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:K(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:K(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:K(s.onPointerLeave,()=>{c()})})}),c7="SelectSeparator",ZT=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});ZT.displayName=c7;var kg="SelectArrow",u7=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Kh(n),i=ui(kg,n),o=di(kg,n);return i.open&&o.position==="popper"?a.jsx(Wv,{...s,...r,ref:t}):null});u7.displayName=kg;var d7="SelectBubbleInput",eP=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=m.useRef(null),i=pe(r,s),o=Dh(t);return m.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[o,t]),a.jsx(ee.select,{...n,style:{...Tk,...n.style},ref:i,defaultValue:t})});eP.displayName=d7;function tP(e){return e===""||e===void 0}function nP(e){const t=it(e),n=m.useRef(""),r=m.useRef(0),s=m.useCallback(o=>{const l=n.current+o;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function rP(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=h7(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function h7(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var f7=PT,sP=RT,p7=OT,m7=DT,g7=MT,iP=LT,v7=BT,oP=WT,aP=qT,y7=KT,x7=YT,lP=QT,cP=XT,uP=ZT;const Zr=f7,es=p7,Ir=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(sP,{ref:r,className:J("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
430ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(m7,{asChild:!0,children:a.jsx(Ev,{className:"h-4 w-4 opacity-50"})})]}));Ir.displayName=sP.displayName;const dP=m.forwardRef(({className:e,...t},n)=>a.jsx(lP,{ref:n,className:J("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(eO,{className:"h-4 w-4"})}));dP.displayName=lP.displayName;const hP=m.forwardRef(({className:e,...t},n)=>a.jsx(cP,{ref:n,className:J("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Ev,{className:"h-4 w-4"})}));hP.displayName=cP.displayName;const Or=m.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>a.jsx(g7,{children:a.jsxs(iP,{ref:s,className:J("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(dP,{}),a.jsx(v7,{className:J("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(hP,{})]})}));Or.displayName=iP.displayName;const w7=m.forwardRef(({className:e,...t},n)=>a.jsx(oP,{ref:n,className:J("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));w7.displayName=oP.displayName;const Ae=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(aP,{ref:r,className:J("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(x7,{children:a.jsx(_v,{className:"h-4 w-4"})})}),a.jsx(y7,{children:t})]}));Ae.displayName=aP.displayName;const b7=m.forwardRef(({className:e,...t},n)=>a.jsx(uP,{ref:n,className:J("-mx-1 my-1 h-px bg-muted",e),...t}));b7.displayName=uP.displayName;function S7(){const[e,t]=m.useState([]),[n,r]=m.useState(!0),{toast:s}=gr(),{hasRole:i}=Ac(),o=async()=>{try{const{data:c,error:u}=await ae.from("user_roles").select("user_id, role, created_at");if(u){console.error("Error fetching users:",u);return}const d=(c==null?void 0:c.map(h=>({id:h.user_id,email:`User ${h.user_id.slice(0,8)}...`,role:h.role})))||[];t(d)}catch(c){console.error("Error fetching users:",c)}finally{r(!1)}};if(m.useEffect(()=>{o()},[]),!i("admin"))return null;const l=async(c,u)=>{const d=u==="admin"?"user":"admin";try{await ae.from("user_roles").delete().eq("user_id",c);const{error:h}=await ae.from("user_roles").insert({user_id:c,role:d});if(h)throw h;s({title:"Role Updated",description:`User role changed to ${d}`}),o()}catch(h){console.error("Error updating user role:",h),s({title:"Error",description:"Failed to update user role",variant:"destructive"})}};return n?a.jsx(be,{children:a.jsx($e,{className:"p-6",children:a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"}),a.jsx("span",{className:"ml-2",children:"Loading users..."})]})})}):a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsx(Ke,{children:"User Management"}),a.jsx(sn,{children:"Manage user roles and permissions"})]}),a.jsx($e,{children:a.jsx("div",{className:"space-y-4",children:e.length===0?a.jsx("p",{className:"text-muted-foreground",children:"No users found"}):e.map(c=>a.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"font-medium",children:c.email}),a.jsx(Qe,{variant:c.role==="admin"?"default":"secondary",children:c.role})]}),a.jsx(te,{variant:"outline",size:"sm",onClick:()=>l(c.id,c.role),children:c.role==="admin"?"Remove Admin":"Make Admin"})]},c.id))})})]})}function k7(){const[e,t]=m.useState({sessionLogging:!0,webRetentionDays:30,whatsappRetentionHours:48,anonymizeData:!0,requireAuth:!0}),[n,r]=m.useState(!0),{toast:s}=gr();m.useEffect(()=>{i()},[]);const i=async()=>{try{const{data:l,error:c}=await ae.from("admin_settings").select("setting_key, setting_value").in("setting_key",["data_retention_days","whatsapp_retention_hours"]);if(c)throw c;if(l){const u=l.reduce((d,h)=>(d[h.setting_key]=h.setting_value,d),{});t(d=>({...d,webRetentionDays:parseInt(u.data_retention_days||"30"),whatsappRetentionHours:parseInt(u.whatsapp_retention_hours||"48")}))}}catch(l){console.error("Error loading settings:",l),s({title:"Error",description:"Failed to load retention settings",variant:"destructive"})}finally{r(!1)}},o=async(l,c)=>{if(t(u=>({...u,[l]:c})),l==="webRetentionDays")try{const{error:u}=await ae.from("admin_settings").update({setting_value:c.toString(),updated_at:new Date().toISOString()}).eq("setting_key","data_retention_days");if(u)throw u;
430s({title:"Web Retention Policy Saved",description:`Web sessions older than ${c} days will be deleted automatically at 2 AM UTC daily.`})}catch(u){console.error("Error saving setting:",u),s({title:"Error",description:"Failed to save web retention policy",variant:"destructive"})}else if(l==="whatsappRetentionHours")try{const{error:u}=await ae.from("admin_settings").update({setting_value:c.toString(),updated_at:new Date().toISOString()}).eq("setting_key","whatsapp_retention_hours");if(u)throw u;s({title:"WhatsApp Retention Policy Saved",description:`WhatsApp conversations older than ${c} hours will be deleted automatically at 2 AM UTC daily.`})}catch(u){console.error("Error saving setting:",u),s({title:"Error",description:"Failed to save WhatsApp retention policy",variant:"destructive"})}else s({title:"Security Setting Updated",description:`${l} has been updated successfully.`})};return a.jsxs(be,{className:"p-6",children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Security & Access"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Admin Users"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage administrator access"})]}),a.jsxs(bn,{children:[a.jsx(dr,{asChild:!0,children:a.jsx(te,{variant:"outline",size:"sm",children:"Manage"})}),a.jsxs(un,{className:"max-w-4xl",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"User Management"}),a.jsx(jn,{children:"Manage user roles and administrative privileges."})]}),a.jsx(S7,{})]})]})]}),a.jsx(Po,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Session Logging"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e.anonymizeData?"Anonymized data only":"Full session data"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qe,{variant:e.sessionLogging?"default":"secondary",children:e.sessionLogging?"Enabled":"Disabled"}),a.jsx(sa,{checked:e.sessionLogging,onCheckedChange:l=>o("sessionLogging",l)})]})]}),a.jsx(Po,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Data Anonymization"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Remove personal identifiers from logs"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qe,{variant:e.anonymizeData?"default":"destructive",children:e.anonymizeData?"Enabled":"Disabled"}),a.jsx(sa,{checked:e.anonymizeData,onCheckedChange:l=>o("anonymizeData",l)})]})]}),a.jsx(Po,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Web Data Retention"}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Delete web sessions older than ",e.webRetentionDays," days"]})]}),a.jsxs(bn,{children:[a.jsx(dr,{asChild:!0,children:a.jsx(te,{variant:"outline",size:"sm",children:"Configure"})}),a.jsxs(un,{children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Web Data Retention Policy"}),a.jsx(jn,{children:"Set how long web coaching sessions are retained before automatic deletion."})]}),a.jsx("div",{className:"space-y-4",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"web-retention",children:"Retention Period (Days)"}),a.jsxs(Zr,{value:e.webRetentionDays.toString(),onValueChange:l=>o("webRetentionDays",parseInt(l)),children:[a.jsx(Ir,{children:a.jsx(es,{})}),a.jsxs(Or,{children:[a.jsx(Ae,{value:"7",children:"7 days"}),a.jsx(Ae,{value:"14",children:"14 days"}),a.jsx(Ae,{value:"30",children:"30 days"}),a.jsx(Ae,{value:"60",children:"60 days"}),a.jsx(Ae,{value:"90",children:"90 days"}),a.jsx(Ae,{value:"365",children:"1 year"})]})]})]})})]})]})]}),a.jsx(Po,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"WhatsApp Data Retention"}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Delete WhatsApp conversations older than ",e.whatsappRetentionHours," hours"]})]}),a.jsxs(bn,{children:[a.jsx(dr,{asChild:!0,children:a.jsx(te,{variant:"outline",size:"sm",children:"Configure"})}),a.jsxs(un,{children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"WhatsApp Data Retention Policy"}),a.jsx(jn,{children:"Set how long WhatsApp conversations are retained before automatic deletion."})]}),a.jsx("div",{className:"space-y-4",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"whatsapp-retention",children:"Retention Period (Hours)"}),a.jsxs(Zr,{value:e.whatsappRetentionHours.toString(),onValueChange:l=>o("whatsappRetentionHours",parseInt(l)),children:[a.jsx(Ir,{children:a.jsx(es,{})}),a.jsxs(Or,{children:[a.jsx(Ae,{value:"24",children:"24 hours (1 day)"}),a.jsx(Ae,{value:"48",children:"48 hours (2 days)"}),a.jsx(Ae,{value:"72",children:"72 hours (3 days)"}),a.jsx(Ae,{value:"168",children:"168 hours (1 week)"}),a.jsx(Ae,{value:"336",children:"336 hours (2 weeks)"}),a.jsx(Ae,{value:"720",children:"720 hours (30 days)"})]})]})]})})]})]})]}),a.jsx(Po,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Authentication Required"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Require login for all features"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qe,{variant:e.requireAuth?"default":"destructive",children:e.requireAuth?"Required":"Optional"}),a.jsx(sa,{checked:e.requireAuth,onCheckedChange:l=>o("requireAuth",l)})]})]})]})]})}function j7(){const[e,t]=m.useState([]),[n,r]=m.useState([]),[s,i]=m.useState(!0),[o,l]=m.useState(null),[c,u]=m.useState(""),[d,h]=m.useState("all");m.useEffect(()=>{p()},[]),m.useEffect(()=>{f()},[e,c,d]);const p=async()=>{try{console.log("Fetching coaching sessions for admin...");const{data:g,error:x}=await ae.from("coaching_sessions").select("*").order("created_at",{ascending:!1});if(x)throw console.error("Error fetching sessions:",x),x;console.log("Fetched sessions:",(g==null?void 0:g.length)||0,"sessions");const w=(g==null?void 0:g.map((S,j)=>({...S,messages:Array.isArray(S.messages)?S.messages:[],session_data:S.session_data&&typeof S.session_data=="object"?S.session_data:null,anonymized_user_id:`User-${(j+1).toString().padStart(3,"0")}`})))||[];t(w)}catch(g){console.error("Error fetching sessions:",g)}finally{i(!1)}},f=()=>{let g=e;c&&(g=g.filter(x=>x.title.toLowerCase().includes(c.toLowerCase())||x.anonymized_user_id.toLowerCase().includes(c.toLowerCase()))),d!=="all"&&(g=g.filter(x=>x.status===d)),r(g)}
430,v=g=>{const x=new Date(g.created_at),w=new Date(g.updated_at);return`${Math.round((w.getTime()-x.getTime())/(1e3*60))} min`},y=g=>{var x;return((x=g.messages)==null?void 0:x.length)||0},b=g=>new Date(g).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});return s?a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsxs(Ke,{className:"flex items-center gap-2",children:[a.jsx(Xr,{className:"w-5 h-5"}),"Session Analytics"]}),a.jsx(sn,{children:"Loading anonymized coaching sessions..."})]}),a.jsx($e,{children:a.jsx("div",{className:"flex items-center justify-center p-8",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})})]}):a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsxs(Ke,{className:"flex items-center gap-2",children:[a.jsx(Xr,{className:"w-5 h-5"}),"Session Analytics"]}),a.jsx(sn,{children:"Review anonymized coaching sessions for quality assurance and insights"})]}),a.jsxs($e,{className:"space-y-4",children:[a.jsxs("div",{className:"flex gap-4",children:[a.jsx("div",{className:"flex-1",children:a.jsxs("div",{className:"relative",children:[a.jsx(Tv,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground"}),a.jsx(Ee,{placeholder:"Search sessions...",value:c,onChange:g=>u(g.target.value),className:"pl-10"})]})}),a.jsxs(Zr,{value:d,onValueChange:h,children:[a.jsx(Ir,{className:"w-40",children:a.jsx(es,{placeholder:"Status"})}),a.jsxs(Or,{children:[a.jsx(Ae,{value:"all",children:"All Status"}),a.jsx(Ae,{value:"active",children:"Active"}),a.jsx(Ae,{value:"completed",children:"Completed"}),a.jsx(Ae,{value:"archived",children:"Archived"})]})]})]}),a.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:n.length===0?a.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No sessions found matching your criteria"}):n.map(g=>{var x,w,S,j;return a.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h4",{className:"font-medium text-sm",children:g.title}),a.jsx(Qe,{variant:"outline",className:"text-xs",children:g.anonymized_user_id}),a.jsx(Qe,{variant:g.status==="active"?"default":"secondary",className:"text-xs",children:g.status})]}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(JI,{className:"w-3 h-3"}),b(g.created_at)]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(to,{className:"w-3 h-3"}),v(g)]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(Xr,{className:"w-3 h-3"}),y(g)," messages"]}),((w=(x=g.session_data)==null?void 0:x.config)==null?void 0:w.style)&&a.jsxs("div",{className:"text-xs",children:[g.session_data.config.style," style"]})]})]}),a.jsxs(bn,{children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{variant:"outline",size:"sm",onClick:()=>l(g),children:[a.jsx(iO,{className:"w-4 h-4 mr-1"}),"View"]}
430)}),a.jsxs(un,{className:"max-w-4xl max-h-[80vh]",children:[a.jsxs(Sn,{children:[a.jsxs(kn,{className:"flex items-center gap-2",children:[a.jsx(Xr,{className:"w-5 h-5"}),"Session: ",g.title]}),a.jsxs(jn,{className:"flex items-center gap-4",children:[a.jsx("span",{children:g.anonymized_user_id}),a.jsx("span",{children:"â¢"}),a.jsx("span",{children:b(g.created_at)}),a.jsx("span",{children:"â¢"}),a.jsxs("span",{children:[y(g)," messages"]}),a.jsx("span",{children:"â¢"}),a.jsx("span",{children:v(g)})]})]}),((S=g.session_data)==null?void 0:S.config)&&a.jsxs("div",{className:"flex gap-2 mb-4",children:[g.session_data.config.style&&a.jsxs(Qe,{variant:"outline",children:[g.session_data.config.style," style"]}),g.session_data.config.duration&&a.jsxs(Qe,{variant:"outline",children:[g.session_data.config.duration," min session"]}),g.session_data.config.focus&&a.jsx(Qe,{variant:"outline",children:g.session_data.config.focus})]}),a.jsx(Rc,{className:"h-[400px] w-full",children:a.jsx("div",{className:"space-y-4 pr-4",children:(j=g.messages)==null?void 0:j.map((k,E)=>a.jsx("div",{className:`flex gap-3 ${k.sender==="user"?"justify-end":"justify-start"}`,children:a.jsxs("div",{className:`flex gap-3 max-w-[80%] ${k.sender==="user"?"flex-row-reverse":"flex-row"}`,children:[a.jsx("div",{className:"flex-shrink-0",children:k.sender==="user"?a.jsx("div",{className:"w-8 h-8 bg-secondary rounded-full flex items-center justify-center",children:a.jsx(Av,{className:"w-4 h-4"})}):a.jsx("div",{className:"w-8 h-8 bg-primary rounded-full flex items-center justify-center",children:a.jsx(Cv,{className:"w-4 h-4 text-primary-foreground"})})}),a.jsxs("div",{className:`px-4 py-3 rounded-lg ${k.sender==="user"?"bg-primary text-primary-foreground":"bg-muted"}`,children:[a.jsx(Zy,{content:k.content}),k.timestamp&&a.jsx("p",{className:"text-xs opacity-60 mt-2",children:new Date(k.timestamp).toLocaleTimeString()})]})]})},E))})})]})]})]},g.id)})}),a.jsx("div",{className:"pt-4 border-t",children:a.jsxs("div",{className:"grid grid-cols-3 gap-4 text-center",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-2xl font-bold text-primary",children:e.length}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Sessions"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xl font-bold text-primary",children:e.filter(g=>g.status==="active").length}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Active Sessions"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xl font-bold text-primary",children:Math.round(e.reduce((g,x)=>{var w;return g+(((w=x.messages)==null?void 0:w.length)||0)},0)/e.length)||0}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Avg Messages/Session"})]})]})})]})]})}function C7(){const[e,t]=m.useState([]),[n,r]=m.useState(null),[s,i]=m.useState([]),[o,l]=m.useState(!0),[c,u]=m.useState(!1),[d,h]=m.useState(""),[p,f]=m.useState(""),[v,y]=m.useState(!1);m.useEffect(()=>{b()},[]),m.useEffect(()=>{n&&g(n.id)},[n]);const b=async()=>{try{console.log("Fetching WhatsApp conversations...");const{data:j,error:k}=await ae.from("whatsapp_conversations").select("*").order("last_message_at",{ascending:!1});if(k)throw k;const E=await Promise.all((j||[]).map(async A=>{const{count:I}=await ae.from("whatsapp_messages").select("*",{count:"exact",head:!0}).eq("conversation_id",A.id);return{...A,message_count:I||0}}));console.log(`Fetched ${E.length} conversations`),t(E)}catch(j){console.error("Error fetching conversations:",j),Wo.error("Failed to load conversations")}finally{l(!1)}},g=async j=>{u(!0);try{const{data:k,error:E}=await ae.from("whatsapp_messages").select("*").eq("conversation_id",j).order("created_at",{ascending:!0});if(E)throw E;console.log(`Fetched ${(k==null?void 0:k.length)||0} messages for conversation`),i(k||[])}catch(k){console.error("Error fetching messages:",k),Wo.error("Failed to load messages")}finally{u(!1)}},x=async()=>{if(!(!n||!p.trim())){y(!0);try{const{error:j}=await ae.functions.invoke("whatsapp-send",{body:{phoneNumber:n.phone_number,message:p,conversationId:n.id}});if(j)throw j;Wo.success("Message sent successfully"),f(""),await g(n.id)}catch(j){console.error("Error sending message:",j),Wo.error("Failed to send message")}finally{y(!1)}}},w=j=>
430new Date(j).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),S=e.filter(j=>{var k;return j.phone_number.includes(d)||((k=j.display_name)==null?void 0:k.toLowerCase().includes(d.toLowerCase()))});return o?a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsxs(Ke,{className:"flex items-center gap-2",children:[a.jsx(Of,{className:"w-5 h-5"}),"WhatsApp Conversations"]}),a.jsx(sn,{children:"Loading conversations..."})]}),a.jsx($e,{children:a.jsx("div",{className:"flex items-center justify-center p-8",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})})})]}):a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsxs(Ke,{className:"flex items-center gap-2",children:[a.jsx(Of,{className:"w-5 h-5"}),"WhatsApp Conversations"]}),a.jsx(sn,{children:"Manage WhatsApp conversations and send manual messages"})]}),a.jsxs($e,{className:"space-y-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Tv,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-muted-foreground"}),a.jsx(Ee,{placeholder:"Search conversations...",value:d,onChange:j=>h(j.target.value),className:"pl-10"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 pb-4 border-b",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-primary",children:e.length}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Conversations"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-primary",children:e.reduce((j,k)=>j+(k.message_count||0),0)}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Messages"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-primary",children:e.filter(j=>{const k=new Date(j.last_message_at),E=new Date(Date.now()-24*60*60*1e3);return k>E}).length}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Active (24h)"})]})]}),a.jsx("div",{className:"space-y-2",children:S.length===0?a.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No conversations found"}):S.map(j=>a.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg hover:bg-muted/50 transition-colors",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h4",{className:"font-medium text-sm",children:j.display_name||j.phone_number}),a.jsx(Qe,{variant:"outline",className:"text-xs",children:j.phone_number})]}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(to,{className:"w-3 h-3"}),w(j.last_message_at)]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(Xr,{className:"w-3 h-3"}),j.message_count||0," messages"]})]})]}),a.jsxs(bn,{children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{variant:"outline",size:"sm",onClick:()=>r(j),children:[a.jsx(Xr,{className:"w-4 h-4 mr-1"}),"View"]}
430)}),a.jsxs(un,{className:"max-w-4xl max-h-[80vh]",children:[a.jsxs(Sn,{children:[a.jsxs(kn,{className:"flex items-center gap-2",children:[a.jsx(Of,{className:"w-5 h-5"}),j.display_name||j.phone_number]}),a.jsxs(jn,{className:"flex items-center gap-4",children:[a.jsx("span",{children:j.phone_number}),a.jsx("span",{children:"â¢"}),a.jsxs("span",{children:[j.message_count||0," messages"]})]})]}),a.jsx(Rc,{className:"h-[400px] w-full pr-4",children:c?a.jsx("div",{className:"flex items-center justify-center p-8",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):a.jsx("div",{className:"space-y-4",children:s.map(k=>a.jsx("div",{className:`flex gap-3 ${k.direction==="outbound"?"justify-end":"justify-start"}`,children:a.jsxs("div",{className:`flex gap-3 max-w-[80%] ${k.direction==="outbound"?"flex-row-reverse":"flex-row"}`,children:[a.jsx("div",{className:"flex-shrink-0",children:k.direction==="inbound"?a.jsx("div",{className:"w-8 h-8 bg-secondary rounded-full flex items-center justify-center",children:a.jsx(Av,{className:"w-4 h-4"})}):a.jsx("div",{className:"w-8 h-8 bg-primary rounded-full flex items-center justify-center",children:a.jsx(Cv,{className:"w-4 h-4 text-primary-foreground"})})}),a.jsxs("div",{className:`px-4 py-3 rounded-lg ${k.direction==="outbound"?"bg-primary text-primary-foreground":"bg-muted"}`,children:[a.jsx(Zy,{content:k.content}),a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsx("p",{className:"text-xs opacity-60",children:w(k.created_at)}),k.direction==="outbound"&&a.jsx(Qe,{variant:"outline",className:"text-xs",children:k.status})]})]})]})},k.id))})}),a.jsxs("div",{className:"flex gap-2 pt-4 border-t",children:[a.jsx(Tr,{placeholder:"Type a manual message...",value:p,onChange:k=>f(k.target.value),className:"flex-1 min-h-[60px]",onKeyDown:k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),x())}}),a.jsxs(te,{onClick:x,disabled:v||!p.trim(),className:"self-end",children:[a.jsx(nj,{className:"w-4 h-4 mr-1"}),"Send"]})]})]})]})]},j.id))})]})]})}const tx=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{ref:n,className:J("w-full caption-bottom text-sm",e),...t})}));tx.displayName="Table";const nx=m.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:J("[&_tr]:border-b",e),...t}));nx.displayName="TableHeader";const rx=m.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:J("[&_tr:last-child]:border-0",e),...t}));rx.displayName="TableBody";const _7=m.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:J("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));_7.displayName="TableFooter";const ia=m.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:J("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));ia.displayName="TableRow";const gn=m.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:J("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));gn.displayName="TableHead";const tn=m.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:J("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));tn.displayName="TableCell";const E7=m.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:J("mt-4 text-sm text-muted-foreground",e),...t}));E7.displayName="TableCaption";const jo=e=>{const[t,n,r]=e.split(" ").map(c=>parseFloat(c)),s=r/100,o=n/100*Math.min(s,1-s),l=c=>{const u=(c+t/30)%12,d=s-o*Math.max(Math.min(u-3,9-u,1),-1);return Math.round(255*d).toString(16).padStart(2,"0")};return`#${l(0)}${l(8)}${l(4)}`},wp=e=>{const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,s=Math.max(t,n,r),i=Math.min(t,n,r),o=(s+i)/2;let l=0,c=0;if(s!==i){const u=s-i;switch(c=o>.5?u/(2-s-i):u/(s+i),s){case t:l=((n-r)/u+(n<r?6:0))/6;break;case n:l=((r-t)/u+2)/6;break;case r:l=((t-n)/u+4)/6;break}}return`${Math.round(l*360)} ${Math.round(c*100)}% ${Math.round(o*100)}%`},Co={tenant_key:"",name:"",domains:"",config:{tagline:"",introText:"",coachName:"",companyName:"",logo:"",logoBW:"",headerImage:"",favicon:"/favicon.jpg",bookingUrl:"",websiteUrl:"",contactEmail:"",metaTitle:"",metaDescription:"",colors:{primary:"16 100% 50%",primaryForeground:"0 0% 100%",accent:"210 40% 96.1%"}}};function N7(){const{isSuperAdmin:e}=Ac(),{toast:t}=gr(),[n,r]=m.useState([]),[s,i]=m.useState(!0),[o,l]=m.useState(!1),[c,u]=m.useState(null),[d,h]=m.useState(Co),[p,f]=m.useState({primary:"",primaryForeground:"",accent:""});m.useEffect(()=>{e&&v()},[e]);const v=async()=>{try{const{data:w,error:S}=await ae.from("tenants").select("*").order("created_at",{ascending:!1});if(S)throw S;r(w||[])}catch(w){console.error("Error fetching tenants:",w),t({title:"Error",description:"Failed to fetch tenants",variant:"destructive"})}finally{i(!1)}},y=async w=>{w.preventDefault();try{const S=d.domains.split(",").map(k=>k.trim()).filter(k=>k),j={tenant_key:d.tenant_key,name:d.name,domains:S,config:d.config,is_active:!0};if(c){const{error:k}=await ae.from("tenants").update(j).eq("id",c.id);if(k)throw k;
430t({title:"Success",description:"Tenant updated successfully. Refresh the page to see the changes.",action:a.jsx(te,{variant:"outline",size:"sm",onClick:()=>window.location.reload(),children:"Refresh Now"})})}else{const{error:k}=await ae.from("tenants").insert([j]);if(k)throw k;t({title:"Success",description:"Tenant created successfully. Refresh the page to see the changes.",action:a.jsx(te,{variant:"outline",size:"sm",onClick:()=>window.location.reload(),children:"Refresh Now"})})}l(!1),u(null),h(Co),v()}catch(S){console.error("Error saving tenant:",S),t({title:"Error",description:"Failed to save tenant",variant:"destructive"})}},b=w=>{u(w),h({tenant_key:w.tenant_key,name:w.name,domains:w.domains.join(", "),config:w.config}),f({primary:jo(w.config.colors.primary),primaryForeground:jo(w.config.colors.primaryForeground),accent:jo(w.config.colors.accent)}),l(!0)},g=async w=>{try{const{error:S}=await ae.from("tenants").delete().eq("id",w);if(S)throw S;t({title:"Success",description:"Tenant deleted successfully"}),v()}catch(S){console.error("Error deleting tenant:",S),t({title:"Error",description:"Failed to delete tenant",variant:"destructive"})}},x=async w=>{try{const{error:S}=await ae.from("tenants").update({is_active:!w.is_active}).eq("id",w.id);if(S)throw S;t({title:"Success",description:`Tenant ${w.is_active?"deactivated":"activated"}`}),v()}catch(S){console.error("Error toggling tenant:",S),t({title:"Error",description:"Failed to update tenant status",variant:"destructive"})}};return e?s?a.jsx("div",{children:"Loading tenants..."}):a.jsxs(be,{children:[a.jsx(qe,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx(Ke,{children:"Tenant Management"}),a.jsx(sn,{children:"Manage multi-tenant configurations and branding"})]}),a.jsxs(bn,{open:o,onOpenChange:l,children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{onClick:()=>{u(null),h(Co),f({primary:jo(Co.config.colors.primary),primaryForeground:jo(Co.config.colors.primaryForeground),accent:jo(Co.config.colors.accent)})},children:[a.jsx(Nv,{className:"w-4 h-4 mr-2"}),"Add Tenant"]})}),a.jsxs(un,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:c?"Edit Tenant":"Create New Tenant"}),a.jsx(jn,{children:"Configure tenant branding, domains, and settings"})]}),a.jsxs("form",{onSubmit:y,className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"tenant_key",children:"Tenant Key"}),a.jsx(Ee,{id:"tenant_key",value:d.tenant_key,onChange:w=>h({...d,tenant_key:w.target.value}),placeholder:"bernhard",required:!0,disabled:!!c})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"name",children:"Display Name"}),a.jsx(Ee,{id:"name",value:d.name,onChange:w=>h({...d,name:w.target.value}),placeholder:"Coach Bernhard (AI)",required:!0})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"domains",children:"Domains (comma-separated)"}),a.jsx(Ee,{id:"domains",value:d.domains,onChange:w=>h({...d,domains:w.target.value}),placeholder:"coach.example.com, www.coach.example.com",required:!0})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"tagline",children:"Tagline"}),a.jsx(Ee,{id:"tagline",value:d.config.tagline,onChange:w=>h({...d,config:{...d.config,tagline:w.target.value}}),placeholder:"Your AI coaching companion"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"introText",children:"Introduction Text"}),a.jsx(Tr,{id:"introText",value:d.config.introText,onChange:w=>h({...d,config:{...d.config,introText:w.target.value}}),placeholder:"This isn't a human coach (yet), but it's pretty close...",className:"min-h-[120px]"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"coachName",children:"Coach Name"}),a.jsx(Ee,{id:"coachName",value:d.config.coachName,onChange:w=>h({...d,config:{...d.config,coachName:w.target.value}})})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"companyName",children:"Company Name"}),a.jsx(Ee,{id:"companyName",value:d.config.companyName,onChange:w=>h({...d,config:{...d.config,companyName:w.target.value}})})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"logo",children:"Logo URL"}),a.jsx(Ee,{id:"logo",value:d.config.logo,onChange:w=>h({...d,config:{...d.config,logo:w.target.value}}),placeholder:"/assets/logo.jpg"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"logoBW",children:"Logo B&W URL"}),a.jsx(Ee,{id:"logoBW",value:d.config.logoBW,onChange:w=>h({...d,config:{...d.config,logoBW:w.target.value}}),placeholder:"/assets/logo-bw.jpg"})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"headerImage",children:"Header Image URL"}),a.jsx(Ee,{id:"headerImage",value:d.config.headerImage,onChange:w=>h({...d,config:{...d.config,headerImage:w.target.value}}),placeholder:"/assets/header.jpg"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"favicon",children:"Favicon URL"}),a.jsx(Ee,{id:"favicon",value:d.config.favicon,onChange:w=>h({...d,config:{...d.config,favicon:w.target.value}}),placeholder:"/favicon.jpg"})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"primary",children:"Primary Color (HEX)"}),a.jsxs("div",{className:"flex gap-2 items-center",children:[a.jsx(Ee,{id:"primary",value:p.primary,onChange:w=>{const S=w.target.value;f({...p,primary:S}),/^#[0-9A-F]{6}$/i.test(S)&&h({...d,config:{...d.config,colors:{...d.config.colors,primary:wp(S)}}})},placeholder:"#FE5000",className:"flex-1"}),a.jsx("div",{className:"w-10 h-10 rounded border border-border",style:{backgroundColor:/^#[0-9A-F]{6}$/i.test(p.primary)?p.primary:"#cccccc"}})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"primaryForeground",children:"Primary Foreground (HEX)"}),a.jsxs("div",{className:"flex gap-2 items-center",children:[a.jsx(Ee,{id:"primaryForeground",value:p.primaryForeground,onChange:w=>{const S=w.target.value;f({...p,primaryForeground:S}),/^#[0-9A-F]{6}$/i.test(S)&&h({...d,config:{...d.config,colors:{...d.config.colors,primaryForeground:wp(S)}}})},placeholder:"#FFFFFF",className:"flex-1"}),a.jsx("div",{className:"w-10 h-10 rounded border border-border",style:{backgroundColor:/^#[0-9A-F]{6}$/i.test(p.primaryForeground)?p.primaryForeground:"#cccccc"}})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"accent",children:"Accent (HEX)"}),a.jsxs("div",{className:"flex gap-2 items-center",children:[a.jsx(Ee,{id:"accent",value:p.accent,onChange:w=>{const S=w.target.value;f({...p,accent:S}),/^#[0-9A-F]{6}$/i.test(S)&&h({...d,config:{...d.config,colors:{...d.config.colors,accent:wp(S)}}})},placeholder:"#E5F1FB",className:"flex-1"}),a.jsx("div",{className:"w-10 h-10 rounded border border-border",style:{backgroundColor:/^#[0-9A-F]{6}$/i.test(p.accent)?p.accent:"#cccccc"}})]})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"bookingUrl",children:"Booking URL"}),a.jsx(Ee,{id:"bookingUrl",value:d.config.bookingUrl,onChange:w=>h({...d,config:{...d.config,bookingUrl:w.target.value}}),placeholder:"https://book.example.com"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"websiteUrl",children:"Website URL"}),a.jsx(Ee,{id:"websiteUrl",value:d.config.websiteUrl,onChange:w=>h({...d,config:{...d.config,websiteUrl:w.target.value}}),placeholder:"https://www.example.com"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"contactEmail",children:"Contact Email"}),a.jsx(Ee,{id:"contactEmail",type:"email",value:d.config.contactEmail,onChange:w=>h({...d,config:{...d.config,contactEmail:w.target.value}}),placeholder:"[email protected]"})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"metaTitle",children:"Meta Title"}),a.jsx(Ee,{id:"metaTitle",value:d.config.metaTitle,onChange:w=>h({...d,config:{...d.config,metaTitle:w.target.value}}),placeholder:"Your AI Coaching Companion"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"metaDescription",children:"Meta Description"}),a.jsx(Tr,{id:"metaDescription",value:d.config.metaDescription,onChange:w=>h({...d,config:{...d.config,metaDescription:w.target.value}}),placeholder:"Experience personalized AI coaching..."})]}),a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx(te,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),a.jsxs(te,{type:"submit",children:[c?"Update":"Create"," Tenant"]})]})]})]})]})]})}),a.jsx($e,{children:a.jsxs(tx,{children:[a.jsx(nx,{children:a.jsxs(ia,{children:[a.jsx(gn,{children:"Name"}),a.jsx(gn,{children:"Key"}),a.jsx(gn,{children:"Domains"}),a.jsx(gn,{children:"Status"}),a.jsx(gn,{children:"Actions"})]})}),a.jsx(rx,{children:n.length===0?a.jsx(ia,{children:a.jsx(tn,{colSpan:5,className:"text-center text-muted-foreground",children:"No tenants found. Create your first tenant to get started."})}):n.map(w=>a.jsxs(ia,{children:[a.jsx(tn,{className:"font-medium",children:w.name}),a.jsx(tn,{children:a.jsx("code",{className:"text-sm",children:w.tenant_key})}),a.jsx(tn,{children:a.jsx("div",{className:"flex flex-wrap gap-1",children:w.domains.map(S=>a.jsxs(Qe,{variant:"secondary",className:"text-xs",children:[a.jsx(aO,{className:"w-3 h-3 mr-1"}),S]},S))})}),a.jsx(tn,{children:a.jsx(sa,{checked:w.is_active,onCheckedChange:()=>x(w)})}),a.jsx(tn,{children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx(te,{size:"sm",variant:"outline",onClick:()=>b(w),children:a.jsx(tj,{className:"w-4 h-4"})}),a.jsxs(by,{children:[a.jsx(q_,{asChild:!0,children:a.jsx(te,{size:"sm",variant:"destructive",children:a.jsx(Pv,{className:"w-4 h-4"})})}),a.jsxs(Ch,{children:[a.jsxs(_h,{children:[a.jsx(Nh,{children:"Delete Tenant"}),a.jsxs(Th,{children:['Are you sure you want to delete "',w.name,'"? This action cannot be undone.']})]}),a.jsxs(Eh,{children:[a.jsx(Ah,{children:"Cancel"}),a.jsx(Ph,{onClick:()=>g(w.id),children:"Delete"})]})]})]})]})})]},w.id))})]})})]}):null}function T7(){const{isSuperAdmin:e}=Ac();return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("header",{className:"border-b border-border bg-card p-4",children:a.jsxs("div",{className:"max-w-6xl mx-auto flex justify-between items-center",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(rj,{className:"w-6 h-6 text-primary"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Admin Dashboard"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Coach Bernhard Management"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qe,{variant:"secondary",children:e?"Super Administrator":"Administrator"}),a.jsx(Fn,{to:"/",children:a.jsx(te,{variant:"outline",size:"sm",children:"Back to Coach"})})]})]})}),a.jsxs("main",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[e&&a.jsx(N7,{}),a.jsx(LV,{}),a.jsx(C7,{}),a.jsx(j7,{}),a.jsx(be,{className:"p-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Coaching Materials"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload, process, and manage coaching materials for RAG"})]}),a.jsx(Fn,{to:"/admin/materials",children:a.jsxs(te,{children:[a.jsx(oO,{className:"w-4 h-4 mr-2"}),"Manage Materials"]})})]})}),a.jsx(k7,{})]}),a.jsx(ti,{})]})}var Gh="Tabs",[P7,Qq]=mt(Gh,[Va]),fP=Va(),[A7,sx]=P7(Gh),pP=m.forwardRef((e,t)=>
430{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=io(l),[h,p]=En({prop:r,onChange:s,defaultProp:i??"",caller:Gh});return a.jsx(A7,{scope:n,baseId:zn(),value:h,onValueChange:p,orientation:o,dir:d,activationMode:c,children:a.jsx(ee.div,{dir:d,"data-orientation":o,...u,ref:t})})});pP.displayName=Gh;var mP="TabsList",gP=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=sx(mP,n),o=fP(n);return a.jsx(Sy,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:a.jsx(ee.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});gP.displayName=mP;var vP="TabsTrigger",yP=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=sx(vP,n),l=fP(n),c=bP(o.baseId,r),u=SP(o.baseId,r),d=r===o.value;return a.jsx(ky,{asChild:!0,...l,focusable:!s,active:d,children:a.jsx(ee.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:t,onMouseDown:K(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:K(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!s&&h&&o.onValueChange(r)})})})});yP.displayName=vP;var xP="TabsContent",wP=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,l=sx(xP,n),c=bP(l.baseId,r),u=SP(l.baseId,r),d=r===l.value,h=m.useRef(d);return m.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),a.jsx(yt,{present:s||d,children:({present:p})=>a.jsx(ee.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:p&&i})})});wP.displayName=xP;function bP(e,t){return`${e}-trigger-${t}`}function SP(e,t){return`${e}-content-${t}`}var R7=pP,kP=gP,jP=yP,CP=wP;const _P=R7,ix=m.forwardRef(({className:e,...t},n)=>a.jsx(kP,{ref:n,className:J("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ix.displayName=kP.displayName;const oa=m.forwardRef(({className:e,...t},n)=>a.jsx(jP,{ref:n,className:J("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));oa.displayName=jP.displayName;const aa=m.forwardRef(({className:e,...t},n)=>a.jsx(CP,{ref:n,className:J("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));aa.displayName=CP.displayName;var ox="Progress",ax=100,[I7,Xq]=mt(ox),[O7,D7]=I7(ox),EP=m.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=M7,...o}=e;(s||s===0)&&!Wb(s)&&console.error(L7(`${s}`,"Progress"));const l=Wb(s)?s:ax;r!==null&&!Vb(r,l)&&console.error(F7(`${r}`,"Progress"));const c=Vb(r,l)?r:null,u=$d(c)?i(c,l):void 0;return a.jsx(O7,{scope:n,value:c,max:l,children:a.jsx(ee.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":$d(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":PP(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});EP.displayName=ox;var NP="ProgressIndicator",TP=m.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,s=D7(NP,n);return a.jsx(ee.div,{"data-state":PP(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:t})});TP.displayName=NP;function M7(e,t){return`${Math.round(e/t*100)}%`}function PP(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function $d(e){return typeof e=="number"}function Wb(e){return $d(e)&&!isNaN(e)&&e>0}function Vb(e,t){return $d(e)&&!isNaN(e)&&e<=t&&e>=0}function L7(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${ax}\`.`}function F7(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 431 - a positive number 432 - less than the value passed to \`max\` (or ${ax} if no \`max\` prop is set) 433 - \`null\` or \`undefined\` if the progress is indeterminate. 434 435Defaulting to \`null\`.`}var AP=EP,$7=TP;const Ci=m.forwardRef(({className:e,value:t,...n},r)=>a.jsx(AP,{ref:r,className:J("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:a.jsx($7,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ci.displayName=AP.displayName;function z7({onUploadComplete:e,onClose:t}){const[n,r]=m.useState(""),[s,i]=m.useState([]),[o,l]=m.useState(!1),c=m.useRef(null),{toast:u}=gr(),{user:d}=li(),h=y=>{const b=Array.from(y.target.files||[]);if(b.length===0)return;const g=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","text/plain","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation"],x=20*1024*1024;for(const S of b){if(!g.includes(S.type)){u({title:"Invalid file type",description:`${S.name} is not a supported file type. Please upload PDF, Word, PowerPoint, or text files.`,variant:"destructive"});return}if(S.size>x){u({title:"File too large",description:`${S.name} exceeds the 20MB size limit.`,variant:"destructive"});return}}const w=b.map(S=>({file:S,progress:0,id:Math.random().toString(36).substr(2,9)}));i(w)},p=async()=>
435{if(!(!d||s.length===0)){l(!0);try{for(const y of s){const{file:b,id:g}=y,x=b.name.split(".").pop(),S=`materials/${`${Date.now()}-${Math.random().toString(36).substr(2,9)}.${x}`}`;i(I=>I.map(_=>_.id===g?{..._,progress:10}:_));const{data:j,error:k}=await ae.storage.from("coaching-materials").upload(S,b);if(k)throw k;i(I=>I.map(_=>_.id===g?{..._,progress:70}:_));const{data:E,error:A}=await ae.from("coaching_materials").insert({name:b.name,file_path:S,file_size:b.size,file_type:b.type,uploaded_by:d.id,description:n||null}).select("id").single();if(A)throw A;i(I=>I.map(_=>_.id===g?{..._,progress:85}:_));try{console.log(`Triggering processing for material: ${b.name}`);const I=await ae.functions.invoke("process-materials",{body:{materialId:E.id}});I.error?console.error(`Processing failed for ${b.name}:`,I.error):console.log(`Processing started for ${b.name}`)}catch(I){console.error(`Error starting processing for ${b.name}:`,I)}i(I=>I.map(_=>_.id===g?{..._,progress:100}:_))}u({title:"Upload successful",description:`${s.length} file(s) uploaded successfully.`}),e(),t()}catch(y){console.error("Upload error:",y),u({title:"Upload failed",description:y instanceof Error?y.message:"An error occurred during upload.",variant:"destructive"})}finally{l(!1)}}},f=y=>{i(b=>b.filter(g=>g.id!==y))},v=y=>{if(y===0)return"0 Bytes";const b=1024,g=["Bytes","KB","MB","GB"],x=Math.floor(Math.log(y)/Math.log(b));return parseFloat((y/Math.pow(b,x)).toFixed(2))+" "+g[x]};return a.jsxs(be,{className:"p-6 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Upload Coaching Materials"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload PDF, Word, PowerPoint, or text files for coaching reference"})]}),a.jsx(te,{variant:"ghost",size:"sm",onClick:t,children:a.jsx(rc,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"description",children:"Description (Optional)"}),a.jsx(Tr,{id:"description",placeholder:"Describe what these materials are for...",value:n,onChange:y=>r(y.target.value),className:"mt-1"})]}),a.jsxs("div",{children:[a.jsx(ue,{children:"Files"}),a.jsxs("div",{className:"mt-1 border-2 border-dashed border-border rounded-lg p-6 text-center cursor-pointer hover:border-primary/50 transition-colors",onClick:()=>{var y;return(y=c.current)==null?void 0:y.click()},children:[a.jsx(yd,{className:"w-8 h-8 mx-auto text-muted-foreground mb-2"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to select files or drag and drop"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"PDF, Word, PowerPoint, or text files up to 20MB each"})]}),a.jsx(Ee,{ref:c,type:"file",className:"hidden",multiple:!0,accept:".pdf,.doc,.docx,.txt,.ppt,.pptx",onChange:h})]}),s.length>0&&a.jsxs("div",{className:"space-y-3",children:[a.jsx(ue,{children:"Selected Files"}),s.map(y=>a.jsxs("div",{className:"flex items-center gap-3 p-3 border border-border rounded-lg",children:[a.jsx(ej,{className:"w-5 h-5 text-muted-foreground"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:y.file.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:v(y.file.size)}),o&&a.jsx(Ci,{value:y.progress,className:"mt-1 h-1"})]}),!o&&a.jsx(te,{variant:"ghost",size:"sm",onClick:()=>f(y.id),children:a.jsx(rc,{className:"w-4 h-4"})})]},y.id))]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(te,{onClick:p,disabled:s.length===0||o,className:"flex-1",children:o?"Uploading...":`Upload ${s.length} file(s)`}),a.jsx(te,{variant:"outline",onClick:t,children:"Cancel"})]}),s.length>0&&a.jsxs("div",{className:"flex items-start gap-2 p-3 bg-muted rounded-lg",children:[a.jsx(tO,{className:"w-4 h-4 text-muted-foreground mt-0.5"}),a.jsxs("div",{className:"text-xs text-muted-foreground",children:[a.jsx("p",{children:"Supported formats: PDF, Word (.doc, .docx), PowerPoint (.ppt, .pptx), Text (.txt)"}),a.jsx("p",{children:"Maximum file size: 20MB per file"})]})]})]})}function B7(){const[e,t]=m.useState([]),[n,r]=m.useState(!0),[s,i]=m.useState(!1),[o,l]=m.useState(!1),{toast:c}=gr(),u=async()=>{try{const{data:g,error:x}=await ae.from("coaching_materials").select("id, name, processing_status, processed_at, processing_error, file_size").eq("is_active",!0).order("uploaded_at",{ascending:!1});if(x)throw x;t(g||[])}catch(g){console.error("Error fetching materials:",g),c({title:"Error",description:"Failed to fetch materials",variant:"destructive"})}finally{r(!1)}};m.useEffect(()=>{u()},[]);const d=async()=>{i(!0);try{const{data:g,error:x}=await ae.functions.invoke("process-all-materials",{body:{}});if(x)throw x;c({title:"Processing Started",description:`Started processing ${g.materialsCount||0} materials in the background.`}),setTimeout(()=>{u()},2e3)}catch(g){console.error("Error starting processing:",g),c({title:"Error",description:"Failed to start processing",variant:"destructive"})}finally{i(!1)}},h=async(g,x)=>{try{const{data:w,error:S}=await ae.functions.invoke("process-materials",{body:{materialId:g,forceReprocess:!0}});if(S)throw S;c({title:"Processing Started",description:`Started processing "${x}"`}),setTimeout(()=>{u()},1e3)}catch(w){console.error("Error processing material:",w),c({title:"Error",description:`Failed to process "${x}"`,variant:"destructive"})}},p=g=>{switch(g){case"completed":return a.jsx(nO,{className:"w-4 h-4 text-green-500"});case"failed":return a.jsx(rO,{className:"w-4 h-4 text-red-500"});case"processing":return a.jsx(zu,{className:"w-4 h-4 text-blue-500 animate-spin"});default:return a.jsx(to,{className:"w-4 h-4 text-yellow-500"})}},f=g=>{const x={completed:"default",failed:"destructive",processing:"secondary",pending:"outline"};return a.jsx(Qe,{variant:x[g]||"outline",children:g})},v=g=>{if(g===0)return"0 Bytes";const x=1024,w=["Bytes","KB","MB","GB"],S=Math.floor(Math.log(g)/Math.log(x));return parseFloat((g/Math.pow(x,S)).toFixed(2))+" "+w[S]},b=(()=>{const g=e.length,x=e.filter(k=>k.processing_status==="completed").length,w=e.filter(k=>k.processing_status==="failed").length,S=e.filter(k=>k.processing_status==="pending").length,j=e.filter(k=>k.processing_status==="processing").length;return{total:g,completed:x,failed:w,pending:S,processing:j}})();return n?a.jsx(be,{className:"p-6",children:a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx(zu,{className:"w-6 h-6 animate-spin"}),a.jsx("span",{className:"ml-2",children:"Loading materials..."})]})}):a.jsxs(be,{className:"p-6 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold",children:"Materials Processing"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Pre-process coaching materials for faster AI responses"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(bn,{open:o,onOpenChange:l,children:[a.jsx(dr,{asChild:!0,children:a.jsxs(te,{variant:"outline",children:[a.jsx(yd,{className:"w-4 h-4 mr-2"}),"Upload New Material"]})}),a.jsx(un,{className:"max-w-2xl",children:a.jsx(z7,{onUploadComplete:()=>{l(!1),u()},onClose:()=>l(!1)})})]}),a.jsxs(te,{variant:"outline",onClick:u,disabled:n,children:[a.jsx(zu,{className:"w-4 h-4 mr-2"}),"Refresh"]}),a.jsxs(te,{onClick:d,disabled:s||b.pending===0,children:[a.jsx(Mw,{className:"w-4 h-4 mr-2"}),"Process All"]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[a.jsxs("div",{className:"text-center p-3 bg-muted rounded-lg",children:[a.jsx("div",{className:"text-2xl font-bold",children:b.total}),a.jsx("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),a.jsxs("div",{className:"text-center p-3 bg-green-50 rounded-lg",children:[a.jsx("div",{className:"text-2xl font-bold text-green-600",children:b.completed}),a.jsx("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),a.jsxs("div",{className:"text-center p-3 bg-yellow-50 rounded-lg",children:[a.jsx("div",{className:"text-2xl font-bold text-yellow-600",children:b.pending}),a.jsx("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),a.jsxs("div",{className:"text-center p-3 bg-red-50 rounded-lg",children:[a.jsx("div",{className:"text-2xl font-bold text-red-600",children:b.failed}),a.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed"})]})]}),b.total>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-sm font-medium",children:"Overall Progress"}),a.jsxs("span",{className:"text-sm text-muted-foreground",children:[b.completed,"/",b.total," completed"]})]}),a.jsx(Ci,{value:b.completed/b.total*100})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("h4",{className:"font-medium",children:"Materials"}),e.length===0?a.jsx("p",{className:"text-center text-muted-foreground py-8",children:"No materials uploaded yet"}):a.jsx("div",{className:"space-y-2",children:e.map(g=>a.jsxs("div",{className:"flex items-center justify-between p-3 border border-border rounded-lg",children:[a.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[p(g.processing_status),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:g.name}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[a.jsx("span",{children:v(g.file_size)}),g.processed_at&&a.jsxs("span",{children:["⢠Processed ",new Date(g.processed_at).toLocaleStr
435ing()]})]}),g.processing_error&&a.jsx("p",{className:"text-xs text-red-500 mt-1",children:g.processing_error})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[f(g.processing_status),(g.processing_status==="pending"||g.processing_status==="failed")&&a.jsx(te,{size:"sm",variant:"outline",onClick:()=>h(g.id,g.name),children:a.jsx(Mw,{className:"w-3 h-3"})})]})]},g.id))})]})]})}const U7=()=>{const[e,t]=m.useState([]),[n,r]=m.useState(!0),[s,i]=m.useState(new Set),[o,l]=m.useState(!1),[c,u]=m.useState(null),[d,h]=m.useState(!1),[p,f]=m.useState(!1),{toast:v}=gr(),y=async()=>{r(!0);try{const{data:N,error:F}=await ae.from("coaching_materials").select("id, name, description, category, keywords, intents, ai_priority, sample_questions_probing, sample_questions_gentle, difficulty_level, typical_session_phase, estimated_reading_time, summary_embedding, processing_status, application_note, application_note_word_count").eq("is_active",!0).order("name");if(F)throw F;t(N||[])}catch(N){console.error("Error fetching materials:",N),v({title:"Error",description:"Failed to fetch materials metadata",variant:"destructive"})}finally{r(!1)}};m.useEffect(()=>{y()},[]);const b=async(N,F)=>{i(M=>new Set(M).add(N));try{const{data:M,error:$}=await ae.functions.invoke("generate-material-metadata",{body:{materialId:N,forceRegenerate:!0}});if($)throw $;M.skipped?v({title:"Already processed",description:`Metadata already exists for ${F}`}):v({title:"Success",description:`Generated metadata for ${F}`}),await y()}catch(M){console.error("Error generating metadata:",M),v({title:"Error",description:`Failed to generate metadata for ${F}`,variant:"destructive"})}finally{i(M=>{const $=new Set(M);return $.delete(N),$})}},g=async()=>{l(!0);const N=e.filter($=>!$.description||!$.summary_embedding||!$.category);v({title:"Bulk Processing Started",description:`Processing ${N.length} materials...`});let F=0,M=0;for(const $ of N)try{const{error:z}=await ae.functions.invoke("generate-material-metadata",{body:{materialId:$.id,forceRegenerate:!1}});if(z)throw z;F++}catch(z){console.error(`Failed to process ${$.name}:`,z),M++}await y(),l(!1),v({title:"Bulk Processing Complete",description:`â ${F} succeeded, â ${M} failed`})},x=N=>{var $,z,Y,O,R;const F=[N.description,N.category,($=N.keywords)==null?void 0:$.length,(z=N.intents)==null?void 0:z.length,N.ai_priority!=="contextual",(Y=N.sample_questions_probing)==null?void 0:Y.length,(O=N.sample_questions_gentle)==null?void 0:O.length,N.difficulty_level,(R=N.typical_session_phase)==null?void 0:R.length,N.estimated_reading_time,N.summary_embedding,N.application_note],M=F.filter(Boolean).length;return Math.round(M/F.length*100)},S=(()=>{const N=e.length,F=e.filter(R=>R.description).length,M=e.filter(R=>R.summary_embedding).length,$=e.filter(R=>R.category).length,z=e.filter(R=>{var C;return(C=R.keywords)==null?void 0:C.length}).length,Y=e.filter(R=>R.ai_priority==="essential").length,O=e.filter(R=>R.ai_priority==="foundational").length;return{total:N,withSummary:F,withEmbedding:M,withCategory:$,withKeywords:z,essential:Y,foundational:O}})(),j=e.filter(N=>!N.description||!N.summary_embedding||!N.category).length,k=N=>{switch(N){case"essential":return"destructive";case"foundational":return"default";case"contextual":return"secondary";default:return"outline"}},E=N=>{u(N),h(!0)},A=async()=>{if(c){f(!0);try{const{error:N}=await ae.from("coaching_materials").update({name:c.name,description:c.description,category:c.category||null,keywords:typeof c.keywords=="string"?D(c.keywords):c.keywords,intents:typeof c.intents=="string"?D(c.intents):c.intents,ai_priority:c.ai_priority,sample_questions_probing:typeof c.sample_questions_probing=="string"?D(c.sample_questions_probing):c.sample_questions_probing,sample_questions_gentle:typeof c.sample_questions_gentle=="string"?D(c.sample_questions_gentle):c.sample_questions_gentle,difficulty_level:c.difficulty_level||null,typical_session_phase:typeof c.typical_session_phase=="string"?D(c.typical_session_phase):c.typical_session_phase,estimated_reading_time:c.estimated_reading_time,application_note:c.application_note}).eq("id",c.id);if(N)throw N;v({title:"Success",description:"Material updated successfully"}),h(!1),await y()}catch(N){console.error("Error updating material:",N),v({title:"Error",description:"Failed to update material",variant:"destructive"})}finally{f(!1)}}},I=async(N,F)=>{try{const{error:M}=await ae.from("coaching_materials").delete().eq("id",N);if(M)throw M;v({title:"Success",description:`Deleted ${F}`}),await y()}catch(M){console.error("Error deleting material:",M),v({title:"Error",description:"Failed to delete material",variant:"destructive"})}},_=(N,F)=>{c&&u({...c,[N]:F})},D=N=>N.split(",").map(F=>
435F.trim()).filter(Boolean);return n?a.jsx("div",{className:"flex items-center justify-center p-8",children:a.jsx(au,{className:"h-8 w-8 animate-spin"})}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"grid gap-4 md:grid-cols-3 lg:grid-cols-6",children:[a.jsxs(be,{children:[a.jsx(qe,{className:"pb-2",children:a.jsx(Ke,{className:"text-sm font-medium",children:"Total Materials"})}),a.jsx($e,{children:a.jsx("div",{className:"text-2xl font-bold",children:S.total})})]}),a.jsxs(be,{children:[a.jsx(qe,{className:"pb-2",children:a.jsx(Ke,{className:"text-sm font-medium",children:"With Summary"})}),a.jsxs($e,{children:[a.jsx("div",{className:"text-2xl font-bold",children:S.withSummary}),a.jsx(Ci,{value:S.withSummary/S.total*100,className:"mt-2"})]})]}),a.jsxs(be,{children:[a.jsx(qe,{className:"pb-2",children:a.jsx(Ke,{className:"text-sm font-medium",children:"With Embedding"})}),a.jsxs($e,{children:[a.jsx("div",{className:"text-2xl font-bold",children:S.withEmbedding}),a.jsx(Ci,{value:S.withEmbedding/S.total*100,className:"mt-2"})]})]}),a.jsxs(be,{children:[a.jsx(qe,{className:"pb-2",children:a.jsx(Ke,{className:"text-sm font-medium",children:"With Category"})}),a.jsxs($e,{children:[a.jsx("div",{className:"text-2xl font-bold",children:S.withCategory}),a.jsx(Ci,{value:S.withCategory/S.total*100,className:"mt-2"})]})]}),a.jsxs(be,{children:[a.jsx(qe,{className:"pb-2",children:a.jsx(Ke,{className:"text-sm font-medium",children:"Essential"})}),a.jsx($e,{children:a.jsx("div",{className:"text-2xl font-bold text-destructive",children:S.essential})})]}),a.jsxs(be,{children:[a.jsx(qe,{className:"pb-2",children:a.jsx(Ke,{className:"text-sm font-medium",children:"Foundational"})}),a.jsx($e,{children:a.jsx("div",{className:"text-2xl font-bold",children:S.foundational})})]})]}),a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsx(Ke,{children:"Metadata Generation"}),a.jsx(sn,{children:"Generate AI-powered metadata (summaries, keywords, intents, embeddings) for coaching materials"})]}),a.jsx($e,{className:"space-y-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium",children:["Materials needing metadata: ",j]}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"This will generate summaries, keywords, intents, categories, and embeddings using GPT-4o-mini"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(te,{onClick:y,variant:"outline",size:"sm",children:[a.jsx(zu,{className:"h-4 w-4 mr-2"}),"Refresh"]}),a.jsx(te,{onClick:g,disabled:o||j===0,children:o?a.jsxs(a.Fragment,{children:[a.jsx(au,{className:"h-4 w-4 mr-2 animate-spin"}),"Processing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Df,{className:"h-4 w-4 mr-2"}),"Process All (",j,")"]})})]})]})})]}),a.jsx("div",{className:"space-y-4",children:e.map(N=>{const F=x(N),M=s.has(N.id);return a.jsxs(be,{children:[a.jsx(qe,{children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"space-y-1 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ke,{className:"text-base",children:N.name}),a.jsx(Qe,{variant:k(N.ai_priority),children:N.ai_priority}),N.category&&a.jsx(Qe,{variant:"outline",children:N.category})]}),a.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[a.jsxs("span",{children:["Completeness: ",F,"%"]}),a.jsx(Ci,{value:F,className:"w-32"})]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(te,{onClick:()=>E(N),size:"sm",variant:"outline",children:[a.jsx(tj,{className:"h-4 w-4 mr-2"}),"Edit"]}),a.jsx(te,{onClick:()=>b(N.id,N.name),disabled:M,size:"sm",variant:F===100?"outline":"default",children:M?a.jsxs(a.Fragment,{children:[a.jsx(au,{className:"h-4 w-4 mr-2 animate-spin"}),"Processing"]}):a.jsxs(a.Fragment,{children:[a.jsx(Df,{className:"h-4 w-4 mr-2"}),F===100?"Regenerate":"Generate"]})}),a.jsxs(by,{children:[a.jsx(q_,{asChild:!0,children:a.jsx(te,{size:"sm",variant:"destructive",children:a.jsx(Pv,{className:"h-4 w-4"})})}),a.jsxs(Ch,{children:[a.jsxs(_h,{children:[a.jsx(Nh,{children:"Delete Material"}),a.jsxs(Th,{children:['Are you sure you want to delete "',N.name,'"? This action cannot be undone.']})]}),a.jsxs(Eh,{children:[a.jsx(Ah,{children:"Cancel"}),a.jsx(Ph,{onClick:()=>I(N.id,N.name),children:"Delete"})]})]})]})]})]})}),a.jsxs($e,{className:"space-y-4",children:[N.description&&a.jsxs("div",{className:"space-y-1",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[a.jsx(ej,{className:"h-4 w-4"}),"Summary (",N.description.split(" ").length," words)"]}),a.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3",children:N.description})]}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[N.keywords&&N.keywords.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[a.jsx(dO,{className:"h-4 w-4"}),"Keywords (",N.keywords.length,")"]}),a.jsx("div",{className:"flex flex-wrap gap-1",children:N.keywords.map(($,z)=>a.jsx(Qe,{variant:"secondary",className:"text-xs",children:$},z))})]}),N.intents&&N.intents.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[a.jsx(hO,{className:"h-4 w-4"}
435),"Coaching Intents (",N.intents.length,")"]}),a.jsx("div",{className:"flex flex-wrap gap-1",children:N.intents.map(($,z)=>a.jsx(Qe,{variant:"outline",className:"text-xs",children:$},z))})]})]}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-3 text-sm",children:[N.difficulty_level&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Jk,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-muted-foreground",children:"Difficulty:"}),a.jsx(Qe,{variant:"outline",children:N.difficulty_level})]}),N.estimated_reading_time&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(to,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-muted-foreground",children:"Reading time:"}),a.jsxs("span",{children:[N.estimated_reading_time," min"]})]}),N.summary_embedding&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Df,{className:"h-4 w-4 text-green-500"}),a.jsx("span",{className:"text-green-500",children:"Embedding ready"})]})]}),N.typical_session_phase&&N.typical_session_phase.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:"text-sm font-medium",children:"Session Phases"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:N.typical_session_phase.map(($,z)=>a.jsx(Qe,{variant:"secondary",className:"text-xs",children:$},z))})]}),N.application_note&&a.jsxs("div",{className:"space-y-1 pt-2 border-t",children:[a.jsxs("div",{className:"text-sm font-medium",children:["Application Note (",N.application_note_word_count||0," words)"]}),a.jsx("p",{className:"text-sm text-muted-foreground",children:N.application_note})]})]})]},N.id)})}),a.jsx(bn,{open:d,onOpenChange:h,children:a.jsxs(un,{className:"max-w-3xl max-h-[80vh] overflow-y-auto",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Edit Material Metadata"}),a.jsx(jn,{children:"Update the material's metadata fields"})]}),c&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"name",children:"Name"}),a.jsx(Ee,{id:"name",value:c.name,onChange:N=>_("name",N.target.value)})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"description",children:"Description / Summary"}),a.jsx(Tr,{id:"description",value:c.description||"",onChange:N=>_("description",N.target.value),rows:5,placeholder:"200-300 word summary"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"category",children:"Category"}),a.jsxs(Zr,{value:c.category||"",onValueChange:N=>_("category",N),children:[a.jsx(Ir,{children:a.jsx(es,{placeholder:"Select category"})}),a.jsxs(Or,{children:[a.jsx(Ae,{value:"ethics",children:"Ethics"}),a.jsx(Ae,{value:"conversation_arc",children:"Conversation Arc"}),a.jsx(Ae,{value:"coaching_skills",children:"Coaching Skills"}),a.jsx(Ae,{value:"frameworks",children:"Frameworks"}),a.jsx(Ae,{value:"tools",children:"Tools"}),a.jsx(Ae,{value:"mental_health",children:"Mental Health"})]})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"ai_priority",children:"AI Priority"}),a.jsxs(Zr,{value:c.ai_priority,onValueChange:N=>_("ai_priority",N),children:[a.jsx(Ir,{children:a.jsx(es,{})}),a.jsxs(Or,{children:[a.jsx(Ae,{value:"essential",children:"Essential"}),a.jsx(Ae,{value:"foundational",children:"Foundational"}),a.jsx(Ae,{value:"contextual",children:"Contextual"})]})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"difficulty_level",children:"Difficulty Level"}),a.jsxs(Zr,{value:c.difficulty_level||"",onValueChange:N=>_("difficulty_level",N),children:[a.jsx(Ir,{children:a.jsx(es,{placeholder:"Select difficulty"})}),a.jsxs(Or,{children:[a.jsx(Ae,{value:"beginner",children:"Beginner"}),a.jsx(Ae,{value:"intermediate",children:"Intermediate"}),a.jsx(Ae,{value:"advanced",children:"Advanced"})]})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"reading_time",children:"Estimated Reading Time (min)"}),a.jsx(Ee,{id:"reading_time",type:"number",value:c.estimated_reading_time||"",onChange:N=>_("estimated_reading_time",parseInt(N.target.value)||null)})]})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"keywords",children:"Keywords (comma-separated)"}),a.jsx(Ee,{id:"keywords",value:Array.isArray(c.keywords)?c.keywords.join(", "):c.keywords||"",onChange:N=>_("keywords",N.target.value),placeholder:"leadership, team, conflict"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"intents",children:"Coaching Intents (comma-separated)"}),a.jsx(Ee,{id:"intents",value:Array.isArray(c.intents)?c.intents.join(", "):c.intents||"",onChange:N=>_("intents",N.target.value),placeholder:"probe values, reframe, explore assumptions"})]}
435),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"session_phase",children:"Typical Session Phase (comma-separated)"}),a.jsx(Ee,{id:"session_phase",value:Array.isArray(c.typical_session_phase)?c.typical_session_phase.join(", "):c.typical_session_phase||"",onChange:N=>_("typical_session_phase",N.target.value),placeholder:"opening, exploration, closure"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"questions_probing",children:"Sample Questions - Probing (comma-separated)"}),a.jsx(Tr,{id:"questions_probing",value:Array.isArray(c.sample_questions_probing)?c.sample_questions_probing.join(", "):c.sample_questions_probing||"",onChange:N=>_("sample_questions_probing",N.target.value),rows:3,placeholder:"What assumptions are you making?, How does this align with your values?"})]}),a.jsxs("div",{children:[a.jsx(ue,{htmlFor:"questions_gentle",children:"Sample Questions - Gentle (comma-separated)"}),a.jsx(Tr,{id:"questions_gentle",value:Array.isArray(c.sample_questions_gentle)?c.sample_questions_gentle.join(", "):c.sample_questions_gentle||"",onChange:N=>_("sample_questions_gentle",N.target.value),rows:3,placeholder:"How are you feeling about this?, What would support look like?"})]}),a.jsxs("div",{children:[a.jsxs(ue,{htmlFor:"application_note",children:["Application Note (max 150 words)",c.application_note&&a.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:[c.application_note.split(/\s+/).filter(Boolean).length," words"]})]}),a.jsx(Tr,{id:"application_note",value:c.application_note||"",onChange:N=>_("application_note",N.target.value),rows:4,placeholder:"Explain when and how the AI should use this material in coaching sessions...",maxLength:900}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Guide the AI on when to use this material: specific situations, client needs, session contexts."})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[a.jsx(te,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),a.jsx(te,{onClick:A,disabled:p,children:p?a.jsxs(a.Fragment,{children:[a.jsx(au,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):"Save Changes"})]})]})]})})]})},H7=["All","Contracting","Exploring","Action","Closing","Any"],W7=["All","Opening","Exploring","Challenging"],V7=["All","EN","DE"],q7=e=>{switch(e){case"Contracting":return"default";case"Exploring":return"secondary";case"Action":return"outline";case"Closing":return"destructive";default:return"secondary"}};function K7(){const[e,t]=m.useState(""),[n,r]=m.useState("All"),[s,i]=m.useState("All"),[o,l]=m.useState("All"),c=Qv(),{data:u,isLoading:d}=qL({queryKey:["coaching-questions"],queryFn:async()=>{const{data:v,error:y}=await ae.from("coaching_questions").select("*").order("question_id");if(y)throw y;return v}}),h=KL({mutationFn:async({id:v,is_active:y})=>{const{error:b}=await ae.from("coaching_questions").update({is_active:y}).eq("id",v);if(b)throw b},onSuccess:()=>{c.invalidateQueries({queryKey:["coaching-questions"]}),Wo.success("Question updated")},onError:v=>Wo.error(v.message)}),p=m.useMemo(()=>u?u.filter(v=>{var y,b,g;if(n!=="All"&&v.stage!==n||s!=="All"&&v.depth!==s||o!=="All"&&v.lang!==o)return!1;if(e){const x=e.toLowerCase();return((y=v.question)==null?void 0:y.toLowerCase().includes(x))||((b=v.topic)==null?void 0:b.toLowerCase().includes(x))||((g=v.use_case)==null?void 0:g.toLowerCase().includes(x))}return!0}):[],[u,e,n,s,o]),f=(u==null?void 0:u.filter(v=>v.is_active).length)||0;return a.jsxs(be,{children:[a.jsx(qe,{children:a.jsxs(Ke,{className:"flex items-center gap-2",children:[a.jsx(Xr,{className:"w-5 h-5"}),"Coaching Questions (",(u==null?void 0:u.length)||0," total, ",f," active)"]})}),a.jsxs($e,{className:"space-y-4",children:[a.jsxs("div",{className:"flex flex-wrap gap-3",children:[a.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[a.jsx(Tv,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),a.jsx(Ee,{placeholder:"Search questions...",value:e,onChange:v=>t(v.target.value),className:"pl-9"})]}),a.jsxs(Zr,{value:n,onValueChange:r,children:[a.jsx(Ir,{className:"w-[140px]",children:a.jsx(es,{placeholder:"Stage"})}),a.jsx(Or,{children:H7.map(v=>a.jsx(Ae,{value:v,children:v},v))})]}),a.jsxs(Zr,{value:s,onValueChange:i,children:[a.jsx(Ir,{className:"w-[140px]",children:a.jsx(es,{placeholder:"Depth"})}),a.jsx(Or,{children:W7.map(v=>a.jsx(Ae,{value:v,children:v},v))})]}),a.jsxs(Zr,{value:o,onValueChange:l,children:[a.jsx(Ir,{className:"w-[100px]",children:a.jsx(es,{placeholder:"Lang"})}),a.jsx(Or,{children:V7.map(v=>a.jsx(Ae,{value:v,children:v},v))})]})]}),a.jsxs("div",{className:"text-sm text-muted-foreground",children:[p.length," questions shown"]}),d?a.jsx("p",{className:"text-muted-foreground",children:"Loading..."}):a.jsx("div",{className:"rounded-md border",children:a.jsxs(tx,{children:[a.jsx(nx,{children:a.jsxs(ia,{children:[a.jsx(gn,{className:"w-[60px]",children:"Active"}),a.jsx(gn,{className:"w-[60px]",children:"ID"}),a.jsx(gn,{children:"Question"}),a.jsx(gn,{className:"w-[100px]",children:"Stage"}),a.jsx(gn,{className:"w-[120px]",children:"Topic"}),a.jsx(gn,{className:"w-[90px]",children:"Depth"}),a.jsx(gn,{className:"w-[50px]",children:"Lang"})]})}),a.jsx(rx,{children:p.map(v=>a.jsxs(ia,{className:v.is_active?"":"opacity-50",children:[a.jsx(tn,{children:a.jsx(sa,{checked:v.is_active,onCheckedChange:y=>h.mutate({id:v.id,is_active:y})})}),a.jsx(tn,{className:"font-mono text-xs",children:v.question_id}),a.jsxs(tn,{children:[a.jsx("div",{className:"text-sm",children:v.question}),a.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:v.use_case})]}),a.jsx(tn,{children:a.jsx(Qe,{variant:q7(v.stage),children:v.stage})}),a.jsx(tn,{className:"text-xs",children:v.topic}),a.jsx(tn,{className:"text-xs",children:v.depth}),a.jsx(tn,{className:"text-xs",children:v.lang})]},v.id))})]})})]})]})}function G7(){return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("header",{className:"border-b border-border bg-card p-4",children:a.jsxs("div",{className:"max-w-6xl mx-auto flex justify-between items-center",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(rj,{className:"w-6 h-6 text-primary"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-primary",children:"Materials Management"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload, process, and manage coaching materials"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qe,{variant:"secondary",children:"Administrator"}),a.jsx(Fn,{to:"/admin",children:a.jsxs(te,{variant:"outline",size:"sm",children:[a.jsx(nc,{className:"w-4 h-4 mr-2"}),"Back to Admin"]})})]})]})}),a.jsx("main",{className:"max-w-6xl mx-auto p-6 space-y-6",children:a.jsxs(_P,{defaultValue:"processing",className:"w-full",children:[a.jsxs(ix,{className:"grid w-full max-w-lg grid-cols-3",children:[a.jsx(oa,{value:"processing",children:"Processing"}),a.jsx(oa,{value:"metadata",children:"Metadata & RAG"}),a.jsx(oa,{value:"questions",children:"Questions"})]}),a.jsx(aa,{value:"processing",className:"mt-6",children:a.jsx(B7,{})}),a.jsx(aa,{value:"metadata",className:"mt-6",children:a.jsx(U7,{})}),a.jsx(aa,{value:"questions",className:"mt-6",children:a.jsx(K7,{})})]})}),a.jsx(ti,{})]})}const Y7=_c("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),bl=m.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,role:"alert",className:J(Y7({variant:t}),e),...n}));bl.displayName="Alert";const Q7=m.forwardRef(({className:e,...t},n)=>a.jsx("h5",{ref:n,className:J("mb-1 font-medium leading-none tracking-tight",e),...t}));Q7.displayName="AlertTitle";const Sl=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:J("text-sm [&_p]:leading-relaxed",e),...t}));Sl.displayName="AlertDescription";const X7=(e,t)=>({otp_expired:"This verification link has expired or was already used. Please request a new one.",access_de
435nied:"Access was denied. The link may have expired or already been used.",invalid_request:"Invalid request. Please try signing up again."})[e]||decodeURIComponent(t.replace(/\+/g," "))||"An error occurred. Please try again.";function J7(){const[e,t]=m.useState(""),[n,r]=m.useState(""),[s,i]=m.useState(""),[o,l]=m.useState(""),[c,u]=m.useState(""),[d,h]=m.useState(""),[p,f]=m.useState(!1),[v,y]=m.useState(!1),[b,g]=m.useState(!1),[x,w]=m.useState(0),[S,j]=m.useState(""),[k,E]=m.useState(null),[A,I]=m.useState(!1),[_,D]=m.useState(()=>{const U=new URLSearchParams(window.location.search).get("type"),se=new URLSearchParams(window.location.hash.substring(1)).get("type");return U==="recovery"||se==="recovery"}),[N]=Y4(),{user:F,signIn:M,signUp:$,resetPassword:z}=li(),Y=ro(),{toast:O}=gr();m.useEffect(()=>{if(x>0){const U=setTimeout(()=>w(ne=>ne-1),1e3);return()=>clearTimeout(U)}},[x]),m.useEffect(()=>{F&&!_&&Y("/coach")},[F,Y,_]),m.useEffect(()=>{const U=N.get("type"),ne=new URLSearchParams(window.location.hash.substring(1)),se=ne.get("type"),H=ne.get("access_token"),W=ne.get("error_code"),ie=ne.get("error"),oe=ne.get("error_description")||"";if(ie==="access_denied"||W){const he=X7(W||"",oe);E(he),window.history.replaceState(null,"",window.location.pathname)}(U==="recovery"||se==="recovery")&&D(!0),se==="signup"&&H&&O({title:"Email confirmed!",description:"Your account is now verified. Redirecting..."})},[N,O]);const R=async U=>{if(U.preventDefault(),!d)return;g(!0);const{error:ne}=await ae.auth.resend({type:"signup",email:d});ne?O({title:"Error",description:ne.message,variant:"destructive"}):(O({title:"Verification email sent!",description:"Please check your inbox for a new verification link."}),E(null),h("")),g(!1)},C=async U=>{U.preventDefault(),f(!0),j("");const{error:ne}=await M(e,n);if(ne){j(ne.message),f(!1);return}const{data:{user:se}}=await ae.auth.getUser();if(se){const{data:H}=await ae.from("user_roles").select("role").eq("user_id",se.id);let W="user";if(H&&H.length>0){const ie=H.map(oe=>oe.role);ie.includes("super_admin")?W="super_admin":ie.includes("admin")&&(W="admin")}O({title:"Welcome back!",description:"You have successfully signed in."}),Y(W==="admin"||W==="super_admin"?"/admin":"/coach")}f(!1)},X=async U=>{U.preventDefault(),f(!0),j("");const{error:ne}=await $(e,n);ne?j(ne.message):O({title:"Account created!",description:"Please check your email to verify your account."}),f(!1)},Q=async U=>{U.preventDefault(),y(!0);const{error:ne}=await z(c);if(ne){const se=ne.message.toLowerCase().includes("rate limit")||ne.message.includes("429")||ne.message.toLowerCase().includes("too many");O({title:se?"Too Many Requests":"Error",description:se?"Please wait at least 60 minutes before requesting another password reset email.":ne.message,variant:"destructive"}),se&&w(60)}else O({title:"Reset link sent!",description:"Check your email for a password reset link. It may take a few minutes to arrive."}),I(!1),u(""),w(60);y(!1)},T=async U=>{if(U.preventDefault(),f(!0),j(""),s!==o){j("Passwords do not match"),f(!1);return}if(s.length<6){j("Password must be at least 6 characters"),f(!1);return}const{error:ne}=await ae.auth.updateUser({password:s});ne?j(ne.message):(O({title:"Password updated!",description:"Your password has been successfully updated."}),Y("/")),f(!1)};return a.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[a.jsx("div",{className:"flex-1 flex items-center justify-center p-4",children:a.jsxs(be,{className:"w-full max-w-md",children:[a.jsxs(qe,{className:"text-center",children:[a.jsx(Ke,{className:"text-2xl text-primary",children:"Coach Bernhard"}),a.jsx(sn,{children:_?"Set your new password":"Sign in to access your coaching sessions"})]}),a.jsxs($e,{children:[k&&a.jsxs("div",{className:"mb-6 space-y-4",children:[a.jsx(bl,{variant:"destructive",children:a.jsx(Sl,{children:k})}),a.jsxs("form",{onSubmit:R,className:"space-y-3",children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your email to receive a new verification link:"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Ee,{type:"email",value:d,onChange:U=>h(U.target.value),placeholder:"[email protected]",required:!0}),a.jsx(te,{type:"submit",disabled:b,children:b?"Sending...":"Resend"})]})]})]}),_?a.jsxs("form",{onSubmit:T,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"new-password",children:"New Password"}),a.jsx(Ee,{id:"new-password",type:"password",value:s,onChange:U=>i(U.target.value),placeholder:"Enter your new password",required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"confirm-password",children:"Confirm Password"}),a.jsx(Ee,{id:"confirm-password",type:"password",value:o,onChange:U=>l(U.target.value),placeholder:"Confirm your new password",required:!0})]}),S&&a.jsx(bl,{variant:"destructive",children:a.jsx(Sl,{children:S})}),a.jsx(te,{type:"submit",className:"w-full",disabled:p,children:p?"Updating...":"Update Password"}),a.jsx("div",{className:"text-center",children:a.jsx(te,{variant:"link",className:"text-sm text-muted-foreground",onClick:()=>D(!1),children:"Back to Sign In"})})]}):a.jsxs(_P,{defaultValue:"signin",className:"w-full",children:[a.jsxs(ix,{className:"grid w-full grid-cols-2",children:[a.jsx(oa,{value:"signin",children:"Sign In"}),a.jsx(oa,{value:"signup",children:"Sign Up"})]}),a.jsx(aa,{value:"signin",children:a.jsxs("form",{onSubmit:C,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"email",children:"Email"}
435),a.jsx(Ee,{id:"email",type:"email",value:e,onChange:U=>t(U.target.value),placeholder:"Enter your email",required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"password",children:"Password"}),a.jsx(Ee,{id:"password",type:"password",value:n,onChange:U=>r(U.target.value),placeholder:"Enter your password",required:!0})]}),S&&a.jsx(bl,{variant:"destructive",children:a.jsx(Sl,{children:S})}),a.jsx(te,{type:"submit",className:"w-full",disabled:p,children:p?"Signing in...":"Sign In"}),a.jsx("div",{className:"text-center",children:a.jsxs(bn,{open:A,onOpenChange:I,children:[a.jsx(dr,{asChild:!0,children:a.jsx(te,{variant:"link",className:"text-sm text-muted-foreground",onClick:()=>u(e),children:"Forgot your password?"})}),a.jsxs(un,{className:"sm:max-w-md",children:[a.jsxs(Sn,{children:[a.jsx(kn,{children:"Reset Password"}),a.jsx(jn,{children:"Enter your email address and we'll send you a link to reset your password."})]}),a.jsxs("form",{onSubmit:Q,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"reset-email",children:"Email"}),a.jsx(Ee,{id:"reset-email",type:"email",value:c,onChange:U=>u(U.target.value),placeholder:"Enter your email",required:!0})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(te,{type:"button",variant:"outline",className:"flex-1",onClick:()=>I(!1),children:"Cancel"}),a.jsx(te,{type:"submit",className:"flex-1",disabled:v||x>0,children:v?"Sending...":x>0?`Wait ${x}s`:"Send Reset Link"})]})]})]})]})})]})}),a.jsx(aa,{value:"signup",children:a.jsxs("form",{onSubmit:X,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"signup-email",children:"Email"}),a.jsx(Ee,{id:"signup-email",type:"email",value:e,onChange:U=>t(U.target.value),placeholder:"Enter your email",required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(ue,{htmlFor:"signup-password",children:"Password"}),a.jsx(Ee,{id:"signup-password",type:"password",value:n,onChange:U=>r(U.target.value),placeholder:"Create a password",required:!0})]}),S&&a.jsx(bl,{variant:"destructive",children:a.jsx(Sl,{children:S})}),a.jsx(te,{type:"submit",className:"w-full",disabled:p,children:p?"Creating account...":"Sign Up"})]})})]})]})]})}),a.jsx(ti,{})]})}function Z7(){return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("main",{className:"max-w-4xl mx-auto p-6",children:a.jsxs(be,{className:"mb-8",children:[a.jsxs(qe,{children:[a.jsx(Ke,{className:"text-3xl font-bold text-center text-primary",children:"Legal Documents â AI Coach Website"}),a.jsxs("p",{className:"text-center text-muted-foreground",children:["Bernhard Kerres & Friends GmbH",a.jsx("br",{}),"(English / Deutsch)"]})]}),a.jsxs($e,{children:[a.jsxs("nav",{className:"mb-8 p-4 bg-muted rounded-lg",children:[a.jsx("h3",{className:"font-semibold mb-4",children:"Table of Contents"}),a.jsxs("ul",{className:"space-y-2 text-sm",children:[a.jsx("li",{children:a.jsx("a",{href:"#legal-notice",className:"text-primary hover:underline",children:"1. Legal Notice / Impressum"})}),a.jsx("li",{children:a.jsx("a",{href:"#privacy-policy",className:"text-primary hover:underline",children:"2. Privacy Policy / Datenschutzerklärung"})}),a.jsx("li",{children:a.jsx("a",{href:"#cookie-policy",className:"text-primary hover:underline",children:"3. Cookie Policy / Cookie-Richtlinie"})}),a.jsx("li",{children:a.jsx("a",{href:"#ai-transparency",className:"text-primary hover:underline",children:"4. AI Transparency Notice / Hinweis zur KI-Nutzung"})}),a.jsx("li",{children:a.jsx("a",{href:"#terms-of-service",className:"text-primary hover:underline",children:"5. Terms of Service / Nutzungsbedingungen"})}),a.jsx("li",{children:a.jsx("a",{href:"#security-statement",className:"text-primary hover:underline",children:"6. Security Statement / SicherheitsmaÃnahmen"})})]})]}),a.jsxs("div",{className:"space-y-12",children:[a.jsxs("section",{id:"legal-notice",children:[a.jsx("h2",{className:"text-2xl font-bold mb-6 text-primary border-b border-border pb-2",children:"1. Legal Notice / Impressum"}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"English"}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Company Name:"})," Bernhard Kerres & Friends GmbH"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Address:"})," Hoher Markt 4/20, A-1010 Vienna, Austria"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Commercial Register (Firmenbuch):"})," 579752b, Commercial Court of Vienna"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"VAT ID:"})," ATU78199717"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Managing Director:"})," Bernhard Kerres"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Email:"})," [email protected]"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Phone:"})," +43 1 225 635 580"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Supervisory Authority:"})," Magistrat der Stadt Wien"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Chamber Membership:"})," Wirtschaftskammer Ãsterreich, Fachgruppe Unternehmensberatung, Buchhaltung und Informationstechnologie"]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Deutsch"}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Firma:"})," Bernhard Kerres & Friends GmbH"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Adresse:"})," Hoher Markt 4/20, A-1010 Wien, Ãsterreich"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Firmenbuchnummer:"}
435)," 579752b, Handelsgericht Wien"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"UID:"})," ATU78199717"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Geschäftsführer:"})," Bernhard Kerres"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"E-Mail:"})," [email protected]"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Telefon:"})," +43 1 225 635 580"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Aufsichtsbehörde:"})," Magistrat der Stadt Wien"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Kammerzugehörigkeit:"})," Wirtschaftskammer Ãsterreich, Fachgruppe Unternehmensberatung, Buchhaltung und Informationstechnologie"]})]})]})]})]}),a.jsxs("section",{id:"privacy-policy",children:[a.jsx("h2",{className:"text-2xl font-bold mb-6 text-primary border-b border-border pb-2",children:"2. Privacy Policy / Datenschutzerklärung"}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"English"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsx("p",{children:"We take the protection of your personal data seriously. This Privacy Policy explains what data we collect, why, and how we handle it in compliance with the General Data Protection Regulation (GDPR), the Austrian Data Protection Act (DSG), and the Austrian Telecommunications Act (TKG 2021)."}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Controller:"}),a.jsxs("p",{children:["Bernhard Kerres & Friends GmbH",a.jsx("br",{}),"Hoher Markt 4/20, A-1010 Vienna, Austria",a.jsx("br",{}),"Email: [email protected]"]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Data We Collect"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Name and email (account creation)"}),a.jsx("li",{children:"Chat transcripts (only if user chooses to save them)"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Purpose & Legal Basis"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Providing the AI Coaching service (Art. 6(1)(b) GDPR â contract)"}),a.jsx("li",{children:"Saving transcripts (Art. 6(1)(a) GDPR â consent)"}),a.jsx("li",{children:"Managing accounts, security, and support (Art. 6(1)(f) GDPR â legitimate interests)"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Retention"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Transcripts: deleted after 30 days"}),a.jsx("li",{children:"Account data: kept as long as account is active, or as required by law"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Processors & Hosting"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Hosting: AWS (European Union)"}),a.jsx("li",{children:"AI Model Provider: OpenAI (EU processing)"}),a.jsx("li",{children:"Email: Brevo, Siteground"}),a.jsx("li",{children:"Payments: Stripe (EEA storage)"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"No International Transfers"}),a.jsx("p",{children:"All data is processed and stored within the European Economic Area (EEA)."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Your Rights"}),a.jsx("p",{children:"You have the right to access, rectification, deletion, restriction, data portability, and to lodge a complaint with the Austrian Data Protection Authority (www.dsb.gv.at)."})]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Deutsch"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsx("p",{children:"Wir nehmen den Schutz Ihrer personenbezogenen Daten sehr ernst. Diese Datenschutzerklärung erläutert, welche Daten wir erheben, warum wir sie verarbeiten und wie wir sie im Einklang mit der Datenschutz-Grundverordnung (DSGVO), dem österreichischen Datenschutzgesetz (DSG) und dem Telekommunikationsgesetz (TKG 2021) verarbeiten."}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Verantwortlicher:"}),a.jsxs("p",{children:["Bernhard Kerres & Friends GmbH",a.jsx("br",{}),"Hoher Markt 4/20, A-1010 Wien, Ãsterreich",a.jsx("br",{}),"E-Mail: [email protected]"]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Verarbeitete Daten"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Name und E-Mail (für Kontoerstellung)"}),a.jsx("li",{children:"Chat-Transkripte (nur wenn vom Nutzer gewünscht)"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Zweck & Rechtsgrundlagen"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Bereitstellung des AI Coaching-Dienstes (Art. 6 Abs. 1 lit. b DSGVO â Vertrag)"}),a.jsx("li",{children:"Speicherung von Transkripten (Art. 6 Abs. 1 lit. a DSGVO â Einwilligung)"}),a.jsx("li",{children:"Kontoverwaltung, Sicherheit und Support (Art. 6 Abs. 1 lit. f DSGVO â berechtigtes Interesse)"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Speicherdauer"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Transkripte: Löschung nach 30 Tagen"}),a.jsx("li",{children:"Kontodaten: solange das Konto aktiv ist oder gesetzliche Pflichten bestehen"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Auftragsverarbeiter & Hosting"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Hosting: AWS (Europäische Union)"}),a.jsx("li",{children:"AI-Modellanbieter: OpenAI (EU-Verarbeitung)"}),a.jsx("li",{children:"E-Mail: Brevo, Siteground"}),a.jsx("li",{children:"Zahlungen: Stripe (Speicherung innerhalb des EWR)"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Keine internationalen Ãbermittlungen"}),a.jsx("p",{children:"Sämtliche Daten werden innerhalb des Europäischen Wirtschaftsraums (EWR) verarbeitet und gespeichert."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"Ihre Rechte"}),a.jsx("p",{children:"Sie haben das Recht auf Auskunft, Berichtigung, Löschung, Einschränkung, Datenübertragbarkeit sowie Beschwerde bei der Datenschutzbehörde (www.dsb.gv.at)."})]})]})]})]})]}),a.jsxs("section",{id:"cookie-policy",children:[a.jsx("h2",{className:"text-2xl font-bold mb-6 text-primary border-b border-border pb-2",children:"3. Cookie Policy / Cookie-Richtlinie"}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"English"}),a.jsx("p",{className:"text-sm",children:"We do not use non-essential cookies or tracking technologies. Only strictly necessary technical cookies are set to operate the website."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Deutsch"}),a.jsx("p",{className:"text-sm",children:"Wir verwenden keine nicht notwendigen Cookies oder Tracking-Technologien. Es werden ausschlieÃlich technisch notwendige Cookies gesetzt, um die Website zu betreiben."})]})]})]}),a.jsxs("section",{id:"ai-transparency",children:[a.jsx("h2",{className:"text-2xl font-bold mb-6 text-primary border-b border-border pb-2",children:"4. AI Transparency Notice / Hinweis zur KI-Nutzung"}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"English"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsx("p",{children:"When you use our AI Coach, you are interacting with artificial intelligence."}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"This is clearly indicated on the homepage and on the /coac
435h page."}),a.jsx("li",{children:"You can escalate to a human coach at any time by booking via book.bernhardkerres.com."}),a.jsx("li",{children:"The AI does not perform biometric or emotion recognition."}),a.jsx("li",{children:"The AI does not generate synthetic media."})]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Deutsch"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsx("p",{children:"Wenn Sie unseren AI Coach nutzen, interagieren Sie mit künstlicher Intelligenz."}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Dies wird auf der Startseite und auf der Seite /coach deutlich kenntlich gemacht."}),a.jsx("li",{children:"Sie können jederzeit zu einem menschlichen Coach wechseln, indem Sie über book.bernhardkerres.com buchen."}),a.jsx("li",{children:"Die KI führt keine biometrische oder Emotionserkennung durch."}),a.jsx("li",{children:"Die KI erzeugt keine synthetischen Medien."})]})]})]})]})]}),a.jsxs("section",{id:"terms-of-service",children:[a.jsx("h2",{className:"text-2xl font-bold mb-6 text-primary border-b border-border pb-2",children:"5. Terms of Service / Nutzungsbedingungen"}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"English"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"1. Scope"}),a.jsx("p",{children:"These Terms govern the use of the AI Coach website and future paid features (e.g., subscriptions, booked coaching sessions)."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"2. User Accounts"}),a.jsx("p",{children:"Users must register with name and email. Accounts are personal and non-transferable."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"3. Services"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Free AI-based coaching chatbot."}),a.jsx("li",{children:"Optional future paid services via Stripe (e.g., coaching sessions)."})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"4. Disclaimer"}),a.jsx("p",{children:"The AI Coach provides general professional coaching support. It is not medical, psychological, financial, or legal advice. In cases of mental health or crisis, please seek professional help."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"5. Payments & Withdrawal (for consumers)"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Payments are processed via Stripe."}),a.jsx("li",{children:"EU consumers have a 14-day withdrawal right under Austrian law (FAGG)."}),a.jsx("li",{children:"If you request immediate service performance, you acknowledge that withdrawal rights may expire once the service is fully delivered."})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"6. Liability"}),a.jsx("p",{children:"We are liable only for intent and gross negligence. Liability for slight negligence, indirect damages, and consequential damages is excluded to the extent permitted by law."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"7. Governing Law & Jurisdiction"}),a.jsx("p",{children:"These Terms are governed by Austrian law. Exclusive jurisdiction: Vienna, Austria."})]})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Deutsch"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"1. Geltungsbereich"}),a.jsx("p",{children:"Diese Bedingungen regeln die Nutzung der AI Coach Website sowie zukünftiger kostenpflichtiger Funktionen (z. B. Abonnements, Coaching-Sessions)."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"2. Benutzerkonten"}),a.jsx("p",{children:"Für die Nutzung ist eine Registrierung mit Name und E-Mail erforderlich. Konten sind persönlich und nicht übertragbar."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"3. Leistungen"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Kostenloser KI-basierter Coaching-Chatbot."}),a.jsx("li",{children:"Zukünftige kostenpflichtige Angebote über Stripe (z. B. Coaching-Sitzungen)."})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"4. Haftungsausschluss"}),a.jsx("p",{children:"Der AI Coach bietet allgemeine professionelle Coaching-Unterstützung. Er stellt keine medizinische, psych
435ologische, finanzielle oder rechtliche Beratung dar. In Krisensituationen wenden Sie sich bitte an professionelle Hilfsstellen."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"5. Zahlungen & Widerrufsrecht (für Verbraucher)"}),a.jsxs("ul",{className:"list-disc list-inside",children:[a.jsx("li",{children:"Zahlungen werden über Stripe abgewickelt."}),a.jsx("li",{children:"EU-Verbrauchern steht ein 14-tägiges Widerrufsrecht nach dem FAGG zu."}),a.jsx("li",{children:"Wenn Sie ausdrücklich die sofortige Erbringung der Dienstleistung verlangen, erlischt das Widerrufsrecht, sobald die Dienstleistung vollständig erbracht wurde."})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"6. Haftung"}),a.jsx("p",{children:"Wir haften nur für Vorsatz und grobe Fahrlässigkeit. Eine Haftung für leichte Fahrlässigkeit, mittelbare Schäden oder Folgeschäden ist â soweit gesetzlich zulässig â ausgeschlossen."})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold",children:"7. Anwendbares Recht & Gerichtsstand"}),a.jsx("p",{children:"Es gilt österreichisches Recht. Gerichtsstand ist Wien, Ãsterreich."})]})]})]})]})]}),a.jsxs("section",{id:"security-statement",children:[a.jsx("h2",{className:"text-2xl font-bold mb-6 text-primary border-b border-border pb-2",children:"6. Security Statement / SicherheitsmaÃnahmen"}),a.jsxs("div",{className:"space-y-4 text-sm",children:[a.jsx("p",{className:"font-semibold",children:"(Annex â both languages combined for simplicity)"}),a.jsx("p",{children:"We implement strong technical and organisational measures, including:"}),a.jsxs("ul",{className:"list-disc list-inside space-y-1",children:[a.jsx("li",{children:"Supabase Auth with JWT and role-based access"}),a.jsx("li",{children:"Row Level Security (RLS) for all database tables"}),a.jsx("li",{children:"HTTPS/TLS encryption"}),a.jsx("li",{children:"API key encryption in Supabase Vault"}),a.jsx("li",{children:"Input validation and secure data handling"}),a.jsx("li",{children:"Automatic security updates and patches"}),a.jsx("li",{children:"Audit logging and monitoring"})]}),a.jsx("p",{className:"mt-4",children:"These measures comply with GDPR Article 32 requirements for security of processing."})]})]})]}),a.jsx("div",{className:"mt-12 p-4 bg-muted rounded-lg text-center",children:a.jsxs("p",{className:"text-sm text-muted-foreground",children:[a.jsx("strong",{children:"Any questions?"}),a.jsx("br",{}),"Contact us at: [email protected]"]})})]})]})}),a.jsx(ti,{})]})}const eq=()=>{const e=ro();return a.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[a.jsx("header",{className:"border-b bg-card p-4",children:a.jsx("div",{className:"max-w-4xl mx-auto flex items-center gap-4",children:a.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>e("/"),className:"gap-2",children:[a.jsx(nc,{className:"h-4 w-4"}),"Back to Home"]})})}),a.jsx("main",{className:"flex-1 container mx-auto px-4 py-8 md:py-12 lg:py-16 max-w-4xl",children:a.jsxs("article",{children:[a.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground text-center mb-8",children:"How Coach Bernhard Works"}),a.jsxs("div",{className:"grid md:grid-cols-3 gap-8 mb-12",children:[a.jsxs("section",{className:"space-y-3 text-center",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:a.jsx("span",{className:"text-2xl font-bold text-primary",children:"1"})}),a.jsx("h2",{className:"font-semibold text-xl text-foreground",children:"Start a Session"}),a.jsx("p",{className:"text-muted-foreground",children:"Sign in and begin your personalized coaching conversation anytime, anywhere. No appointments needed, just instant access to AI-powered coaching."})]}),a.jsxs("section",{className:"space-y-3 text-center",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:a.jsx("span",{className:"text-2xl font-bold text-primary",children:"2"})}),a.jsx("h2",{className:"font-semibold text-xl text-foreground",children:"Reflect & Grow"}),a.jsx("p",{className:"text-muted-foreground",children:"Engage in meaningful dialogue that challenges your thinking and sparks new insights. The AI adapts to your unique situation and goals."})]}),a.jsxs("section",{className:"space-y-3 text-center",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mx-auto mb-4",children:a.jsx("span",{className:"text-2xl font-bold text-primary",children:"3"})}),a.jsx("h2",{className:"font-semibold text-xl text-foreground",children:"Take Action"}),a.jsx("p",{className:"text-muted-foreground",children:"Transform insights into actionable steps for your personal and professional development. Track your progress across sessions."})]})]}),a.jsxs("section",{className:"space-y-6 bg-muted/30 rounded-lg p-6 md:p-8",children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"What Makes Coach Bernhard Different?"}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:"Bernhard Kerres' Coaching Style"}),a.jsx("p",{className:"text-muted-foreground",children:"This AI is trained on Bernhard Kerres' proven coaching methodology, bringing professional-grade coaching insights to your fingertips."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:"Available 24/7"}),a.jsx("p",{className:"text-muted-foreground",children:"Whether it's early morning or late at night, Coach Bernhard is always ready to help you work through your challenges and opportunities."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:"Personalized Conversations"}),a.jsx("p",{className:"text-muted-foreground",children:"Each session is tailored to your specific needs, context, and goals. The AI remembers your previous conversations to provide continuity."})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg text-foreground mb-2",children:"Bridge to Human Coaching"}),a.jsx("p",{className:"text-muted-foreground",children:"While Coach Bernhard provides valuable AI-powered insights, you can always transition to in-person coaching with Bernhard Kerres when you're ready for deeper, human connection."})]})]})]}),a.jsx("div",{className:"text-center mt-12",children:a.jsx(te,{onClick:()=>e("/auth"),size:"lg",className:"px-8 py-4 text-lg font-semibold h-auto bg-gradient-to-r from-orange-500 to-red-600 hover:from-orange-600 hover:to-red-700 text-white shadow-lg hover:shadow-xl transition-all duration-300",children:"Get Started Now"})})]})}),a.jsx(ti,{})]})};var Yh="Collapsible",[tq,RP]=mt(Yh),[nq,lx]=tq(Yh),IP=m.forwardRef((e,t)=>
vendor: 4,158 bytes, line 435
435{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:o,...l}=e,[c,u]=En({prop:r,defaultProp:s??!1,onChange:o,caller:Yh});return a.jsx(nq,{scope:n,disabled:i,contentId:zn(),open:c,onOpenToggle:m.useCallback(()=>u(d=>!d),[u]),children:a.jsx(ee.div,{"data-state":ux(c),"data-disabled":i?"":void 0,...l,ref:t})})});IP.displayName=Yh;var OP="CollapsibleTrigger",DP=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,s=lx(OP,n);return a.jsx(ee.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":ux(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:t,onClick:K(e.onClick,s.onOpenToggle)})});DP.displayName=OP;var cx="CollapsibleContent",MP=m.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=lx(cx,e.__scopeCollapsible);return a.jsx(yt,{present:n||s.open,children:({present:i})=>a.jsx(rq,{...r,ref:t,present:i})})});MP.displayName=cx;var rq=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=e,o=lx(cx,n),[l,c]=m.useState(r),u=m.useRef(null),d=pe(t,u),h=m.useRef(0),p=h.current,f=m.useRef(0),v=f.current,y=o.open||l,b=m.useRef(y),g=m.useRef(void 0);return m.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),pt(()=>{const x=u.current;if(x){g.current=g.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();h.current=w.height,f.current=w.width,b.current||(x.style.transitionDuration=g.current.transitionDuration,x.style.animationName=g.current.animationName),c(r)}},[o.open,r]),a.jsx(ee.div,{"data-state":ux(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...i,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:y&&s})});function ux(e){return e?"open":"closed"}var sq=IP,iq=DP,oq=MP,yr="Accordion",aq=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[dx,lq,cq]=kc(yr),[Qh,Jq]=mt(yr,[cq,RP]),hx=RP(),LP=B.forwardRef((e,t)=>{const{type:n,...r}=e,s=r,i=r;return a.jsx(dx.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?a.jsx(fq,{...i,ref:t}):a.jsx(hq,{...s,ref:t})})});LP.displayName=yr;var[FP,uq]=Qh(yr),[$P,dq]=Qh(yr,{collapsible:!1}),hq=B.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...o}=e,[l,c]=En({prop:n,defaultProp:r??"",onChange:s,caller:yr});return a.jsx(FP,{scope:e.__scopeAccordion,value:B.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:B.useCallback(()=>i&&c(""),[i,c]),children:a.jsx($P,{scope:e.__scopeAccordion,collapsible:i,children:a.jsx(zP,{...o,ref:t})})})}),fq=B.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=e,[o,l]=En({prop:n,defaultProp:r??[],onChange:s,caller:yr}),c=B.useCallback(d=>l((h=[])=>[...h,d]),[l]),u=B.useCallback(d=>l((h=[])=>h.filter(p=>p!==d)),[l]);return a.jsx(FP,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:a.jsx($P,{scope:e.__scopeAccordion,collapsible:!0,children:a.jsx(zP,{...i,ref:t})})})}),[pq,Xh]=Qh(yr),zP=B.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...o}=e,l=B.useRef(null),c=pe(l,t),u=lq(n),h=io(s)==="ltr",p=K(e.onKeyDown,f=>{var A;if(!aq.includes(f.key))return;const v=f.target,y=u().filter(I=>{var _;return!((_=I.ref.current)!=null&&_.disabled)}),b=y.findIndex(I=>I.ref.current===v),g=y.length;if(b===-1)return;f.preventDefault();let x=b;const w=0,S=g-1,j=()=>{x=b+1,x>S&&(x=w)},k=()=>{x=b-1,x<w&&(x=S)};switch(f.key){case"Home":x=w;break;case"End":x=S;break;case"ArrowRight":i==="horizontal"&&(h?j():k());break;case"ArrowDown":i==="vertical"&&j();break;case"ArrowLeft":i==="horizontal"&&(h?k():j());break;case"ArrowUp":i==="vertical"&&k();break}const E=x%g;(A=y[E].ref.current)==null||A.focus()});return a.jsx(pq,{scope:n,disabled:r,direction:s,orientation:i,children:a.jsx(dx.Slot,{scope:n,children:a.jsx(ee.div,{...o,"data-orientation":i,ref:c,onKeyDown:r?void 0:p})})})}),zd="AccordionItem",[mq,fx]=Qh(zd),BP=B.forwardRef((e,t)=>
435{const{__scopeAccordion:n,value:r,...s}=e,i=Xh(zd,n),o=uq(zd,n),l=hx(n),c=zn(),u=r&&o.value.includes(r)||!1,d=i.disabled||e.disabled;return a.jsx(mq,{scope:n,open:u,disabled:d,triggerId:c,children:a.jsx(sq,{"data-orientation":i.orientation,"data-state":KP(u),...l,...s,ref:t,disabled:d,open:u,onOpenChange:h=>{h?o.onItemOpen(r):o.onItemClose(r)}})})});BP.displayName=zd;var UP="AccordionHeader",HP=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Xh(yr,n),i=fx(UP,n);return a.jsx(ee.h3,{"data-orientation":s.orientation,"data-state":KP(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});HP.displayName=UP;var jg="AccordionTrigger",WP=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Xh(yr,n),i=fx(jg,n),o=dq(jg,n),l=hx(n);return a.jsx(dx.ItemSlot,{scope:n,children:a.jsx(iq,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...l,...r,ref:t})})});WP.displayName=jg;var VP="AccordionContent",qP=B.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,s=Xh(yr,n),i=fx(VP,n),o=hx(n);return a.jsx(oq,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});qP.displayName=VP;function KP(e){return e?"open":"closed"}var gq=LP,vq=BP,yq=HP,GP=WP,YP=qP;const xq=gq,Pt=m.forwardRef(({className:e,...t},n)=>a.jsx(vq,{ref:n,className:J("border-b",e),...t}));Pt.displayName="AccordionItem";const At=m.forwardRef(({className:e,children:t,...n},r)=>a.jsx(yq,{className:"flex",children:a.jsxs(GP,{ref:r,className:J("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,a.jsx(Ev,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));At.displayName=GP.displayName;const Rt=m.forwardRef(({className:e,children:t,...n},r)=>a.jsx(YP,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:a.jsx("div",{className:J("pb-4 pt-0",e),children:t})}));Rt.displayName=YP.displayName;const wq=()=>{const e=ro(),n={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{question:"What is Coach Bernhard (AI)?",answer:"Coach Bernhard is your pocket-sized reflection partnerâan AI-powered coach trained in the professional coaching style of Bernhard Kerres. It follows ICF coaching standards, and helps you explore ideas, challenges, and next steps in your personal and professional life. Think of it as a conversation starter for growth and clarity."},{question:"How does an AI Coach work?",answer:"Coach Bernhard uses advanced AI to guide you through reflective questions, insights, and exercises â just like a real coach would. It listens, prompts, and challenges your thinking. It won't give you quick-fix answers; it helps you discover your own."},{question:"Can I book a session with the real Bernhard Kerres?",answer:"Yes! For in-depth human coaching sessions, you can book directly with Bernhard Kerres at https://book.bernhardkerres.com. The AI coach is a great way to start your journey and can complement your human coaching sessions."},{question:"Can AI really coach me like a human?",answer:"Not quiteâbut it comes close. Coach Bernhard is inspired by hundreds of real coaching conversations with Bernhard Kerres and built on proven coaching principles. It's here to help you reflect, grow, and prepare for deeper conversations with a human coach."},{question:"Who created Coach Bernhard?",answer:"Coach Bernhard was created by Bernhard Kerres, an executive coach, former CEO, and professional opera singer. His work combines business acumen, creativity, and deep coaching experience. You can learn more or book a session with him at https://book.bernhardkerres.com."},{question:"What makes Coach Bernhard different from other AI chatbots?",answer:"Most AI bots give you advice. Coach Bernhard gives you insight. It doesn't tell you what to do â it helps you figure out why, how, and what's next. It's grounded in ICF ethics and real-world coaching experience, not random internet wisdom."},{question:"What topics can I explore with Coach Bernhard?",answer:"You can bring almost anything that matters to you: Leadership and communication, Career decisions and transitions, Confidence and motivation, Navigating change and resistance, Purpose, meaning, and balance. It is y
435our space for reflection â no judgment, just curiosity."},{question:"Is my coaching session data private and secure?",answer:"Yes, your privacy and security are our top priorities. You have a choice of either saving your chats or not. When saved, you can return to them later. Saved coaching conversations are encrypted and stored securely. Your data is never shared with third parties. You can review our full privacy policy for detailed information."},{question:"Can I use Coach Bernhard for team or executive development?",answer:"Absolutely. Leaders use it to reflect before key meetings, debrief after coaching sessions, or clarify their thinking between leadership development programs. It's a great companion tool for teams and executives working on self-awareness and performance."},{question:"When should I switch to a human coach?",answer:"If you're facing a complex situation, an emotional block, or a big decision that needs depth and empathy â reach out to a human coach. Bernhard and his team are ready to support you personally at https://book.bernhardkerres.com."},{question:"How do I start a conversation with Coach Bernhard?",answer:"Just click Start Your Coaching Session and begin. There's no setup, no signup, no pressure. Just you, your thoughts, and a smart reflection partner ready to help you move forward."},{question:"Can I get Coach Bernhard in my company or app?",answer:"Yes! Bernhard offers tailored AI coaching integrations for organizations and leadership programs. You can inquire about partnership options via https://www.bernhardkerres.com."},{question:"Is Coach Bernhard free to use?",answer:"Yes, Coach Bernhard is free for individual reflection. (If you're a company or c
435oach interested in customized AI coaching experiences, reach out to explore collaboration opportunities.)"},{question:"Can I access my previous coaching sessions?",answer:"Absolutely! If you choose to save your session, they can be accessed anytime. This allows you to review insights, track your progress over time, and pick up where you left off in your personal development journey."},{question:"Is Coach Bernhard available in languages other than English?",answer:"Currently, Coach Bernhard primarily operates in English. However, its language capabilities are already pretty good. Try it out!"}].map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))};return a.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[a.jsx(kk,{children:a.jsx("script",{type:"application/ld+json",children:JSON.stringify(n)})}),a.jsx("header",{className:"border-b bg-card p-4",children:a.jsx("div",{className:"max-w-4xl mx-auto flex items-center gap-4",children:a.jsxs(te,{variant:"ghost",size:"sm",onClick:()=>e("/"),className:"gap-2",children:[a.jsx(nc,{className:"h-4 w-4"}),"Back to Home"]})})}),a.jsx("main",{className:"flex-1 container mx-auto px-4 py-8 md:py-12 lg:py-16 max-w-4xl",children:a.jsxs("article",{children:[a.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-foreground text-center mb-8",children:"Frequently Asked Questions"}),a.jsxs(xq,{type:"single",collapsible:!0,className:"w-full space-y-4",children:[a.jsxs(Pt,{value:"item-1",children:[a.jsx(At,{className:"text-left",children:"What is Coach Bernhard (AI)?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Coach Bernhard is your pocket-sized reflection partnerâan AI-powered coach trained in the professional coaching style of Bernhard Kerres. It follows ICF coaching standards, and helps you explore ideas, challenges, and next steps in your personal and professional life. Think of it as a conversation starter for growth and clarity."})})]}),a.jsxs(Pt,{value:"item-2",children:[a.jsx(At,{className:"text-left",children:"How does an AI Coach work?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Coach Bernhard uses advanced AI to guide you through reflective questions, insights, and exercises â just like a real coach would. It listens, prompts, and challenges your thinking. It wonât give you quick-fix answers; it helps you discover your own."})})]}),a.jsxs(Pt,{value:"item-3",children:[a.jsx(At,{className:"text-left",children:"Can I book a session with the real Bernhard Kerres?"}),a.jsx(Rt,{children:a.jsxs("p",{children:["Yes! For in-depth human coaching sessions, you can book directly with Bernhard Kerres at"," ",a.jsxs("a",{href:"https://book.bernhardkerres.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1",children:["book.bernhardkerres.com",a.jsx(Ho,{className:"h-3 w-3"})]}),". The AI coach is a great way to start your journey and can complement your human coaching sessions."]})})]}),a.jsxs(Pt,{value:"item-4",children:[a.jsx(At,{className:"text-left",children:"Can AI really coach me like a human?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Not quiteâbut it comes close. Coach Bernhard is inspired by hundreds of real coaching conversations with Bernhard Kerres and built on proven coaching principles. Itâs here to help you reflect, grow, and prepare for deeper conversations with a human coach."})})]}),a.jsxs(Pt,{value:"item-5",children:[a.jsx(At,{className:"text-left",children:"Who created Coach Bernhard?"}),a.jsx(Rt,{children:a.jsxs("p",{children:["Coach Bernhard was created by Bernhard Kerres, an executive coach, former CEO, and professional opera singer. His work combines business acumen, creativity, and deep coaching experience. You can learn more or book a session with him at"," ",a.jsxs("a",{href:"https://book.bernhardkerres.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1",children:["book.bernhardkerres.com",a.jsx(Ho,{className:"h-3 w-3"})]}),"."]})})]}),a.jsxs(Pt,{value:"item-6",children:[a.jsx(At,{className:"text-left",children:"What makes Coach Bernhard different from other AI chatbots?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Most AI bots give you advice. Coach Bernhard gives you insight. It doesnât tell you what to do â it helps you figure out why, how, and whatâs next. Itâs grounded in ICF ethics and real-world coaching experience, not random internet wisdom."})})]}),a.jsxs(Pt,{value:"item-7",children:[a.jsx(At,{className:"text-left",children:"What topics can I explore with Coach Bernhard?"}),a.jsx(Rt,{children:a.jsxs("p",{children:["You can bring almost anything that matters to you:",a.jsxs("ul",{children:[a.jsx("li",{children:"- Leadership and communication "}),a.jsx("li",{children:"- Career decisions and transitions "}),a.jsx("li",{children:"- Confidence and motivation "}),a.jsx("li",{children:"- Navigating change and resistance "}),a.jsx("li",{children:"- Purpose, meaning, and balance "})]}),"It is your space for reflection â no judgment, just curiosity."]})})]}),a.jsxs(Pt,{value:"item-8",children:[a.jsx(At,{className:"text-left",children:"Is my coaching session data private and secure?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Yes, your privacy and security are our top priorities. You have a choice of either saving your chats or not. When saved, you can return to them later. Saved coaching conversations are encrypted and stored securely. Your data is never shared with third parties. You can review our full privacy policy for detailed information."})})]}),a.jsxs(Pt,{value:"item-9",children:[a.jsx(At,{className:"text-left",children:"Can I use Coach Bernhard for team or executive development?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Absolutely. Leaders use it to reflect before key meetings, debrief after coaching sessions, or clarify their thinking between leadership development programs. Itâs a great companion tool for teams and executives working on self-awareness and performance."})})]}),a.jsxs(Pt,{value:"item-10",children:[a.jsx(At,{className:"text-left",children:"When should I switch to a human coach?"}),a.jsx(Rt,{children:a.jsxs("p",{children:["If youâre facing a complex situation, an emotional block, or a big decision that needs depth and empathy â reach out to a human coach. Bernhard and his team are ready to support you personally at "," ",a.jsxs("a",{href:"https://book.bernhardkerres.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1",children:["book.bernhardkerres.com",a.jsx(Ho,{className:"h-3 w-3"})]}),"."]})})]}),a.jsxs(Pt,{value:"item-11",children:[a.jsx(At,{className:"text-left",children:"How do I start a conversation with Coach Bernhard?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Just click Start Your Coaching Session and begin. Thereâs no setup, no signup, no pressure. Just you, your thoughts, and a smart reflection partner ready to help you move forward."})})]}),a.jsxs(Pt,{value:"item-12",children:[a.jsx(At,{className:"text-left",children:"Can I get Coach Bernhard in my company or app?"}),a.jsx(Rt,{children:a.jsxs("p",{children:["Yes! Bernhard offers tailored AI coaching integrations for organizations and leadership programs. You can inquire about partnership options via "," ",a.jsxs("a",{href:"https://www.bernhardkerres.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:text-primary/80 underline inline-flex items-center gap-1",children:["www.bernhardkerres.com",a.jsx(Ho,{className:"h-3 w-3"})]}),"."]})})]}),a.jsxs(Pt,{value:"item-13",children:[a.jsx(At,{className:"text-left",children:"Is Coach Bernhard free to use?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Yes, Coach Bernhard is free for individual reflection. (If youâre a company or c
435oach interested in customized AI coaching experiences, reach out to explore collaboration opportunities.)"})})]}),a.jsxs(Pt,{value:"item-14",children:[a.jsx(At,{className:"text-left",children:"Can I access my previous coaching sessions?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Absolutely! If you choose to save your session, they can be accessed anytime. This allows you to review insights, track your progress over time, and pick up where you left off in your personal development journey."})})]}),a.jsxs(Pt,{value:"item-15",children:[a.jsx(At,{className:"text-left",children:"Is Coach Bernhard available in languages other than English?"}),a.jsx(Rt,{children:a.jsx("p",{children:"Currently, Coach Bernhard primarily operates in English. However, its language capabilities are already pretty good. Try it out!"})})]})]}),a.jsxs("div",{className:"text-center mt-12 pt-8 border-t",children:[a.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Still have questions?"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"The best way to understand Coach Bernhard is to experience it yourself."}),a.jsx(te,{onClick:()=>e("/auth"),size:"lg",className:"px-8 py-4 text-lg font-semibold h-auto bg-gradient-to-r from-orange-500 to-red-600 hover:from-orange-600 hover:to-red-700 text-white shadow-lg hover:shadow-xl transition-all duration-300",children:"Try It Now"})]})]})}),a.jsx(ti,{})]})},bq="/assets/coach-bernhard-logo-CP-6OPHW.jpg",Sq=()=>{const[e,t]=m.useState("unknown"),[n,r]=m.useState(null),[s,i]=m.useState(!1);m.useEffect(()=>{const l=navigator.userAgent.toLowerCase();/iphone|ipad|ipod/.test(l)?t("ios"):/android/.test(l)?t("android"):t("desktop"),window.matchMedia("(display-mode: standalone)").matches&&i(!0);const c=u=>{u.preventDefault(),r(u)};return window.addEventListener("beforeinstallprompt",c),()=>{window.removeEventListener("beforeinstallprompt",c)}},[]);const o=async()=>{if(!n)return;n.prompt();const{outcome:l}=await n.userChoice;l==="accepted"&&i(!0),r(null)};return s?a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:a.jsxs(be,{className:"max-w-md w-full text-center",children:[a.jsxs(qe,{children:[a.jsx("div",{className:"mx-auto mb-4",children:a.jsx(al,{className:"w-16 h-16 text-green-500"})}),a.jsx(Ke,{className:"text-2xl",children:"Already Installed!"}),a.jsx(sn,{children:"Coach Bernhard is already installed on your device. You can find it on your home screen."})]}),a.jsx($e,{children:a.jsx(Fn,{to:"/",children:a.jsxs(te,{className:"w-full",children:[a.jsx(nc,{className:"mr-2 h-4 w-4"}),"Go to App"]})})})]})}):a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx("header",{className:"border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:a.jsx("div",{className:"container flex h-16 items-center px-4",children:a.jsxs(Fn,{to:"/",className:"flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[a.jsx(nc,{className:"h-4 w-4"}),a.jsx("span",{children:"Back"})]})})}),a.jsxs("main",{className:"container max-w-2xl mx-auto px-4 py-8",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("img",{src:bq,alt:"Coach Bernhard",className:"w-24 h-24 rounded-2xl mx-auto mb-4 shadow-lg"}),a.jsx("h1",{className:"text-3xl font-bold text-foreground mb-2",children:"Install Coach Bernhard"}),a.jsx("p",{className:"text-muted-foreground",children:"Add Coach Bernhard to your home screen for quick access and an app-like experience."})]}),a.jsxs(be,{className:"mb-8",children:[a.jsx(qe,{children:a.jsxs(Ke,{className:"flex items-center gap-2",children:[a.jsx(uO,{className:"h-5 w-5 text-primary"}),"Why Install?"]})}),a.jsxs($e,{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(al,{className:"h-5 w-5 text-green-500 mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Quick Access"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Launch directly from your home screen"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(al,{className:"h-5 w-5 text-green-500 mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Full Screen Experience"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No browser bars - feels like a native app"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(al,{className:"h-5 w-5 text-green-500 mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"Works Offline"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Access your coaching sessions even without internet"})]})]}),a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(al,{className:"h-5 w-5 text-green-500 mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:"No App Store Required"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Install instantly without downloads or updates"})]})]})]})]}),n?a.jsxs(be,{className:"border-primary",children:[a.jsxs(qe,{children:[a.jsx(Ke,{children:"Ready to Install"}),a.jsx(sn,{children:"Click the button below to add Coach Bernhard to your home screen."})]}),a.jsx($e,{children:a.jsxs(te,{onClick:o,className:"w-full",size:"lg",children:[a.jsx(vd,{className:"mr-2 h-5 w-5"}),"Install Coach Bernhard"]})})]}):e==="ios"?a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsx(Ke,{children:"Install on iOS"}),a.jsx(sn,{children:"Follow these steps to add Coach Bernhard to your home screen"})]}),a.jsxs($e,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"1"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:"Tap the Share button"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Find the share icon at the bottom of Safari (box with arrow pointing up)"}),a.jsxs("div",{className:"inline-flex items-center gap-2 bg-muted rounded-lg px-3 py-2",children:[a.jsx(cO,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm",children:"Share"})]})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"2"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:'Scroll down and tap "Add to Home Screen"'}),a.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"You may need to scroll down in the share menu to find this option"}),a.jsxs("div",{className:"inline-flex items-center gap-2 bg-muted rounded-lg px-3 py-2",children:[a.jsx(Nv,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm",children:"Add to Home Screen"})]})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"3"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:'Tap "Add" in the top right'}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Coach Bernhard will now appear on your home screen!"})]})]})]})]}):e==="android"?a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsx(Ke,{children:"Install on Android"}),a.jsx(sn,{children:"Follow these steps to add Coach Bernhard to your home screen"})]}),a.jsxs($e,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"1"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:"Tap the menu button"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Find the three dots in the top right corner of Chrome"}),a.jsxs("div",{className:"inline-flex items-center gap-2 bg-muted rounded-lg px-3 py-2",children:[a.jsx(sO,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm",children:"Menu"})]})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"2"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:'Tap "Install app" or "Add to Home screen"'}),a.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"The exact wording may vary depending on your browser"}),a.jsxs("div",{className:"inline-flex items-center gap-2 bg-muted rounded-lg px-3 py-2",children:[a.jsx(vd,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm",children:"Install app"})]})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"3"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:"Confirm the installation"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:'Tap "Install" in the popup. Coach Bernhard will appear on your home screen!'})]})]})]})]}):a.jsxs(be,{children:[a.jsxs(qe,{children:[a.jsx(Ke,{children:"Install on Desktop"}),a.jsx(sn,{children:"Add Coach Bernhard to your computer for quick access"})]}),a.jsxs($e,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"1"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:"Look for the install icon"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"In Chrome, look for the install icon (plus sign in a box) in the address bar on the right"})]})]}),a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center font-bold",children:"2"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium mb-1",children:'Click "Install"'}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Confirm the installation when prompted. The app will open in its own window!"})]})]})]})]}),a.jsx("div",{className:"text-center mt-8",children:a.jsx(Fn,{to:"/",className:"text-primary hover:underline",children:"Continue using in browser"})})]})]})},kq=()=>{const e=no();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-100",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),a.jsx("p",{className:"mb-4 text-xl text-gray-600",children:"Oops! Page not found"}),a.jsx("a",{href:"/",className:"text-blue-500 underline hover:text-blue-700",children:"Return to Home"})]})})},jq=new TL,Cq=()=>a.jsx(OL,{client:jq,children:a.jsx(pz,{children:a.jsx(fz,{children:a.jsxs(hL,{children:[a.jsx(gz,{}),a.jsx(QO,{}),a.jsx(ND,{}),a.jsx(V4,{children:a.jsxs(L4,{children:[a.jsx(Zn,{path:"/auth",element:a.jsx(J7,{})}),a.jsx(Zn,{path:"/",element:a.jsx(wz,{})}),a.jsx(Zn,{path:"/coach",element:a.jsx(Yf,{children:a.jsx(MV,{})})}),a.jsx(Zn,{path:"/admin",element:a.jsx(Yf,{adminOnly:!0,children:a.jsx(T7,{})})}),a.jsx(Zn,{path:"/admin/materials",element:a.jsx(Yf,{adminOnly:!0,children:a.jsx(G7,{})})}),a.jsx(Zn,{path:"/legal",element:a.jsx(Z7,{})}),a.jsx(Zn,{path:"/how-it-works",element:a.jsx(eq,{})}),a.jsx(Zn,{path:"/faq",element:a.jsx(wq,{})}),a.jsx(Zn,{path:"/install",element:a.jsx(Sq,{})}),a.jsx(Zn,{path:"*",element:a.jsx(kq,{})})]})})]})})})});mk(document.getElementById("root")).render(a.jsx(Sk,{children:a.jsx(Cq,{})}));
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.