vendor: 6,122 bytes, lines 1-9
1var pg=t=>{throw TypeError(t)};var sd=(t,e,n)=>e.has(t)||pg("Cannot "+n);var P=(t,e,n)=>(sd(t,e,"read from private field"),n?n.call(t):e.get(t)),ce=(t,e,n)=>e.has(t)?pg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,r)=>(sd(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Xe=(t,e,n)=>(sd(t,e,"access private method"),n);var fl=(t,e,n,r)=>({set _(s){te(t,e,s,n)},get _(){return P(t,e,r)}});function wE(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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)}})();function Vw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bw={exports:{}},wc={},zw={exports:{}},oe={};/** 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 Ja=Symbol.for("react.element"),xE=Symbol.for("react.portal"),bE=Symbol.for("react.fragment"),_E=Symbol.for("react.strict_mode"),SE=Symbol.for("react.profiler"),kE=Symbol.for("react.provider"),EE=Symbol.for("react.context"),TE=Symbol.for("react.forward_ref"),CE=Symbol.for("react.suspense"),PE=Symbol.for("react.memo"),AE=Symbol.for("react.lazy"),mg=Symbol.iterator;function RE(t){return t===null||typeof t!="object"?null:(t=mg&&t[mg]||t["@@iterator"],typeof t=="function"?t:null)}var Ww={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Hw=Object.assign,qw={};function co(t,e,n){this.props=t,this.context=e,this.refs=qw,this.updater=n||Ww}co.prototype.isReactComponent={};co.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};co.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Kw(){}Kw.prototype=co.prototype;function mp(t,e,n){this.props=t,this.context=e,this.refs=qw,this.updater=n||Ww}var gp=mp.prototype=new Kw;gp.constructor=mp;Hw(gp,co.prototype);gp.isPureReactComponent=!0;var gg=Array.isArray,Gw=Object.prototype.hasOwnProperty,yp={current:null},Yw={key:!0,ref:!0,__self:!0,__source:!0};function Jw(t,e,n){var r,s={},i=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)Gw.call(e,r)&&!Yw.hasOwnProperty(r)&&(s[r]=e[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Ja,type:t,key:i,ref:o,props:s,_owner:yp.current}}function jE(t,e){return{$$typeof:Ja,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function vp(t){return typeof t=="object"&&t!==null&&t.$$typeof===Ja}function OE(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var yg=/\/+/g;function id(t,e){return typeof t=="object"&&t!==null&&t.key!=null?OE(""+t.key):e.toString(36)}function Ql(t,e,n,r,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Ja:case xE:o=!0}}if(o)return o=t,s=s(o),t=r===""?"."+id(o,0):r,gg(s)?(n="",t!=null&&(n=t.replace(yg,"$&/")+"/"),Ql(s,e,n,"",function(u){return u})):s!=null&&(vp(s)&&(s=jE(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(yg,"$&/")+"/")+t)),e.push(s)),1;if(o=0,r=r===""?".":r+":",gg(t))for(var a=0;a<t.length;a++){i=t[a];var l=r+id(i,a);o+=Ql(i,e,n,l,s)}else if(l=RE(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=r+id(i,a++),o+=Ql(i,e,n,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function pl(t,e,n){if(t==null)return t;var r=[],s=0;return Ql(t,r,"","",function(i){return e.call(n,i,s++)}),r}function NE(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var ft={current:null},Zl={transition:null},LE={ReactCurrentDispatcher:ft,ReactCurrentBatchConfig:Zl,ReactCurrentOwner:yp};function Qw(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:pl,forEach:function(t,e,n){pl(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return pl(t,function(){e++}),e},toArray:function(t){return pl(t,function(e){return e})||[]},only:function(t){if(!vp(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};oe.Component=co;oe.Fragment=bE;oe.Profiler=SE;oe.PureComponent=mp;oe.StrictMode=_E;oe.Suspense=CE;
vendor: 5,064 bytes, lines 9-25
9oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LE;oe.act=Qw;oe.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=Hw({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=yp.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Gw.call(e,l)&&!Yw.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Ja,type:t.type,key:s,ref:i,props:r,_owner:o}};oe.createContext=function(t){return t={$$typeof:EE,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:kE,_context:t},t.Consumer=t};oe.createElement=Jw;oe.createFactory=function(t){var e=Jw.bind(null,t);return e.type=t,e};oe.createRef=function(){return{current:null}};oe.forwardRef=function(t){return{$$typeof:TE,render:t}};oe.isValidElement=vp;oe.lazy=function(t){return{$$typeof:AE,_payload:{_status:-1,_result:t},_init:NE}};oe.memo=function(t,e){return{$$typeof:PE,type:t,compare:e===void 0?null:e}};oe.startTransition=function(t){var e=Zl.transition;Zl.transition={};try{t()}finally{Zl.transition=e}};oe.unstable_act=Qw;oe.useCallback=function(t,e){return ft.current.useCallback(t,e)};oe.useContext=function(t){return ft.current.useContext(t)};oe.useDebugValue=function(){};oe.useDeferredValue=function(t){return ft.current.useDeferredValue(t)};oe.useEffect=function(t,e){return ft.current.useEffect(t,e)};oe.useId=function(){return ft.current.useId()};oe.useImperativeHandle=function(t,e,n){return ft.current.useImperativeHandle(t,e,n)};oe.useInsertionEffect=function(t,e){return ft.current.useInsertionEffect(t,e)};oe.useLayoutEffect=function(t,e){return ft.current.useLayoutEffect(t,e)};oe.useMemo=function(t,e){return ft.current.useMemo(t,e)};oe.useReducer=function(t,e,n){return ft.current.useReducer(t,e,n)};oe.useRef=function(t){return ft.current.useRef(t)};oe.useState=function(t){return ft.current.useState(t)};oe.useSyncExternalStore=function(t,e,n){return ft.current.useSyncExternalStore(t,e,n)};oe.useTransition=function(){return ft.current.useTransition()};oe.version="18.3.1";zw.exports=oe;var b=zw.exports;const L=Vw(b),Zw=wE({__proto__:null,default:L},[b]);/** 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 IE=b,DE=Symbol.for("react.element"),ME=Symbol.for("react.fragment"),$E=Object.prototype.hasOwnProperty,FE=IE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,UE={key:!0,ref:!0,__self:!0,__source:!0};function Xw(t,e,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)$E.call(e,r)&&!UE.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:DE,type:t,key:i,ref:o,props:s,_owner:FE.current}}wc.Fragment=ME;wc.jsx=Xw;wc.jsxs=Xw;Bw.exports=wc;var p=Bw.exports,ex={exports:{}},Ot={},tx={exports:{}},nx={};/** 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(t){function e(C,R){var M=C.length;C.push(R);e:for(;0<M;){var J=M-1>>>1,G=C[J];if(0<s(G,R))C[J]=R,C[M]=G,M=J;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var R=C[0],M=C.pop();if(M!==R){C[0]=M;e:for(var J=0,G=C.length,ie=G>>>1;J<ie;){var ae=2*(J+1)-1,Le=C[ae],Ze=ae+1,he=C[Ze];if(0>s(Le,M))Ze<G&&0>s(he,Le)?(C[J]=he,C[Ze]=M,J=Ze):(C[J]=Le,C[ae]=M,J=ae);else if(Ze<G&&0>s(he,M))C[J]=he,C[Ze]=M,J=Ze;else break e}}return R}function s(C,R){var M=C.sortIndex-R.sortIndex;return M!==0?M:C.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,m=!1,x=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=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(C){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=C)r(u),R.sortIndex=R.expirationTime,e(l,R);else break;R=n(u)}}function _(C){if(m=!1,w(C),!g)if(n(l)!==null)g=!0,Y(S);else{var R=n(u);R!==null&&H(_,R.startTime-C)}}function S(C,R){g=!1,m&&(m=!1,y(T),T=-1),h=!0;var M=f;try{for(w(R),d=n(l);d!==null&&(!(d.expirationTime>R)||C&&!W());){var J=d.callback;
vendor: 1,971 bytes, line 25
25if(typeof J=="function"){d.callback=null,f=d.priorityLevel;var G=J(d.expirationTime<=R);R=t.unstable_now(),typeof G=="function"?d.callback=G:d===n(l)&&r(l),w(R)}else r(l);d=n(l)}if(d!==null)var ie=!0;else{var ae=n(u);ae!==null&&H(_,ae.startTime-R),ie=!1}return ie}finally{d=null,f=M,h=!1}}var k=!1,E=null,T=-1,A=5,j=-1;function W(){return!(t.unstable_now()-j<A)}function $(){if(E!==null){var C=t.unstable_now();j=C;var R=!0;try{R=E(!0,C)}finally{R?ne():(k=!1,E=null)}}else k=!1}var ne;if(typeof v=="function")ne=function(){v($)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,X=I.port2;I.port1.onmessage=$,ne=function(){X.postMessage(null)}}else ne=function(){x($,0)};function Y(C){E=C,k||(k=!0,ne())}function H(C,R){T=x(function(){C(t.unstable_now())},R)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(C){C.callback=null},t.unstable_continueExecution=function(){g||h||(g=!0,Y(S))},t.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<C?Math.floor(1e3/C):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(C){switch(f){case 1:case 2:case 3:var R=3;break;default:R=f}var M=f;f=R;try{return C()}finally{f=M}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(C,R){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var M=f;f=C;try{return R()}finally{f=M}},t.unstable_scheduleCallback=function(C,R,M){var J=t.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?J+M:J):M=J,C){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}
vendor: 4,614 bytes, lines 25-33
25return G=M+G,C={id:c++,callback:R,priorityLevel:C,startTime:M,expirationTime:G,sortIndex:-1},M>J?(C.sortIndex=M,e(u,C),n(l)===null&&C===n(u)&&(m?(y(T),T=-1):m=!0,H(_,M-J))):(C.sortIndex=G,e(l,C),g||h||(g=!0,Y(S))),C},t.unstable_shouldYield=W,t.unstable_wrapCallback=function(C){var R=f;return function(){var M=f;f=R;try{return C.apply(this,arguments)}finally{f=M}}}})(nx);tx.exports=nx;var VE=tx.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 BE=b,Rt=VE;function O(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var rx=new Set,aa={};function Hs(t,e){Gi(t,e),Gi(t+"Capture",e)}function Gi(t,e){for(aa[t]=e,t=0;t<e.length;t++)rx.add(e[t])}var tr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ph=Object.prototype.hasOwnProperty,zE=/^[: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]*$/,vg={},wg={};function WE(t){return ph.call(wg,t)?!0:ph.call(vg,t)?!1:zE.test(t)?wg[t]=!0:(vg[t]=!0,!1)}function HE(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function qE(t,e,n,r){if(e===null||typeof e>"u"||HE(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function pt(t,e,n,r,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var Qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Qe[t]=new pt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Qe[e]=new pt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Qe[t]=new pt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Qe[t]=new pt(t,2,!1,t,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(t){Qe[t]=new pt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Qe[t]=new pt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Qe[t]=new pt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Qe[t]=new pt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Qe[t]=new pt(t,5,!1,t.toLowerCase(),null,!1,!1)});var wp=/[\-:]([a-z])/g;function xp(t){return t[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(t){var e=t.replace(wp,xp);Qe[e]=new pt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(wp,xp);Qe[e]=new pt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(wp,xp);Qe[e]=new pt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Qe[t]=new pt(t,1,!1,t.toLowerCase(),null,!1,!1)});Qe.xlinkHref=new pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Qe[t]=new pt(t,1,!1,t.toLowerCase(),null,!0,!0)});function bp(t,e,n,r){var s=Qe.hasOwnProperty(e)?Qe[e]:null;(s!==null?s.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(qE(e,n,s,r)&&(n=null),r||s===null?WE(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):s.mustUseProperty?t[s.propertyName]=n===null?s.type===3?!1:"":n:(e=s.attributeName,r=s.attributeNamespace,n===null?t.removeAttribute(e):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var ur=BE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ml=Symbol.for("react.element"),ci=Symbol.for("react.portal"),di=Symbol.for("react.fragment"),_p=Symbol.for("react.strict_mode"),mh=Symbol.for("react.profiler"),sx=Symbol.for("react.provider"),ix=Symbol.for("react.context"),Sp=Symbol.for("react.forward_ref"),gh=Symbol.for("react.suspense"),yh=Symbol.for("react.suspense_list"),kp=Symbol.for("react.memo"),Sr=Symbol.for("react.lazy"),ox=Symbol.for("react.offscreen"),xg=Symbol.iterator;function ko(t){return t===null||typeof t!="object"?null:(t=xg&&t[xg]||t["@@iterator"],typeof t=="function"?t:null)}var Pe=Object.assign,od;function Do(t){if(od===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);od=e&&e[1]||""}return` 34`+od+t}var ad=!1;function ld(t,e){if(!t||ad)return"";ad=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}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,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{ad=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Do(t):""}function KE(t){switch(t.tag){case 5:return Do(t.type);case 16:return Do("Lazy");case 13:return Do("Suspense");case 19:return Do("SuspenseList");case 0:case 2:case 15:return t=ld(t.type,!1),t;case 11:return t=ld(t.type.render,!1),t;case 1:return t=ld(t.type,!0),t;default:return""}}function vh(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case di:return"Fragment";case ci:return"Portal";case mh:return"Profiler";case _p:return"StrictMode";case gh:return"Suspense";case yh:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ix:return(t.displayName||"Context")+".Consumer";case sx:return(t._context.displayName||"Context")+".Provider";case Sp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case kp:return e=t.displayName||null,e!==null?e:vh(t.type)||"Memo";case Sr:e=t._payload,t=t._init;try{return vh(t(e))}catch{}}return null}function GE(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vh(e);case 8:return e===_p?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Jr(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ax(t){var e=t.type;
vendor: 14,305 bytes, line 37
37return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function YE(t){var e=ax(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function gl(t){t._valueTracker||(t._valueTracker=YE(t))}function lx(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=ax(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function xu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function wh(t,e){var n=e.checked;return Pe({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function bg(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Jr(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function ux(t,e){e=e.checked,e!=null&&bp(t,"checked",e,!1)}function xh(t,e){ux(t,e);var n=Jr(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?bh(t,e.type,n):e.hasOwnProperty("defaultValue")&&bh(t,e.type,Jr(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function _g(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function bh(t,e,n){(e!=="number"||xu(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Mo=Array.isArray;function Ai(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s<n.length;s++)e["$"+n[s]]=!0;for(n=0;n<t.length;n++)s=e.hasOwnProperty("$"+t[n].value),t[n].selected!==s&&(t[n].selected=s),s&&r&&(t[n].defaultSelected=!0)}else{for(n=""+Jr(n),e=null,s=0;s<t.length;s++){if(t[s].value===n){t[s].selected=!0,r&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function _h(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(O(91));return Pe({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Sg(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(O(92));if(Mo(n)){if(1<n.length)throw Error(O(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:Jr(n)}}function cx(t,e){var n=Jr(e.value),r=Jr(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function kg(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function dx(t){switch(t){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 Sh(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?dx(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var yl,hx=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,s){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(yl=yl||document.createElement("div"),yl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=yl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function la(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ho={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},JE=["Webkit","ms","Moz","O"];Object.keys(Ho).forEach(function(t){JE.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ho[e]=Ho[t]})});function fx(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ho.hasOwnProperty(t)&&Ho[t]?(""+e).trim():e+"px"}function px(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=fx(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var QE=Pe({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 kh(t,e){if(e){if(QE[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(O(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(O(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(O(61))}if(e.style!=null&&typeof e.style!="object")throw Error(O(62))}}function Eh(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Th=null;function Ep(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ch=null,Ri=null,ji=null;function Eg(t){if(t=Xa(t)){if(typeof Ch!="function")throw Error(O(280));var e=t.stateNode;e&&(e=kc(e),Ch(t.stateNode,t.type,e))}}function mx(t){Ri?ji?ji.push(t):ji=[t]:Ri=t}function gx(){if(Ri){var t=Ri,e=ji;if(ji=Ri=null,Eg(t),e)for(t=0;t<e.length;t++)Eg(e[t])}}function yx(t,e){return t(e)}function vx(){}var ud=!1;function wx(t,e,n){if(ud)return t(e,n);ud=!0;try{return yx(t,e,n)}finally{ud=!1,(Ri!==null||ji!==null)&&(vx(),gx())}}function ua(t,e){var n=t.stateNode;if(n===null)return null;var r=kc(n);if(r===null)return null;n=r[e];e:switch(e){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)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(O(231,e,typeof n));return n}var Ph=!1;if(tr)try{var Eo={};Object.defineProperty(Eo,"passive",{get:function(){Ph=!0}}),window.addEventListener("test",Eo,Eo),window.removeEventListener("test",Eo,Eo)}catch{Ph=!1}function ZE(t,e,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var qo=!1,bu=null,_u=!1,Ah=null,XE={onError:function(t){qo=!0,bu=t}};function eT(t,e,n,r,s,i,o,a,l){qo=!1,bu=null,ZE.apply(XE,arguments)}function tT(t,e,n,r,s,i,o,a,l){if(eT.apply(this,arguments),qo){if(qo){var u=bu;qo=!1,bu=null}else throw Error(O(198));_u||(_u=!0,Ah=u)}}function qs(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function xx(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Tg(t){if(qs(t)!==t)throw Error(O(188))}function nT(t){var e=t.alternate;if(!e){if(e=qs(t),e===null)throw Error(O(188));return e!==t?null:t}for(var n=t,r=e;;){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 Tg(s),t;if(i===r)return Tg(s),e;i=i.sibling}throw Error(O(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?t:e}function bx(t){return t=nT(t),t!==null?_x(t):null}function _x(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=_x(t);if(e!==null)return e;t=t.sibling}return null}var Sx=Rt.unstable_scheduleCallback,Cg=Rt.unstable_cancelCallback,rT=Rt.unstable_shouldYield,sT=Rt.unstable_requestPaint,Ne=Rt.unstable_now,iT=Rt.unstable_getCurrentPriorityLevel,Tp=Rt.unstable_ImmediatePriority,kx=Rt.unstable_UserBlockingPriority,Su=Rt.unstable_NormalPriority,oT=Rt.unstable_LowPriority,Ex=Rt.unstable_IdlePriority,xc=null,jn=null;function aT(t){if(jn&&typeof jn.onCommitFiberRoot=="function")try{jn.onCommitFiberRoot(xc,t,void 0,(t.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:cT,lT=Math.log,uT=Math.LN2;function cT(t){return t>>>=0,t===0?32:31-(lT(t)/uT|0)|0}var vl=64,wl=4194304;function $o(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ku(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=$o(a):(i&=o,i!==0&&(r=$o(i)))}else o=n&~s,o!==0?r=$o(o):i!==0&&(r=$o(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-fn(e),s=1<<n,r|=t[n],e&=~s;return r}function dT(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 hT(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-fn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=dT(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function Rh(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Tx(){var t=vl;return vl<<=1,!(vl&4194240)&&(vl=64),t}function cd(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Qa(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-fn(e),t[e]=n}function fT(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var s=31-fn(n),i=1<<s;e[s]=0,r[s]=-1,t[s]=-1,n&=~i}}function Cp(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-fn(n),s=1<<r;s&e|t[r]&e&&(t[r]|=e),n&=~s}}var fe=0;function Cx(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var Px,Pp,Ax,Rx,jx,jh=!1,xl=[],Ur=null,Vr=null,Br=null,ca=new Map,da=new Map,Tr=[],pT="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 Pg(t,e){switch(t){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":Vr=null;break;case"mouseover":case"mouseout":Br=null;break;case"pointerover":case"pointerout":ca.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":da.delete(e.pointerId)}}function To(t,e,n,r,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},e!==null&&(e=Xa(e),e!==null&&Pp(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function mT(t,e,n,r,s){switch(e){case"focusin":return Ur=To(Ur,t,e,n,r,s),!0;case"dragenter":return Vr=To(Vr,t,e,n,r,s),!0;case"mouseover":return Br=To(Br,t,e,n,r,s),!0;case"pointerover":var i=s.pointerId;return ca.set(i,To(ca.get(i)||null,t,e,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,da.set(i,To(da.get(i)||null,t,e,n,r,s)),!0}return!1}function Ox(t){var e=xs(t.target);if(e!==null){var n=qs(e);if(n!==null){if(e=n.tag,e===13){if(e=xx(n),e!==null){t.blockedOn=e,jx(t.priority,function(){Ax(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Xl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Oh(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Th=r,n.target.dispatchEvent(r),Th=null}else return e=Xa(n),e!==null&&Pp(e),t.blockedOn=n,!1;e.shift()}return!0}function Ag(t,e,n){Xl(t)&&n.delete(e)}function gT(){jh=!1,Ur!==null&&Xl(Ur)&&(Ur=null),Vr!==null&&Xl(Vr)&&(Vr=null),Br!==null&&Xl(Br)&&(Br=null),ca.forEac
vendor: 11,468 bytes, line 37
37h(Ag),da.forEach(Ag)}function Co(t,e){t.blockedOn===e&&(t.blockedOn=null,jh||(jh=!0,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,gT)))}function ha(t){function e(s){return Co(s,t)}if(0<xl.length){Co(xl[0],t);for(var n=1;n<xl.length;n++){var r=xl[n];r.blockedOn===t&&(r.blockedOn=null)}}for(Ur!==null&&Co(Ur,t),Vr!==null&&Co(Vr,t),Br!==null&&Co(Br,t),ca.forEach(e),da.forEach(e),n=0;n<Tr.length;n++)r=Tr[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Tr.length&&(n=Tr[0],n.blockedOn===null);)Ox(n),n.blockedOn===null&&Tr.shift()}var Oi=ur.ReactCurrentBatchConfig,Eu=!0;function yT(t,e,n,r){var s=fe,i=Oi.transition;Oi.transition=null;try{fe=1,Ap(t,e,n,r)}finally{fe=s,Oi.transition=i}}function vT(t,e,n,r){var s=fe,i=Oi.transition;Oi.transition=null;try{fe=4,Ap(t,e,n,r)}finally{fe=s,Oi.transition=i}}function Ap(t,e,n,r){if(Eu){var s=Oh(t,e,n,r);if(s===null)xd(t,e,r,Tu,n),Pg(t,r);else if(mT(s,t,e,n,r))r.stopPropagation();else if(Pg(t,r),e&4&&-1<pT.indexOf(t)){for(;s!==null;){var i=Xa(s);if(i!==null&&Px(i),i=Oh(t,e,n,r),i===null&&xd(t,e,r,Tu,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else xd(t,e,r,null,n)}}var Tu=null;function Oh(t,e,n,r){if(Tu=null,t=Ep(r),t=xs(t),t!==null)if(e=qs(t),e===null)t=null;else if(n=e.tag,n===13){if(t=xx(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Tu=t,null}function Nx(t){switch(t){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(iT()){case Tp:return 1;case kx:return 4;case Su:case oT:return 16;case Ex:return 536870912;default:return 16}default:return 16}}var Ir=null,Rp=null,eu=null;function Lx(){if(eu)return eu;var t,e=Rp,n=e.length,r,s="value"in Ir?Ir.value:Ir.textContent,i=s.length;for(t=0;t<n&&e[t]===s[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===s[i-r];r++);return eu=s.slice(t,1<r?1-r:void 0)}function tu(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function bl(){return!0}function Rg(){return!1}function Nt(t){function e(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 a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bl:Rg,this.isPropagationStopped=Rg,this}return Pe(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bl)},persist:function(){},isPersistent:bl}),e}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jp=Nt(ho),Za=Pe({},ho,{view:0,detail:0}),wT=Nt(Za),dd,hd,Po,bc=Pe({},Za,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Op,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Po&&(Po&&t.type==="mousemove"?(dd=t.screenX-Po.screenX,hd=t.screenY-Po.screenY):hd=dd=0,Po=t),dd)},movementY:function(t){return"movementY"in t?t.movementY:hd}}),jg=Nt(bc),xT=Pe({},bc,{dataTransfer:0}),bT=Nt(xT),_T=Pe({},Za,{relatedTarget:0}),fd=Nt(_T),ST=Pe({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),kT=Nt(ST),ET=Pe({},ho,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),TT=Nt(ET),CT=Pe({},ho,{data:0}),Og=Nt(CT),PT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AT={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"},RT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jT(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=RT[t])?!!e[t]:!1}function Op(){return jT}var OT=Pe({},Za,{key:function(t){if(t.key){var e=PT[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=tu(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?AT[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Op,charCode:function(t){return t.type==="keypress"?tu(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?tu(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),NT=Nt(OT),LT=Pe({},bc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ng=Nt(LT),IT=Pe({},Za,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Op}),DT=Nt(IT),MT=Pe({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),$T=Nt(MT),FT=Pe({},bc,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),UT=Nt(FT),VT=[9,13,27,32],Np=tr&&"CompositionEvent"in window,Ko=null;tr&&"documentMode"in document&&(Ko=document.documentMode);var BT=tr&&"TextEvent"in window&&!Ko,Ix=tr&&(!Np||Ko&&8<Ko&&11>=Ko),Lg=" ",Ig=!1;function Dx(t,e){switch(t){case"keyup":return VT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mx(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hi=!1;function zT(t,e){switch(t){case"compositionend":return Mx(e);case"keypress":return e.which!==32?null:(Ig=!0,Lg);case"textInput":return t=e.data,t===Lg&&Ig?null:t;default:return null}}function WT(t,e){if(hi)return t==="compositionend"||!Np&&Dx(t,e)?(t=Lx(),eu=Rp=Ir=null,hi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Ix&&e.locale!=="ko"?null:e.data;default:return null}}var HT={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 Dg(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!HT[t.type]:e==="textarea"}function $x(t,e,n,r){mx(r),e=Cu(e,"onChange"),0<e.length&&(n=new jp("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Go=null,fa=null;function qT(t){Yx(t,0)}function _c(t){var e=mi(t);if(lx(e))return t}function KT(t,e){if(t==="change")return e}var Fx=!1;if(tr){var pd;if(tr){var md="oninput"in document;if(!md){var Mg=document.createElement("div");Mg.setAttribute("oninput","return;"),md=typeof Mg.oninput=="function"}pd=md}else pd=!1;Fx=pd&&(!document.documentMode||9<document.documentMode)}function $g(){Go&&(Go.detachEvent("onpropertychange",Ux),fa=Go=null)}function Ux(t){if(t.propertyName==="value"&&_c(fa)){var e=[];$x(e,fa,t,Ep(t)),wx(qT,e)}}function GT(t,e,n){t==="focusin"?($g(),Go=e,fa=n,Go.attachEvent("onpropertychange",Ux)):t==="focusout"&&$g()}function YT(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return _c(fa)}function JT(t,e){if(t==="click")return _c(e)}function QT(t,e){if(t==="input"||t==="change")return _c(e)}function ZT(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var gn=typeof Object.is=="function"?Object.is:ZT;function pa(t,e){if(gn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ph.call(e,s)||!gn(t[s],e[s]))return!1}return!0}function Fg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ug(t,e){var n=Fg(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fg(n)}}function Vx(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Vx(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Bx(){for(var t=window,e=xu();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=xu(t.document)}return e}function Lp(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function XT(t){var e=Bx(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Vx(n.ownerDocument.documentElement,n)){if(r!==null&&Lp(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=Ug(n,i);var o=Ug(n,r);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var eC=tr&&"documentMode"in document&&11>
vendor: 4,874 bytes, line 37
37=document.documentMode,fi=null,Nh=null,Yo=null,Lh=!1;function Vg(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lh||fi==null||fi!==xu(r)||(r=fi,"selectionStart"in r&&Lp(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}),Yo&&pa(Yo,r)||(Yo=r,r=Cu(Nh,"onSelect"),0<r.length&&(e=new jp("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=fi)))}function _l(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var pi={animationend:_l("Animation","AnimationEnd"),animationiteration:_l("Animation","AnimationIteration"),animationstart:_l("Animation","AnimationStart"),transitionend:_l("Transition","TransitionEnd")},gd={},zx={};tr&&(zx=document.createElement("div").style,"AnimationEvent"in window||(delete pi.animationend.animation,delete pi.animationiteration.animation,delete pi.animationstart.animation),"TransitionEvent"in window||delete pi.transitionend.transition);function Sc(t){if(gd[t])return gd[t];if(!pi[t])return t;var e=pi[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in zx)return gd[t]=e[n];return t}var Wx=Sc("animationend"),Hx=Sc("animationiteration"),qx=Sc("animationstart"),Kx=Sc("transitionend"),Gx=new Map,Bg="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 os(t,e){Gx.set(t,e),Hs(e,[t])}for(var yd=0;yd<Bg.length;yd++){var vd=Bg[yd],tC=vd.toLowerCase(),nC=vd[0].toUpperCase()+vd.slice(1);os(tC,"on"+nC)}os(Wx,"onAnimationEnd");os(Hx,"onAnimationIteration");os(qx,"onAnimationStart");os("dblclick","onDoubleClick");os("focusin","onFocus");os("focusout","onBlur");os(Kx,"onTransitionEnd");Gi("onMouseEnter",["mouseout","mouseover"]);Gi("onMouseLeave",["mouseout","mouseover"]);Gi("onPointerEnter",["pointerout","pointerover"]);Gi("onPointerLeave",["pointerout","pointerover"]);Hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="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(" "),rC=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function zg(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,tT(r,e,void 0,t),t.currentTarget=null}function Yx(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],s=r.event;r=r.listeners;e:{var i=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;zg(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;zg(s,a,u),i=l}}}if(_u)throw t=Ah,_u=!1,Ah=null,t}function xe(t,e){var n=e[Fh];n===void 0&&(n=e[Fh]=new Set);var r=t+"__bubble";n.has(r)||(Jx(e,t,2,!1),n.add(r))}function wd(t,e,n){var r=0;e&&(r|=4),Jx(n,t,r,e)}var Sl="_reactListening"+Math.random().toString(36).slice(2);function ma(t){if(!t[Sl]){t[Sl]=!0,rx.forEach(function(n){n!=="selectionchange"&&(rC.has(n)||wd(n,!1,t),wd(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Sl]||(e[Sl]=!0,wd("selectionchange",!1,e))}}function Jx(t,e,n,r){switch(Nx(e)){case 1:var s=yT;break;case 4:s=vT;break;default:s=Ap}n=s.bind(null,e,n,t),s=void 0,!Ph||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),r?s!==void 0?t.addEventListener(e,n,{capture:!0,passive:s}):t.addEventListener(e,n,!0):s!==void 0?t.addEventListener(e,n,{passive:s}):t.addEventListener(e,n,!1)}function xd(t,e,n,r,s){var i=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;
vendor: 5,316 bytes, lines 37-38
37if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=xs(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}wx(function(){var u=i,c=Ep(n),d=[];e:{var f=Gx.get(t);if(f!==void 0){var h=jp,g=t;switch(t){case"keypress":if(tu(n)===0)break e;case"keydown":case"keyup":h=NT;break;case"focusin":g="focus",h=fd;break;case"focusout":g="blur",h=fd;break;case"beforeblur":case"afterblur":h=fd;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":h=jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=bT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=DT;break;case Wx:case Hx:case qx:h=kT;break;case Kx:h=$T;break;case"scroll":h=wT;break;case"wheel":h=UT;break;case"copy":case"cut":case"paste":h=TT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Ng}var m=(e&4)!==0,x=!m&&t==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,w;v!==null;){w=v;var _=w.stateNode;if(w.tag===5&&_!==null&&(w=_,y!==null&&(_=ua(v,y),_!=null&&m.push(ga(v,_,w)))),x)break;v=v.return}0<m.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:m}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==Th&&(g=n.relatedTarget||n.fromElement)&&(xs(g)||g[nr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?xs(g):null,g!==null&&(x=qs(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(m=jg,_="onMouseLeave",y="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(m=Ng,_="onPointerLeave",y="onPointerEnter",v="pointer"),x=h==null?f:mi(h),w=g==null?f:mi(g),f=new m(_,v+"leave",h,n,c),f.target=x,f.relatedTarget=w,_=null,xs(c)===u&&(m=new m(y,v+"enter",g,n,c),m.target=w,m.relatedTarget=x,_=m),x=_,h&&g)t:{for(m=h,y=g,v=0,w=m;w;w=ti(w))v++;for(w=0,_=y;_;_=ti(_))w++;for(;0<v-w;)m=ti(m),v--;for(;0<w-v;)y=ti(y),w--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=ti(m),y=ti(y)}m=null}else m=null;h!==null&&Wg(d,f,h,m,!1),g!==null&&x!==null&&Wg(d,x,g,m,!0)}}e:{if(f=u?mi(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=KT;else if(Dg(f))if(Fx)S=QT;else{S=YT;var k=GT}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=JT);if(S&&(S=S(t,u))){$x(d,S,n,c);break e}k&&k(t,f,u),t==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&bh(f,"number",f.value)}switch(k=u?mi(u):window,t){case"focusin":(Dg(k)||k.contentEditable==="true")&&(fi=k,Nh=u,Yo=null);break;case"focusout":Yo=Nh=fi=null;break;case"mousedown":Lh=!0;break;case"contextmenu":case"mouseup":case"dragend":Lh=!1,Vg(d,n,c);break;case"selectionchange":if(eC)break;case"keydown":case"keyup":Vg(d,n,c)}var E;if(Np)e:{switch(t){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else hi?Dx(t,n)&&(T="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Ix&&n.locale!=="ko"&&(hi||T!=="onCompositionStart"?T==="onCompositionEnd"&&hi&&(E=Lx()):(Ir=c,Rp="value"in Ir?Ir.value:Ir.textContent,hi=!0)),k=Cu(u,T),0<k.length&&(T=new Og(T,t,null,n,c),d.push({event:T,listeners:k}),E?T.data=E:(E=Mx(n),E!==null&&(T.data=E)))),(E=BT?zT(t,n):WT(t,n))&&(u=Cu(u,"onBeforeInput"),0<u.length&&(c=new Og("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=E))}Yx(d,e)})}function ga(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Cu(t,e){for(var n=e+"Capture",r=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ua(t,n),i!=null&&r.unshift(ga(t,i,s)),i=ua(t,e),i!=null&&r.push(ga(t,i,s))),t=t.return}return r}function ti(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Wg(t,e,n,r,s){for(var i=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=ua(n,i),l!=null&&o.unshift(ga(n,l,a))):s||(l=ua(n,i),l!=null&&o.push(ga(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var sC=/\r\n?/g,iC=/\u0000|\uFFFD/g;function Hg(t){return(typeof t=="string"?t:""+t).replace(sC,` 38`).replace(iC,"")}function kl(t,e,n){if(e=Hg(e),Hg(t)!==e&&n)throw Error(O(425))}function Pu(){}var Ih=null,Dh=null;function Mh(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var $h=typeof setTimeout=="function"?setTimeout:void 0,oC=typeof clearTimeout=="function"?clearTimeout:void 0,qg=typeof Promise=="function"?Promise:void 0,aC=typeof queueMicrotask=="function"?queueMicrotask:typeof qg<"u"?function(t){return qg.resolve(null).then(t).cat
vendor: 4,824 bytes, line 38
38ch(lC)}:$h;function lC(t){setTimeout(function(){throw t})}function bd(t,e){var n=e,r=0;do{var s=n.nextSibling;if(t.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){t.removeChild(s),ha(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ha(e)}function zr(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Kg(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var fo=Math.random().toString(36).slice(2),An="__reactFiber$"+fo,ya="__reactProps$"+fo,nr="__reactContainer$"+fo,Fh="__reactEvents$"+fo,uC="__reactListeners$"+fo,cC="__reactHandles$"+fo;function xs(t){var e=t[An];if(e)return e;for(var n=t.parentNode;n;){if(e=n[nr]||n[An]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Kg(t);t!==null;){if(n=t[An])return n;t=Kg(t)}return e}t=n,n=t.parentNode}return null}function Xa(t){return t=t[An]||t[nr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function mi(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(O(33))}function kc(t){return t[ya]||null}var Uh=[],gi=-1;function as(t){return{current:t}}function be(t){0>gi||(t.current=Uh[gi],Uh[gi]=null,gi--)}function ye(t,e){gi++,Uh[gi]=t.current,t.current=e}var Qr={},ot=as(Qr),bt=as(!1),Ms=Qr;function Yi(t,e){var n=t.type.contextTypes;if(!n)return Qr;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function _t(t){return t=t.childContextTypes,t!=null}function Au(){be(bt),be(ot)}function Gg(t,e,n){if(ot.current!==Qr)throw Error(O(168));ye(ot,e),ye(bt,n)}function Qx(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(O(108,GE(t)||"Unknown",s));return Pe({},n,r)}function Ru(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Qr,Ms=ot.current,ye(ot,t),ye(bt,bt.current),!0}function Yg(t,e,n){var r=t.stateNode;if(!r)throw Error(O(169));n?(t=Qx(t,e,Ms),r.__reactInternalMemoizedMergedChildContext=t,be(bt),be(ot),ye(ot,t)):be(bt),ye(bt,n)}var Gn=null,Ec=!1,_d=!1;function Zx(t){Gn===null?Gn=[t]:Gn.push(t)}function dC(t){Ec=!0,Zx(t)}function ls(){if(!_d&&Gn!==null){_d=!0;var t=0,e=fe;try{var n=Gn;for(fe=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Gn=null,Ec=!1}catch(s){throw Gn!==null&&(Gn=Gn.slice(t+1)),Sx(Tp,ls),s}finally{fe=e,_d=!1}}return null}var yi=[],vi=0,ju=null,Ou=0,Mt=[],$t=0,$s=null,Qn=1,Zn="";function gs(t,e){yi[vi++]=Ou,yi[vi++]=ju,ju=t,Ou=e}function Xx(t,e,n){Mt[$t++]=Qn,Mt[$t++]=Zn,Mt[$t++]=$s,$s=t;var r=Qn;t=Zn;var s=32-fn(r)-1;r&=~(1<<s),n+=1;var i=32-fn(e)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Qn=1<<32-fn(e)+s|n<<s|r,Zn=i+t}else Qn=1<<i|n<<s|r,Zn=t}function Ip(t){t.return!==null&&(gs(t,1),Xx(t,1,0))}function Dp(t){for(;t===ju;)ju=yi[--vi],yi[vi]=null,Ou=yi[--vi],yi[vi]=null;for(;t===$s;)$s=Mt[--$t],Mt[$t]=null,Zn=Mt[--$t],Mt[$t]=null,Qn=Mt[--$t],Mt[$t]=null}var Pt=null,Ct=null,Se=!1,cn=null;function eb(t,e){var n=Ft(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function Jg(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Pt=t,Ct=zr(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Pt=t,Ct=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=$s!==null?{id:Qn,overflow:Zn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Ft(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Pt=t,Ct=null,!0):!1;default:return!1}}function Vh(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Bh(t){if(Se){var e=Ct;if(e){var n=e;if(!Jg(t,e)){if(Vh(t))throw Error(O(418));e=zr(n.nextSibling);var r=Pt;e&&Jg(t,e)?eb(r,n):(t.flags=t.flags&-4097|2,Se=!1,Pt=t)}}else{if(Vh(t))throw Error(O(418));t.flags=t.flags&-4097|2,Se=!1,Pt=t}}}function Qg(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Pt=t}function El(t){if(t!==Pt)return!1;if(!Se)return Qg(t),Se=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Mh(t.type,t.memoizedProps)),e&&(e=Ct)){if(Vh(t))throw tb(),Error(O(418));for(;e;)eb(t,e),e=zr(e.nextSibling)}if(Qg(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(O(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 22,874 bytes, lines 38-40
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Ct=zr(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Ct=null}}else Ct=Pt?zr(t.stateNode.nextSibling):null;return!0}function tb(){for(var t=Ct;t;)t=zr(t.nextSibling)}function Ji(){Ct=Pt=null,Se=!1}function Mp(t){cn===null?cn=[t]:cn.push(t)}var hC=ur.ReactCurrentBatchConfig;function Ao(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,t));var s=r,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,t))}return t}function Tl(t,e){throw t=Object.prototype.toString.call(e),Error(O(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Zg(t){var e=t._init;return e(t._payload)}function nb(t){function e(y,v){if(t){var w=y.deletions;w===null?(y.deletions=[v],y.flags|=16):w.push(v)}}function n(y,v){if(!t)return null;for(;v!==null;)e(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function s(y,v){return y=Kr(y,v),y.index=0,y.sibling=null,y}function i(y,v,w){return y.index=w,t?(w=y.alternate,w!==null?(w=w.index,w<v?(y.flags|=2,v):w):(y.flags|=2,v)):(y.flags|=1048576,v)}function o(y){return t&&y.alternate===null&&(y.flags|=2),y}function a(y,v,w,_){return v===null||v.tag!==6?(v=Ad(w,y.mode,_),v.return=y,v):(v=s(v,w),v.return=y,v)}function l(y,v,w,_){var S=w.type;return S===di?c(y,v,w.props.children,_,w.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Sr&&Zg(S)===v.type)?(_=s(v,w.props),_.ref=Ao(y,v,w),_.return=y,_):(_=lu(w.type,w.key,w.props,null,y.mode,_),_.ref=Ao(y,v,w),_.return=y,_)}function u(y,v,w,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==w.containerInfo||v.stateNode.implementation!==w.implementation?(v=Rd(w,y.mode,_),v.return=y,v):(v=s(v,w.children||[]),v.return=y,v)}function c(y,v,w,_,S){return v===null||v.tag!==7?(v=Is(w,y.mode,_,S),v.return=y,v):(v=s(v,w),v.return=y,v)}function d(y,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Ad(""+v,y.mode,w),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ml:return w=lu(v.type,v.key,v.props,null,y.mode,w),w.ref=Ao(y,null,v),w.return=y,w;case ci:return v=Rd(v,y.mode,w),v.return=y,v;case Sr:var _=v._init;return d(y,_(v._payload),w)}if(Mo(v)||ko(v))return v=Is(v,y.mode,w,null),v.return=y,v;Tl(y,v)}return null}function f(y,v,w,_){var S=v!==null?v.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return S!==null?null:a(y,v,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ml:return w.key===S?l(y,v,w,_):null;case ci:return w.key===S?u(y,v,w,_):null;case Sr:return S=w._init,f(y,v,S(w._payload),_)}if(Mo(w)||ko(w))return S!==null?null:c(y,v,w,_,null);Tl(y,w)}return null}function h(y,v,w,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(w)||null,a(v,y,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ml:return y=y.get(_.key===null?w:_.key)||null,l(v,y,_,S);case ci:return y=y.get(_.key===null?w:_.key)||null,u(v,y,_,S);case Sr:var k=_._init;return h(y,v,w,k(_._payload),S)}if(Mo(_)||ko(_))return y=y.get(w)||null,c(v,y,_,S,null);Tl(v,_)}return null}function g(y,v,w,_){for(var S=null,k=null,E=v,T=v=0,A=null;E!==null&&T<w.length;T++){E.index>T?(A=E,E=null):A=E.sibling;var j=f(y,E,w[T],_);if(j===null){E===null&&(E=A);break}t&&E&&j.alternate===null&&e(y,E),v=i(j,v,T),k===null?S=j:k.sibling=j,k=j,E=A}if(T===w.length)return n(y,E),Se&&gs(y,T),S;if(E===null){for(;T<w.length;T++)E=d(y,w[T],_),E!==null&&(v=i(E,v,T),k===null?S=E:k.sibling=E,k=E);return Se&&gs(y,T),S}for(E=r(y,E);T<w.length;T++)A=h(E,y,T,w[T],_),A!==null&&(t&&A.alternate!==null&&E.delete(A.key===null?T:A.key),v=i(A,v,T),k===null?S=A:k.sibling=A,k=A);return t&&E.forEach(function(W){return e(y,W)}),Se&&gs(y,T),S}function m(y,v,w,_){var S=ko(w);if(typeof S!="function")throw Error(O(150));if(w=S.call(w),w==null)throw Error(O(151));for(var k=S=null,E=v,T=v=0,A=null,j=w.next();E!==null&&!j.done;T++,j=w.next()){E.index>T?(A=E,E=null):A=E.sibling;var W=f(y,E,j.value,_);if(W===null){E===null&&(E=A);break}t&&E&&W.alternate===null&&e(y,E),v=i(W,v,T),k===null?S=W:k.sibling=W,k=W,E=A}if(j.done)return n(y,E),Se&&gs(y,T),S;if(E===null){for(;!j.done;T++,j=w.next())j=d(y,j.value,_),j!==null&&(v=i(j,v,T),k===null?S=j:k.sibling=j,k=j);return Se&&gs(y,T),S}for(E=r(y,E);!j.done;T++,j=w.next())j=h(E,y,T,j.value,_),j!==null&&(t&&j.alternate!==null&&E.delete(j.key===null?T:j.key),v=i(j,v,T),k===null?S=j:k.sibling=j,k=j);return t&&E.forEach(function($){return e(y,$)}),Se&&gs(y,T),S}function x(y,v,w,_){if(typeof w=="object"&&w!==null&&w.type===di&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case ml:e:{for(var S=w.key,k=v;k!==null;){if(k.key===S){if(S=w.type,S===di){if(k.tag===7){n(y,k.sibling),v=s(k,w.props.children),v.return=y,y=v;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Sr&&Zg(S)===k.type){n(y,k.sibling),v=s(k,w.props),v.ref=Ao(y,k,w),v.return=y,y=v;break e}n(y,k);break}else e(y,k);k=k.sibling}w.type===di?(v=Is(w.props.children,y.mode,_,w.key),v.return=y,y=v):(_=lu(w.type,w.key,w.props,null,y.mode,_),_.ref=Ao(y,v,w),_.return=y,y=_)}return o(y);case ci:e:{for(k=w.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(y,v.sibling),v=s(v,w.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else e(y,v);v=v.sibling}v=Rd(w,y.mode,_),v.return=y,y=v}return o(y);case Sr:return k=w._init,x(y,v,k(w._payload),_)}if(Mo(w))return g(y,v,w,_);if(ko(w))return m(y,v,w,_);Tl(y,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(y,v.sibling),v=s(v,w),v.return=y,y=v):(n(y,v),v=Ad(w,y.mode,_),v.return=y,y=v),o(y)):n(y,v)}return x}var Qi=nb(!0),rb=nb(!1),Nu=as(null),Lu=null,wi=null,$p=null;function Fp(){$p=wi=Lu=null}function Up(t){var e=Nu.current;be(Nu),t._currentValue=e}function zh(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Ni(t,e){Lu=t,$p=wi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(xt=!0),t.firstContext=null)}function Wt(t){var e=t._currentValue;if($p!==t)if(t={context:t,memoizedValue:e,next:null},wi===null){if(Lu===null)throw Error(O(308));wi=t,Lu.dependencies={lanes:0,firstContext:t}}else wi=wi.next=t;return e}var bs=null;function Vp(t){bs===null?bs=[t]:bs.push(t)}function sb(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,Vp(e)):(n.next=s.next,s.next=n),e.interleaved=n,rr(t,r)}function rr(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var kr=!1;function Bp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ib(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Xn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Wr(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,rr(t,n)}return s=r.interleaved,s===null?(e.next=e,Vp(r)):(e.next=s.next,s.next=e),r.interleaved=e,rr(t,n)}function nu(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Cp(t,n)}}function Xg(t,e){var n=t.updateQueue,r=t.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=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Iu(t,e,n,r){var s=t.updateQueue;kr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=t,m=a;switch(f=e,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=Pe({},d,f);break e;case 2:kr=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Us|=o,t.lanes=o,t.memoizedState=d}}function ey(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(O(191,s));s.call(r)}}}var el={},On=as(el),va=as(el),wa=as(el);function _s(t){if(t===el)throw Error(O(174));return t}function zp(t,e){switch(ye(wa,e),ye(va,t),ye(On,el),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Sh(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Sh(e,t)}be(On),ye(On,e)}function Zi(){be(On),be(va),be(wa)}function ob(t){_s(wa.current);var e=_s(On.current),n=Sh(e,t.type);e!==n&&(ye(va,t),ye(On,n))}function Wp(t){va.current===t&&(be(On),be(va))}var Ee=as(0);function Du(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Sd=[];function Hp(){for(var t=0;t<Sd.length;t++)Sd[t]._workInProgressVersionPrimary=null;Sd.length=0}var ru=ur.ReactCurrentDispatcher,kd=ur.ReactCurrentBatchConfig,Fs=0,Ce=null,Ue=null,We=null,Mu=!1,Jo=!1,xa=0,fC=0;function et(){throw Error(O(321))}function qp(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!gn(t[n],e[n]))return!1;return!0}function Kp(t,e,n,r,s,i){if(Fs=i,Ce=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,ru.current=t===null||t.memoizedState===null?yC:vC,t=n(r,s),Jo){i=0;do{if(Jo=!1,xa=0,25<=i)throw Error(O(301));i+=1,We=Ue=null,e.updateQueue=null,ru.current=wC,t=n(r,s)}while(Jo)}if(ru.current=$u,e=Ue!==null&&Ue.next!==null,Fs=0,We=Ue=Ce=null,Mu=!1,e)throw Error(O(300));return t}function Gp(){var t=xa!==0;return xa=0,t}function _n(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Ce.memoizedState=We=t:We=We.next=t,We}function Ht(){if(Ue===null){var t=Ce.alternate;t=t!==null?t.memoizedState:null}else t=Ue.next;var e=We===null?Ce.memoizedState:We.next;if(e!==null)We=e,Ue=t;else{if(t===null)throw Error(O(310));Ue=t,t={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},We===null?Ce.memoizedState=We=t:We=We.next=t}return We}function ba(t,e){return typeof e=="function"?e(t):e}function Ed(t){var e=Ht(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=Ue,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 a=o=null,l=null,u=i;do{var c=u.lane;if((Fs&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,Ce.lanes|=c,Us|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,gn(r,e.memoizedState)||(xt=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){s=t;do i=s.lane,Ce.lanes|=i,Us|=i,s=s.next;while(s!==t)}else s===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Td(t){var e=Ht(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var r=n.dispatch,s=n.pending,i=e.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);gn(i,e.memoizedState)||(xt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function ab(){}function lb(t,e){var n=Ce,r=Ht(),s=e(),i=!gn(r.memoizedState,s);if(i&&(r.memoizedState=s,xt=!0),r=r.queue,Yp(db.bind(null,n,r,t),[t]),r.getSnapshot!==e||i||We!==null&&We.memoizedState.tag&1){if(n.flags|=2048,_a(9,cb.bind(null,n,r,s,e),void 0,null),qe===null)throw Error(O(349));Fs&30||ub(n,e,s)}return s}function ub(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Ce.updateQueue,e===null?(e={lastEffect:null,stores:null},Ce.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function cb(t,e,n,r){e.value=n,e.getSnapshot=r,hb(e)&&fb(t)}function db(t,e,n){return n(function(){hb(e)&&fb(t)})}function hb(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!gn(t,n)}catch{return!0}}function fb(t){var e=rr(t,1);e!==null&&pn(e,t,1,-1)}function ty(t){var e=_n();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:t},e.queue=t,t=t.dispatch=gC.bind(null,Ce,t),[e.memoizedState,t]}function _a(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Ce.updateQueue,e===null?(e={lastEffect:null,stores:null},Ce.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function pb(){return Ht().memoizedState}function su(t,e,n,r){var s=_n();Ce.flags|=t,s.memoizedState=_a(1|e,n,void 0,r===void 0?null:r)}function Tc(t,e,n,r){var s=Ht();r=r===void 0?null:r;var i=void 0;if(Ue!==null){var o=Ue.memoizedState;if(i=o.destroy,r!==null&&qp(r,o.deps)){s.memoizedState=_a(e,n,i,r);return}}Ce.flags|=t,s.memoizedState=_a(1|e,n,i,r)}function ny(t,e){return su(8390656,8,t,e)}function Yp(t,e){return Tc(2048,8,t,e)}function mb(t,e){return Tc(4,2,t,e)}function gb(t,e){return Tc(4,4,t,e)}function yb(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function vb(t,e,n){return n=n!=null?n.concat([t]):null,Tc(4,4,yb.bind(null,e,t),n)}function Jp(){}function wb(t,e){var n=Ht();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&qp(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function xb(t,e){var n=Ht();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&qp(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function bb(t,e,n){return Fs&21?(gn(n,e)||(n=Tx(),Ce.lanes|=n,Us|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,xt=!0),t.memoizedState=n)}function pC(t,e){var n=fe;fe=n!==0&&4>n?n:4,t(!0);var r=kd.transition;kd.transition={};try{t(!1),e()}finally{fe=n,kd.transition=r}}function _b(){return Ht().memoizedState}function mC(t,e,n){var r=qr(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Sb(t))kb(e,n);else if(n=sb(t,e,n,r),n!==null){var s=ht();pn(n,t,r,s),Eb(n,e,r)}}function gC(t,e,n){var r=qr(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Sb(t))kb(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,gn(a,o)){var l=e.interleaved;l===null?(s.next=s,Vp(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}n=sb(t,e,s,r),n!==null&&(s=ht(),pn(n,t,r,s),Eb(n,e,r))}}function Sb(t){var e=t.alternate;return t===Ce||e!==null&&e===Ce}function kb(t,e){Jo=Mu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Eb(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Cp(t,n)}}var $u={readContext:Wt,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},yC={readContext:Wt,useCallback:function(t,e){return _n().memoizedState=[t,e===void 0?null:e],t},useContext:Wt,useEffect:ny,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,su(4194308,4,yb.bind(null,e,t),n)},useLayoutEffect:function(t,e){return su(4194308,4,t,e)},useInsertionEffect:function(t,e){return su(4,2,t,e)},useMemo:function(t,e){var n=_n();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=_n();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=mC.bind(null,Ce,t),[r.memoizedState,t]},useRef:function(t){var e=_n();return t={current:t},e.memoizedState=t},useState:ty,useDebugValue:Jp,useDeferredValue:function(t){return _n().memoizedState=t},useTransition:function(){var t=ty(!1),e=t[0];return t=pC.bind(null,t[1]),_n().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Ce,s=_n();if(Se){if(n===void 0)throw Error(O(407));n=n()}else{if(n=e(),qe===null)throw Error(O(349));Fs&30||ub(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,ny(db.bind(null,r,i,t),[t]),r.flags|=2048,_a(9,cb.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=_n(),e=qe.identifierPrefix;if(Se){var n=Zn,r=Qn;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=xa++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=fC++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},vC={readContext:Wt,useCallback:wb,useContext:Wt,useEffect:Yp,useImperativeHandle:vb,useInsertionEffect:mb,useLayoutEffect:gb,useMemo:xb,useReducer:Ed,useRef:pb,useState:function(){return Ed(ba)},useDebugValue:Jp,useDeferredValue:function(t){var e=Ht();return bb(e,Ue.memoizedState,t)},useTransition:function(){var t=Ed(ba)[0],e=Ht().memoizedState;return[t,e]},useMutableSource:ab,useSyncExternalStore:lb,useId:_b,unstable_isNewReconciler:!1},wC={readContext:Wt,useCallback:wb,useContext:Wt,useEffect:Yp,useImperativeHandle:vb,useInsertionEffect:mb,useLayoutEffect:gb,useMemo:xb,useReducer:Td,useRef:pb,useState:function(){return Td(ba)},useDebugValue:Jp,useDeferredValue:function(t){var e=Ht();return Ue===null?e.memoizedState=t:bb(e,Ue.memoizedState,t)},useTransition:function(){var t=Td(ba)[0],e=Ht().memoizedState;return[t,e]},useMutableSource:ab,useSyncExternalStore:lb,useId:_b,unstable_isNewReconciler:!1};function rn(t,e){if(t&&t.defaultProps){e=Pe({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Wh(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Pe({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Cc={isMounted:function(t){return(t=t._reactInternals)?qs(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=ht(),s=qr(t),i=Xn(r,s);i.payload=e,n!=null&&(i.callback=n),e=Wr(t,i,s),e!==null&&(pn(e,t,s,r),nu(e,t,s))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=ht(),s=qr(t),i=Xn(r,s);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Wr(t,i,s),e!==null&&(pn(e,t,s,r),nu(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=ht(),r=qr(t),s=Xn(n,r);s.tag=2,e!=null&&(s.callback=e),e=Wr(t,s,r),e!==null&&(pn(e,t,r,n),nu(e,t,r))}};function ry(t,e,n,r,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,i,o):e.prototype&&e.prototype.isPureReactComponent?!pa(n,r)||!pa(s,i):!0}function Tb(t,e,n){var r=!1,s=Qr,i=e.contextType;return typeof i=="object"&&i!==null?i=Wt(i):(s=_t(e)?Ms:ot.current,r=e.contextTypes,i=(r=r!=null)?Yi(t,s):Qr),e=new e(n,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Cc,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function sy(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&Cc.enqueueReplaceState(e,e.state,null)}function Hh(t,e,n,r){var s=t.stateNode;s.props=n,s.state=t.memoizedState,s.refs={},Bp(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=Wt(i):(i=_t(e)?Ms:ot.current,s.context=Yi(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Wh(t,e,i,n),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&Cc.enqueueReplaceState(s,s.state,null),Iu(t,n,s,r),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function Xi(t,e){try{var n="",r=e;do n+=KE(r),r=r.return;while(r);var s=n}catch(i){s=` 39Error generating stack: `+i.message+` 40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function Cd(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function qh(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var xC=typeof WeakMap=="function"?WeakMap:Map;function Cb(t,e,n){n=Xn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;
vendor: 9,684 bytes, line 40
40return n.callback=function(){Uu||(Uu=!0,nf=r),qh(t,e)},n}function Pb(t,e,n){n=Xn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){qh(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){qh(t,e),typeof r!="function"&&(Hr===null?Hr=new Set([this]):Hr.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function iy(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new xC;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=LC.bind(null,t,e,n),e.then(t,t))}function oy(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function ay(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Xn(-1,1),e.tag=2,Wr(n,e,1))),n.lanes|=1),t)}var bC=ur.ReactCurrentOwner,xt=!1;function lt(t,e,n,r){e.child=t===null?rb(e,null,n,r):Qi(e,t.child,n,r)}function ly(t,e,n,r,s){n=n.render;var i=e.ref;return Ni(e,s),r=Kp(t,e,n,r,i,s),n=Gp(),t!==null&&!xt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,sr(t,e,s)):(Se&&n&&Ip(e),e.flags|=1,lt(t,e,r,s),e.child)}function uy(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!sm(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,Ab(t,e,i,r,s)):(t=lu(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:pa,n(o,r)&&t.ref===e.ref)return sr(t,e,s)}return e.flags|=1,t=Kr(i,r),t.ref=e.ref,t.return=e,e.child=t}function Ab(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(pa(i,r)&&t.ref===e.ref)if(xt=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(xt=!0);else return e.lanes=t.lanes,sr(t,e,s)}return Kh(t,e,n,r,s)}function Rb(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(bi,kt),kt|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ye(bi,kt),kt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ye(bi,kt),kt|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,ye(bi,kt),kt|=r;return lt(t,e,s,n),e.child}function jb(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Kh(t,e,n,r,s){var i=_t(n)?Ms:ot.current;return i=Yi(e,i),Ni(e,s),n=Kp(t,e,n,r,i,s),r=Gp(),t!==null&&!xt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,sr(t,e,s)):(Se&&r&&Ip(e),e.flags|=1,lt(t,e,n,s),e.child)}function cy(t,e,n,r,s){if(_t(n)){var i=!0;Ru(e)}else i=!1;if(Ni(e,s),e.stateNode===null)iu(t,e),Tb(e,n,r),Hh(e,n,r,s),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Wt(u):(u=_t(n)?Ms:ot.current,u=Yi(e,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&sy(e,o,r,u),kr=!1;var f=e.memoizedState;o.state=f,Iu(e,r,o,s),l=e.memoizedState,a!==r||f!==l||bt.current||kr?(typeof c=="function"&&(Wh(e,n,c,r),l=e.memoizedState),(a=kr||ry(e,n,a,r,f,l,u))?(d||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"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,ib(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:rn(e.type,a),o.props=u,d=e.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Wt(l):(l=_t(n)?Ms:ot.current,l=Yi(e,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&sy(e,o,r,l),kr=!1,f=e.memoizedState,o.state=f,Iu(e,r,o,s);var g=e.memoizedState;a!==d||f!==g||bt.current||kr?(typeof h=="function"&&(Wh(e,n,h,r),g=e.memoizedState),(u=kr||ry(e,n,u,r,f,g,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return Gh(t,e,n,r,i,s)}function Gh(t,e,n,r,s,i){jb(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return s&&Yg(e,n,!1),sr(t,e,i);r=e.stateNode,bC.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Qi(e,t.child,null,i),e.child=Qi(e,null,a,i)):lt(t,e,a,i),e.memoizedState=r.state,s&&Yg(e,n,!0),e.child}function Ob(t){var e=t.stateNode;e.pendingContext?Gg(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Gg(t,e.context,!1),zp(t,e.containerInfo)}function dy(t,e,n,r,s){return Ji(),Mp(s),e.flags|=256,lt(t,e,n,r),e.child}var Yh={dehydrated:null,treeContext:null,retryLane:0};function Jh(t){return{baseLanes:t,cachePool:null,transitions:null}}function Nb(t,e,n){var r=e.pendingProps,s=Ee.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),ye(Ee,s&1),t===null)return Bh(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,i?(r=e.mode,i=e.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Rc(o,r,0,null),t=Is(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Jh(n),e.memoizedState=Yh,t):Qp(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return _C(t,e,o,r,a,s,n);if(i){i=r.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=Kr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Kr(a,i):(i=Is(i,o,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,o=t.child.memoizedState,o=o===null?Jh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~n,e.memoizedState=Yh,r}return i=t.child,t=i.sibling,r=Kr(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Qp(t,e){return e=Rc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Cl(t,e,n,r){return r!==null&&Mp(r),Qi(e,t.child,null,n),t=Qp(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function _C(t,e,n,r,s,i,o){if(n)return e.flags&256?(e.flags&=-257,r=Cd(Error(O(422))),Cl(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=Rc({mode:"visible",children:r.children},s,0,null),i=Is(i,s,o,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&Qi(e,t.child,null,o),e.child.memoizedState=Jh(o),e.memoizedState=Yh,i);if(!(e.mode&1))return Cl(t,e,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(O(419)),r=Cd(i,r,void 0),Cl(t,e,o,r)}if(a=(o&t.childLanes)!==0,xt||a){if(r=qe,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,rr(t,s),pn(r,t,s,-1))}return rm(),r=Cd(Error(O(421))),Cl(t,e,o,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=IC.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Ct=zr(s.nextSibling),Pt=e,Se=!0,cn=null,t!==null&&(Mt[$t++]=Qn,Mt[$t++]=Zn,Mt[$t++]=$s,Qn=t.id,Zn=t.overflow,$s=e),e=Qp(e,r.children),e.flags|=4096,e)}function hy(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),zh(t.return,e,n)}function Pd(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}
vendor: 5,962 bytes, line 40
40function Lb(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(lt(t,e,r.children,n),r=Ee.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&hy(t,n,e);else if(t.tag===19)hy(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ye(Ee,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&Du(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),Pd(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Du(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}Pd(e,!0,n,null,i);break;case"together":Pd(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function iu(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function sr(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Us|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(O(153));if(e.child!==null){for(t=e.child,n=Kr(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Kr(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function SC(t,e,n){switch(e.tag){case 3:Ob(e),Ji();break;case 5:ob(e);break;case 1:_t(e.type)&&Ru(e);break;case 4:zp(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;ye(Nu,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(ye(Ee,Ee.current&1),e.flags|=128,null):n&e.child.childLanes?Nb(t,e,n):(ye(Ee,Ee.current&1),t=sr(t,e,n),t!==null?t.sibling:null);ye(Ee,Ee.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return Lb(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ye(Ee,Ee.current),r)break;return null;case 22:case 23:return e.lanes=0,Rb(t,e,n)}return sr(t,e,n)}var Ib,Qh,Db,Mb;Ib=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qh=function(){};Db=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,_s(On.current);var i=null;switch(n){case"input":s=wh(t,s),r=wh(t,r),i=[];break;case"select":s=Pe({},s,{value:void 0}),r=Pe({},r,{value:void 0}),i=[];break;case"textarea":s=_h(t,s),r=_h(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=Pu)}kh(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(aa.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(aa.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&xe("scroll",t),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};Mb=function(t,e,n,r){n!==r&&(e.flags|=4)};function Ro(t,e){if(!Se)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function tt(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function kC(t,e,n){var r=e.pendingProps;switch(Dp(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(e),null;case 1:return _t(e.type)&&Au(),tt(e),null;case 3:return r=e.stateNode,Zi(),be(bt),be(ot),Hp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(El(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,cn!==null&&(of(cn),cn=null))),Qh(t,e),tt(e),null;case 5:Wp(e);var s=_s(wa.current);if(n=e.type,t!==null&&e.stateNode!=null)Db(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(O(166));return tt(e),null}if(t=_s(On.current),El(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[An]=e,r[ya]=i,t=(e.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<Fo.length;s++)xe(Fo[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":bg(r,i),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},xe("invalid",r);break;case"textarea":Sg(r,i),xe("invalid",r)}kh(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];
vendor: 32,436 bytes, line 40
40o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&kl(r.textContent,a,t),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&kl(r.textContent,a,t),s=["children",""+a]):aa.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&xe("scroll",r)}switch(n){case"input":gl(r),_g(r,i,!0);break;case"textarea":gl(r),kg(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Pu)}r=s,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=dx(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[An]=e,t[ya]=r,Ib(t,e,!1,!1),e.stateNode=t;e:{switch(o=Eh(n,r),n){case"dialog":xe("cancel",t),xe("close",t),s=r;break;case"iframe":case"object":case"embed":xe("load",t),s=r;break;case"video":case"audio":for(s=0;s<Fo.length;s++)xe(Fo[s],t);s=r;break;case"source":xe("error",t),s=r;break;case"img":case"image":case"link":xe("error",t),xe("load",t),s=r;break;case"details":xe("toggle",t),s=r;break;case"input":bg(t,r),s=wh(t,r),xe("invalid",t);break;case"option":s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=Pe({},r,{value:void 0}),xe("invalid",t);break;case"textarea":Sg(t,r),s=_h(t,r),xe("invalid",t);break;default:s=r}kh(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?px(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&hx(t,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&la(t,l):typeof l=="number"&&la(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(aa.hasOwnProperty(i)?l!=null&&i==="onScroll"&&xe("scroll",t):l!=null&&bp(t,i,l,o))}switch(n){case"input":gl(t),_g(t,r,!1);break;case"textarea":gl(t),kg(t);break;case"option":r.value!=null&&t.setAttribute("value",""+Jr(r.value));break;case"select":t.multiple=!!r.multiple,i=r.value,i!=null?Ai(t,!!r.multiple,i,!1):r.defaultValue!=null&&Ai(t,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Pu)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return tt(e),null;case 6:if(t&&e.stateNode!=null)Mb(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(O(166));if(n=_s(wa.current),_s(On.current),El(e)){if(r=e.stateNode,n=e.memoizedProps,r[An]=e,(i=r.nodeValue!==n)&&(t=Pt,t!==null))switch(t.tag){case 3:kl(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&kl(r.nodeValue,n,(t.mode&1)!==0)}i&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[An]=e,e.stateNode=r}return tt(e),null;case 13:if(be(Ee),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Se&&Ct!==null&&e.mode&1&&!(e.flags&128))tb(),Ji(),e.flags|=98560,i=!1;else if(i=El(e),r!==null&&r.dehydrated!==null){if(t===null){if(!i)throw Error(O(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[An]=e}else Ji(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;tt(e),i=!1}else cn!==null&&(of(cn),cn=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Ee.current&1?Be===0&&(Be=3):rm())),e.updateQueue!==null&&(e.flags|=4),tt(e),null);case 4:return Zi(),Qh(t,e),t===null&&ma(e.stateNode.containerInfo),tt(e),null;case 10:return Up(e.type._context),tt(e),null;case 17:return _t(e.type)&&Au(),tt(e),null;case 19:if(be(Ee),i=e.memoizedState,i===null)return tt(e),null;if(r=(e.flags&128)!==0,o=i.rendering,o===null)if(r)Ro(i,!1);else{if(Be!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Du(t),o!==null){for(e.flags|=128,Ro(i,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)i=n,t=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,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,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return ye(Ee,Ee.current&1|2),e.child}t=t.sibling}i.tail!==null&&Ne()>eo&&(e.flags|=128,r=!0,Ro(i,!1),e.lanes=4194304)}else{if(!r)if(t=Du(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Ro(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Se)return tt(e),null}else 2*Ne()-i.renderingStartTime>eo&&n!==1073741824&&(e.flags|=128,r=!0,Ro(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(n=i.last,n!==null?n.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ne(),e.sibling=null,n=Ee.current,ye(Ee,r?n&1|2:n&1),e):(tt(e),null);case 22:case 23:return nm(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?kt&1073741824&&(tt(e),e.subtreeFlags&6&&(e.flags|=8192)):tt(e),null;case 24:return null;case 25:return null}throw Error(O(156,e.tag))}function EC(t,e){switch(Dp(e),e.tag){case 1:return _t(e.type)&&Au(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Zi(),be(bt),be(ot),Hp(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Wp(e),null;case 13:if(be(Ee),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(O(340));Ji()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return be(Ee),null;case 4:return Zi(),null;case 10:return Up(e.type._context),null;case 22:case 23:return nm(),null;case 24:return null;default:return null}}var Pl=!1,st=!1,TC=typeof WeakSet=="function"?WeakSet:Set,U=null;function xi(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Oe(t,e,r)}else n.current=null}function Zh(t,e,n){try{n()}catch(r){Oe(t,e,r)}}var fy=!1;function CC(t,e){if(Ih=Eu,t=Bx(),Lp(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.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,a=-1,l=-1,u=0,c=0,d=t,f=null;t:for(;;){for(var h;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++u===s&&(a=o),f===i&&++c===r&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dh={focusedElem:t,selectionRange:n},Eu=!1,U=e;U!==null;)if(e=U,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,U=t;else for(;U!==null;){e=U;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,x=g.memoizedState,y=e.stateNode,v=y.getSnapshotBeforeUpdate(e.elementType===e.type?m:rn(e.type,m),x);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=e.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(O(163))}}catch(_){Oe(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,U=t;break}U=e.return}return g=fy,fy=!1,g}function Qo(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Zh(e,n,i)}s=s.next}while(s!==r)}}function Pc(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Xh(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function $b(t){var e=t.alternate;e!==null&&(t.alternate=null,$b(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[An],delete e[ya],delete e[Fh],delete e[uC],delete e[cC])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Fb(t){return t.tag===5||t.tag===3||t.tag===4}function py(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Fb(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ef(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Pu));else if(r!==4&&(t=t.child,t!==null))for(ef(t,e,n),t=t.sibling;t!==null;)ef(t,e,n),t=t.sibling}function tf(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(tf(t,e,n),t=t.sibling;t!==null;)tf(t,e,n),t=t.sibling}var Ge=null,un=!1;function yr(t,e,n){for(n=n.child;n!==null;)Ub(t,e,n),n=n.sibling}function Ub(t,e,n){if(jn&&typeof jn.onCommitFiberUnmount=="function")try{jn.onCommitFiberUnmount(xc,n)}catch{}switch(n.tag){case 5:st||xi(n,e);case 6:var r=Ge,s=un;Ge=null,yr(t,e,n),Ge=r,un=s,Ge!==null&&(un?(t=Ge,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&(un?(t=Ge,n=n.stateNode,t.nodeType===8?bd(t.parentNode,n):t.nodeType===1&&bd(t,n),ha(t)):bd(Ge,n.stateNode));break;case 4:r=Ge,s=un,Ge=n.stateNode.containerInfo,un=!0,yr(t,e,n),Ge=r,un=s;break;case 0:case 11:case 14:case 15:if(!st&&(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)&&Zh(n,e,o),s=s.next}while(s!==r)}yr(t,e,n);break;case 1:if(!st&&(xi(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Oe(n,e,a)}yr(t,e,n);break;case 21:yr(t,e,n);break;case 22:n.mode&1?(st=(r=st)||n.memoizedState!==null,yr(t,e,n),st=r):yr(t,e,n);break;default:yr(t,e,n)}}function my(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new TC),e.forEach(function(r){var s=DC.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Jt(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ge=a.stateNode,un=!1;break e;case 3:Ge=a.stateNode.containerInfo,un=!0;break e;case 4:Ge=a.stateNode.containerInfo,un=!0;break e}a=a.return}if(Ge===null)throw Error(O(160));Ub(i,o,s),Ge=null,un=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){Oe(s,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Vb(e,t),e=e.sibling}function Vb(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Jt(e,t),xn(t),r&4){try{Qo(3,t,t.return),Pc(3,t)}catch(m){Oe(t,t.return,m)}try{Qo(5,t,t.return)}catch(m){Oe(t,t.return,m)}}break;case 1:Jt(e,t),xn(t),r&512&&n!==null&&xi(n,n.return);break;case 5:if(Jt(e,t),xn(t),r&512&&n!==null&&xi(n,n.return),t.flags&32){var s=t.stateNode;try{la(s,"")}catch(m){Oe(t,t.return,m)}}if(r&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=n!==null?n.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&ux(s,i),Eh(a,o);var u=Eh(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?px(s,d):c==="dangerouslySetInnerHTML"?hx(s,d):c==="children"?la(s,d):bp(s,c,d,u)}switch(a){case"input":xh(s,i);break;case"textarea":cx(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Ai(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?Ai(s,!!i.multiple,i.defaultValue,!0):Ai(s,!!i.multiple,i.multiple?[]:"",!1))}s[ya]=i}catch(m){Oe(t,t.return,m)}}break;case 6:if(Jt(e,t),xn(t),r&4){if(t.stateNode===null)throw Error(O(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(m){Oe(t,t.return,m)}}break;case 3:if(Jt(e,t),xn(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ha(e.containerInfo)}catch(m){Oe(t,t.return,m)}break;case 4:Jt(e,t),xn(t);break;case 13:Jt(e,t),xn(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(em=Ne())),r&4&&my(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(st=(u=st)||c,Jt(e,t),st=u):Jt(e,t),xn(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(U=t,c=t.child;c!==null;){for(d=U=c;U!==null;){switch(f=U,h=f.child,f.tag){case 0:case 11:case 14:case 15:Qo(4,f,f.return);break;case 1:xi(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,g.props=e.memoizedProps,g.state=e.memoizedState,g.componentWillUnmount()}catch(m){Oe(r,n,m)}}break;case 5:xi(f,f.return);break;case 22:if(f.memoizedState!==null){yy(d);continue}}h!==null?(h.return=f,U=h):yy(d)}c=c.sibling}e:for(c=null,d=t;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=fx("display",o))}catch(m){Oe(t,t.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Oe(t,t.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Jt(e,t),xn(t),r&4&&my(t);break;case 21:break;default:Jt(e,t),xn(t)}}function xn(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Fb(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(la(s,""),r.flags&=-33);var i=py(t);tf(t,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=py(t);ef(t,a,o);break;default:throw Error(O(161))}}catch(l){Oe(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function PC(t,e,n){U=t,Bb(t)}function Bb(t,e,n){for(var r=(t.mode&1)!==0;U!==null;){var s=U,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Pl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||st;a=Pl;var u=st;if(Pl=o,(st=l)&&!u)for(U=s;U!==null;)o=U,l=o.child,o.tag===22&&o.memoizedState!==null?vy(s):l!==null?(l.return=o,U=l):vy(s);for(;i!==null;)U=i,Bb(i),i=i.sibling;U=s,Pl=a,st=u}gy(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,U=i):gy(t)}}function gy(t){for(;U!==null;){var e=U;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:st||Pc(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!st)if(n===null)r.componentDidMount();else{var s=e.elementType===e.type?n.memoizedProps:rn(e.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&ey(e,i,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}ey(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ha(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}st||e.flags&512&&Xh(e)}catch(f){Oe(e,e.return,f)}}if(e===t){U=null;break}if(n=e.sibling,n!==null){n.return=e.return,U=n;break}U=e.return}}function yy(t){for(;U!==null;){var e=U;if(e===t){U=null;break}var n=e.sibling;if(n!==null){n.return=e.return,U=n;break}U=e.return}}function vy(t){for(;U!==null;){var e=U;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Pc(4,e)}catch(l){Oe(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var s=e.return;try{r.componentDidMount()}catch(l){Oe(e,s,l)}}var i=e.return;try{Xh(e)}catch(l){Oe(e,i,l)}break;case 5:var o=e.return;try{Xh(e)}catch(l){Oe(e,o,l)}}}catch(l){Oe(e,e.return,l)}if(e===t){U=null;break}var a=e.sibling;if(a!==null){a.return=e.return,U=a;break}U=e.return}}var AC=Math.ceil,Fu=ur.ReactCurrentDispatcher,Zp=ur.ReactCurrentOwner,Vt=ur.ReactCurrentBatchConfig,le=0,qe=null,Me=null,Je=0,kt=0,bi=as(0),Be=0,Sa=null,Us=0,Ac=0,Xp=0,Zo=null,vt=null,em=0,eo=1/0,Wn=null,Uu=!1,nf=null,Hr=null,Al=!1,Dr=null,Vu=0,Xo=0,rf=null,ou=-1,au=0;function ht(){return le&6?Ne():ou!==-1?ou:ou=Ne()}function qr(t){return t.mode&1?le&2&&Je!==0?Je&-Je:hC.transition!==null?(au===0&&(au=Tx()),au):(t=fe,t!==0||(t=window.event,t=t===void 0?16:Nx(t.type)),t):1}function pn(t,e,n,r){if(50<Xo)throw Xo=0,rf=null,Error(O(185));Qa(t,n,r),(!(le&2)||t!==qe)&&(t===qe&&(!(le&2)&&(Ac|=n),Be===4&&Cr(t,Je)),St(t,r),n===1&&le===0&&!(e.mode&1)&&(eo=Ne()+500,Ec&&ls()))}function St(t,e){var n=t.callbackNode;hT(t,e);var r=ku(t,t===qe?Je:0);if(r===0)n!==null&&Cg(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Cg(n),e===1)t.tag===0?dC(wy.bind(null,t)):Zx(wy.bind(null,t)),aC(function(){!(le&6)&&ls()}),n=null;else{switch(Cx(r)){case 1:n=Tp;break;case 4:n=kx;break;case 16:n=Su;break;case 536870912:n=Ex;break;default:n=Su}n=Jb(n,zb.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function zb(t,e){if(ou=-1,au=0,le&6)throw Error(O(327));var n=t.callbackNode;if(Li()&&t.callbackNode!==n)return null;var r=ku(t,t===qe?Je:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=Bu(t,r);else{e=r;var s=le;le|=2;var i=Hb();(qe!==t||Je!==e)&&(Wn=null,eo=Ne()+500,Ls(t,e));do try{OC();break}catch(a){Wb(t,a)}while(!0);Fp(),Fu.current=i,le=s,Me!==null?e=0:(qe=null,Je=0,e=Be)}if(e!==0){if(e===2&&(s=Rh(t),s!==0&&(r=s,e=sf(t,s))),e===1)throw n=Sa,Ls(t,0),Cr(t,r),St(t,Ne()),n;if(e===6)Cr(t,r);else{if(s=t.current.alternate,!(r&30)&&!RC(s)&&(e=Bu(t,r),e===2&&(i=Rh(t),i!==0&&(r=i,e=sf(t,i))),e===1))throw n=Sa,Ls(t,0),Cr(t,r),St(t,Ne()),n;switch(t.finishedWork=s,t.finishedLanes=r,e){case 0:case 1:throw Error(O(345));case 2:ys(t,vt,Wn);break;case 3:if(Cr(t,r),(r&130023424)===r&&(e=em+500-Ne(),10<e)){if(ku(t,0)!==0)break;if(s=t.suspendedLanes,(s&r)!==r){ht(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=$h(ys.bind(null,t,vt,Wn),e);break}ys(t,vt,Wn);break;case 4:if(Cr(t,r),(r&4194240)===r)break;for(e=t.eventTimes,s=-1;0<r;){var o=31-fn(r);i=1<<o,o=e[o],o>s&&(s=o),r&=~i}if(r=s,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AC(r/1960))-r,10<r){t.timeoutHandle=$h(ys.bind(null,t,vt,Wn),r);break}ys(t,vt,Wn);break;case 5:ys(t,vt,Wn);break;default:throw Error(O(329))}}}return St(t,Ne()),t.callbackNode===n?zb.bind(null,t):null}function sf(t,e){var n=Zo;return t.current.memoizedState.isDehydrated&&(Ls(t,e).flags|=256),t=Bu(t,e),t!==2&&(e=vt,vt=n,e!==null&&of(e)),t}function of(t){vt===null?vt=t:vt.push.apply(vt,t)}function RC(t){for(var e=t;;){if(e.flags&16384){var n=e.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(!gn(i(),s))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Cr(t,e){for(e&=~Xp,e&=~Ac,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-fn(e),r=1<<n;t[n]=-1,e&=~r}}function wy(t){if(le&6)throw Error(O(327));Li();var e=ku(t,0);if(!(e&1))return St(t,Ne()),null;var n=Bu(t,e);if(t.tag!==0&&n===2){var r=Rh(t);r!==0&&(e=r,n=sf(t,r))}if(n===1)throw n=Sa,Ls(t,0),Cr(t,e),St(t,Ne()),n;if(n===6)throw Error(O(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,ys(t,vt,Wn),St(t,Ne()),null}function tm(t,e){var n=le;le|=1;try{return t(e)}finally{le=n,le===0&&(eo=Ne()+500,Ec&&ls())}}function Vs(t){Dr!==null&&Dr.tag===0&&!(le&6)&&Li();var e=le;le|=1;var n=Vt.transition,r=fe;try{if(Vt.transition=null,fe=1,t)return t()}finally{fe=r,Vt.transition=n,le=e,!(le&6)&&ls()}}function nm(){kt=bi.current,be(bi)}function Ls(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,oC(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(Dp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Au();break;case 3:Zi(),be(bt),be(ot),Hp();break;case 5:Wp(r);break;case 4:Zi();break;case 13:be(Ee);break;case 19:be(Ee);break;case 10:Up(r.type._context);break;case 22:case 23:nm()}n=n.return}if(qe=t,Me=t=Kr(t.current,null),Je=kt=e,Be=0,Sa=null,Xp=Ac=Us=0,vt=Zo=null,bs!==null){for(e=0;e<bs.length;e++)if(n=bs[e],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}bs=null}return t}function Wb(t,e){do{var n=Me;try{if(Fp(),ru.current=$u,Mu){for(var r=Ce.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Mu=!1}if(Fs=0,We=Ue=Ce=null,Jo=!1,xa=0,Zp.current=null,n===null||n.return===null){Be=1,Sa=e,Me=null;break}e:{var i=t,o=n.return,a=n,l=e;if(e=Je,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=oy(o);if(h!==null){h.flags&=-257,ay(h,o,a,i,e),h.mode&1&&iy(i,u,e),e=h,l=u;var g=e.updateQueue;if(g===null){var m=new Set;m.add(l),e.updateQueue=m}else g.add(l);break e}else{if(!(e&1)){iy(i,u,e),rm();break e}l=Error(O(426))}}else if(Se&&a.mode&1){var x=oy(o);if(x!==null){!(x.flags&65536)&&(x.flags|=256),ay(x,o,a,i,e),Mp(Xi(l,a));break e}}i=l=Xi(l,a),Be!==4&&(Be=2),Zo===null?Zo=[i]:Zo.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var y=Cb(i,l,e);Xg(i,y);break e;case 1:a=l;var v=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Hr===null||!Hr.has(w)))){i.flags|=65536,e&=-e,i.lanes|=e;var _=Pb(i,a,e);Xg(i,_);break e}}i=i.return}while(i!==null)}Kb(n)}catch(S){e=S,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function Hb(){var t=Fu.current;return Fu.current=$u,t===null?$u:t}function rm(){(Be===0||Be===3||Be===2)&&(Be=4),qe===null||!(Us&268435455)&&!(Ac&268435455)||Cr(qe,Je)}function Bu(t,e){var n=le;le|=2;var r=Hb();(qe!==t||Je!==e)&&(Wn=null,Ls(t,e));do try{jC();break}catch(s){Wb(t,s)}while(!0);if(Fp(),le=n,Fu.current=r,Me!==null)throw Error(O(261));return qe=null,Je=0,Be}function jC(){for(;Me!==null;)qb(Me)}function OC(){for(;Me!==null&&!rT();)qb(Me)}function qb(t){var e=Yb(t.alternate,t,kt);t.memoizedProps=t.pendingProps,e===null?Kb(t):Me=e,Zp.current=null}function Kb(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=EC(n,e),n!==null){n.flags&=32767,Me=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Be=6,Me=null;return}}else if(n=kC(n,e,kt),n!==null){Me=n;return}if(e=e.sibling,e!==null){Me=e;return}Me=e=t}while(e!==null);Be===0&&(Be=5)}function ys(t,e,n){var r=fe,s=Vt.transition;try{Vt.transition=null,fe=1,NC(t,e,n,r)}finally{Vt.transition=s,fe=r}return null}function NC(t,e,n,r){do Li();while(Dr!==null);if(le&6)throw Error(O(327));n=t.finishedWork;var s=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(O(177));t.callbackNode=null,t.callbackPriority=0;var i=n.lanes|n.childLanes;if(fT(t,i),t===qe&&(Me=qe=null,Je=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Al||(Al=!0,Jb(Su,function(){return Li(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Vt.transition,Vt.transition=null;var o=fe;fe=1;var a=le;le|=4,Zp.current=null,CC(t,n),Vb(n,t),XT(Dh),Eu=!!Ih,Dh=Ih=null,t.current=n,PC(n),sT(),le=a,fe=o,Vt.transition=i}else t.current=n;if(Al&&(Al=!1,Dr=t,Vu=s),i=t.pendingLanes,i===0&&(Hr=null),aT(n.stateNode),St(t,Ne()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)s=e[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Uu)throw Uu=!1,t=nf,nf=null,t;return Vu&1&&t.tag!==0&&Li(),i=t.pendingLanes,i&1?t===rf?Xo++:(Xo=0,rf=t):Xo=0,ls(),null}function Li(){if(Dr!==null){var t=Cx(Vu),e=Vt.transition,n=fe;try{if(Vt.transition=null,fe=16>t?16:t,Dr===null)var r=!1;else{if(t=Dr,Dr=null,Vu=0,le&6)throw Error(O(331));var s=le;for(le|=4,U=t.current;U!==null;){var i=U,o=i.child;if(U.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(U=u;U!==null;){var c=U;switch(c.tag){case 0:case 11:case 15:Qo(8,c,i)}var d=c.child;if(d!==null)d.return=c,U=d;else for(;U!==null;){c=U;var f=c.sibling,h=c.return;if($b(c),c===u){U=null;break}if(f!==null){f.return=h,U=f;break}U=h}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}U=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,U=o;else e:for(;U!==null;){if(i=U,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Qo(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,U=y;break e}U=i.return}}var v=t.current;for(U=v;U!==null;){o=U;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,U=w;else e:for(o=v;U!==null;){if(a=U,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Pc(9,a)}}catch(S){Oe(a,a.return,S)}if(a===o){U=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,U=_;break e}U=a.return}}if(le=s,ls(),jn&&typeof jn.onPostCommitFiberRoot=="function")try{jn.onPostCommitFiberRoot(xc,t)}catch{}r=!0}return r}finally{fe=n,Vt.transition=e}}return!1}function xy(t,e,n){e=Xi(n,e),e=Cb(t,e,1),t=Wr(t,e,1),e=ht(),t!==null&&(Qa(t,1,e),St(t,e))}function Oe(t,e,n){if(t.tag===3)xy(t,t,n);else for(;e!==null;){if(e.tag===3){xy(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Hr===null||!Hr.has(r))){t=Xi(n,t),t=Pb(e,t,1),e=Wr(e,t,1),t=ht(),e!==null&&(Qa(e,1,t),St(e,t));break}}e=e.return}}function LC(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=ht(),t.pingedLanes|=t.suspendedLanes&n,qe===t&&(Je&n)===n&&(Be===4||Be===3&&(Je&130023424)===Je&&500>Ne()-em?Ls(t,0):Xp|=n),St(t,e)}function Gb(t,e){e===0&&(t.mode&1?(e=wl,wl<<=1,!(wl&130023424)&&(wl=4194304)):e=1);var n=ht();t=rr(t,e),t!==null&&(Qa(t,e,n),St(t,n))}function IC(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Gb(t,n)}function DC(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(e),Gb(t,n)}var Yb;Yb=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||bt.current)xt=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return xt=!1,SC(t,e,n);xt=!!(t.flags&131072)}else xt=!1,Se&&e.flags&1048576&&Xx(e,Ou,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;iu(t,e),t=e.pendingProps;var s=Yi(e,ot.current);Ni(e,n),s=Kp(null,e,r,t,s,n);var i=Gp();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,_t(r)?(i=!0,Ru(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Bp(e),s.updater=Cc,e.stateNode=s,s._reactInternals=e,Hh(e,r,t,n),e=Gh(null,e,r,!0,i,n)):(e.tag=0,Se&&i&&Ip(e),lt(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(iu(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=$C(r),t=rn(r,t),s){case 0:e=Kh(null,e,r,t,n);break e;case 1:e=cy(null,e,r,t,n);break e;case 11:e=ly(null,e,r,t,n);break e;case 14:e=uy(null,e,r,rn(r.type,t),n);break e}throw Error(O(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:rn(r,s),Kh(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:rn(r,s),cy(t,e,r,s,n);case 3:e:{if(Ob(e),t===null)throw Error(O(387));r=e.pendingProps,i=e.memoizedState,s=i.element,ib(t,e),Iu(e,r,null,n);var o=e.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Xi(Error(O(423)),e),e=dy(t,e,r,n,s);break e}else if(r!==s){s=Xi(Error(O(424)),e),e=dy(t,e,r,n,s);break e}else for(Ct=zr(e.stateNode.containerInfo.firstChild),Pt=e,Se=!0,cn=null,n=rb(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ji(),r===s){e=sr(t,e,n);break e}lt(t,e,r,n)}e=e.child}return e;case 5:return ob(e),t===null&&Bh(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,Mh(r,s)?o=null:i!==null&&Mh(r,i)&&(e.flags|=32),jb(t,e),lt(t,e,o,n),e.child;case 6:return t===null&&Bh(e),null;case 13:return Nb(t,e,n);case 4:return zp(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Qi(e,null,r,n):lt(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:rn(r,s),ly(t,e,r,s,n);case 7:return lt(t,e,e.pendingProps,n),e.child;case 8:return lt(t,e,e.pendingProps.children,n),e.child;case 12:return lt(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,ye(Nu,r._currentValue),r._currentValue=o,i!==null)if(gn(i.value,o)){if(i.children===s.children&&!bt.current){e=sr(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Xn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),zh(i.return,n,e),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(O(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),zh(o,n,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}lt(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Ni(e,n),s=Wt(s),r=r(s),e.flags|=1,lt(t,e,r,n),e.child;case 14:return r=e.type,s=rn(r,e.pendingProps),s=rn(r.type,s),uy(t,e,r,s,n);case 15:return Ab(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:rn(r,s),iu(t,e),e.tag=1,_t(r)?(t=!0,Ru(e)):t=!1,Ni(e,n),Tb(e,r,s),Hh(e,r,s,n),Gh(null,e,r,!0,t,n);case 19:return Lb(t,e,n);case 22:return Rb(t,e,n)}throw Error(O(156,e.tag))};function Jb(t,e){return Sx(t,e)}function MC(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 Ft(t,e,n,r){return new MC(t,e,n,r)}function sm(t){return t=t.prototype,!(!t||!t.isReactComponent)}function $C(t){if(typeof t=="function")return sm(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Sp)return 11;if(t===kp)return 14}return 2}function Kr(t,e){var n=t.alternate;return n===null?(n=Ft(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deleti
vendor: 5,099 bytes, line 40
40ons=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function lu(t,e,n,r,s,i){var o=2;if(r=t,typeof t=="function")sm(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case di:return Is(n.children,s,i,e);case _p:o=8,s|=8;break;case mh:return t=Ft(12,n,e,s|2),t.elementType=mh,t.lanes=i,t;case gh:return t=Ft(13,n,e,s),t.elementType=gh,t.lanes=i,t;case yh:return t=Ft(19,n,e,s),t.elementType=yh,t.lanes=i,t;case ox:return Rc(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case sx:o=10;break e;case ix:o=9;break e;case Sp:o=11;break e;case kp:o=14;break e;case Sr:o=16,r=null;break e}throw Error(O(130,t==null?t:typeof t,""))}return e=Ft(o,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Is(t,e,n,r){return t=Ft(7,t,r,e),t.lanes=n,t}function Rc(t,e,n,r){return t=Ft(22,t,r,e),t.elementType=ox,t.lanes=n,t.stateNode={isHidden:!1},t}function Ad(t,e,n){return t=Ft(6,t,null,e),t.lanes=n,t}function Rd(t,e,n){return e=Ft(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function FC(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cd(0),this.expirationTimes=cd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cd(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function im(t,e,n,r,s,i,o,a,l){return t=new FC(t,e,n,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Ft(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bp(i),t}function UC(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ci,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function Qb(t){if(!t)return Qr;t=t._reactInternals;e:{if(qs(t)!==t||t.tag!==1)throw Error(O(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(_t(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(O(171))}if(t.tag===1){var n=t.type;if(_t(n))return Qx(t,n,e)}return e}function Zb(t,e,n,r,s,i,o,a,l){return t=im(n,r,!0,t,s,i,o,a,l),t.context=Qb(null),n=t.current,r=ht(),s=qr(n),i=Xn(r,s),i.callback=e??null,Wr(n,i,s),t.current.lanes=s,Qa(t,s,r),St(t,r),t}function jc(t,e,n,r){var s=e.current,i=ht(),o=qr(s);return n=Qb(n),e.context===null?e.context=n:e.pendingContext=n,e=Xn(i,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=Wr(s,e,o),t!==null&&(pn(t,s,o,i),nu(t,s,o)),o}function zu(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function by(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function om(t,e){by(t,e),(t=t.alternate)&&by(t,e)}function VC(){return null}var Xb=typeof reportError=="function"?reportError:function(t){console.error(t)};function am(t){this._internalRoot=t}Oc.prototype.render=am.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(O(409));jc(t,e,null,null)};Oc.prototype.unmount=am.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Vs(function(){jc(null,t,null,null)}),e[nr]=null}};function Oc(t){this._internalRoot=t}Oc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Rx();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Tr.length&&e!==0&&e<Tr[n].priority;n++);Tr.splice(n,0,t),n===0&&Ox(t)}};function lm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Nc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function _y(){}function BC(t,e,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=zu(o);i.call(u)}}var o=Zb(e,r,t,0,null,!1,!1,"",_y);return t._reactRootContainer=o,t[nr]=o.current,ma(t.nodeType===8?t.parentNode:t),Vs(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=zu(l);a.call(u)}}var l=im(t,0,!1,null,null,!1,!1,"",_y);return t._reactRootContainer=l,t[nr]=l.current,ma(t.nodeType===8?t.parentNode:t),Vs(function(){jc(e,l,n,r)}),l}function Lc(t,e,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=zu(o);a.call(l)}}jc(e,o,t,s)}else o=BC(n,e,t,s,r);return zu(o)}Px=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=$o(e.pendingLanes);
vendor: 4,598 bytes, line 40
40n!==0&&(Cp(e,n|1),St(e,Ne()),!(le&6)&&(eo=Ne()+500,ls()))}break;case 13:Vs(function(){var r=rr(t,1);if(r!==null){var s=ht();pn(r,t,1,s)}}),om(t,1)}};Pp=function(t){if(t.tag===13){var e=rr(t,134217728);if(e!==null){var n=ht();pn(e,t,134217728,n)}om(t,134217728)}};Ax=function(t){if(t.tag===13){var e=qr(t),n=rr(t,e);if(n!==null){var r=ht();pn(n,t,e,r)}om(t,e)}};Rx=function(){return fe};jx=function(t,e){var n=fe;try{return fe=t,e()}finally{fe=n}};Ch=function(t,e,n){switch(e){case"input":if(xh(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var s=kc(r);if(!s)throw Error(O(90));lx(r),xh(r,s)}}}break;case"textarea":cx(t,n);break;case"select":e=n.value,e!=null&&Ai(t,!!n.multiple,e,!1)}};yx=tm;vx=Vs;var zC={usingClientEntryPoint:!1,Events:[Xa,mi,kc,mx,gx,tm]},jo={findFiberByHostInstance:xs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WC={bundleType:jo.bundleType,version:jo.version,rendererPackageName:jo.rendererPackageName,rendererConfig:jo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ur.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=bx(t),t===null?null:t.stateNode},findFiberByHostInstance:jo.findFiberByHostInstance||VC,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 Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{xc=Rl.inject(WC),jn=Rl}catch{}}Ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zC;Ot.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lm(e))throw Error(O(200));return UC(t,e,null,n)};Ot.createRoot=function(t,e){if(!lm(t))throw Error(O(299));var n=!1,r="",s=Xb;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=im(t,1,!1,null,null,n,!1,r,s),t[nr]=e.current,ma(t.nodeType===8?t.parentNode:t),new am(e)};Ot.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(O(188)):(t=Object.keys(t).join(","),Error(O(268,t)));return t=bx(e),t=t===null?null:t.stateNode,t};Ot.flushSync=function(t){return Vs(t)};Ot.hydrate=function(t,e,n){if(!Nc(e))throw Error(O(200));return Lc(null,t,e,!0,n)};Ot.hydrateRoot=function(t,e,n){if(!lm(t))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Xb;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=Zb(e,null,t,1,n??null,s,!1,i,o),t[nr]=e.current,ma(t),r)for(t=0;t<r.length;t++)n=r[t],s=n._getVersion,s=s(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,s]:e.mutableSourceEagerHydrationData.push(n,s);return new Oc(e)};Ot.render=function(t,e,n){if(!Nc(e))throw Error(O(200));return Lc(null,t,e,!1,n)};Ot.unmountComponentAtNode=function(t){if(!Nc(t))throw Error(O(40));return t._reactRootContainer?(Vs(function(){Lc(null,null,t,!1,function(){t._reactRootContainer=null,t[nr]=null})}),!0):!1};Ot.unstable_batchedUpdates=tm;Ot.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Nc(n))throw Error(O(200));if(t==null||t._reactInternals===void 0)throw Error(O(38));return Lc(t,e,n,!1,r)};Ot.version="18.3.1-next-f1338f8080-20240426";function e_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e_)}catch(t){console.error(t)}}e_(),ex.exports=Ot;var tl=ex.exports;const t_=Vw(tl);var n_,Sy=tl;n_=Sy.createRoot,Sy.hydrateRoot;const HC=1,qC=1e6;let jd=0;function KC(){return jd=(jd+1)%Number.MAX_SAFE_INTEGER,jd.toString()}const Od=new Map,ky=t=>{if(Od.has(t))return;const e=setTimeout(()=>{Od.delete(t),ea({type:"REMOVE_TOAST",toastId:t})},qC);Od.set(t,e)},GC=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,HC)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;
40return n?ky(n):t.toasts.forEach(r=>{ky(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},uu=[];let cu={toasts:[]};function ea(t){cu=GC(cu,t),uu.forEach(e=>{e(cu)})}function r_({...t}){const e=KC(),n=s=>ea({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>ea({type:"DISMISS_TOAST",toastId:e});return ea({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function YC(){const[t,e]=b.useState(cu);return b.useEffect(()=>(uu.push(e),()=>{const n=uu.indexOf(e);n>-1&&uu.splice(n,1)}),[t]),{...t,toast:r_,dismiss:n=>ea({type:"DISMISS_TOAST",toastId:n})}}function Ve(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Ey(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function s_(...t){return e=>{let n=!1;const r=t.map(s=>{const i=Ey(s,e);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():Ey(t[s],null)}}}}function yn(...t){return b.useCallback(s_(...t),t)}function Ic(t,e=[]){let n=[];function r(i,o){const a=b.createContext(o),l=n.length;n=[...n,o];const u=d=>{var y;const{scope:f,children:h,...g}=d,m=((y=f==null?void 0:f[t])==null?void 0:y[l])||a,x=b.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:x,children:h})};u.displayName=i+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,g=b.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const s=()=>{const i=n.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[r,JC(s,...e)]}function JC(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}function Wu(t){const e=ZC(t),n=b.forwardRef((r,s)=>{const{children:i,...o}=r,a=b.Children.toArray(i),l=a.find(eP);if(l){const u=l.props.children,c=a.map(d=>d===l?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:d);return p.jsx(e,{...o,ref:s,children:b.isValidElement(u)?b.cloneElement(u,void 0,c):null})}return p.jsx(e,{...o,ref:s,children:i})});return n.displayName=`${t}.Slot`,n}var QC=Wu("Slot");function ZC(t){const e=b.forwardRef((n,r)=>{const{children:s,...i}=n;if(b.isValidElement(s)){const o=nP(s),a=tP(i,s.props);return s.type!==b.Fragment&&(a.ref=r?s_(r,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var i_=Symbol("radix.slottable");function XC(t){const e=({children:n})=>p.jsx(p.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=i_,e}function eP(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===i_}function tP(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function nP(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function rP(t){const e=t+"CollectionProvider",[n,r]=Ic(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:x,children:y}=m,v=L.useRef(null),w=L.useRef(new Map).current;return p.jsx(s,{scope:x,itemMap:w,collectionRef:v,children:y})};o.displayName=e;const a=t+"CollectionSlot",l=Wu(a),u=L.forwardRef((m,x)=>{const{scope:y,children:v}=m,w=i(a,y),_=yn(x,w.collectionRef);return p.jsx(l,{ref:_,children:v})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=Wu(c),h=L.forwardRef((m,x)=>{const{scope:y,children:v,...w}=m,_=L.useRef(null),S=yn(x,_),k=i(c,y);return L.useEffect(()=>(k.itemMap.set(_,{ref:_,...w}),()=>
vendor: 5,309 bytes, line 40
40void k.itemMap.delete(_))),p.jsx(f,{[d]:"",ref:S,children:v})});h.displayName=c;function g(m){const x=i(t+"CollectionConsumer",m);return L.useCallback(()=>{const v=x.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((k,E)=>w.indexOf(k.ref.current)-w.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:h},g,r]}var sP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mt=sP.reduce((t,e)=>{const n=Wu(`Primitive.${e}`),r=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function o_(t,e){t&&tl.flushSync(()=>t.dispatchEvent(e))}function Zr(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function iP(t,e=globalThis==null?void 0:globalThis.document){const n=Zr(t);b.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var oP="DismissableLayer",af="dismissableLayer.update",aP="dismissableLayer.pointerDownOutside",lP="dismissableLayer.focusOutside",Ty,a_=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),um=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,u=b.useContext(a_),[c,d]=b.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),g=yn(e,E=>d(E)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(x),v=c?m.indexOf(c):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,_=v>=y,S=cP(E=>{const T=E.target,A=[...u.branches].some(j=>j.contains(T));!_||A||(s==null||s(E),o==null||o(E),E.defaultPrevented||a==null||a())},f),k=dP(E=>{const T=E.target;[...u.branches].some(j=>j.contains(T))||(i==null||i(E),o==null||o(E),E.defaultPrevented||a==null||a())},f);return iP(E=>{v===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),b.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ty=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Cy(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Ty)}},[c,f,n,u]),b.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Cy())},[c,u]),b.useEffect(()=>{const E=()=>h({});return document.addEventListener(af,E),()=>document.removeEventListener(af,E)},[]),p.jsx(mt.div,{...l,ref:g,style:{pointerEvents:w?_?"auto":"none":void 0,...t.style},onFocusCapture:Ve(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Ve(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ve(t.onPointerDownCapture,S.onPointerDownCapture)})});um.displayName=oP;var uP="DismissableLayerBranch",l_=b.forwardRef((t,e)=>{const n=b.useContext(a_),r=b.useRef(null),s=yn(e,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(mt.div,{...t,ref:s})});l_.displayName=uP;function cP(t,e=globalThis==null?void 0:globalThis.document){const n=Zr(t),r=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){u_(aP,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function dP(t,e=globalThis==null?void 0:globalThis.document){const n=Zr(t),r=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!r.current&&u_(lP,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Cy(){const t=new CustomEvent(af);document.dispatchEvent(t)}function u_(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?o_(s,i):s.dispatchEvent(i)}var hP=um,fP=l_,Xr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},pP="Portal",c_=b.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[s,i]=b.useState(!1);Xr(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?t_.createPortal(p.jsx(mt.div,{...r,ref:e}),o):null});c_.displayName=pP;function mP(t,e){return b.useReducer((n,r)=>e[n][r]??n,t)}var cm=t=>{const{present:e,children:n}=t,r=gP(e),s=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=yn(r.ref,yP(s));return typeof n=="function"||r.isPresent?b.cloneElement(s,{ref:i}
40):null};cm.displayName="Presence";function gP(t){const[e,n]=b.useState(),r=b.useRef(null),s=b.useRef(t),i=b.useRef("none"),o=t?"mounted":"unmounted",[a,l]=mP(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=jl(r.current);i.current=a==="mounted"?u:"none"},[a]),Xr(()=>{const u=r.current,c=s.current;if(c!==t){const f=i.current,h=jl(u);t?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Xr(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=h=>{const m=jl(r.current).includes(h.animationName);if(h.target===e&&m&&(l("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},f=h=>{h.target===e&&(i.current=jl(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function jl(t){return(t==null?void 0:t.animationName)||"none"}function yP(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var vP=Zw[" useInsertionEffect ".trim().toString()]||Xr;function wP({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,i,o]=xP({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:s;{const c=b.useRef(t!==void 0);b.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"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.`),c.current=a},[a,r])}const u=b.useCallback(c=>{var d;if(a){const f=bP(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else i(c)},[a,t,i,o]);return[l,u]}function xP({defaultProp:t,onChange:e}){const[n,r]=b.useState(t),s=b.useRef(n),i=b.useRef(e);return vP(()=>{i.current=e},[e]),b.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function bP(t){return typeof t=="function"}var _P=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"}),SP="VisuallyHidden",Dc=b.forwardRef((t,e)=>p.jsx(mt.span,{...t,ref:e,style:{..._P,...t.style}}));Dc.displayName=SP;var kP=Dc,dm="ToastProvider",[hm,EP,TP]=rP("Toast"),[d_,n3]=Ic("Toast",[TP]),[CP,Mc]=d_(dm),h_=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=b.useState(null),[u,c]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${dm}\`. Expected non-empty \`string\`.`),p.jsx(hm.Provider,{scope:e,children:p.jsx(CP,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>c(h=>h+1),[]),onToastRemove:b.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};h_.displayName=dm;var f_="ToastViewport",PP=["F8"],lf="toast.viewportPause",uf="toast.viewportResume",p_=b.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=PP,label:s="Notifications ({hotkey})",...i}=t,o=Mc(f_,n),a=EP(n),l=b.useRef(null),u=b.useRef(null),c=b.useRef(null),d=b.useRef(null),f=yn(e,d,o.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;b.useEffect(()=>{const x=y=>{var w;r.length!==0&&r.every(_=>y[_]||y.code===_)&&((w=d.current)==null||w.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),b.useEffect(()=>{const x=l.current,y=d.current;if(g&&x&&y){const v=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(lf);y.dispatchEvent(k),o.isClosePausedRef.current=!0}},w=()=>
40{if(o.isClosePausedRef.current){const k=new CustomEvent(uf);y.dispatchEvent(k),o.isClosePausedRef.current=!1}},_=k=>{!x.contains(k.relatedTarget)&&w()},S=()=>{x.contains(document.activeElement)||w()};return x.addEventListener("focusin",v),x.addEventListener("focusout",_),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",S),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[g,o.isClosePausedRef]);const m=b.useCallback(({tabbingDirection:x})=>{const v=a().map(w=>{const _=w.ref.current,S=[_,...VP(_)];return x==="forwards"?S:S.reverse()});return(x==="forwards"?v.reverse():v).flat()},[a]);return b.useEffect(()=>{const x=d.current;if(x){const y=v=>{var S,k,E;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const T=document.activeElement,A=v.shiftKey;if(v.target===x&&A){(S=u.current)==null||S.focus();return}const $=m({tabbingDirection:A?"backwards":"forwards"}),ne=$.findIndex(I=>I===T);Nd($.slice(ne+1))?v.preventDefault():A?(k=u.current)==null||k.focus():(E=c.current)==null||E.focus()}};return x.addEventListener("keydown",y),()=>x.removeEventListener("keydown",y)}},[a,m]),p.jsxs(fP,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&p.jsx(cf,{ref:u,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"forwards"});Nd(x)}}),p.jsx(hm.Slot,{scope:n,children:p.jsx(mt.ol,{tabIndex:-1,...i,ref:f})}),g&&p.jsx(cf,{ref:c,onFocusFromOutsideViewport:()=>{const x=m({tabbingDirection:"backwards"});Nd(x)}})]})});p_.displayName=f_;var m_="ToastFocusProxy",cf=b.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=Mc(m_,n);return p.jsx(Dc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});cf.displayName=m_;var nl="Toast",AP="toast.swipeStart",RP="toast.swipeMove",jP="toast.swipeCancel",OP="toast.swipeEnd",g_=b.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=wP({prop:r,defaultProp:s??!0,onChange:i,caller:nl});return p.jsx(cm,{present:n||a,children:p.jsx(IP,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Zr(t.onPause),onResume:Zr(t.onResume),onSwipeStart:Ve(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Ve(t.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Ve(t.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:Ve(t.onSwipeEnd,u=>{const{x:c,y:d}=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",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});g_.displayName=nl;var[NP,LP]=d_(nl,{onClose(){}}),IP=b.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...g}=t,m=Mc(nl,n),[x,y]=b.useState(null),v=yn(e,I=>y(I)),w=b.useRef(null),_=b.useRef(null),S=s||m.duration,k=b.useRef(0),E=b.useRef(S),T=b.useRef(0),{onToastAdd:A,onToastRemove:j}=m,W=Zr(()=>{var X;(x==null?void 0:x.contains(document.activeElement))&&((X=m.viewport)==null||X.focus()),o()}),$=b.useCallback(I=>
40{!I||I===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(W,I))},[W]);b.useEffect(()=>{const I=m.viewport;if(I){const X=()=>{$(E.current),u==null||u()},Y=()=>{const H=new Date().getTime()-k.current;E.current=E.current-H,window.clearTimeout(T.current),l==null||l()};return I.addEventListener(lf,Y),I.addEventListener(uf,X),()=>{I.removeEventListener(lf,Y),I.removeEventListener(uf,X)}}},[m.viewport,S,l,u,$]),b.useEffect(()=>{i&&!m.isClosePausedRef.current&&$(S)},[i,S,m.isClosePausedRef,$]),b.useEffect(()=>(A(),()=>j()),[A,j]);const ne=b.useMemo(()=>x?S_(x):null,[x]);return m.viewport?p.jsxs(p.Fragment,{children:[ne&&p.jsx(DP,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:ne}),p.jsx(NP,{scope:n,onClose:W,children:tl.createPortal(p.jsx(hm.ItemSlot,{scope:n,children:p.jsx(hP,{asChild:!0,onEscapeKeyDown:Ve(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||W(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(mt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ve(t.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,W()))}),onPointerDown:Ve(t.onPointerDown,I=>{I.button===0&&(w.current={x:I.clientX,y:I.clientY})}),onPointerMove:Ve(t.onPointerMove,I=>{if(!w.current)return;const X=I.clientX-w.current.x,Y=I.clientY-w.current.y,H=!!_.current,C=["left","right"].includes(m.swipeDirection),R=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,M=C?R(0,X):0,J=C?0:R(0,Y),G=I.pointerType==="touch"?10:2,ie={x:M,y:J},ae={originalEvent:I,delta:ie};H?(_.current=ie,Ol(RP,d,ae,{discrete:!1})):Py(ie,m.swipeDirection,G)?(_.current=ie,Ol(AP,c,ae,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(X)>G||Math.abs(Y)>G)&&(w.current=null)}),onPointerUp:Ve(t.onPointerUp,I=>{const X=_.current,Y=I.target;if(Y.hasPointerCapture(I.pointerId)&&Y.releasePointerCapture(I.pointerId),_.current=null,w.current=null,X){const H=I.currentTarget,C={originalEvent:I,delta:X};Py(X,m.swipeDirection,m.swipeThreshold)?Ol(OP,h,C,{discrete:!0}):Ol(jP,f,C,{discrete:!0}),H.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),DP=t=>{const{__scopeToast:e,children:n,...r}=t,s=Mc(nl,e),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return FP(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:p.jsx(c_,{asChild:!0,children:p.jsx(Dc,{...r,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",n]})})})},MP="ToastTitle",y_=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return p.jsx(mt.div,{...r,ref:e})});y_.displayName=MP;var $P="ToastDescription",v_=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return p.jsx(mt.div,{...r,ref:e})});v_.displayName=$P;var w_="ToastAction",x_=b.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?p.jsx(__,{altText:n,asChild:!0,children:p.jsx(fm,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${w_}\`. Expected non-empty \`string\`.`),null)});x_.displayName=w_;var b_="ToastClose",fm=b.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=LP(b_,n);return p.jsx(__,{asChild:!0,children:p.jsx(mt.button,{type:"button",...r,ref:e,onClick:Ve(t.onClick,s.onClose)})})});fm.displayName=b_;var __=b.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return p.jsx(mt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function S_(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),UP(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&&e.push(o)}else e.push(...S_(r))}}),e}function Ol(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?o_(s,i):s.dispatchEvent(i)}var Py=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function FP(t=()=>{}){const e=Zr(t);Xr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function UP(t){return t.nodeType===t.ELEMENT_NODE}function VP(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function Nd(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var BP=h_,k_=p_,E_=g_,T_=y_,C_=v_,P_=x_,A_=fm;function R_(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=R_(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function j_(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=R_(t))&&(r&&(r+=" "),r+=e);return r}const Ay=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ry=j_,pm=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return Ry(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=Ay(c)||Ay(d);return s[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[m,x]=g;return Array.isArray(x)?x.includes({...i,...a}[m]):{...i,...a}[m]===x})?[...u,d,f]:u},[]);return Ry(t,o,l,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 zP=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O_=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===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 WP={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 HP=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...WP,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:O_("lucide",s),...a},[...o.map(([u,c])=>b.createElement(u,c)),...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 qP=(t,e)=>{const n=b.forwardRef(({className:r,...s},i)=>b.createElement(HP,{ref:i,iconNode:e,className:O_(`lucide-${zP(t)}`,r),...s}));return n.displayName=`${t}`,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 KP=qP("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 5,914 bytes, line 65
65],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),mm="-",GP=t=>{const e=JP(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(mm);return a[0]===""&&a.length!==1&&a.shift(),N_(a,e)||YP(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},N_=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?N_(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(mm);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},jy=/^\[(.+)\]$/,YP=t=>{if(jy.test(t)){const e=jy.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},JP=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return ZP(Object.entries(t.classGroups),n).forEach(([i,o])=>{df(o,r,i,e)}),r},df=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:Oy(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(QP(s)){df(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{df(o,Oy(e,i),n,r)})})},Oy=(t,e)=>{let n=t;return e.split(mm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},QP=t=>t.isThemeGetter,ZP=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[n,s]}):t,XP=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),e++,e>t&&(e=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)}}},L_="!",eA=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let x=0;x<a.length;x++){let y=a[x];if(u===0){if(y===s&&(r||a.slice(x,x+i)===e)){l.push(a.slice(c,x)),c=x+i;continue}if(y==="/"){d=x;continue}}y==="["?u++:y==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(L_),g=h?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},tA=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},nA=t=>({cache:XP(t.cacheSize),parseClassName:eA(t),...GP(t)}),rA=/\s+/,sA=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(rA);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(u);let g=!!h,m=r(g?f.substring(0,h):f);if(!m){if(!g){a=u+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=u+(a.length>0?" "+a:a);continue}g=!1}const x=tA(c).join(":"),y=d?x+L_:x,v=y+m;if(i.includes(v))continue;i.push(v);const w=s(m,g);for(let _=0;_<w.length;++_){const S=w[_];i.push(y+S)}a=u+(a.length>0?" "+a:a)}return a};function iA(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=I_(e))&&(r&&(r+=" "),r+=n);return r}const I_=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=I_(t[r]))&&(n&&(n+=" "),n+=e);return n};function oA(t,...e){let n,r,s,i=o;function o(l){const u=e.reduce((c,d)=>d(c),t());return n=nA(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=sA(l,n);return s(l,c),c}return function(){return i(iA.apply(null,arguments))}}const we=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},D_=/^\[(?:([a-z-]+):)?(.+)\]$/i,aA=/^\d+\/\d+$/,lA=new Set(["px","full","screen"]),uA=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cA=/\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$/,dA=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hA=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fA=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vn=t=>Ii(t)||lA.has(t)||aA.test(t),vr=t=>po(t,"length",bA),Ii=t=>!!t&&!Number.isNaN(Number(t)),Ld=t=>po(t,"number",Ii),Oo=t=>!!t&&Number.isInteger(Number(t)),pA=t=>t.endsWith("%")&&Ii(t.slice(0,-1)),re=t=>D_.test(t),wr=t=>uA.test(t),mA=new Set(["length","size","percentage"]),gA=t=>po(t,mA,M_),yA=t=>po(t,"position",M_),vA=new Set(["image","url"]),wA=t=>po(t,vA,SA),xA=t=>po(t,"",_A),No=()=>!0,po=(t,e,n)=>{const r=D_.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},bA=t=>cA.test(t)&&!dA.test(t),M_=()=>!1,_A=t=>hA.test(t),SA=t=>fA.test(t),kA=()=>{const t=we("colors"),e=we("spacing"),n=we("blur"),r=we("brightness"),s=we("borderColor"),i=we("borderRadius"),o=we("borderSpacing"),a=we("borderWidth"),l=we("contrast"),u=we("grayscale"),c=we("hueRotate"),d=we("invert"),f=we("gap"),h=we("gradientColorStops"),g=we("gradientColorStopPositions"),m=we("inset"),x=we("margin"),y=we("opacity"),v=we("padding"),w=we("saturate"),_=we("scale"),S=we("sepia"),k=we("skew"),E=we("space"),T=we("translate"),A=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",re,e],$=()=>[re,e],ne=()=>["",Vn,vr],I=()=>["auto",Ii,re],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",re],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Ii,re];return{cacheSize:500,separator:":",theme:{colors:[No],spacing:[Vn,vr],blur:["none","",wr,re],brightness:J(),borderColor:[t],borderRadius:["n
65one","","full",wr,re],borderSpacing:$(),borderWidth:ne(),contrast:J(),grayscale:R(),hueRotate:J(),invert:R(),gap:$(),gradientColorStops:[t],gradientColorStopPositions:[pA,vr],inset:W(),margin:W(),opacity:J(),padding:$(),saturate:J(),scale:J(),sepia:R(),skew:J(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[wr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:[...X(),re]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Oo,re]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",Oo,re]}],"grid-cols":[{"grid-cols":[No]}],"col-start-end":[{col:["auto",{span:["full",Oo,re]},re]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[No]}],"row-start-end":[{row:["auto",{span:[Oo,re]},re]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"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",re,e]}],"min-w":[{"min-w":[re,e,"min","max","fit"]}],"max-w":[{"max-w":[re,e,"none","full","min","max","fit","prose",{screen:[wr]},wr]}],h:[{h:[re,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,e,"auto","min","max","fit"]}],"font-size":[{text:["base",wr,vr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ld]}],"font-family":[{font:[No]}],"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",re]}],"line-clamp":[{"line-clamp":["none",Ii,Ld]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,vr]}],"underline-offset":[{"underline-offset":["auto",Vn,re]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],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",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),yA]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",gA]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wA]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[g]}
65],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}
vendor: 4,468 bytes, line 65
65],"divide-style":[{divide:Y()}],"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:["",...Y()]}],"outline-offset":[{"outline-offset":[Vn,re]}],"outline-w":[{outline:[Vn,vr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Vn,vr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",wr,xA]}],"shadow-color":[{shadow:[No]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",wr,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",re]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Oo,re]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"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",re]}],accent:[{accent:["auto",t]}],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",re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Vn,vr,Ld]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
65none"]}]},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"]}}},EA=oA(kA);function $n(...t){return EA(j_(t))}const TA=BP,$_=b.forwardRef(({className:t,...e},n)=>p.jsx(k_,{ref:n,className:$n("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]",t),...e}));$_.displayName=k_.displayName;const CA=pm("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"}}),F_=b.forwardRef(({className:t,variant:e,...n},r)=>p.jsx(E_,{ref:r,className:$n(CA({variant:e}),t),...n}));F_.displayName=E_.displayName;const PA=b.forwardRef(({className:t,...e},n)=>p.jsx(P_,{ref:n,className:$n("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",t),...e}));PA.displayName=P_.displayName;const U_=b.forwardRef(({className:t,...e},n)=>p.jsx(A_,{ref:n,className:$n("absolute right-2 top-2 rounded-md p-1 text-foreground
65/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",t),"toast-close":"",...e,children:p.jsx(KP,{className:"h-4 w-4"})}));U_.displayName=A_.displayName;const V_=b.forwardRef(({className:t,...e},n)=>p.jsx(T_,{ref:n,className:$n("text-sm font-semibold",t),...e}));V_.displayName=T_.displayName;const B_=b.forwardRef(({className:t,...e},n)=>p.jsx(C_,{ref:n,className:$n("text-sm opacity-90",t),...e}));B_.displayName=C_.displayName;function AA(){const{toasts:t}=YC();return p.jsxs(TA,{children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return p.jsxs(F_,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(V_,{children:n}),r&&p.jsx(B_,{children:r})]}),s,p.jsx(U_,{})]},e)}),p.jsx($_,{})]})}var Ny=["light","dark"],RA="(prefers-color-scheme: dark)",jA=b.createContext(void 0),OA={setTheme:t=>{},themes:[]},NA=()=>{var t;return(t=b.useContext(jA))!=null?t:OA};b.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",c=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=s?Ny.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(g,m=!1,x=!0)=>{let y=o?o[g]:g,v=m?g+"|| ''":`'${y}'`,w="";return s&&x&&!m&&Ny.includes(g)&&(w+=`d.style.colorScheme = '${g}';`),n==="class"?m||y?w+=`c.add(${v})`:w+="null":y&&(w+=`d[s](n,${v})`),w},h=t?`!function(){${c}${f(t)}}()`:r?`!function(){try{${c}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${RA}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var LA=t=>{switch(t){case"success":return MA;case"info":return FA;case"warning":return $A;case"error":return UA;default:return null}},IA=Array(12).fill(0),DA=({visible:t,className:e})=>L.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},L.createElement("div",{className:"sonner-spinner"},IA.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),MA=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),$A=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),FA=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),UA=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),VA=L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),BA=()=>{let[t,e]=L.useState(document.hidden);return L.useEffect(()=>{let n=()=>{e(document.hidden)};
65return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},hf=1,zA=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:hf++,i=this.toasts.find(a=>a.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:n}),{...a,...t,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let r=t instanceof Promise?t:t(),s=n!==void 0,i,o=r.then(async l=>{if(i=["resolve",l],L.isValidElement(l))s=!1,this.create({id:n,type:"default",message:l});else if(HA(l)&&!l.ok){s=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,c=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:n,type:"error",message:u,description:c})}else if(e.success!==void 0){s=!1;let u=typeof e.success=="function"?await e.success(l):e.success,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"success",message:u,description:c})}}).catch(async l=>{if(i=["reject",l],e.error!==void 0){s=!1;let u=typeof e.error=="function"?await e.error(l):e.error,c=typeof e.description=="function"?await e.description(l):e.description;this.create({id:n,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(n),n=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,u)=>o.then(()=>i[0]==="reject"?u(i[1]):l(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||hf++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},yt=new zA,WA=(t,e)=>{let n=(e==null?void 0:e.id)||hf++;return yt.addToast({title:t,...e,id:n}),n},HA=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",qA=WA,KA=()=>yt.toasts,GA=()=>yt.getActiveToasts(),Nl=Object.assign(qA,{success:yt.success,info:yt.info,warning:yt.warning,error:yt.error,custom:yt.custom,message:yt.message,promise:yt.promise,dismiss:yt.dismiss,loading:yt.loading},{getHistory:KA,getToasts:GA});function YA(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}YA(`: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;
65left: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}
65: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%);
65--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%)} 66`);function Ll(t){return t.label!==void 0}var JA=3,QA="32px",ZA="16px",Ly=4e3,XA=356,eR=14,tR=20,nR=200;function Qt(...t){return t.filter(Boolean).join(" ")}function rR(t){let[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}var sR=t=>{var e,n,r,s,i,o,a,l,u,c,d;let{invert:f,toast:h,unstyled:g,interacting:m,setHeights:x,visibleToasts:y,heights:v,index:w,toasts:_,expanded:S,removeToast:k,defaultRichColors:E,closeButton:T,style:A,cancelButtonStyle:j,actionButtonStyle:W,className:$="",descriptionClassName:ne="",duration:I,position:X,gap:Y,loadingIcon:H,expandByDefault:C,classNames:R,icons:M,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:G}=t,[ie,ae]=L.useState(null),[Le,Ze]=L.useState(null),[he,Ys]=L.useState(!1),[dr,ds]=L.useState(!1),[hr,Js]=L.useState(!1),[fr,cl]=L.useState(!1),[ed,dl]=L.useState(!1),[td,_o]=L.useState(0),[Qs,lg]=L.useState(0),So=L.useRef(h.duration||I||Ly),ug=L.useRef(null),hs=L.useRef(null),cE=w===0,dE=w+1<=y,Lt=h.type,Zs=h.dism
66issible!==!1,hE=h.className||"",fE=h.descriptionClassName||"",hl=L.useMemo(()=>v.findIndex(ee=>ee.toastId===h.id)||0,[v,h.id]),pE=L.useMemo(()=>{var ee;return(ee=h.closeButton)!=null?ee:T},[h.closeButton,T]),cg=L.useMemo(()=>h.duration||I||Ly,[h.duration,I]),nd=L.useRef(0),Xs=L.useRef(0),dg=L.useRef(0),ei=L.useRef(null),[mE,gE]=X.split("-"),hg=L.useMemo(()=>v.reduce((ee,pe,_e)=>_e>=hl?ee:ee+pe.height,0),[v,hl]),fg=BA(),yE=h.invert||f,rd=Lt==="loading";Xs.current=L.useMemo(()=>hl*Y+hg,[hl,hg]),L.useEffect(()=>{So.current=cg},[cg]),L.useEffect(()=>{Ys(!0)},[]),L.useEffect(()=>{let ee=hs.current;if(ee){let pe=ee.getBoundingClientRect().height;return lg(pe),x(_e=>[{toastId:h.id,height:pe,position:h.position},..._e]),()=>x(_e=>_e.filter(Kt=>Kt.toastId!==h.id))}},[x,h.id]),L.useLayoutEffect(()=>{if(!he)return;let ee=hs.current,pe=ee.style.height;ee.style.height="auto";let _e=ee.getBoundingClientRect().height;ee.style.height=pe,lg(_e),x(Kt=>Kt.find(Gt=>Gt.toastId===h.id)?Kt.map(Gt=>Gt.toastId===h.id?{...Gt,height:_e}:Gt):[{toastId:h.id,height:_e,position:h.position},...Kt])},[he,h.title,h.description,x,h.id]);let pr=L.useCallback(()=>{ds(!0),_o(Xs.current),x(ee=>ee.filter(pe=>pe.toastId!==h.id)),setTimeout(()=>{k(h)},nR)},[h,k,x,Xs]);L.useEffect(()=>{if(h.promise&&Lt==="loading"||h.duration===1/0||h.type==="loading")return;let ee;return S||m||G&&fg?(()=>{if(dg.current<nd.current){let pe=new Date().getTime()-nd.current;So.current=So.current-pe}dg.current=new Date().getTime()})():So.current!==1/0&&(nd.current=new Date().getTime(),ee=setTimeout(()=>{var pe;(pe=h.onAutoClose)==null||pe.call(h,h),pr()},So.current)),()=>clearTimeout(ee)},[S,m,h,Lt,G,fg,pr]),L.useEffect(()=>{h.delete&&pr()},[pr,h.delete]);function vE(){var ee,pe,_e;return M!=null&&M.loading?L.createElement("div",{className:Qt(R==null?void 0:R.loader,(ee=h==null?void 0:h.classNames)==null?void 0:ee.loader,"sonner-loader"),"data-visible":Lt==="loading"},M.loading):H?L.createElement("div",{className:Qt(R==null?void 0:R.loader,(pe=h==null?void 0:h.classNames)==null?void 0:pe.loader,"sonner-loader"),"data-visible":Lt==="loading"},H):L.createElement(DA,{className:Qt(R==null?void 0:R.loader,(_e=h==null?void 0:h.classNames)==null?void 0:_e.loader),visible:Lt==="loading"})}return L.createElement("li",{tabIndex:0,ref:hs,className:Qt($,hE,R==null?void 0:R.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,R==null?void 0:R.default,R==null?void 0:R[Lt],(n=h==null?void 0:h.classNames)==null?void 0:n[Lt]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:E,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":he,"data-promise":!!h.promise,"data-swiped":ed,"data-removed":dr,"data-visible":dE,"data-y-position":mE,"data-x-position":gE,"data-index":w,"data-front":cE,"data-swiping":hr,"data-dismissible":Zs,"data-type":Lt,"data-invert":yE,"data-swipe-out":fr,"data-swipe-direction":Le,"data-expanded":!!(S||C&&he),style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${dr?td:Xs.current}px`,"--initial-height":C?"auto":`${Qs}px`,...A,...h.style},onDragEnd:()=>{Js(!1),ae(null),ei.current=null},onPointerDown:ee=>{rd||!Zs||(ug.current=new Date,_o(Xs.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(Js(!0),ei.current={x:ee.clientX,y:ee.clientY}))},onPointerUp:()=>{var ee,pe,_e,Kt;if(fr||!Zs)return;ei.current=null;let Gt=Number(((ee=hs.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),mr=Number(((pe=hs.current)==null?void 0:pe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),fs=new Date().getTime()-((_e=ug.current)==null?void 0:_e.getTime()),Yt=ie==="x"?Gt:mr,gr=Math.abs(Yt)/fs;if(Math.abs(Yt)>=tR||gr>.11){_o(Xs.current),(Kt=h.onDismiss)==null||Kt.call(h,h),Ze(ie==="x"?Gt>0?"right":"left":mr>0?"down":"up"),pr(),cl(!0),dl(!1);return}Js(!1),ae(null)},onPointerMove:ee=>{var pe,_e,Kt,Gt;if(!ei.current||!Zs||((pe=window.getSelection())==null?void 0:pe.toString().length)>0)return;let mr=ee.clientY-ei.current.y,fs=ee.clientX-ei.current.x,Yt=(_e=t.swipeDirections)!=null?_e:rR(X);!ie&&(Math.abs(fs)>1||Math.abs(mr)>1)&&ae(Math.abs(fs)>Math.abs(mr)?"x":"y");let gr={x:0,y:0};ie==="y"?(Yt.includes("top")||Yt.includes("bottom"))&&(Yt.includes("top")&&mr<0||Yt.includes("bottom")&&mr>0)&&(gr.y=mr):ie==="x"&&(Yt.includes("left")||Yt.includes("right"))&&(Yt.includes("left")&&fs<0||Yt.includes("right")&&fs>0)&&(gr.x=fs),(Math.abs(gr.x)>0||Math.abs(gr.y)>0)&&dl(!0),(Kt=hs.current)==null||Kt.style.setProperty("--swipe-amount-x",`${gr.x}px`),(Gt=hs.current)==null||Gt.style.setProperty("--swipe-amount-y",`${gr.y}px`)}},pE&&!h.jsx?L.createElement("button",{"aria-label":J,"data-disabled":rd,"data-close-button":!0,onClick:rd||!Zs?()=>{}:()=>{var ee;pr(),(ee=h.onDismiss)==null||ee.call(h,h)},className:Qt(R==null?void 0:R.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=M==null?void 0:M.close)!=null?i:VA):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:L.createElement(L.Fragment,null,Lt||h.icon||h.promise?L.createElement("div",{"data-icon":"",className:Qt(R==null?void 0:R.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||vE():null,h.type!=="loading"?h.icon||(M==null?void 0:M[Lt])||LA(Lt):null):null,
vendor: 6,592 bytes, line 66
66L.createElement("div",{"data-content":"",className:Qt(R==null?void 0:R.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},L.createElement("div",{"data-title":"",className:Qt(R==null?void 0:R.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?L.createElement("div",{"data-description":"",className:Qt(ne,fE,R==null?void 0:R.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),b.isValidElement(h.cancel)?h.cancel:h.cancel&&Ll(h.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:ee=>{var pe,_e;Ll(h.cancel)&&Zs&&((_e=(pe=h.cancel).onClick)==null||_e.call(pe,ee),pr())},className:Qt(R==null?void 0:R.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,b.isValidElement(h.action)?h.action:h.action&&Ll(h.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||W,onClick:ee=>{var pe,_e;Ll(h.action)&&((_e=(pe=h.action).onClick)==null||_e.call(pe,ee),!ee.defaultPrevented&&pr())},className:Qt(R==null?void 0:R.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function Iy(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function iR(t,e){let n={};return[t,e].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?ZA:QA;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${o}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=a:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(a)}),n}var oR=b.forwardRef(function(t,e){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:g=JA,toastOptions:m,dir:x=Iy(),gap:y=eR,loadingIcon:v,icons:w,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=t,[k,E]=L.useState([]),T=L.useMemo(()=>Array.from(new Set([r].concat(k.filter(G=>G.position).map(G=>G.position)))),[k,r]),[A,j]=L.useState([]),[W,$]=L.useState(!1),[ne,I]=L.useState(!1),[X,Y]=L.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=L.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=L.useRef(null),M=L.useRef(!1),J=L.useCallback(G=>{E(ie=>{var ae;return(ae=ie.find(Le=>Le.id===G.id))!=null&&ae.delete||yt.dismiss(G.id),ie.filter(({id:Le})=>Le!==G.id)})},[]);return L.useEffect(()=>yt.subscribe(G=>{if(G.dismiss){E(ie=>ie.map(ae=>ae.id===G.id?{...ae,delete:!0}:ae));return}setTimeout(()=>{t_.flushSync(()=>{E(ie=>{let ae=ie.findIndex(Le=>Le.id===G.id);return ae!==-1?[...ie.slice(0,ae),{...ie[ae],...G},...ie.slice(ae+1)]:[G,...ie]})})})}),[]),L.useEffect(()=>{if(c!=="system"){Y(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;let G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:ie})=>{Y(ie?"dark":"light")})}catch{G.addListener(({matches:ae})=>{try{Y(ae?"dark":"light")}catch(Le){console.error(Le)}})}},[c]),L.useEffect(()=>{k.length<=1&&$(!1)},[k]),L.useEffect(()=>{let G=ie=>{var ae,Le;s.every(Ze=>ie[Ze]||ie.code===Ze)&&($(!0),(ae=H.current)==null||ae.focus()),ie.code==="Escape"&&(document.activeElement===H.current||(Le=H.current)!=null&&Le.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),L.useEffect(()=>{if(H.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,M.current=!1)}},[H.current]),L.createElement("section",{ref:e,"aria-label":`${_} ${C}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((G,ie)=>{var ae;let[Le,Ze]=G.split("-");return k.length?L.createElement("ol",{key:G,dir:x==="auto"?Iy():x,tabIndex:-1,ref:H,className:a,"data-sonner-toaster":!0,"data-theme":X,"data-y-position":Le,"data-lifted":W&&k.length>1&&!i,"data-x-position":Ze,style:{"--front-toast-height":`${((ae=A[0])==null?void 0:ae.height)||0}px`,"--width":`${XA}px`,"--gap":`${y}px`,...h,...iR(l,u)},onBlur:he=>{M.current&&!he.currentTarget.contains(he.relatedTarget)&&(M.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||M.current||(M.current=!0,R.current=he.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{ne||$(!1)},onDragEnd:()=>$(!1),onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(he=>!he.position&&ie===0||he.position===G).map((he,Ys)=>{var dr,ds;return L.createElement(sR,{key:he.id,icons:w,index:Ys,toast:he,defaultRichColors:d,duration:(dr=m==null?void 0:m.duration)!=null?dr:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(ds=m==null?void 0:m.closeButton)!=null?ds:o,interacting:ne,position:G,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:J,toasts:k.filter(hr=>hr.position==he.position),heights:A.filter(hr=>hr.position==he.position),setHeights:j,expandByDefault:i,gap:y,loadingIcon:v,expanded:W,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const aR=({...t})=>{const{theme:e="system"}=NA();return p.jsx(oR,{theme:e,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"}},...t})},lR=["top","right","bottom","left"],es=Math.min,Et=Math.max,Hu=Math.round,Il=Math.floor,Nn=t=>({x:t,y:t}
vendor: 11,930 bytes, line 66
66),uR={left:"right",right:"left",bottom:"top",top:"bottom"},cR={start:"end",end:"start"};function ff(t,e,n){return Et(t,es(e,n))}function ir(t,e){return typeof t=="function"?t(e):t}function or(t){return t.split("-")[0]}function mo(t){return t.split("-")[1]}function gm(t){return t==="x"?"y":"x"}function ym(t){return t==="y"?"height":"width"}const dR=new Set(["top","bottom"]);function Rn(t){return dR.has(or(t))?"y":"x"}function vm(t){return gm(Rn(t))}function hR(t,e,n){n===void 0&&(n=!1);const r=mo(t),s=vm(t),i=ym(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=qu(o)),[o,qu(o)]}function fR(t){const e=qu(t);return[pf(t),e,pf(e)]}function pf(t){return t.replace(/start|end/g,e=>cR[e])}const Dy=["left","right"],My=["right","left"],pR=["top","bottom"],mR=["bottom","top"];function gR(t,e,n){switch(t){case"top":case"bottom":return n?e?My:Dy:e?Dy:My;case"left":case"right":return e?pR:mR;default:return[]}}function yR(t,e,n,r){const s=mo(t);let i=gR(or(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(pf)))),i}function qu(t){return t.replace(/left|right|bottom|top/g,e=>uR[e])}function vR(t){return{top:0,right:0,bottom:0,left:0,...t}}function z_(t){return typeof t!="number"?vR(t):{top:t,right:t,bottom:t,left:t}}function Ku(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function $y(t,e,n){let{reference:r,floating:s}=t;const i=Rn(e),o=vm(e),a=ym(o),l=or(e),u=i==="y",c=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-s.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-s.width,y:d};break;default:h={x:r.x,y:r.y}}switch(mo(e)){case"start":h[o]-=f*(n&&u?-1:1);break;case"end":h[o]+=f*(n&&u?-1:1);break}return h}const wR=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:c,y:d}=$y(u,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:x,fn:y}=a[m],{x:v,y:w,data:_,reset:S}=await y({x:c,y:d,initialPlacement:r,placement:f,strategy:s,middlewareData:h,rects:u,platform:o,elements:{reference:t,floating:e}});c=v??c,d=w??d,h={...h,[x]:{...h[x],..._}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:c,y:d}=$y(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function ka(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=ir(e,t),g=z_(h),x=a[f?d==="floating"?"reference":"floating":d],y=Ku(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=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},S=Ku(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return{top:(y.top-S.top+g.top)/_.y,bottom:(S.bottom-y.bottom+g.bottom)/_.y,left:(y.left-S.left+g.left)/_.x,right:(S.right-y.right+g.right)/_.x}}const xR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=ir(t,e)||{};if(u==null)return{};const d=z_(c),f={x:n,y:r},h=vm(s),g=ym(h),m=await o.getDimensions(u),x=h==="y",y=x?"top":"left",v=x?"bottom":"right",w=x?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[h]-f[h]-i.floating[g],S=f[h]-i.reference[h],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=a.floating[w]||i.floating[g]);const T=_/2-S/2,A=E/2-m[g]/2-1,j=es(d[y],A),W=es(d[v],A),$=j,ne=E-m[g]-W,I=E/2-m[g]/2+T,X=ff($,I,ne),Y=!l.arrow&&mo(s)!=null&&I!==X&&i.reference[g]/2-(I<$?j:W)-m[g]/2<0,H=Y?I<$?I-$:I-ne:0;return{[h]:f[h]+H,data:{[h]:X,centerOffset:I-X-H,...Y&&{alignmentOffset:H}},reset:Y}}}),bR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=ir(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=or(s),v=Rn(a),w=or(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(w||!m?[qu(a)]:fR(a)),k=g!=="none";!f&&k&&S.push(...yR(a,m,g,_));const E=[a,...S],T=await ka(e,x),A=[];let j=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&A.push(T[y]),d){const I=hR(s,o,_);A.push(T[I[0]],T[I[1]])}if(j=[...j,{placement:s,overflows:A}],!A.every(I=>I<=0)){var W,$;const I=(((W=i.flip)==null?void 0:W.index)||0)+1,X=E[I];if(X&&(!(d==="alignment"?v!==Rn(X):!1)||j.every(C=>C.overflows[0]>0&&Rn(C.placement)===v)))return{data:{index:I,overflows:j},reset:{placement:X}};let Y=($=j.filter(H=>H.overflows[0]<=0).sort((H,C)=>H.overflows[1]-C.overflows[1])[0])==null?void 0:$.placement;if(!Y)switch(h){case"bestFit":{var ne;const H=(ne=j.filter(C=>{if(k){const R=Rn(C.placement);return R===v||R==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((C,R)=>C[1]-R[1])[0])==null?void 0:ne[0];H&&(Y=H);break}case"initialPlacement":Y=a;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function Fy(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Uy(t){return lR.some(e=>t[e]>=0)}const _R=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=ir(t,e);switch(r){case"referenceHidden":{const i=await ka(e,{...s,elementContext:"reference"}),o=Fy(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Uy(o)}}}case"escaped":{const i=await ka(e,{...s,altBoundary:!0}),o=Fy(i,n.floating);return{data:{escapedOffsets:o,escaped:Uy(o)}}}default:return{}}}}},W_=new Set(["left","top"]);async function SR(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=or(n),a=mo(n),l=Rn(n)==="y",u=W_.has(o)?-1:1,c=i&&l?-1:1,d=ir(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const kR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await SR(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},ER=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:y,y:v}=x;return{x:y,y:v}}},...l}=ir(t,e),u={x:n,y:r},c=await ka(e,l),d=Rn(or(s)),f=gm(d);let h=u[f],g=u[d];if(i){const x=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=h+c[x],w=h-c[y];h=ff(v,h,w)}if(o){const x=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=g+c[x],w=g-c[y];g=ff(v,g,w)}const m=a.fn({...e,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:o}}}}}},TR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ir(t,e),c={x:n,y:r},d=Rn(s),f=gm(d);let h=c[f],g=c[d];const m=ir(a,e),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const w=f==="y"?"height":"width",_=i.reference[f]-i.floating[w]+x.mainAxis,S=i.reference[f]+i.reference[w]-x.mainAxis;h<_?h=_:h>S&&(h=S)}if(u){var y,v;const w=f==="y"?"width":"height",_=W_.has(or(s)),S=i.reference[d]-i.floating[w]+(_&&((y=o.offset)==null?void 0:y[d])||0)+(_?0:x.crossAxis),k=i.reference[d]+i.reference[w]+(_?0:((v=o.offset)==null?void 0:v[d])||0)-(_?x.crossAxis:0);g<S?g=S:g>k&&(g=k)}return{[f]:h,[d]:g}}}},CR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...u}=ir(t,e),c=await ka(e,u),d=or(s),f=mo(s),h=Rn(s)==="y",{width:g,height:m}=i.floating;let x,y;d==="top"||d==="bottom"?(x=d,y=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,x=f==="end"?"top":"bottom");const v=m-c.top-c.bottom,w=g-c.left-c.right,_=es(m-c[x],v),S=es(g-c[y],w),k=!e.middlewareData.shift;let E=_,T=S;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(E=v),k&&!f){const j=Et(c.left,0),W=Et(c.right,0),$=Et(c.top,0),ne=Et(c.bottom,0);h?T=g-2*(j!==0||W!==0?j+W:Et(c.left,c.right)):E=m-2*($!==0||ne!==0?$+ne:Et(c.top,c.bottom))}await l({...e,availableWidth:T,availableHeight:E});const A=await o.getDimensions(a.floating);return g!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function $c(){return typeof window<"u"}function go(t){return H_(t)?(t.nodeName||"").toLowerCase():"#document"}function At(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Fn(t){var e;return(e=(H_(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function H_(t){return $c()?t instanceof Node||t instanceof At(t).Node:!1}function vn(t){return $c()?t instanceof Element||t instanceof At(t).Element:!1}function Dn(t){return $c()?t instanceof HTMLElement||t instanceof At(t).HTMLElement:!1}function Vy(t){return!$c()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof At(t).ShadowRoot}const PR=new Set(["inline","contents"]);function rl(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=wn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!PR.has(s)}const AR=new Set(["table","td","th"]);function RR(t){return AR.has(go(t))}const jR=[":popover-open",":modal"];function Fc(t){return jR.some(e=>{try{return t.matches(e)}catch{return!1}})}const OR=["transform","translate","scale","rotate","perspective"],NR=["transform","translate","scale","rotate","perspective","filter"],LR=["paint","layout","strict","content"];function wm(t){const e=xm(),n=vn(t)?wn(t):t;return OR.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||NR.some(r=>(n.willChange||"").includes(r))||LR.some(r=>(n.contain||"").includes(r))}function IR(t){let e=ts(t);for(;Dn(e)&&!to(e);){if(wm(e))return e;if(Fc(e))return null;e=ts(e)}return null}function xm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const DR=new Set(["html","body","#document"]);function to(t){return DR.has(go(t))}function wn(t){return At(t).getComputedStyle(t)}function Uc(t){return vn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ts(t){if(go(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vy(t)&&t.host||Fn(t);return Vy(e)?e.host:e}function q_(t){const e=ts(t);return to(e)?t.ownerDocument?t.ownerDocument.body:t.body:Dn(e)&&rl(e)?e:q_(e)}function Ea(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=q_(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=At(s);if(i){const a=mf(o);
vendor: 6,504 bytes, line 66
66return e.concat(o,o.visualViewport||[],rl(s)?s:[],a&&n?Ea(a):[])}return e.concat(s,Ea(s,[],n))}function mf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function K_(t){const e=wn(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Dn(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=Hu(n)!==i||Hu(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function bm(t){return vn(t)?t:t.contextElement}function Di(t){const e=bm(t);if(!Dn(e))return Nn(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=K_(e);let o=(i?Hu(n.width):n.width)/r,a=(i?Hu(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const MR=Nn(0);function G_(t){const e=At(t);return!xm()||!e.visualViewport?MR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $R(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==At(t)?!1:e}function Bs(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=bm(t);let o=Nn(1);e&&(r?vn(r)&&(o=Di(r)):o=Di(t));const a=$R(i,n,r)?G_(i):Nn(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,c=s.width/o.x,d=s.height/o.y;if(i){const f=At(i),h=r&&vn(r)?At(r):r;let g=f,m=mf(g);for(;m&&r&&h!==g;){const x=Di(m),y=m.getBoundingClientRect(),v=wn(m),w=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,_=y.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=w,u+=_,g=At(m),m=mf(g)}}return Ku({width:c,height:d,x:l,y:u})}function _m(t,e){const n=Uc(t).scrollLeft;return e?e.left+n:Bs(Fn(t)).left+n}function Y_(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-(n?0:_m(t,r)),i=r.top+e.scrollTop;return{x:s,y:i}}function FR(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=Fn(r),a=e?Fc(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Nn(1);const c=Nn(0),d=Dn(r);if((d||!d&&!i)&&((go(r)!=="body"||rl(o))&&(l=Uc(r)),Dn(r))){const h=Bs(r);u=Di(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=o&&!d&&!i?Y_(o,l,!0):Nn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function UR(t){return Array.from(t.getClientRects())}function VR(t){const e=Fn(t),n=Uc(t),r=t.ownerDocument.body,s=Et(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=Et(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+_m(t);const a=-n.scrollTop;return wn(r).direction==="rtl"&&(o+=Et(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function BR(t,e){const n=At(t),r=Fn(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=xm();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const zR=new Set(["absolute","fixed"]);function WR(t,e){const n=Bs(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Dn(t)?Di(t):Nn(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function By(t,e,n){let r;if(e==="viewport")r=BR(t,n);else if(e==="document")r=VR(Fn(t));else if(vn(e))r=WR(e,n);else{const s=G_(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Ku(r)}function J_(t,e){const n=ts(t);return n===e||!vn(n)||to(n)?!1:wn(n).position==="fixed"||J_(n,e)}function HR(t,e){const n=e.get(t);if(n)return n;let r=Ea(t,[],!1).filter(a=>vn(a)&&go(a)!=="body"),s=null;const i=wn(t).position==="fixed";let o=i?ts(t):t;for(;vn(o)&&!to(o);){const a=wn(o),l=wm(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&zR.has(s.position)||rl(o)&&!l&&J_(t,o))?r=r.filter(c=>c!==o):s=a,o=ts(o)}return e.set(t,r),r}function qR(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?Fc(e)?[]:HR(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,c)=>{const d=By(e,c,s);return u.top=Et(d.top,u.top),u.right=es(d.right,u.right),u.bottom=es(d.bottom,u.bottom),u.left=Et(d.left,u.left),u},By(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function KR(t){const{width:e,height:n}=K_(t);return{width:e,height:n}}function GR(t,e,n){const r=Dn(e),s=Fn(e),i=n==="fixed",o=Bs(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Nn(0);function u(){l.x=_m(s)}if(r||!r&&!i)if((go(e)!=="body"||rl(s))&&(a=Uc(e)),r){const h=Bs(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&u();i&&!r&&s&&u();const c=s&&!r&&!i?Y_(s,a):Nn(0),d=o.left+a.scrollLeft-l.x-c.x,f=o.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function Id(t){return wn(t).position==="static"}function zy(t,e){if(!Dn(t)||wn(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Fn(t)===n&&(n=n.ownerDocument.body),n}function Q_(t,e){const n=At(t);if(Fc(t))return n;if(!Dn(t)){let s=ts(t);for(;s&&!to(s);){if(vn(s)&&!Id(s))return s;s=ts(s)}return n}let r=zy(t,e);for(;r&&RR(r)&&Id(r);)r=zy(r,e);return r&&to(r)&&Id(r)&&!wm(r)?n:r||IR(t)||n}const YR=async function(t){const e=this.getOffsetParent||Q_,n=this.getDimensions,r=await n(t.floating);return{reference:GR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function JR(t){return wn(t).direction==="rtl"}const QR={convertOffsetParentRelativeRectToViewportRelativeRect:FR,getDocumentElement:Fn,getClippingRect:qR,getOffsetParent:Q_,getElementRects:YR,getClientRects:UR,getDimensions:KR,getScale:Di,isElement:vn,isRTL:JR};function Z_(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ZR(t,e){let n=null,r;const s=Fn(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=t.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||e(),!f||!h)return;const g=Il(d),m=Il(s.clientWidth-(c+f)),x=Il(s.clientHeight-(d+h)),y=Il(c),w={rootMargin:-g+"px "+-m+"px "+-x+"px "+-y+"px",threshold:Et(0,es(1,l))||1};let _=!0;function S(k){const E=k[0].intersectionRatio;if(E!==l){if(!_)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!Z_(u,t.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(S,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(t)}return o(!0),i}function XR(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=bm(t),c=s||i?[...u?Ea(u):[],...Ea(e)]:[];
vendor: 9,105 bytes, line 66
66c.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=u&&a?ZR(u,n):null;let f=-1,h=null;o&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let g,m=l?Bs(t):null;l&&x();function x(){const y=Bs(t);m&&!Z_(m,y)&&n(),m=y,g=requestAnimationFrame(x)}return n(),()=>{var y;c.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d==null||d(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const ej=kR,tj=ER,nj=bR,rj=CR,sj=_R,Wy=xR,ij=TR,oj=(t,e,n)=>{const r=new Map,s={platform:QR,...n},i={...s.platform,_c:r};return wR(t,e,{...s,platform:i})};var aj=typeof document<"u",lj=function(){},du=aj?b.useLayoutEffect:lj;function Gu(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Gu(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Gu(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function X_(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Hy(t,e){const n=X_(t);return Math.round(e*n)/n}function Dd(t){const e=b.useRef(t);return du(()=>{e.current=t}),e}function uj(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=b.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(r);Gu(f,r)||h(r);const[g,m]=b.useState(null),[x,y]=b.useState(null),v=b.useCallback(C=>{C!==k.current&&(k.current=C,m(C))},[]),w=b.useCallback(C=>{C!==E.current&&(E.current=C,y(C))},[]),_=i||g,S=o||x,k=b.useRef(null),E=b.useRef(null),T=b.useRef(c),A=l!=null,j=Dd(l),W=Dd(s),$=Dd(u),ne=b.useCallback(()=>{if(!k.current||!E.current)return;const C={placement:e,strategy:n,middleware:f};W.current&&(C.platform=W.current),oj(k.current,E.current,C).then(R=>{const M={...R,isPositioned:$.current!==!1};I.current&&!Gu(T.current,M)&&(T.current=M,tl.flushSync(()=>{d(M)}))})},[f,e,n,W,$]);du(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[u]);const I=b.useRef(!1);du(()=>(I.current=!0,()=>{I.current=!1}),[]),du(()=>{if(_&&(k.current=_),S&&(E.current=S),_&&S){if(j.current)return j.current(_,S,ne);ne()}},[_,S,ne,j,A]);const X=b.useMemo(()=>({reference:k,floating:E,setReference:v,setFloating:w}),[v,w]),Y=b.useMemo(()=>({reference:_,floating:S}),[_,S]),H=b.useMemo(()=>{const C={position:n,left:0,top:0};if(!Y.floating)return C;const R=Hy(Y.floating,c.x),M=Hy(Y.floating,c.y);return a?{...C,transform:"translate("+R+"px, "+M+"px)",...X_(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:M}},[n,a,Y.floating,c.x,c.y]);return b.useMemo(()=>({...c,update:ne,refs:X,elements:Y,floatingStyles:H}),[c,ne,X,Y,H])}const cj=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?Wy({element:r.current,padding:s}).fn(n):{}:r?Wy({element:r,padding:s}).fn(n):{}}}},dj=(t,e)=>({...ej(t),options:[t,e]}),hj=(t,e)=>({...tj(t),options:[t,e]}),fj=(t,e)=>({...ij(t),options:[t,e]}),pj=(t,e)=>({...nj(t),options:[t,e]}),mj=(t,e)=>({...rj(t),options:[t,e]}),gj=(t,e)=>({...sj(t),options:[t,e]}),yj=(t,e)=>({...cj(t),options:[t,e]});var vj="Arrow",e1=b.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return p.jsx(mt.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});e1.displayName=vj;var wj=e1;function xj(t){const[e,n]=b.useState(void 0);return Xr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var t1="Popper",[n1,r1]=Ic(t1),[r3,s1]=n1(t1),i1="PopperAnchor",o1=b.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=s1(i1,n),o=b.useRef(null),a=yn(e,o);return b.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:p.jsx(mt.div,{...s,ref:a})});o1.displayName=i1;var Sm="PopperContent",[bj,_j]=n1(Sm),a1=b.forwardRef((t,e)=>{var he,Ys,dr,ds,hr,Js;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=t,x=s1(Sm,n),[y,v]=b.useState(null),w=yn(e,fr=>v(fr)),[_,S]=b.useState(null),k=xj(_),E=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,A=r+(i!=="center"?"-"+i:""),j=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},W=Array.isArray(u)?u:[u],$=W.length>0,ne={padding:j,boundary:W.filter(kj),altBoundary:$},{refs:I,floatingStyles:X,placement:Y,isPositioned:H,middlewareData:C}=uj({strategy:"fixed",placement:A,whileElementsMounted:(...fr)=>XR(...fr,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[dj({mainAxis:s+T,alignmentAxis:o}),l&&hj({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?fj():void 0,...ne}),l&&pj({...ne}),mj({...ne,apply:({elements:fr,rects:cl,availableWidth:ed,availableHeight:dl})=>{const{width:td,height:_o}=cl.reference,Qs=fr.floating.style;Qs.setProperty("--radix-popper-available-width",`${ed}px`),Qs.setProperty("--radix-popper-available-height",`${dl}px`),Qs.setProperty("--radix-popper-anchor-width",`${td}px`),Qs.setProperty("--radix-popper-anchor-height",`${_o}px`)}}),_&&yj({element:_,padding:a}),Ej({arrowWidth:E,arrowHeight:T}),f&&gj({strategy:"referenceHidden",...ne})]}),[R,M]=c1(Y),J=Zr(g);Xr(()=>{H&&(J==null||J())},[H,J]);const G=(he=C.arrow)==null?void 0:he.x,ie=(Ys=C.arrow)==null?void 0:Ys.y,ae=((dr=C.arrow)==null?void 0:dr.centerOffset)!==0,[Le,Ze]=b.useState();return Xr(()=>{y&&Ze(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:H?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Le,"--radix-popper-transform-origin":[(ds=C.transformOrigin)==null?void 0:ds.x,(hr=C.transformOrigin)==null?void 0:hr.y].join(" "),...((Js=C.hide)==null?void 0:Js.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(bj,{scope:n,placedSide:R,onArrowChange:S,arrowX:G,arrowY:ie,shouldHideArrow:ae,children:p.jsx(mt.div,{"data-side":R,"data-align":M,...m,ref:w,style:{...m.style,animation:H?void 0:"none"}})})})});a1.displayName=Sm;var l1="PopperArrow",Sj={top:"bottom",right:"left",bottom:"top",left:"right"},u1=b.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=_j(l1,r),o=Sj[i.placedSide];return p.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:p.jsx(wj,{...s,ref:n,style:{...s.style,display:"block"}})})});u1.displayName=l1;function kj(t){return t!==null}var Ej=t=>({name:"transformOrigin",options:t,fn(e){var x,y,v;const{placement:n,rects:r,middlewareData:s}=e,o=((x=s.arrow)==null?void 0:x.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=c1(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,h=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let g="",m="";return u==="bottom"?(g=o?d:`${f}px`,m=`${-l}px`):u==="top"?(g=o?d:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=o?d:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=o?d:`${h}px`),{data:{x:g,y:m}}}});function c1(t){const[e,n="center"]=t.split("-");return[e,n]}var Tj=o1,Cj=a1,Pj=u1,[Vc,s3]=Ic("Tooltip",[r1]),km=r1(),d1="TooltipProvider",Aj=700,qy="tooltip.open",[Rj,h1]=Vc(d1),f1=t=>{const{__scopeTooltip:e,delayDuration:n=Aj,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(Rj,{scope:e,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>
vendor: 2,460 bytes, line 66
66o.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:i})};f1.displayName=d1;var p1="Tooltip",[i3,Bc]=Vc(p1),gf="TooltipTrigger",jj=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=Bc(gf,n),i=h1(gf,n),o=km(n),a=b.useRef(null),l=yn(e,a,s.onTriggerChange),u=b.useRef(!1),c=b.useRef(!1),d=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(Tj,{asChild:!0,...o,children:p.jsx(mt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Ve(t.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ve(t.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Ve(t.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Ve(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:Ve(t.onBlur,s.onClose),onClick:Ve(t.onClick,s.onClose)})})});jj.displayName=gf;var Oj="TooltipPortal",[o3,Nj]=Vc(Oj,{forceMount:void 0}),no="TooltipContent",m1=b.forwardRef((t,e)=>{const n=Nj(no,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,o=Bc(no,t.__scopeTooltip);return p.jsx(cm,{present:r||o.open,children:o.disableHoverableContent?p.jsx(g1,{side:s,...i,ref:e}):p.jsx(Lj,{side:s,...i,ref:e})})}),Lj=b.forwardRef((t,e)=>{const n=Bc(no,t.__scopeTooltip),r=h1(no,t.__scopeTooltip),s=b.useRef(null),i=yn(e,s),[o,a]=b.useState(null),{trigger:l,onClose:u}=n,c=s.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((g,m)=>{const x=g.currentTarget,y={x:g.clientX,y:g.clientY},v=Fj(y,x.getBoundingClientRect()),w=Uj(y,v),_=Vj(m.getBoundingClientRect()),S=zj([...w,..._]);a(S),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&c){const g=x=>h(x,c),m=x=>h(x,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,h,f]),b.useEffect(()=>{if(o){const g=m=>{const x=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(x))||(c==null?void 0:c.contains(x)),w=!Bj(y,o);v?f():w&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,o,u,f]),p.jsx(g1,{...t,ref:i})}
66),[Ij,Dj]=Vc(p1,{isInside:!1}),Mj=XC("TooltipContent"),g1=b.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=Bc(no,n),u=km(n),{onClose:c}=l;return b.useEffect(()=>(document.addEventListener(qy,c),()=>document.removeEventListener(qy,c)),[c]),b.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),p.jsx(um,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:p.jsxs(Cj,{"data-state":l.stateAttribute,...u,...a,ref:e,style:{...a.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:[p.jsx(Mj,{children:r}),p.jsx(Ij,{scope:n,isInside:!0,children:p.jsx(kP,{id:l.contentId,role:"tooltip",children:s||r})})]})})});m1.displayName=no;var y1="TooltipArrow",$j=b.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=km(n);return Dj(y1,n).isInside?null:p.jsx(Pj,{...s,...r,ref:e})});$j.displayName=y1;function Fj(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.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 Uj(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function Vj(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function Bj(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],u=a.x,c=a.y,d=l.x,f=l.y;c>r!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(s=!s)}return s}function zj(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Wj(e)}function Wj(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const s=t[r];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[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(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var Hj=f1,v1=m1;const qj=Hj,Kj=b.forwardRef(({className:t,sideOffset:e=4,...n},r)=>p.jsx(v1,{ref:r,sideOffset:e,className:$n("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",t),...n}));Kj.displayName=v1.displayName;var zc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wc=typeof window>"u"||"Deno"in globalThis;function sn(){}function Gj(t,e){return typeof t=="function"?t(e):t}function Yj(t){return typeof t=="number"&&t>=0&&t!==1/0}function Jj(t,e){return Math.max(t+(e||0)-Date.now(),0)}function yf(t,e){return typeof t=="function"?t(e):t}function Qj(t,e){return typeof t=="function"?t(e):t}function Ky(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==Em(o,e.options))return!1}else if(!Ca(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Gy(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Ta(e.options.mutationKey)!==Ta(i))return!1}else if(!Ca(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function Em(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ta)(t)}function Ta(t){return JSON.stringify(t,(e,n)=>vf(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ca(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ca(t[n],e[n])):!1}function w1(t,e){if(t===e)return t;const n=Yy(t)&&Yy(e);if(n||vf(t)&&vf(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),o=i.length,a=n?[]:{},l=new Set(r);let u=0;for(let c=0;c<o;c++){const d=n?c:i[c];(!n&&l.has(d)||n)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,u++):(a[d]=w1(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&u++)}return s===o&&u===s?t:a}return e}function Yy(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function vf(t){if(!Jy(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Jy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Jy(t){return Object.prototype.toString.call(t)==="[object Object]"}function Zj(t){return new Promise(e=>{setTimeout(e,t)})}function Xj(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?w1(t,e):e}function eO(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function tO(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Tm=Symbol();function x1(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Tm?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ps,Rr,Ui,Nw,nO=(Nw=class extends zc{constructor(){super();ce(this,Ps);ce(this,Rr);ce(this,Ui);te(this,Ui,e=>{if(!Wc&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Rr)||this.setEventListener(P(this,Ui))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,Rr))==null||e.call(this),te(this,Rr,void 0))}setEventListener(e){var n;te(this,Ui,e),(n=P(this,Rr))==null||n.call(this),te(this,Rr,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){P(this,Ps)!==e&&(te(this,Ps,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 4,924 bytes, line 66
66this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof P(this,Ps)=="boolean"?P(this,Ps):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ps=new WeakMap,Rr=new WeakMap,Ui=new WeakMap,Nw),b1=new nO,Vi,jr,Bi,Lw,rO=(Lw=class extends zc{constructor(){super();ce(this,Vi,!0);ce(this,jr);ce(this,Bi);te(this,Bi,e=>{if(!Wc&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,jr)||this.setEventListener(P(this,Bi))}onUnsubscribe(){var e;this.hasListeners()||((e=P(this,jr))==null||e.call(this),te(this,jr,void 0))}setEventListener(e){var n;te(this,Bi,e),(n=P(this,jr))==null||n.call(this),te(this,jr,e(this.setOnline.bind(this)))}setOnline(e){P(this,Vi)!==e&&(te(this,Vi,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return P(this,Vi)}},Vi=new WeakMap,jr=new WeakMap,Bi=new WeakMap,Lw),Yu=new rO;function sO(){let t,e;const n=new Promise((s,i)=>{t=s,e=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}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function iO(t){return Math.min(1e3*2**t,3e4)}function _1(t){return(t??"online")==="online"?Yu.isOnline():!0}var S1=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Md(t){return t instanceof S1}function k1(t){let e=!1,n=0,r=!1,s;const i=sO(),o=m=>{var x;r||(f(new S1(m)),(x=t.abort)==null||x.call(t))},a=()=>{e=!0},l=()=>{e=!1},u=()=>b1.isFocused()&&(t.networkMode==="always"||Yu.isOnline())&&t.canRun(),c=()=>_1(t.networkMode)&&t.canRun(),d=m=>{var x;r||(r=!0,(x=t.onSuccess)==null||x.call(t,m),s==null||s(),i.resolve(m))},f=m=>{var x;r||(r=!0,(x=t.onError)==null||x.call(t,m),s==null||s(),i.reject(m))},h=()=>new Promise(m=>{var x;s=y=>{(r||u())&&m(y)},(x=t.onPause)==null||x.call(t)}).then(()=>{var m;s=void 0,r||(m=t.onContinue)==null||m.call(t)}),g=()=>{if(r)return;let m;const x=n===0?t.initialPromise:void 0;try{m=x??t.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(d).catch(y=>{var k;if(r)return;const v=t.retry??(Wc?0:3),w=t.retryDelay??iO,_=typeof w=="function"?w(n,y):w,S=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,y);if(e||!S){f(y);return}n++,(k=t.onFail)==null||k.call(t,n,y),Zj(_).then(()=>u()?void 0:h()).then(()=>{e?f(y):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?g():h().then(g),i)}}var oO=t=>setTimeout(t,0);function aO(){let t=[],e=0,n=a=>{a()},r=a=>{a()},s=oO;const i=a=>{e?t.push(a):s(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var ut=aO(),As,Iw,E1=(Iw=class{constructor(){ce(this,As)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yj(this.gcTime)&&te(this,As,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Wc?1/0:5*60*1e3))}clearGcTimeout(){P(this,As)&&(clearTimeout(P(this,As)),te(this,As,void 0))}},As=new WeakMap,Iw),zi,Rs,Dt,js,nt,Ga,Os,an,zn,Dw,lO=(Dw=class extends E1{constructor(e){super();ce(this,an);ce(this,zi);ce(this,Rs);ce(this,Dt);ce(this,js);ce(this,nt);ce(this,Ga);ce(this,Os);te(this,Os,!1),te(this,Ga,e.defaultOptions),this.setOptions(e.options),this.observers=[],te(this,js,e.client),te(this,Dt,P(this,js).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,te(this,zi,cO(this.options)),this.state=e.state??P(this,zi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=P(this,nt))==null?void 0:e.promise}setOptions(e){this.options={...P(this,Ga),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Dt).remove(this)}setData(e,n){const r=Xj(this.state.data,e,this.options);return Xe(this,an,zn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Xe(this,an,zn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=P(this,nt))==null?void 0:r.promise;return(s=P(this,nt))==null||s.cancel(e),n?n.then(sn).catch(sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,zi))}isActive(){return this.observers.some(e=>Qj(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tm||this.state.dataUpdateCount+this.state.errorUpdate
66Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>yf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Jj(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=P(this,nt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=P(this,nt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),P(this,Dt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(P(this,nt)&&(P(this,Os)?P(this,nt).cancel({revert:!0}):P(this,nt).cancelRetry()),this.scheduleGc()),P(this,Dt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Xe(this,an,zn).call(this,{type:"invalidate"})}fetch(e,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,nt))return P(this,nt).continueRetry(),P(this,nt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(te(this,Os,!0),r.signal)})},i=()=>{const f=x1(this.options,n),g=(()=>{const m={client:P(this,js),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return te(this,Os,!1),this.options.persister?this.options.persister(f,g,this):f(g)},a=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,js),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),te(this,Rs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Xe(this,an,zn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,m,x;Md(f)&&f.silent||Xe(this,an,zn).call(this,{type:"error",error:f}),Md(f)||((g=(h=P(this,Dt).config).onError)==null||g.call(h,f,this),(x=(m=P(this,Dt).config).onSettled)==null||x.call(m,this.state.data,f,this)),this.scheduleGc()};return te(this,nt,k1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){l(y);return}(g=(h=P(this,Dt).config).onSuccess)==null||g.call(h,f,this),(x=(m=P(this,Dt).config).onSettled)==null||x.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{Xe(this,an,zn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Xe(this,an,zn).call(this,{type:"pause"})},onContinue:()=>{Xe(this,an,zn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),P(this,nt).start()}},zi=new WeakMap,Rs=new WeakMap,Dt=new WeakMap,js=new WeakMap,nt=new WeakMap,Ga=new WeakMap,Os=new WeakMap,an=new WeakSet,zn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...uO(r.data,this.options),fetchMeta:e.meta??null};case"success":return te(this,Rs,void 0),{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return Md(s)&&s.revert&&P(this,Rs)?{...P(this,Rs),fetchStatus:"idle"}
vendor: 10,615 bytes, line 66
66:{...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,...e.state}}};this.state=n(this.state),ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Dt).notify({query:this,type:"updated",action:e})})},Dw);function uO(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_1(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function cO(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 En,Mw,dO=(Mw=class extends zc{constructor(e={}){super();ce(this,En);this.config=e,te(this,En,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??Em(s,n);let o=this.get(i);return o||(o=new lO({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){P(this,En).has(e.queryHash)||(P(this,En).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=P(this,En).get(e.queryHash);n&&(e.destroy(),n===e&&P(this,En).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ut.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return P(this,En).get(e)}getAll(){return[...P(this,En).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Ky(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>Ky(e,r)):n}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){ut.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ut.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},En=new WeakMap,Mw),Tn,at,Ns,Cn,xr,$w,hO=($w=class extends E1{constructor(e){super();ce(this,Cn);ce(this,Tn);ce(this,at);ce(this,Ns);this.mutationId=e.mutationId,te(this,at,e.mutationCache),te(this,Tn,[]),this.state=e.state||fO(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){P(this,Tn).includes(e)||(P(this,Tn).push(e),this.clearGcTimeout(),P(this,at).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){te(this,Tn,P(this,Tn).filter(n=>n!==e)),this.scheduleGc(),P(this,at).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){P(this,Tn).length||(this.state.status==="pending"?this.scheduleGc():P(this,at).remove(this))}continue(){var e;return((e=P(this,Ns))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,u,c,d,f,h,g,m,x,y,v,w,_,S,k,E,T;const n=()=>{Xe(this,Cn,xr).call(this,{type:"continue"})};te(this,Ns,k1({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(A,j)=>{Xe(this,Cn,xr).call(this,{type:"failed",failureCount:A,error:j})},onPause:()=>{Xe(this,Cn,xr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,at).canRun(this)}));const r=this.state.status==="pending",s=!P(this,Ns).canStart();try{if(r)n();else{Xe(this,Cn,xr).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=P(this,at).config).onMutate)==null?void 0:o.call(i,e,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));j!==this.state.context&&Xe(this,Cn,xr).call(this,{type:"pending",context:j,variables:e,isPaused:s})}const A=await P(this,Ns).start();return await((c=(u=P(this,at).config).onSuccess)==null?void 0:c.call(u,A,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,A,e,this.state.context)),await((g=(h=P(this,at).config).onSettled)==null?void 0:g.call(h,A,null,this.state.variables,this.state.context,this)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,A,null,e,this.state.context)),Xe(this,Cn,xr).call(this,{type:"success",data:A}),A}catch(A){try{throw await((v=(y=P(this,at).config).onError)==null?void 0:v.call(y,A,e,this.state.context,this)),await((_=(w=this.options).onError)==null?void 0:_.call(w,A,e,this.state.context)),await((k=(S=P(this,at).config).onSettled)==null?void 0:k.call(S,void 0,A,this.state.variables,this.state.context,this)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,A,e,this.state.context)),A}finally{Xe(this,Cn,xr).call(this,{type:"error",error:A})}}finally{P(this,at).runNext(this)}}},Tn=new WeakMap,at=new WeakMap,Ns=new WeakMap,Cn=new WeakSet,xr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ut.batch(()=>{P(this,Tn).forEach(r=>{r.onMutationUpdate(e)}),P(this,at).notify({mutation:this,type:"updated",action:e})})},$w);function fO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yn,ln,Ya,Fw,pO=(Fw=class extends zc{constructor(e={}){super();ce(this,Yn);ce(this,ln);ce(this,Ya);this.config=e,te(this,Yn,new Set),te(this,ln,new Map),te(this,Ya,0)}build(e,n,r){const s=new hO({mutationCache:this,mutationId:++fl(this,Ya)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){P(this,Yn).add(e);const n=Dl(e);if(typeof n=="string"){const r=P(this,ln).get(n);r?r.push(e):P(this,ln).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(P(this,Yn).delete(e)){const n=Dl(e);if(typeof n=="string"){const r=P(this,ln).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&P(this,ln).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Dl(e);if(typeof n=="string"){const r=P(this,ln).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Dl(e);if(typeof n=="string"){const s=(r=P(this,ln).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ut.batch(()=>{P(this,Yn).forEach(e=>{this.notify({type:"removed",mutation:e})}),P(this,Yn).clear(),P(this,ln).clear()})}getAll(){return Array.from(P(this,Yn))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>Gy(n,r))}findAll(e={}){return this.getAll().filter(n=>Gy(e,n))}notify(e){ut.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ut.batch(()=>Promise.all(e.map(n=>n.continue().catch(sn))))}},Yn=new WeakMap,ln=new WeakMap,Ya=new WeakMap,Fw);function Dl(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Qy(t){return{onFetch:(e,n)=>{var c,d,f,h,g;const r=e.options,s=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=e.state.data)==null?void 0:h.pages)||[],o=((g=e.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const x=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},y=x1(e.options,e.fetchOptions),v=async(w,_,S)=>{if(m)return Promise.reject();if(_==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const W={client:e.client,queryKey:e.queryKey,pageParam:_,direction:S?"backward":"forward",meta:e.options.meta};return x(W),W})(),T=await y(E),{maxPages:A}=e.options,j=S?tO:eO;return{pages:j(w.pages,T,A),pageParams:j(w.pageParams,_,A)}};if(s&&i.length){const w=s==="backward",_=w?mO:Zy,S={pages:i,pageParams:o},k=_(r,S);a=await v(S,k,w)}else{const w=t??i.length;do{const _=l===0?o[0]??r.initialPageParam:Zy(r,a);if(l>0&&_==null)break;a=await v(a,_),l++}while(l<w)}return a};e.options.persister?e.fetchFn=()=>{var m,x;return(x=(m=e.options).persister)==null?void 0:x.call(m,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function Zy(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function mO(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Ae,Or,Nr,Wi,Hi,Lr,qi,Ki,Uw,gO=(Uw=class{constructor(t={}){ce(this,Ae);ce(this,Or);ce(this,Nr);ce(this,Wi);ce(this,Hi);ce(this,Lr);ce(this,qi);ce(this,Ki);te(this,Ae,t.queryCache||new dO),te(this,Or,t.mutationCache||new pO),te(this,Nr,t.defaultOptions||{}),te(this,Wi,new Map),te(this,Hi,new Map),te(this,Lr,0)}mount(){fl(this,Lr)._++,P(this,Lr)===1&&(te(this,qi,b1.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,Ae).onFocus())})),te(this,Ki,Yu.subscribe(async t=>{t&&(await this.resumePausedMutations(),P(this,Ae).onOnline())})))}unmount(){var t,e;fl(this,Lr)._--,P(this,Lr)===0&&((t=P(this,qi))==null||t.call(this),te(this,qi,void 0),(e=P(this,Ki))==null||e.call(this),te(this,Ki,void 0))}isFetching(t){return P(this,Ae).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return P(this,Or).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=P(this,Ae).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=P(this,Ae).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(yf(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return P(this,Ae).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=P(this,Ae).get(r.queryHash),i=s==null?void 0:s.state.data,o=Gj(e,i);if(o!==void 0)return P(this,Ae).build(this,r).setData(o,{...n,manual:!0})}
66setQueriesData(t,e,n){return ut.batch(()=>P(this,Ae).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=P(this,Ae).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=P(this,Ae);ut.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=P(this,Ae);return ut.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=ut.batch(()=>P(this,Ae).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(sn).catch(sn)}invalidateQueries(t,e={}){return ut.batch(()=>(P(this,Ae).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=ut.batch(()=>P(this,Ae).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(sn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(sn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=P(this,Ae).build(this,e);return n.isStaleByTime(yf(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(sn).catch(sn)}fetchInfiniteQuery(t){return t.behavior=Qy(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(sn).catch(sn)}ensureInfiniteQueryData(t){return t.behavior=Qy(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Yu.isOnline()?P(this,Or).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,Ae)}getMutationCache(){return P(this,Or)}getDefaultOptions(){return P(this,Nr)}setDefaultOptions(t){te(this,Nr,t)}setQueryDefaults(t,e){P(this,Wi).set(Ta(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...P(this,Wi).values()],n={};return e.forEach(r=>{Ca(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){P(this,Hi).set(Ta(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...P(this,Hi).values()],n={};return e.forEach(r=>{Ca(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...P(this,Nr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Em(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Tm&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...P(this,Nr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){P(this,Ae).clear(),P(this,Or).clear()}},Ae=new WeakMap,Or=new WeakMap,Nr=new WeakMap,Wi=new WeakMap,Hi=new WeakMap,Lr=new WeakMap,qi=new WeakMap,Ki=new WeakMap,Uw),yO=b.createContext(void 0),vO=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),p.jsx(yO.Provider,{value:t,children:e}));/** 67 * @remix-run/router v1.23.0 68 * 69 * Copyright (c) Remix Software Inc. 70 * 71 * This source code is licensed under the MIT license found in the 72 * LICENSE.md file in the root directory of this source tree. 73 * 74 * @license MIT 75 */function Pa(){return Pa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Pa.apply(this,arguments)}var Mr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Mr||(Mr={}));const Xy="popstate";function wO(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return wf("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Ju(s)}return bO(e,n,null,t)}function $e(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function T1(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function xO(){return Math.random().toString(36).substr(2,8)}function ev(t,e){return{usr:t.state,key:t.key,idx:e}}function wf(t,e,n,r){return n===void 0&&(n=null),Pa({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?yo(e):e,{state:n,key:e&&e.key||r||xO()})}function Ju(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function yo(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function bO(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Mr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Pa({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){a=Mr.Pop;let x=c(),y=x==null?null:x-u;u=x,l&&l({action:a,location:m.location,delta:y})}function f(x,y){a=Mr.Push;let v=wf(m.location,x,y);u=c()+1;let w=ev(v,u),_=m.createHref(v);try{o.pushState(w,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:m.location,delta:1})}function h(x,y){a=Mr.Replace;let v=wf(m.location,x,y);u=c();let w=ev(v,u),_=m.createHref(v);o.replaceState(w,"",_),i&&l&&l({action:a,location:m.location,delta:0})}function g(x){let y=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof x=="str
75ing"?x:Ju(x);return v=v.replace(/ $/,"%20"),$e(y,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,y)}let m={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Xy,d),l=x,()=>{s.removeEventListener(Xy,d),l=null}},createHref(x){return e(s,x)},createURL:g,encodeLocation(x){let y=g(x);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:h,go(x){return o.go(x)}};return m}var tv;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(tv||(tv={}));function _O(t,e,n){return n===void 0&&(n="/"),SO(t,e,n,!1)}function SO(t,e,n,r){let s=typeof e=="string"?yo(e):e,i=Cm(s.pathname||"/",n);if(i==null)return null;let o=C1(t);kO(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=IO(i);a=NO(o[l],u,r)}return a}function C1(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Gr([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&($e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),C1(i.children,e,c,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:jO(u,i.index),routesMeta:c})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of P1(i.path))s(i,o,l)}),e}function P1(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=P1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function kO(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:OO(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const EO=/^:[\w-]+$/,TO=3,CO=2,PO=1,AO=10,RO=-2,nv=t=>t==="*";function jO(t,e){let n=t.split("/"),r=n.length;return n.some(nv)&&(r+=RO),e&&(r+=CO),n.filter(s=>!nv(s)).reduce((s,i)=>s+(EO.test(i)?TO:i===""?PO:AO),r)}function OO(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function NO(t,e,n){let{routesMeta:r}=t,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=i==="/"?e:e.slice(i.length)||"/",d=rv({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=rv({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 9,263 bytes, lines 75-84
75Object.assign(s,d.params),o.push({params:s,pathname:Gr([i,d.pathname]),pathnameBase:FO(Gr([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=Gr([i,d.pathnameBase]))}return o}function rv(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=LO(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let m=a[d]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[d];return h&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:t}}function LO(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),T1(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function IO(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return T1(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Cm(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function DO(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?yo(t):t;return{pathname:n?n.startsWith("/")?n:MO(n,e):e,search:UO(r),hash:VO(s)}}function MO(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function $d(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` 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 $O(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function A1(t,e){let n=$O(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function R1(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=yo(t):(s=Pa({},t),$e(!s.pathname||!s.pathname.includes("?"),$d("?","pathname","search",s)),$e(!s.pathname||!s.pathname.includes("#"),$d("#","pathname","hash",s)),$e(!s.search||!s.search.includes("#"),$d("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=DO(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Gr=t=>t.join("/").replace(/\/\/+/g,"/"),FO=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),UO=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,VO=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function BO(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const j1=["post","put","patch","delete"];new Set(j1);const zO=["get",...j1];new Set(zO);/** 76 * React Router v6.30.1 77 * 78 * Copyright (c) Remix Software Inc. 79 * 80 * This source code is licensed under the MIT license found in the 81 * LICENSE.md file in the root directory of this source tree. 82 * 83 * @license MIT 84 */function Aa(){return Aa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Aa.apply(this,arguments)}const Pm=b.createContext(null),WO=b.createContext(null),Ks=b.createContext(null),Hc=b.createContext(null),us=b.createContext({outlet:null,matches:[],isDataRoute:!1}),O1=b.createContext(null);function HO(t,e){let{relative:n}=e===void 0?{}:e;sl()||$e(!1);let{basename:r,navigator:s}=b.useContext(Ks),{hash:i,pathname:o,search:a}=L1(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Gr([r,o])),s.createHref({pathname:l,search:a,hash:i})}function sl(){return b.useContext(Hc)!=null}function Gs(){return sl()||$e(!1),b.useContext(Hc).location}function N1(t){b.useContext(Ks).static||b.useLayoutEffect(t)}function Am(){let{isDataRoute:t}=b.useContext(us);return t?iN():qO()}function qO(){sl()||$e(!1);let t=b.useContext(Pm),{basename:e,future:n,navigator:r}=b.useContext(Ks),{matches:s}=b.useContext(us),{pathname:i}=Gs(),o=JSON.stringify(A1(s,n.v7_relativeSplatPath)),a=b.useRef(!1);return N1(()=>{a.current=!0}),b.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=R1(u,JSON.parse(o),i,c.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Gr([e,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[e,r,o,i,t])}function KO(){let{matches:t}=b.useContext(us),e=t[t.length-1];return e?e.params:{}}function L1(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=b.useContext(Ks),{matches:s}=b.useContext(us),{pathname:i}=Gs(),o=JSON.stringify(A1(s,r.v7_relativeSplatPath));return b.useMemo(()=>R1(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function GO(t,e){return YO(t,e)}function YO(t,e,n,r){sl()||$e(!1);let{navigator:s}=b.useContext(Ks),{matches:i}=b.useContext(us),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Gs(),c;if(e){var d;let x=typeof e=="string"?yo(e):e;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||$e(!1),c=x}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let x=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let g=_O(t,{pathname:h}),m=eN(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Gr([l,s.encodeLocation?s.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Gr([l,s.encodeLocation?s.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return e&&m?b.createElement(Hc.Provider,{value:{location:Aa({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Mr.Pop}},m):m}function JO(){let t=sN(),e=BO(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:s},n):null,null)}const QO=b.createElement(JO,null);class ZO extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?b.createElement(us.Provider,{value:this.props.routeContext},b.createElement(O1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function XO(t){let{routeContext:e,match:n,children:r}=t,s=b.useContext(Pm);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(us.Provider,{value:e},r)}function eN(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||$e(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=n,g=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||g){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,f)=>{let h,g=!1,m=null,x=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||QO,l&&(u<0&&f===0?(g=!0,x=null):u===f&&(g=!0,x=d.route.hydrateFallbackElement||null)));let y=e.concat(o.slice(0,f+1)),v=()=>{let w;return h?w=m:g?w=x:d.route.Component?w=b.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,b.createElement(XO,{match:d,routeC
84ontext:{outlet:c,matches:y,isDataRoute:n!=null},children:w})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(ZO,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var I1=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(I1||{}),Qu=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Qu||{});function tN(t){let e=b.useContext(Pm);return e||$e(!1),e}function nN(t){let e=b.useContext(WO);return e||$e(!1),e}function rN(t){let e=b.useContext(us);return e||$e(!1),e}function D1(t){let e=rN(),n=e.matches[e.matches.length-1];return n.route.id||$e(!1),n.route.id}function sN(){var t;let e=b.useContext(O1),n=nN(Qu.UseRouteError),r=D1(Qu.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function iN(){let{router:t}=tN(I1.UseNavigateStable),e=D1(Qu.UseNavigateStable),n=b.useRef(!1);return N1(()=>{n.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Aa({fromRouteId:e},i)))},[t,e])}function oN(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function en(t){$e(!1)}function aN(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Mr.Pop,navigator:i,static:o=!1,future:a}=t;sl()&&$e(!1);let l=e.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:l,navigator:i,static:o,future:Aa({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=yo(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:g="default"}=r,m=b.useMemo(()=>{let x=Cm(c,l);return x==null?null:{location:{pathname:x,search:d,hash:f,state:h,key:g},navigationType:s}},[l,c,d,f,h,g,s]);return m==null?null:b.createElement(Ks.Provider,{value:u},b.createElement(Hc.Provider,{children:n,value:m}))}function lN(t){let{children:e,location:n}=t;return GO(xf(e),n)}new Promise(()=>{});function xf(t,e){e===void 0&&(e=[]);let n=[];return b.Children.forEach(t,(r,s)=>{if(!b.isValidElement(r))return;let i=[...e,s];if(r.type===b.Fragment){n.push.apply(n,xf(r.props.children,i));return}r.type!==en&&$e(!1),!r.props.index||!r.props.children||$e(!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=xf(r.props.children,i)),n.push(o)}),n}/** 85 * React Router DOM v6.30.1 86 * 87 * Copyright (c) Remix Software Inc. 88 * 89 * This source code is licensed under the MIT license found in the 90 * LICENSE.md file in the root directory of this source tree. 91 * 92 * @license MIT 93 */function bf(){return bf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bf.apply(this,arguments)}function uN(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function cN(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function dN(t,e){return t.button===0&&(!e||e==="_self")&&!cN(t)}function _f(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function hN(t,e){let n=_f(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const fN=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],pN="6";try{window.__reactRouterVersion=pN}catch{}const mN="startTransition",sv=Zw[mN];function gN(t){let{basename:e,children:n,future:r,window:s}=t,i=b.useRef();i.current==null&&(i.current=wO({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=b.useCallback(d=>{u&&sv?sv(()=>l(d)):l(d)},[l,u]);return b.useLayoutEffect(()=>o.listen(c),[o,c]),b.useEffect(()=>
93oN(r),[r]),b.createElement(aN,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const yN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,me=b.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,f=uN(e,fN),{basename:h}=b.useContext(Ks),g,m=!1;if(typeof u=="string"&&vN.test(u)&&(g=u,yN))try{let w=new URL(window.location.href),_=u.startsWith("//")?new URL(w.protocol+u):new URL(u),S=Cm(_.pathname,h);_.origin===w.origin&&S!=null?u=S+_.search+_.hash:m=!0}catch{}let x=HO(u,{relative:s}),y=wN(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function v(w){r&&r(w),w.defaultPrevented||y(w)}return b.createElement("a",bf({},f,{href:g||x,onClick:m||i?r:v,ref:n,target:l}))});var iv;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(iv||(iv={}));var ov;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(ov||(ov={}));function wN(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=Am(),u=Gs(),c=L1(t,{relative:o});return b.useCallback(d=>{if(dN(d,n)){d.preventDefault();let f=r!==void 0?r:Ju(u)===Ju(c);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,t,i,o,a])}function M1(t){let e=b.useRef(_f(t)),n=b.useRef(!1),r=Gs(),s=b.useMemo(()=>hN(r.search,n.current?null:e.current),[r.search]),i=Am(),o=b.useCallback((a,l)=>{const u=_f(typeof a=="function"?a(s):a);n.current=!0,i("?"+u,l)},[i,s]);return[s,o]}const $1=b.createContext({});function xN(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const F1=typeof window<"u",bN=F1?b.useLayoutEffect:b.useEffect,Rm=b.createContext(null);function jm(t,e){t.indexOf(e)===-1&&t.push(e)}function Zu(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Mn=(t,e,n)=>n>e?e:n<t?t:n;let qc=()=>{},ro=()=>{};const ar={},U1=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function V1(t){return typeof t=="object"&&t!==null}const B1=t=>/^0[^.\s]+$/u.test(t);function z1(t){let e;return()=>(e===void 0&&(e=t()),e)}const Bt=t=>t,_N=(t,e)=>n=>e(t(n)),il=(...t)=>t.reduce(_N),Ra=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Om{constructor(){this.subscriptions=[]}add(e){return jm(this.subscriptions,e),()=>Zu(this.subscriptions,e)}notify(e,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zt=t=>t*1e3,Ut=t=>t/1e3;function W1(t,e){return e?t*(1e3/e):0}const H1=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,SN=1e-7,kN=12;function EN(t,e,n,r,s){let i,o,a=0;do o=e+(n-e)/2,i=H1(o,r,s)-t,i>0?n=o:e=o;while(Math.abs(i)>SN&&++a<kN);return o}function ol(t,e,n,r){if(t===e&&n===r)return Bt;const s=i=>EN(i,0,1,t,n);return i=>i===0||i===1?i:H1(s(i),e,r)}const q1=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,K1=t=>e=>1-t(1-e),G1=ol(.33,1.53,.69,.99),Nm=K1(G1),Y1=q1(Nm),J1=t=>(t*=2)<1?.5*Nm(t):.5*(2-Math.pow(2,-10*(t-1))),Lm=t=>1-Math.sin(Math.acos(t)),Q1=K1(Lm),Z1=q1(Lm),TN=ol(.42,0,1,1),CN=ol(0,0,.58,1),X1=ol(.42,0,.58,1),PN=t=>Array.isArray(t)&&typeof t[0]!="number",eS=t=>Array.isArray(t)&&typeof t[0]=="number",av={linear:Bt,easeIn:TN,easeInOut:X1,easeOut:CN,circIn:Lm,circInOut:Z1,circOut:Q1,backIn:Nm,backInOut:Y1,backOut:G1,anticipate:J1},AN=t=>typeof t=="string",lv=t=>{if(eS(t)){ro(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,r,s]=t;return ol(e,n,r,s)}else if(AN(t))return ro(av[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),av[t];return t},Ml=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],uv={value:null,addProjectionMetrics:null};function RN(t,e){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){o.has(d)&&(c.schedule(d),t()),l++,d(a)}const c={schedule:(d,f=!1,h=!1)=>{const m=h&&s?n:r;return f&&o.add(d),m.has(d)||m.add(d),d},cancel:d=>
vendor: 6,939 bytes, line 93
93{r.delete(d),o.delete(d)},process:d=>{if(a=d,s){i=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),e&&uv.value&&uv.value.frameloop[e].push(l),l=0,n.clear(),s=!1,i&&(i=!1,c.process(d))}};return c}const jN=40;function tS(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Ml.reduce((w,_)=>(w[_]=RN(i,e?_:void 0),w),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:g}=o,m=()=>{const w=ar.useManualTiming?s.timestamp:performance.now();n=!1,ar.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(w-s.timestamp,jN),1)),s.timestamp=w,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),g.process(s),s.isProcessing=!1,n&&e&&(r=!1,t(m))},x=()=>{n=!0,r=!0,s.isProcessing||t(m)};return{schedule:Ml.reduce((w,_)=>{const S=o[_];return w[_]=(k,E=!1,T=!1)=>(n||x(),S.schedule(k,E,T)),w},{}),cancel:w=>{for(let _=0;_<Ml.length;_++)o[Ml[_]].cancel(w)},state:s,steps:o}}const{schedule:ve,cancel:ns,state:Ye,steps:Fd}=tS(typeof requestAnimationFrame<"u"?requestAnimationFrame:Bt,!0);let hu;function ON(){hu=void 0}const ct={now:()=>(hu===void 0&&ct.set(Ye.isProcessing||ar.useManualTiming?Ye.timestamp:performance.now()),hu),set:t=>{hu=t,queueMicrotask(ON)}},nS=t=>e=>typeof e=="string"&&e.startsWith(t),rS=nS("--"),NN=nS("var(--"),Im=t=>NN(t)?LN.test(t.split("/*")[0].trim()):!1,LN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function cv(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const vo={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ja={...vo,transform:t=>Mn(0,1,t)},$l={...vo,default:1},ta=t=>Math.round(t*1e5)/1e5,Dm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function IN(t){return t==null}const DN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Mm=(t,e)=>n=>!!(typeof n=="string"&&DN.test(n)&&n.startsWith(t)||e&&!IN(n)&&Object.prototype.hasOwnProperty.call(n,e)),sS=(t,e,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Dm);return{[t]:parseFloat(s),[e]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},MN=t=>Mn(0,255,t),Ud={...vo,transform:t=>Math.round(MN(t))},Ss={test:Mm("rgb","red"),parse:sS("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Ud.transform(t)+", "+Ud.transform(e)+", "+Ud.transform(n)+", "+ta(ja.transform(r))+")"};function $N(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Sf={test:Mm("#"),parse:$N,transform:Ss.transform},al=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),br=al("deg"),Ln=al("%"),V=al("px"),FN=al("vh"),UN=al("vw"),dv={...Ln,parse:t=>Ln.parse(t)/100,transform:t=>Ln.transform(t*100)},_i={test:Mm("hsl","hue"),parse:sS("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Ln.transform(ta(e))+", "+Ln.transform(ta(n))+", "+ta(ja.transform(r))+")"},De={test:t=>Ss.test(t)||Sf.test(t)||_i.test(t),parse:t=>Ss.test(t)?Ss.parse(t):_i.test(t)?_i.parse(t):Sf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ss.transform(t):_i.transform(t),getAnimatableNone:t=>{const e=De.parse(t);return e.alpha=0,De.transform(e)}},VN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function BN(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Dm))==null?void 0:e.length)||0)+(((n=t.match(VN))==null?void 0:n.length)||0)>0}const iS="number",oS="color",zN="var",WN="var(",hv="${}",HN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Oa(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=e.replace(HN,l=>(De.test(l)?(r.color.push(i),s.push(oS),n.push(De.parse(l))):l.startsWith(WN)?(r.var.push(i),s.push(zN),n.push(l)):(r.number.push(i),s.push(iS),n.push(parseFloat(l))),++i,hv)).split(hv);return{values:n,split:a,indexes:r,types:s}}function aS(t){return Oa(t).values}function lS(t){const{split:e,types:n}=Oa(t),r=e.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=e[o],s[o]!==void 0){const a=n[o];a===iS?i+=ta(s[o]):a===oS?i+=De.transform(s[o]):i+=s[o]}return i}}const qN=t=>typeof t=="number"?0:De.test(t)?De.getAnimatableNone(t):t;function KN(t){const e=aS(t);return lS(t)(e.map(qN))}const mn={test:BN,parse:aS,createTransformer:lS,getAnimatableNone:KN};function Vd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function GN({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let s=0,i=0,o=0;if(!e)s=i=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=Vd(l,a,t+1/3),i=Vd(l,a,t),o=Vd(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Xu(t,e){return n=>n>0?e:t}const Te=(t,e,n)=>t+(e-t)*n,Bd=(t,e,n)=>{const r=t*t,s=n*(e*e-r)+r;return s<0?0:Math.sqrt(s)},YN=[Sf,Ss,_i],JN=t=>YN.find(e=>e.test(t));function fv(t){const e=JN(t);if(qc(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===_i&&(n=GN(n)),n}const pv=(t,e)=>{const n=fv(t),r=fv(e);if(!n||!r)return Xu(t,e);const s={...n};return i=>(s.red=Bd(n.red,r.red,i),s.green=Bd(n.green,r.green,i),s.blue=Bd(n.blue,r.blue,i),s.alpha=Te(n.alpha,r.alpha,i),Ss.transform(s))},kf=new Set(["none","hidden"]);function QN(t,e){return kf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ZN(t,e){return n=>Te(t,e,n)}function $m(t){return typeof t=="number"?ZN:typeof t=="string"?Im(t)?Xu:De.test(t)?pv:t2:Array.isArray(t)?uS:typeof t=="object"?De.test(t)?pv:XN:Xu}function uS(t,e){const n=[...t],r=n.length,s=t.map((i,o)=>$m(i)(i,e[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function XN(t,e){const n={...t,...e},r={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(r[s]=$m(t[s])(t[s],e[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function e2(t,e){const n=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const i=e.types[s],o=t.indexes[i][r[i]],a=t.values[o]??0;n[s]=a,r[i]++}return n}const t2=(t,e)=>{const n=mn.createTransformer(e),r=Oa(t),s=Oa(e);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?kf.has(t)&&!s.values.length||kf.has(e)&&!r.values.length?QN(t,e):il(uS(e2(r,s),s.values),n):(qc(!0,`Complex values '${t}' and '${e}
93' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Xu(t,e))};function cS(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Te(t,e,n):$m(t)(t,e)}const n2=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>ve.update(e,n),stop:()=>ns(e),now:()=>Ye.isProcessing?Ye.timestamp:ct.now()}},dS=(t,e,n=10)=>{let r="";const s=Math.max(Math.round(e/n),2);for(let i=0;i<s;i++)r+=Math.round(t(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ec=2e4;function Fm(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<ec;)e+=n,r=t.next(e);return e>=ec?1/0:e}function r2(t,e=100,n){const r=n({...t,keyframes:[0,e]}),s=Math.min(Fm(r),ec);return{type:"keyframes",ease:i=>r.next(s*i).value/e,duration:Ut(s)}}const s2=5;function hS(t,e,n){const r=Math.max(e-s2,0);return W1(n-t(r),e-r)}const ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},zd=.001;function i2({duration:t=ke.duration,bounce:e=ke.bounce,velocity:n=ke.velocity,mass:r=ke.mass}){let s,i;qc(t<=zt(ke.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=Mn(ke.minDamping,ke.maxDamping,o),t=Mn(ke.minDuration,ke.maxDuration,Ut(t)),o<1?(s=u=>{const c=u*o,d=c*t,f=c-n,h=Ef(u,o),g=Math.exp(-d);return zd-f/h*g},i=u=>{const d=u*o*t,f=d*n+n,h=Math.pow(o,2)*Math.pow(u,2)*t,g=Math.exp(-d),m=Ef(Math.pow(u,2),o);return(-s(u)+zd>0?-1:1)*((f-h)*g)/m}):(s=u=>{const c=Math.exp(-u*t),d=(u-n)*t+1;return-zd+c*d},i=u=>{const c=Math.exp(-u*t),d=(n-u)*(t*t);return c*d});const a=5/t,l=a2(s,i,a);if(t=zt(t),isNaN(l))return{stiffness:ke.stiffness,damping:ke.damping,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const o2=12;function a2(t,e,n){let r=n;for(let s=1;s<o2;s++)r=r-t(r)/e(r);return r}function Ef(t,e){return t*Math.sqrt(1-e*e)}const l2=["duration","bounce"],u2=["stiffness","damping","mass"];function mv(t,e){return e.some(n=>t[n]!==void 0)}function c2(t){let e={velocity:ke.velocity,stiffness:ke.stiffness,damping:ke.damping,mass:ke.mass,isResolvedFromDuration:!1,...t};if(!mv(t,u2)&&mv(t,l2))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Mn(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:ke.mass,stiffness:s,damping:i}}else{const n=i2({...t,velocity:0});e={...e,...n,mass:ke.mass},e.isResolvedFromDuration=!0}return e}function tc(t=ke.visualDuration,e=ke.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=c2({...n,velocity:-Ut(n.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),x=o-i,y=Ut(Math.sqrt(l/c)),v=Math.abs(x)<5;r||(r=v?ke.restSpeed.granular:ke.restSpeed.default),s||(s=v?ke.restDelta.granular:ke.restDelta.default);let w;if(m<1){const S=Ef(y,m);w=k=>{const E=Math.exp(-m*y*k);return o-E*((g+m*y*x)/S*Math.sin(S*k)+x*Math.cos(S*k))}}else if(m===1)w=S=>o-Math.exp(-y*S)*(x+(g+y*x)*S);else{const S=y*Math.sqrt(m*m-1);w=k=>{const E=Math.exp(-m*y*k),T=Math.min(S*k,300);return o-E*((g+m*y*x)*Math.sinh(T)+S*x*Math.cosh(T))/S}}const _={calculatedDuration:h&&d||null,next:S=>{const k=w(S);if(h)a.done=S>=d;else{let E=S===0?g:0;m<1&&(E=S===0?zt(g):hS(w,S,k));const T=Math.abs(E)<=r,A=Math.abs(o-k)<=s;a.done=T&&A}return a.value=a.done?o:k,a},toString:()=>{const S=Math.min(Fm(_),ec),k=dS(E=>_.next(S*E).value,S,30);return S+"ms "+k},toTransition:()=>{}};return _}tc.applyToOptions=t=>{const e=r2(t,100,tc);return t.ease=e.ease,t.duration=zt(e.duration),t.type="keyframes",t};function Tf({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=t[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,g=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*e;const x=d+m,y=o===void 0?x:o(x);y!==x&&(m=y-d);const v=T=>-m*Math.exp(-T/r),w=T=>y+v(T),_=T=>{const A=v(T),j=w(T);f.done=Math.abs(A)<=u,f.value=f.done?y:j};let S,k;const E=T=>{h(f.value)&&(S=T,k=tc({keyframes:[f.value,g(f.value)],velocity:hS(w,T,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:T=>{let A=!1;return!k&&S===void 0&&(A=!0,_(T),E(T)),S!==void 0&&T>=S?k.next(T-S):(!A&&_(T),f)}}}function d2(t,e,n){const r=[],s=n||ar.mix||cS,i=t.length-1;for(let o=0;o<i;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||Bt:e;a=il(l,a)}r.push(a)}return r}function h2(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const i=t.length;if(ro(i===e.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=d2(e,r,s),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(c<t[d+1]);d++);const f=Ra(t[d],t[d+1],c);return a[d](f)};return n?c=>u(Mn(t[0],t[i-1],c)):u}function f2(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=Ra(0,e,r);t.push(Te(n,1,s))}}function p2(t){const e=[0];return f2(e,t.length-1),e}function m2(t,e){return t.map(n=>n*e)}function g2(t,e){return t.map(()=>e||X1).splice(0,t.length-1)}function na({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=PN(r)?r.map(lv):lv(r),i={done:!1,value:e[0]},o=m2(n&&n.length===e.length?n:p2(e),t),a=h2(o,e,{ease:Array.isArray(s)?s:g2(e,s)});return{calculatedDuration:t,next:l=>(i.value=a(l),i.done=l>=t,i)}}const y2=t=>t!==null;function Um(t,{repeat:e,repeatType:n="loop"},r,s=1){const i=t.filter(y2),a=s<0||e&&n!=="loop"&&e%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const v2={decay:Tf,inertia:Tf,tween:na,keyframes:na,spring:tc};function fS(t){typeof t.type=="string"&&(t.type=v2[t.type])}class Vm{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const w2=t=>t/100;class Bm extends Vm{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==ct.now()&&this.tick(ct.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;fS(e);const{type:n=na,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=e;let{keyframes:a}=e;const l=n||na;l!==na&&typeof a[0]!="number"&&(this.mixKeyframes=il(w2,cS(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Fm(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:g,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,_=r;if(d){const T=Math.min(this.currentTime,s)/a;let A=Math.floor(T),j=T%1;!j&&T>=1&&(j=1),j===1&&A--,A=Math.min(A,d+1),!!(A%2)&&(f==="reverse"?(j=1-j,h&&(j-=h
vendor: 4,695 bytes, line 93
93/a)):f==="mirror"&&(_=o)),w=Mn(0,1,j)*a}const S=v?{done:!1,value:c[0]}:_.next(w);i&&(S.value=i(S.value));let{done:k}=S;!v&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&g!==Tf&&(S.value=Um(c,this.options,x,this.speed)),m&&m(S.value),E&&this.finish(),S}then(e,n){return this.finished.then(e,n)}get duration(){return Ut(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ut(e)}get time(){return Ut(this.currentTime)}set time(e){var n;e=zt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ct.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Ut(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:e=n2,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ct.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function x2(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ks=t=>t*180/Math.PI,Cf=t=>{const e=ks(Math.atan2(t[1],t[0]));return Pf(e)},b2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Cf,rotateZ:Cf,skewX:t=>ks(Math.atan(t[1])),skewY:t=>ks(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Pf=t=>(t=t%360,t<0&&(t+=360),t),gv=Cf,yv=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),vv=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),_2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yv,scaleY:vv,scale:t=>(yv(t)+vv(t))/2,rotateX:t=>Pf(ks(Math.atan2(t[6],t[5]))),rotateY:t=>Pf(ks(Math.atan2(-t[2],t[0]))),rotateZ:gv,rotate:gv,skewX:t=>ks(Math.atan(t[4])),skewY:t=>ks(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Af(t){return t.includes("scale")?1:0}function Rf(t,e){if(!t||t==="none")return Af(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=_2,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=b2,s=a}if(!s)return Af(e);const i=r[e],o=s[1].split(",").map(k2);return typeof i=="function"?i(o):o[i]}const S2=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Rf(n,e)};function k2(t){return parseFloat(t.trim())}const wo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xo=new Set(wo),wv=t=>t===vo||t===V,E2=new Set(["x","y","z"]),T2=wo.filter(t=>!E2.has(t));function C2(t){const e=[];return T2.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const $r={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Rf(e,"x"),y:(t,{transform:e})=>Rf(e,"y")};$r.translateX=$r.x;$r.translateY=$r.y;const Ds=new Set;let jf=!1,Of=!1,Nf=!1;function pS(){if(Of){const t=Array.from(Ds).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const s=C2(r);s.length&&(n.set(r,s),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const s=n.get(r);
vendor: 1,610 bytes, line 93
93s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Of=!1,jf=!1,Ds.forEach(t=>t.complete(Nf)),Ds.clear()}function mS(){Ds.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Of=!0)})}function P2(){Nf=!0,mS(),pS(),Nf=!1}class zm{constructor(e,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ds.add(this),jf||(jf=!0,ve.read(mS),ve.resolveKeyframes(pS))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:s}=this;if(e[0]===null){const i=s==null?void 0:s.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&i===void 0&&s.set(e[0])}x2(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ds.delete(this)}cancel(){this.state==="scheduled"&&(Ds.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const A2=t=>t.startsWith("--");function R2(t,e,n){A2(e)?t.style.setProperty(e,n):t.style[e]=n}const j2={};function gS(t,e){const n=z1(t);return()=>j2[e]??n()}const O2=gS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),yS=gS(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 5,100 bytes, line 93
93,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Uo=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,xv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Uo([0,.65,.55,1]),circOut:Uo([.55,0,1,.45]),backIn:Uo([.31,.01,.66,-.59]),backOut:Uo([.33,1.53,.69,.99])};function vS(t,e){if(t)return typeof t=="function"?yS()?dS(t,e):"ease-out":eS(t)?Uo(t):Array.isArray(t)?t.map(n=>vS(n,e)||xv.easeOut):xv[t]}function N2(t,e,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const d=vS(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function wS(t){return typeof t=="function"&&"applyToOptions"in t}function L2({type:t,...e}){return wS(t)&&yS()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class xS extends Vm{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=e,ro(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=L2(e);this.animation=N2(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const c=Um(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):R2(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ut(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ut(e)}get time(){return Ut(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=zt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&O2()?(this.animation.timeline=e,Bt):n(this)}}const bS={anticipate:J1,backInOut:Y1,circInOut:Z1};function I2(t){return t in bS}function D2(t){typeof t.ease=="string"&&I2(t.ease)&&(t.ease=bS[t.ease])}const Wd=10;class M2 extends xS{constructor(e){D2(e),fS(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Bm({...o,autoplay:!1}),l=Math.max(Wd,ct.now()-this.startTime),u=Mn(0,Wd,l-Wd);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const bv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(mn.test(t)||t==="0")&&!t.startsWith("url("));function $2(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function F2(t,e,n,r){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const i=t[t.length-1],o=bv(s,e),a=bv(i,e);return qc(o===a,`You are trying to animate ${e} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:$2(t)||(n==="spring"||wS(n))&&r}function Lf(t){t.duration=0,t.type="keyframes"}const U2=new Set(["opacity","clipPath","filter","transform"]),V2=z1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function B2(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:s,damping:i,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return V2()&&n&&U2.has(n)&&(n!=="transform"||!u)&&!l&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const z2=40;class W2 extends Vm{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:
93o="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){var g;super(),this.stop=()=>{var m,x;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=ct.now();const f={autoplay:e,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:l,motionValue:u,element:c,...d},h=(c==null?void 0:c.KeyframeResolver)||zm;this.keyframeResolver=new h(a,(m,x,y)=>this.onKeyframesResolved(m,x,f,!y),l,u,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(e,n,r,s){var x,y;this.keyframeResolver=void 0;const{name:i,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=ct.now(),F2(e,i,o,a)||((ar.instantAnimations||!l)&&(c==null||c(Um(e,r,n))),e[0]=e[e.length-1],Lf(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>z2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},h=!u&&B2(f),g=(y=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:y.current,m=h?new M2({...f,element:g}):new Bm(f);m.finished.then(()=>{this.notifyFinished()}).catch(Bt),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),P2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function _S(t,e,n,r=0,s=1){const i=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:a-i*r}const H2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function q2(t){const e=H2.exec(t);if(!e)return[,];const[,n,r,s]=e;return[`--${n??r}`,s]}const K2=4;function SS(t,e,n=1){ro(n<=K2,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=q2(t);if(!r)return;const i=window.getComputedStyle(e).getPropertyValue(r);if(i){const o=i.trim();return U1(o)?parseFloat(o):o}return Im(s)?SS(s,e,n+1):s}const G2={type:"spring",stiffness:500,damping:25,restSpeed:10},Y2=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),J2={type:"keyframes",duration:.8},Q2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Z2=(t,{keyframes:e})=>e.length>2?J2:xo.has(t)?t.startsWith("scale")?Y2(e[1]):G2:Q2,X2=t=>t!==null;function eL(t,{repeat:e,repeatType:n="loop"},r){const s=t.filter(X2),i=e&&n!=="loop"&&e%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}function kS(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...r}=t;return{...e,...r}}return t}function Wm(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?kS(n,t):n}function tL({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Hm=(t,e,n,r={},s,i)=>o=>{const a=Wm(r,t)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-zt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:i?void 0:s};tL(a)||Object.assign(c,Z2(t,c)),c.duration&&(c.duration=zt(c.duration)),c.repeatDelay&&(c.repeatDelay=zt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Lf(c),c.delay===0&&(
vendor: 8,708 bytes, line 93
93d=!0)),(ar.instantAnimations||ar.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(d=!0,Lf(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,d&&!i&&e.get()!==void 0){const f=eL(c.keyframes,a);if(f!==void 0){ve.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Bm(c):new W2(c)};function _v(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function qm(t,e,n,r){if(typeof e=="function"){const[s,i]=_v(r);e=e(n!==void 0?n:t.custom,s,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,i]=_v(r);e=e(n!==void 0?n:t.custom,s,i)}return e}function Mi(t,e,n){const r=t.getProps();return qm(r,e,n!==void 0?n:r.custom,t)}const ES=new Set(["width","height","top","left","right","bottom",...wo]),Sv=30,nL=t=>!isNaN(parseFloat(t));class rL{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=ct.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ct.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=nL(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Om);const r=this.events[e].add(n);return e==="change"?()=>{r(),ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ct.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Sv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sv);return W1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function so(t,e){return new rL(t,e)}const If=t=>Array.isArray(t);function sL(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,so(n))}function iL(t){return If(t)?t[t.length-1]||0:t}function oL(t,e){const n=Mi(t,e);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=iL(i[o]);sL(t,o,a)}}const it=t=>!!(t&&t.getVelocity);function aL(t){return!!(it(t)&&t.add)}function Df(t,e){const n=t.getValue("willChange");if(aL(n))return n.add(e);if(!n&&ar.WillChange){const r=new ar.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Km(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const lL="framerAppearId",TS="data-"+Km(lL);function CS(t){return t.props[TS]}function uL({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function PS(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();i=i?kS(i,l):l;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const c=[],d=s&&t.animationState&&t.animationState.getState()[s];for(const f in a){const h=t.getValue(f,t.latestValues[f]??null),g=a[f];if(g===void 0||d&&uL(d,f))continue;const m={delay:n,...Wm(i||{},f)},x=h.get();if(x!==void 0&&!h.isAnimating&&!Array.isArray(g)&&g===x&&!m.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const _=CS(t);if(_){const S=window.MotionHandoffAnimation(_,f,ve);S!==null&&(m.startTime=S,y=!0)}}Df(t,f);const v=u??t.shouldReduceMotion;h.start(Hm(f,h,g,v&&ES.has(f)?{type:!1}:m,t,y));const w=h.animation;w&&c.push(w)}if(o){const f=()=>ve.update(()=>{o&&oL(t,o)});c.length?Promise.all(c).then(f):f()}return c}function Mf(t,e,n={}){var l;const r=Mi(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(PS(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return cL(t,e,u,c,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,c]=a==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function cL(t,e,n=0,r=0,s=0,i=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Mf(l,e,{...o,delay:n+(typeof r=="function"?0:r)+_S(t.variantChildren,l,r,s,i)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function dL(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const s=e.map(i=>Mf(t,i,n));r=Promise.all(s)}else if(typeof e=="string")r=Mf(t,e,n);else{const s=typeof e=="function"?Mi(t,e,n.custom):e;r=Promise.all(PS(t,s,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const hL={test:t=>t==="auto",parse:t=>t},AS=t=>e=>e.test(t),RS=[vo,V,Ln,br,UN,FN,hL],kv=t=>RS.find(AS(t));function fL(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||B1(t):!0}const pL=new Set(["brightness","contrast","saturate","opacity"]);function mL(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Dm)||[];if(!r)return t;const s=n.replace(r,"");let i=pL.has(e)?1:0;return r!==n&&(i*=100),e+"("+i+s+")"}const gL=/\b([a-z-]*)\(.*?\)/gu,$f={...mn,getAnimatableNone:t=>{const e=t.match(gL);return e?e.map(mL).join(" "):t}},Ff={...mn,getAnimatableNone:t=>{const e=mn.parse(t);return mn.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Ev={...vo,transform:Math.round},yL={rotate:br,rotateX:br,rotateY:br,rotateZ:br,scale:$l,scaleX:$l,scaleY:$l,scaleZ:$l,skew:br,skewX:br,skewY:br,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:ja,originX:dv,originY:dv,originZ:V},Gm={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...yL,zIndex:Ev,fillOpacity:ja,strokeOpacity:ja,numOctaves:Ev},vL={...Gm,color:De,backgroundColor:De,outlineColor:De,fill:De,stroke:De,borderColor:De,borderTopColor:De,borderRightColor:De,borderBottomColor:De,borderLeftColor:De,filter:$f,WebkitFilter:$f,mask:Ff,WebkitMask:Ff},jS=t=>vL[t],wL=new Set([$f,Ff]);function OS(t,e){let n=jS(t);return wL.has(n)||(n=mn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xL=new Set(["auto","none","0"]);function bL(t,e,n){let r=0,s;for(;r<t.length&&!s;){const i=t[r];typeof i=="string"&&!xL.has(i)&&Oa(i).values.length&&(s=t[r]),r++}if(s&&n)for(const i of e)t[i]=OS(n,s)}class _L extends zm{constructor(e,n,r,s,i){super(e,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let d=e[c];
vendor: 1,295 bytes, line 93
93if(typeof d=="string"&&(d=d.trim(),Im(d))){const f=SS(d,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ES.has(r)||e.length!==2)return;const[s,i]=e,o=kv(s),a=kv(i),l=cv(s),u=cv(i);if(l!==u&&$r[r]){this.needsMeasurement=!0;return}if(o!==a)if(wv(o)&&wv(a))for(let c=0;c<e.length;c++){const d=e[c];typeof d=="string"&&(e[c]=parseFloat(d))}else $r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let s=0;s<e.length;s++)(e[s]===null||fL(e[s]))&&r.push(s);r.length&&bL(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$r[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=$r[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEac
vendor: 15,758 bytes, line 93
93h(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const SL=new Set(["opacity","clipPath","filter","transform"]);function NS(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const s=document.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(r=>r!=null)}const LS=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function kL(t){return V1(t)&&"offsetHeight"in t}const{schedule:Ym,cancel:a3}=tS(queueMicrotask,!1),tn={x:!1,y:!1};function IS(){return tn.x||tn.y}function EL(t){return t==="x"||t==="y"?tn[t]?null:(tn[t]=!0,()=>{tn[t]=!1}):tn.x||tn.y?null:(tn.x=tn.y=!0,()=>{tn.x=tn.y=!1})}function DS(t,e){const n=NS(t),r=new AbortController,s={passive:!0,...e,signal:r.signal};return[n,s,()=>r.abort()]}function TL(t){return!(t.pointerType==="touch"||IS())}function CL(t,e,n={}){const[r,s,i]=DS(t,n);return r.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",g)},d=x=>{u&&(u(x),u=void 0),c()},f=x=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(x))},h=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},g=x=>{if(x.pointerType!=="touch"){if(a){l=!0;return}d(x)}},m=x=>{if(!TL(x))return;l=!1;const y=e(o,x);typeof y=="function"&&(u=y,o.addEventListener("pointerleave",g,s))};o.addEventListener("pointerenter",m,s),o.addEventListener("pointerdown",h,s)}),i}const MS=(t,e)=>e?t===e?!0:MS(t,e.parentElement):!1,Jm=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,PL=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function AL(t){return PL.has(t.tagName)||t.isContentEditable===!0}const RL=new Set(["INPUT","SELECT","TEXTAREA"]);function jL(t){return RL.has(t.tagName)||t.isContentEditable===!0}const fu=new WeakSet;function Tv(t){return e=>{e.key==="Enter"&&t(e)}}function Hd(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const OL=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Tv(()=>{if(fu.has(n))return;Hd(n,"down");const s=Tv(()=>{Hd(n,"up")}),i=()=>Hd(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",i,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Cv(t){return Jm(t)&&!IS()}const Pv=new WeakSet;function NL(t,e,n={}){const[r,s,i]=DS(t,n),o=a=>{const l=a.currentTarget;if(!Cv(a)||Pv.has(a))return;fu.add(l),n.stopPropagation&&Pv.add(a);const u=e(l,a),c=(h,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),fu.has(l)&&fu.delete(l),Cv(h)&&typeof u=="function"&&u(h,{success:g})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||MS(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),kL(a)&&(a.addEventListener("focus",u=>OL(u,s)),!AL(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Qm(t){return V1(t)&&"ownerSVGElement"in t}const pu=new WeakMap;let _r;const $S=(t,e,n)=>(r,s)=>s&&s[0]?s[0][t+"Size"]:Qm(r)&&"getBBox"in r?r.getBBox()[e]:r[n],LL=$S("inline","width","offsetWidth"),IL=$S("block","height","offsetHeight");function DL({target:t,borderBoxSize:e}){var n;(n=pu.get(t))==null||n.forEach(r=>{r(t,{get width(){return LL(t,e)},get height(){return IL(t,e)}})})}function ML(t){t.forEach(DL)}function $L(){typeof ResizeObserver>"u"||(_r=new ResizeObserver(ML))}function FL(t,e){_r||$L();const n=NS(t);return n.forEach(r=>{let s=pu.get(r);s||(s=new Set,pu.set(r,s)),s.add(e),_r==null||_r.observe(r)}),()=>{n.forEach(r=>{const s=pu.get(r);s==null||s.delete(e),s!=null&&s.size||_r==null||_r.unobserve(r)})}}const mu=new Set;let Si;function UL(){Si=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};mu.forEach(e=>e(t))},window.addEventListener("resize",Si)}function VL(t){return mu.add(t),Si||UL(),()=>{mu.delete(t),!mu.size&&typeof Si=="function"&&(window.removeEventListener("resize",Si),Si=void 0)}}function Av(t,e){return typeof t=="function"?VL(t):FL(t,e)}function BL(t){return Qm(t)&&t.tagName==="svg"}const zL=[...RS,De,mn],WL=t=>zL.find(AS(t)),Rv=()=>({translate:0,scale:1,origin:0,originPoint:0}),ki=()=>({x:Rv(),y:Rv()}),jv=()=>({min:0,max:0}),Fe=()=>({x:jv(),y:jv()}),HL=new WeakMap;function Kc(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Na(t){return typeof t=="string"||Array.isArray(t)}const Zm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xm=["initial",...Zm];function Gc(t){return Kc(t.animate)||Xm.some(e=>Na(t[e]))}function FS(t){return!!(Gc(t)||t.variants)}function qL(t,e,n){for(const r in e){const s=e[r],i=n[r];if(it(s))t.addValue(r,s);else if(it(i))t.addValue(r,so(s,{owner:t}));else if(i!==s)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(r);t.addValue(r,so(o!==void 0?o:s,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Uf={current:null},US={current:!1},KL=typeof window<"u";function GL(){if(US.current=!0,!!KL)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Uf.current=t.matches;t.addEventListener("change",e),e()}else Uf.current=!1}const Ov=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let nc={};function VS(t){nc=t}function YL(){return nc}class JL{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=ct.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ve.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=Gc(n),this.isVariantNode=FS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const g=f[h];u[h]!==void 0&&it(g)&&g.set(u[h])}}mount(e){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,HL.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(US.current||GL(),this.shouldReduceMotion=Uf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),ns(this.notifyUpdate),ns(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&SL.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,d=new xS({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:zt(c)}),f=o(d);this.valueSubscriptions.set(e,()=>{f(),d.cancel()});return}const r=xo.has(e);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in nc){const n=nc[e];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[e]&&s&&r(this.props)&&(this.features[e]=new s(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fe()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Ov.length;r++){const s=Ov[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=e[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=qL(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=so(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(U1(r)||B1(r))?r=parseFloat(r):!WL(r)&&mn.test(n)&&(r=OS(e,n)),this.setBaseTarget(e,it(r)?r.get():r)),it(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=qm(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!it(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Om),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Ym.render(this.render)}}class BS extends JL{constructor(){super(...arguments),this.KeyframeResolver=_L}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const r=e.style;return r?r[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;it(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class cs{constructor(e){this.isMounted=!1,this.node=e}update(){}}function zS({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function QL({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ZL(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qd(t){return t===void 0||t===1}function Vf({scale:t,scaleX:e,scaleY:n}){return!qd(t)||!qd(e)||!qd(n)}function vs(t){return Vf(t)||WS(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function WS(t){return Nv(t.x)||Nv(t.y)}function Nv(t){return t&&t!=="0%"}function rc(t,e,n){const r=t-n,s=e*r;return n+s}function Lv(t,e,n,r,s){return s!==void 0&&(t=rc(t,s,r)),rc(t,n,r)+e}function Bf(t,e=0,n=1,r,s){t.min=Lv(t.min,e,n,r,s),t.max=Lv(t.max,e,n,r,s)}function HS(t,{x:e,y:n}){Bf(t.x,e.translate,e.scale,e.originPoint),Bf(t.y,n.translate,n.scale,n.originPoint)}const Iv=.999999999999,Dv=1.0000000000001;function XL(t,e,n,r=!1){const s=n.length;if(!s)return;e.x=e.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Ti(t,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,HS(t,o)),r&&vs(i.latestValues)&&Ti(t,i.latestValues))}e.x<Dv&&e.x>Iv&&(e.x=1),e.y<Dv&&e.y>Iv&&(e.y=1)}function Ei(t,e){t.min=t.min+e,t.max=t.max+e}function Mv(t,e,n,r,s=.5){const i=Te(t.min,t.max,s);Bf(t,e,n,i,r)}function Ti(t,e){Mv(t.x,e.x,e.scaleX,e.scale,e.originX),Mv(t.y,e.y,e.scaleY,e.scale,e.originY)}function qS(t,e){return zS(ZL(t.getBoundingClientRect(),e))}function eI(t,e,n){const r=qS(t,n),{scroll:s}=e;return s&&(Ei(r.x,s.offset.x),Ei(r.y,s.offset.y)),r}const tI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nI=wo.length;function rI(t,e,n){let r="",s=!0;for(let i=0;i<nI;i++){const o=wo[i],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=LS(a,Gm[o]);if(!l){s=!1;const c=tI[o]||o;r+=`${c}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,s?"":r):s&&(r="none"),r}function eg(t,e,n){const{style:r,vars:s,transformOrigin:i}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(xo.has(l)){o=!0;continue}else if(rS(l)){s[l]=u;continue}else{const c=LS(u,Gm[l]);l.startsWith("origin")?(a=!0,i[l]=c):r[l]=c}}if(e.transform||(o||n?r.transform=rI(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}function KS(t,{style:e,vars:n}
vendor: 24,405 bytes, line 93
93,r,s){const i=t.style;let o;for(o in e)i[o]=e[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function $v(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=$v(t,e.target.x),r=$v(t,e.target.y);return`${n}% ${r}%`}},sI={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=mn.parse(t);if(s.length>5)return r;const i=mn.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const u=Te(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},zf={borderRadius:{...Lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lo,borderTopRightRadius:Lo,borderBottomLeftRadius:Lo,borderBottomRightRadius:Lo,boxShadow:sI};function GS(t,{layout:e,layoutId:n}){return xo.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!zf[t]||t==="opacity")}function tg(t,e,n){var o;const r=t.style,s=e==null?void 0:e.style,i={};if(!r)return i;for(const a in r)(it(r[a])||s&&it(s[a])||GS(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(i[a]=r[a]);return i}function iI(t){return window.getComputedStyle(t)}class oI extends BS{constructor(){super(...arguments),this.type="html",this.renderInstance=KS}readValueFromInstance(e,n){var r;if(xo.has(n))return(r=this.projection)!=null&&r.isProjecting?Af(n):S2(e,n);{const s=iI(e),i=(rS(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return qS(e,n)}build(e,n,r){eg(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return tg(e,n,r)}}const aI={offset:"stroke-dashoffset",array:"stroke-dasharray"},lI={offset:"strokeDashoffset",array:"strokeDasharray"};function uI(t,e,n=1,r=0,s=!0){t.pathLength=1;const i=s?aI:lI;t[i.offset]=`${-r}`,t[i.array]=`${e} ${n}`}const cI=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function YS(t,{attrX:e,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...a},l,u,c){if(eg(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const h of cI)d[h]!==void 0&&(f[h]=d[h],delete d[h]);e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&uI(d,s,i,o,!1)}const JS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),QS=t=>typeof t=="string"&&t.toLowerCase()==="svg";function dI(t,e,n,r){KS(t,e,void 0,r);for(const s in e.attrs)t.setAttribute(JS.has(s)?s:Km(s),e.attrs[s])}function ZS(t,e,n){const r=tg(t,e,n);for(const s in t)if(it(t[s])||it(e[s])){const i=wo.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=t[s]}return r}class hI extends BS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fe}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(xo.has(n)){const r=jS(n);return r&&r.default||0}return n=JS.has(n)?n:Km(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return ZS(e,n,r)}build(e,n,r){YS(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,s){dI(e,n,r,s)}mount(e){this.isSVGTag=QS(e.tagName),super.mount(e)}}const fI=Xm.length;function XS(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?XS(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<fI;n++){const r=Xm[n],s=t.props[r];(Na(s)||s===!1)&&(e[r]=s)}return e}function ek(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const pI=[...Zm].reverse(),mI=Zm.length;function gI(t){return e=>Promise.all(e.map(({animation:n,options:r})=>dL(t,n,r)))}function yI(t){let e=gI(t),n=Fv(),r=!0;const s=l=>(u,c)=>{var f;const d=Mi(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:g,...m}=d;u={...u,...m,...g}}return u};function i(l){e=l(t)}function o(l){const{props:u}=t,c=XS(t.parent)||{},d=[],f=new Set;let h={},g=1/0;for(let x=0;x<mI;x++){const y=pI[x],v=n[y],w=u[y]!==void 0?u[y]:c[y],_=Na(w),S=y===l?v.isActive:null;S===!1&&(g=x);let k=w===c[y]&&w!==u[y]&&_;if(k&&r&&t.manuallyAnimateOnMount&&(k=!1),v.protectedKeys={...h},!v.isActive&&S===null||!w&&!v.prevProp||Kc(w)||typeof w=="boolean")continue;if(y==="exit"&&v.isActive&&S!==!0){v.prevResolvedValues&&(h={...h,...v.prevResolvedValues});continue}const E=vI(v.prevProp,w);let T=E||y===l&&v.isActive&&!k&&_||x>g&&_,A=!1;const j=Array.isArray(w)?w:[w];let W=j.reduce(s(y),{});S===!1&&(W={});const{prevResolvedValues:$={}}=v,ne={...$,...W},I=H=>{T=!0,f.has(H)&&(A=!0,f.delete(H)),v.needsAnimating[H]=!0;const C=t.getValue(H);C&&(C.liveStyle=!1)};for(const H in ne){const C=W[H],R=$[H];if(h.hasOwnProperty(H))continue;let M=!1;If(C)&&If(R)?M=!ek(C,R):M=C!==R,M?C!=null?I(H):f.add(H):C!==void 0&&f.has(H)?I(H):v.protectedKeys[H]=!0}v.prevProp=w,v.prevResolvedValues=W,v.isActive&&(h={...h,...W}),r&&t.blockInitialAnimation&&(T=!1);const X=k&&E;T&&(!X||A)&&d.push(...j.map(H=>{const C={type:y};if(typeof H=="string"&&r&&!X&&t.manuallyAnimateOnMount&&t.parent){const{parent:R}=t,M=Mi(R,H);if(R.enteringChildren&&M){const{delayChildren:J}=M.transition||{};C.delay=_S(R.enteringChildren,t,J)}}return{animation:H,options:C}}))}if(f.size){const x={};if(typeof u.initial!="boolean"){const y=Mi(t,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(x.transition=y.transition)}f.forEach(y=>{const v=t.getBaseTarget(y),w=t.getValue(y);w&&(w.liveStyle=!0),x[y]=v??null}),d.push({animation:x})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),r=!1,m?e(d):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Fv()}}}function vI(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ek(e,t):!1}function ps(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fv(){return{animate:ps(!0),whileInView:ps(),whileHover:ps(),whileTap:ps(),whileDrag:ps(),whileFocus:ps(),exit:ps()}}function Uv(t,e){t.min=e.min,t.max=e.max}function Zt(t,e){Uv(t.x,e.x),Uv(t.y,e.y)}function Vv(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const tk=1e-4,wI=1-tk,xI=1+tk,nk=.01,bI=0-nk,_I=0+nk;function dt(t){return t.max-t.min}function SI(t,e,n){return Math.abs(t-e)<=n}function Bv(t,e,n,r=.5){t.origin=r,t.originPoint=Te(e.min,e.max,t.origin),t.scale=dt(n)/dt(e),t.translate=Te(n.min,n.max,t.origin)-t.originPoint,(t.scale>=wI&&t.scale<=xI||isNaN(t.scale))&&(t.scale=1),(t.translate>=bI&&t.translate<=_I||isNaN(t.translate))&&(t.translate=0)}function ra(t,e,n,r){Bv(t.x,e.x,n.x,r?r.originX:void 0),Bv(t.y,e.y,n.y,r?r.originY:void 0)}function zv(t,e,n){t.min=n.min+e.min,t.max=t.min+dt(e)}function kI(t,e,n){zv(t.x,e.x,n.x),zv(t.y,e.y,n.y)}function Wv(t,e,n){t.min=e.min-n.min,t.max=t.min+dt(e)}function sc(t,e,n){Wv(t.x,e.x,n.x),Wv(t.y,e.y,n.y)}function Hv(t,e,n,r,s){return t-=e,t=rc(t,1/n,r),s!==void 0&&(t=rc(t,1/s,r)),t}function EI(t,e=0,n=1,r=.5,s,i=t,o=t){if(Ln.test(e)&&(e=parseFloat(e),e=Te(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=Te(i.min,i.max,r);t===i&&(a-=e),t.min=Hv(t.min,e,n,a,s),t.max=Hv(t.max,e,n,a,s)}function qv(t,e,[n,r,s],i,o){EI(t,e[n],e[r],e[s],e.scale,i,o)}const TI=["x","scaleX","originX"],CI=["y","scaleY","originY"];function Kv(t,e,n,r){qv(t.x,e,TI,n?n.x:void 0,r?r.x:void 0),qv(t.y,e,CI,n?n.y:void 0,r?r.y:void 0)}function Gv(t){return t.translate===0&&t.scale===1}function rk(t){return Gv(t.x)&&Gv(t.y)}function Yv(t,e){return t.min===e.min&&t.max===e.max}function PI(t,e){return Yv(t.x,e.x)&&Yv(t.y,e.y)}function Jv(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function sk(t,e){return Jv(t.x,e.x)&&Jv(t.y,e.y)}function Qv(t){return dt(t.x)/dt(t.y)}function Zv(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Sn(t){return[t("x"),t("y")]}function AI(t,e,n){let r="";const s=t.x.translate/e.x,i=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:h,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ik=["TopLeft","TopRight","BottomLeft","BottomRight"],RI=ik.length,Xv=t=>typeof t=="string"?parseFloat(t):t,e0=t=>typeof t=="number"||V.test(t);function jI(t,e,n,r,s,i){s?(t.opacity=Te(0,n.opacity??1,OI(r)),t.opacityExit=Te(e.opacity??1,0,NI(r))):i&&(t.opacity=Te(e.opacity??1,n.opacity??1,r));for(let o=0;o<RI;o++){const a=`border${ik[o]}Radius`;let l=t0(e,a),u=t0(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||e0(l)===e0(u)?(t[a]=Math.max(Te(Xv(l),Xv(u),r),0),(Ln.test(u)||Ln.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=Te(e.rotate||0,n.rotate||0,r))}function t0(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const OI=ok(0,.5,Q1),NI=ok(.5,.95,Bt);function ok(t,e,n){return r=>r<t?0:r>e?1:n(Ra(t,e,r))}function LI(t,e,n){const r=it(t)?t:so(t);return r.start(Hm("",r,e,n)),r.animation}function La(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const II=(t,e)=>t.depth-e.depth;class DI{constructor(){this.children=[],this.isDirty=!1}add(e){jm(this.children,e),this.isDirty=!0}remove(e){Zu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(II),this.isDirty=!1,this.children.forEach(e)}}function MI(t,e){const n=ct.now(),r=({timestamp:s})=>{const i=s-n;i>=e&&(ns(r),t(i-e))};return ve.setup(r,!0),()=>ns(r)}function gu(t){return it(t)?t.get():t}class $I{constructor(){this.members=[]}add(e){jm(this.members,e);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===e||r===this.lead||r===this.prevLead)continue;const s=r.instance;s&&s.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&Zu(this.members,r)}e.scheduleRender()}remove(e){if(Zu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s],o=i.instance;if(i.isPresent!==!1&&(!o||o.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender();const s=r.options.layoutDependency,i=e.options.layoutDependency;if(!(s!==void 0&&i!==void 0&&s===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:a}=e.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const yu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Kd=["","X","Y","Z"],FI=1e3;let UI=0;function Gd(t,e,n,r){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),r&&(r[t]=0))}function ak(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=CS(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",ve,!(s||i))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&ak(r)}function lk({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=e==null?void 0:e()){this.id=UI++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(zI),this.nodes.forEach(KI),this.nodes.forEach(GI),this.nodes.forEach(WI)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new DI)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Om),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Qm(o)&&!BL(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,d=0;const f=()=>this.root.updateBlockedByResize=!1;ve.read(()=>{d=window.innerWidth}),t(o,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,c&&c(),c=MI(f,250),yu.hasAnimatedSinceResize&&(yu.hasAnimatedSinceResize=!1,this.nodes.forEach(s0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||XI,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),y=!this.targetLayout||!sk(this.targetLayout,h),v=!d&&f;if(this.options.layoutRoot||this.resumeFrom||v||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Wm(g,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(c,v)}else d||s0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ns(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(YI),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ak(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(n0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(r0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(qI),this.nodes.forEach(VI),this.nodes.forEach(BI)):this.nodes.forEach(r0),this.clearAllSnapshots();const a=ct.now();Ye.delta=Mn(0,1e3/60,a-Ye.timestamp),Ye.timestamp=a,Ye.isProcessing=!0,Fd.update.process(Ye),Fd.preRender.process(Ye),Fd.render.process(Ye),Ye.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ym.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(HI),this.sharedNodes.forEach(JI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!dt(this.snapshot.measuredBox.x)&&!dt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Fe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!rk(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||vs(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),eD(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Fe();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(tD))){const{scroll:c}=this.root;c&&(Ei(a.x,c.offset.x),Ei(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=Fe();if(Zt(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Zt(a,o),Ei(a.x,d.offset.x),Ei(a.y,d.offset.y))}return a}applyTransform(o,a=!1){const l=Fe();Zt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ti(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),vs(c.latestValues)&&Ti(l,c.latestValues)}return vs(this.latestValues)&&Ti(l,this.latestValues),l}removeTransform(o){const a=Fe();Zt(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!vs(u.latestValues))continue;Vf(u.latestValues)&&u.updateSnapshot();const c=Fe(),d=u.measurePageBox();Zt(c,d),Kv(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return vs(this.latestValues)&&Kv(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ye.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!this.layout||!(c||d))return;this.resolvedRelativeTargetAt=Ye.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Fe(),this.targetWithTransforms=Fe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kI(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Zt(this.target,this.layout.layoutBox),HS(this.target,this.targetDelta)):Zt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Vf(this.parent.latestValues)||WS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fe(),this.relativeTargetOrigin=Fe(),sc(this.relativeTargetOrigin,a,l),Zt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&
vendor: 5,299 bytes, line 93
93(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ye.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Zt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;XL(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Fe());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Vv(this.prevProjectionDelta.x,this.projectionDelta.x),Vv(this.prevProjectionDelta.y,this.projectionDelta.y)),ra(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Zv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ki(),this.projectionDelta=ki(),this.projectionDeltaWithTransform=ki()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=ki();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Fe(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=h!==g,x=this.getStack(),y=!x||x.members.length<=1,v=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(ZI));this.animationProgress=0;let w;this.mixTargetDelta=_=>{const S=_/1e3;i0(d.x,o.x,S),i0(d.y,o.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QI(this.relativeTarget,this.relativeTargetOrigin,f,S),w&&PI(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Fe()),Zt(w,this.relativeTarget)),m&&(this.animationValues=c,jI(c,u,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ns(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ve.update(()=>{yu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=so(0)),this.motionValue.jump(0,!1),this.currentAnimation=LI(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(FI),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&uk(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Fe();const d=dt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const f=dt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Zt(a,l),Ti(a,c),ra(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $I),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 4,211 bytes, line 93
93resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Gd("z",o,u,this.animationValues);for(let c=0;c<Kd.length;c++)Gd(`rotate${Kd[c]}`,o,u,this.animationValues),Gd(`skew${Kd[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=gu(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=gu(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!vs(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=AI(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:f,y:h}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in zf){if(c[g]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:y}=zf[g],v=d==="none"?c[g]:m(c[g],u);if(x){const w=x.length;for(let _=0;_<w;_++)o[x[_]]=v}else y?this.options.visualElement.renderState.vars[g]=v:o[g]=v}this.options.layoutId&&(o.pointerEvents=u===this?gu(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(n0),this.root.sharedNodes.clear()}}}function VI(t){t.updateLayout()}function BI(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?Sn(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=dt(f);f.min=r[d].min,f.max=f.min+h}):uk(i,e.layoutBox,r)&&Sn(d=>{const f=o?e.measuredBox[d]:e.layoutBox[d],h=dt(r[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=ki();ra(a,r,e.layoutBox);const l=ki();o?ra(l,t.applyTransform(s,!0),e.measuredBox):ra(l,r,e.layoutBox);const u=!rk(a);let c=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const g=Fe();sc(g,e.layoutBox,f.layoutBox);const m=Fe();sc(m,r,h.layoutBox),sk(g,m)||(c=!0),d.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=g,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function zI(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function WI(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function HI(t){t.clearSnapshot()}function n0(t){t.clearMeasurements()}function r0(t){t.isLayoutDirty=!1}function qI(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function s0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function KI(t){t.resolveTargetDelta()}function GI(t){t.calcProjection()}
vendor: 27,141 bytes, line 93
93function YI(t){t.resetSkewAndRotation()}function JI(t){t.removeLeadSnapshot()}function i0(t,e,n){t.translate=Te(e.translate,0,n),t.scale=Te(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function o0(t,e,n,r){t.min=Te(e.min,n.min,r),t.max=Te(e.max,n.max,r)}function QI(t,e,n,r){o0(t.x,e.x,n.x,r),o0(t.y,e.y,n.y,r)}function ZI(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const XI={duration:.45,ease:[.4,0,.1,1]},a0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),l0=a0("applewebkit/")&&!a0("chrome/")?Math.round:Bt;function u0(t){t.min=l0(t.min),t.max=l0(t.max)}function eD(t){u0(t.x),u0(t.y)}function uk(t,e,n){return t==="position"||t==="preserve-aspect"&&!SI(Qv(e),Qv(n),.2)}function tD(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const nD=lk({attachResizeListener:(t,e)=>La(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Yd={current:void 0},ck=lk({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Yd.current){const t=new nD({});t.mount(window),t.setOptions({layoutScroll:!0}),Yd.current=t}return Yd.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),dk=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function rD(t=!0){const e=b.useContext(Rm);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=e,i=b.useId();b.useEffect(()=>{if(t)return s(i)},[t]);const o=b.useCallback(()=>t&&r&&r(i),[i,r,t]);return!n&&r?[!1,o]:[!0]}const hk=b.createContext({strict:!1}),c0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let d0=!1;function sD(){if(d0)return;const t={};for(const e in c0)t[e]={isEnabled:n=>c0[e].some(r=>!!n[r])};VS(t),d0=!0}function fk(){return sD(),YL()}function iD(t){const e=fk();for(const n in t)e[n]={...e[n],...t[n]};VS(e)}const oD=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ic(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||oD.has(t)}let pk=t=>!ic(t);function aD(t){typeof t=="function"&&(pk=e=>e.startsWith("on")?!ic(e):t(e))}try{aD(require("@emotion/is-prop-valid").default)}catch{}function lD(t,e,n){const r={};for(const s in t)s==="values"&&typeof t.values=="object"||(pk(s)||n===!0&&ic(s)||!e&&!ic(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}const Yc=b.createContext({});function uD(t,e){if(Gc(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Na(n)?n:void 0,animate:Na(r)?r:void 0}}return t.inherit!==!1?e:{}}function cD(t){const{initial:e,animate:n}=uD(t,b.useContext(Yc));return b.useMemo(()=>({initial:e,animate:n}),[h0(e),h0(n)])}function h0(t){return Array.isArray(t)?t.join(" "):t}const ng=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mk(t,e,n){for(const r in e)!it(e[r])&&!GS(r,n)&&(t[r]=e[r])}function dD({transformTemplate:t},e){return b.useMemo(()=>{const n=ng();return eg(n,e,t),Object.assign({},n.vars,n.style)},[e])}function hD(t,e){const n=t.style||{},r={};return mk(r,n,t),Object.assign(r,dD(t,e)),r}function fD(t,e){const n={},r=hD(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const gk=()=>({...ng(),attrs:{}});function pD(t,e,n,r){const s=b.useMemo(()=>{const i=gk();return YS(i,e,QS(r),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};mk(i,t.style,t),s.style={...i,...s.style}}return s}const mD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function rg(t){return typeof t!="string"||t.includes("-")?!1:!!(mD.indexOf(t)>-1||/[A-Z]/u.test(t))}function gD(t,e,n,{latestValues:r},s,i=!1,o){const l=(o??rg(t)?pD:fD)(e,r,s,t),u=lD(e,typeof t=="string",i),c=t!==b.Fragment?{...u,...l,ref:n}:{},{children:d}=e,f=b.useMemo(()=>it(d)?d.get():d,[d]);return b.createElement(t,{...c,children:f})}function yD({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,s){return{latestValues:vD(n,r,s,t),renderState:e()}}function vD(t,e,n,r){const s={},i=r(t,{});for(const f in i)s[f]=gu(i[f]);let{initial:o,animate:a}=t;const l=Gc(t),u=FS(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?a:o;if(d&&typeof d!="boolean"&&!Kc(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const g=qm(t,f[h]);if(g){const{transitionEnd:m,transition:x,...y}=g;for(const v in y){let w=y[v];if(Array.isArray(w)){const _=c?w.length-1:0;w=w[_]}w!==null&&(s[v]=w)}for(const v in m)s[v]=m[v]}}}return s}const yk=t=>(e,n)=>{const r=b.useContext(Yc),s=b.useContext(Rm),i=()=>yD(t,e,r,s);return n?i():xN(i)},wD=yk({scrapeMotionValuesFromProps:tg,createRenderState:ng}),xD=yk({scrapeMotionValuesFromProps:ZS,createRenderState:gk}),bD=Symbol.for("motionComponentSymbol");function _D(t,e,n){const r=b.useRef(n);b.useInsertionEffect(()=>{r.current=n});const s=b.useRef(null);return b.useCallback(i=>{var a;i&&((a=t.onMount)==null||a.call(t,i)),e&&(i?e.mount(i):e.unmount());const o=r.current;if(typeof o=="function")if(i){const l=o(i);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i)},[e])}const vk=b.createContext({});function oi(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function SD(t,e,n,r,s,i){var w,_;const{visualElement:o}=b.useContext(Yc),a=b.useContext(hk),l=b.useContext(Rm),u=b.useContext(dk),c=u.reducedMotion,d=u.skipAnimations,f=b.useRef(null),h=b.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,m=b.useContext(vk);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&kD(f.current,n,s,m);const x=b.useRef(!1);b.useInsertionEffect(()=>{g&&x.current&&g.update(n,l)});const y=n[TS],v=b.useRef(!!y&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((_=window.MotionHasOptimisedAnimation)==null?void 0:_.call(window,y)));return bN(()=>{h.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),b.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,y)}),v.current=!1),g.enteringChildren=void 0)}),g}function kD(t,e,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:wk(t.parent)),t.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&oi(a),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function wk(t){if(t)return t.options.allowProjection!==!1?t.projection:wk(t.parent)}function Jd(t,{forwardMotionProps:e=!1,type:n}={},r,s){r&&iD(r);const i=n?n==="svg":rg(t),o=i?xD:wD;function a(u,c){let d;const f={...b.useContext(dk),...u,layoutId:ED(u)},{isStatic:h}=f,g=cD(u),m=o(u,h);if(!h&&F1){TD();const x=CD(f);d=x.MeasureLayout,g.visualElement=SD(t,m,f,s,x.ProjectionNode,i)}return p.jsxs(Yc.Provider,{value:g,children:[d&&g.visualElement?p.jsx(d,{visualElement:g.visualElement,...f}):null,gD(t,u,_D(m,g.visualElement,c),m,h,e,i)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=b.forwardRef(a);return l[bD]=t,l}function ED({layoutId:t}){const e=b.useContext($1).id;return e&&t!==void 0?e+"-"+t:t}function TD(t,e){b.useContext(hk).strict}function CD(t){const e=fk(),{drag:n,layout:r}=e;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(t)||r!=null&&r.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function PD(t,e){if(typeof Proxy>"u")return Jd;const n=new Map,r=(i,o)=>Jd(i,o,t,e),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Jd(o,void 0,t,e)),n.get(o))})}const AD=(t,e)=>e.isSVG??rg(t)?new hI(e):new oI(e,{allowProjection:t!==b.Fragment});class RD extends cs{constructor(e){super(e),e.animationState||(e.animationState=yI(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Kc(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let jD=0;class OD extends cs{constructor(){super(...arguments),this.id=jD++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e);n&&!e&&s.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const ND={animation:{Feature:RD},exit:{Feature:OD}};function ll(t){return{point:{x:t.pageX,y:t.pageY}}}const LD=t=>e=>Jm(e)&&t(e,ll(e));function sa(t,e,n,r){return La(t,e,LD(n),r)}const xk=({current:t})=>t?t.ownerDocument.defaultView:null,f0=(t,e)=>Math.abs(t-e);function ID(t,e){const n=f0(t.x,e.x),r=f0(t.y,e.y);return Math.sqrt(n**2+r**2)}const p0=new Set(["auto","scroll"]);class bk{constructor(e,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Zd(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=ID(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!m)return;const{point:x}=h,{timestamp:y}=Ye;this.history.push({...x,timestamp:y});const{onStart:v,onMove:w}=this.handlers;g||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=Qd(g,this.transformPagePoint),ve.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();const{onEnd:m,onSessionEnd:x,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Zd(h.type==="pointercancel"?this.lastMoveEventInfo:Qd(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),x&&x(h,v)},!Jm(e))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const l=ll(e),u=Qd(l,this.transformPagePoint),{point:c}=u,{timestamp:d}=Ye;this.history=[{...c,timestamp:d}];const{onSessionStart:f}=n;f&&f(e,Zd(u,this.history)),this.removeListeners=il(sa(this.contextWindow,"pointermove",this.handlePointerMove),sa(this.contextWindow,"pointerup",this.handlePointerUp),sa(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(p0.has(r.overflowX)||p0.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,s),ve.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ns(this.updatePoint)}}function Qd(t,e){return e?{point:e(t.point)}:t}function m0(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Zd({point:t},e){return{point:t,delta:m0(t,_k(e)),offset:m0(t,DD(e)),velocity:MD(e,.1)}}function DD(t){return t[0]}function _k(t){return t[t.length-1]}function MD(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=_k(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>zt(e)));)n--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&s.timestamp-r.timestamp>zt(e)*2&&(r=t[1]);const i=Ut(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function $D(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Te(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Te(n,t,r.max):Math.min(t,n)),t}function g0(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function FD(t,{top:e,left:n,bottom:r,right:s}){return{x:g0(t.x,n,s),y:g0(t.y,e,r)}}function y0(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function UD(t,e){return{x:y0(t.x,e.x),y:y0(t.y,e.y)}}function VD(t,e){let n=.5;const r=dt(t),s=dt(e);return s>r?n=Ra(e.min,e.max-r,t.min):r>s&&(n=Ra(t.min,t.max-s,e.min)),Mn(0,1,n)}function BD(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Wf=.35;function zD(t=Wf){return t===!1?t=0:t===!0&&(t=Wf),{x:v0(t,"left","right"),y:v0(t,"top","bottom")}}function v0(t,e,n){return{min:w0(t,e),max:w0(t,n)}}function w0(t,e){return typeof t=="number"?t:t[e]||0}const WD=new WeakMap;class HD{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(ll(d).point),this.stopAnimation()},o=(d,f)=>{const{drag:h,dragPropagation:g,onDragStart:m}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=EL(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sn(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Ln.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const _=w.layout.layoutBox[y];_&&(v=dt(_)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&ve.update(()=>m(d,f),!1,!0),Df(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(g&&this.currentDirection===null){this.currentDirection=KD(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),x&&ve.update(()=>x(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new bk(e,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:xk(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&ve.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:s}=this.getProps();if(!r||!Fl(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=$D(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;e&&oi(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=FD(r.layoutBox,e):this.constraints=!1,this.elastic=zD(n),s!==this.constraints&&!oi(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Sn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=BD(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!oi(e))return!1;const r=e.current;ro(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=eI(r,s.root,this.visualElement.getTransformPagePoint());let o=UD(s.layout.layoutBox,i);if(n){const a=n(QL(o));this.hasMutatedConstraints=!!a,a&&(o=zS(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Sn(c=>{if(!Fl(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const f=s?200:1e6,h=s?40:1e7,g={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Df(this.visualElement,e),r.start(Hm(e,r,0,n,this.visualElement,!1))}stopAnimation(){Sn(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Sn(n=>{const{drag:r}=this.getProps();if(!Fl(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n],l=i.get()||0;i.set(e[n]-Te(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!oi(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Sn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=VD({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sn(o=>{if(!Fl(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Te(l,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;WD.set(this.visualElement,this);const e=this.visualElement.current,n=sa(e,"pointerdown",u=>{const{drag:c,dragListener:d=!0}=this.getProps(),f=u.target,h=f!==e&&jL(f);c&&d&&!h&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();oi(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=qD(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ve.read(s);const a=La(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Sn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=u[d].translate,f.set(f.get()+u[d].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l&&l(),r&&r()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Wf,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function x0(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function qD(t,e,n){const r=Av(t,x0(n)),s=Av(e,x0(n));return()=>{r(),s()}}function Fl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function KD(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class GD extends cs{constructor(e){super(e),this.removeGroupControls=Bt,this.removeListeners=Bt,this.controls=new HD(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bt}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Xd=t=>(e,n)=>{t&&ve.update(()=>t(e,n),!1,!0)};class YD extends cs{constructor(){super(...arguments),this.removePointerDownListener=Bt}onPointerDown(e){this.session=new bk(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xk(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Xd(e),onStart:Xd(n),onMove:Xd(r),onEnd:(i,o)=>{delete this.session,s&&ve.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=sa(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let eh=!1;class JD extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=e;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),eh&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),yu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),eh=!0,s||e.layoutDependency!==n||n===void 0||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||ve.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ym.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=e;eh=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Sk(t){const[e,n]=rD(),r=b.useContext($1);return p.jsx(JD,{...t,layoutGroup:r,switchLayoutGroup:b.useContext(vk),isPresent:e,safeToRemove:n})}const QD={pan:{Feature:YD},drag:{Feature:GD,ProjectionNode:ck,MeasureLayout:Sk}};function b0(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ve.postRender(()=>i(e,ll(e)))}class ZD extends cs{mount(){const{current:e}=this.node;e&&(this.unmount=CL(e,(n,r)=>(b0(this.node,r,"Start"),s=>b0(this.node,s,"End"))))}unmount(){}}class XD extends cs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=il(La(this.node.current,"focus",()=>this.onFocus()),La(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function _0(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ve.postRender(()=>i(e,ll(e)))}class eM extends cs{mount(){const{current:e}=this.node;if(!e)return;
93const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=NL(e,(s,i)=>(_0(this.node,i,"Start"),(o,{success:a})=>_0(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Hf=new WeakMap,th=new WeakMap,tM=t=>{const e=Hf.get(t.target);e&&e(t)},nM=t=>{t.forEach(tM)};function rM({root:t,...e}){const n=t||document;th.has(n)||th.set(n,{});const r=th.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(nM,{root:t,...e})),r[s]}function sM(t,e,n){const r=rM(e);return Hf.set(t,n),r.observe(t),()=>{Hf.delete(t),r.unobserve(t)}}const iM={some:0,all:1};class oM extends cs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:iM[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return sM(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(aM(e,n))&&this.startObserver()}unmount(){}}function aM({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const lM={inView:{Feature:oM},tap:{Feature:eM},focus:{Feature:XD},hover:{Feature:ZD}},uM={layout:{ProjectionNode:ck,MeasureLayout:Sk}},cM={...ND,...lM,...QD,...uM},He=PD(cM,AD),dM="/assets/collision-logo-q2lv175G.svg";function er(){return p.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 border-b border-border/50 bg-background/80 backdrop-blur-md",children:p.jsxs("div",{className:"container mx-auto flex items-center justify-between px-6 py-4",children:[p.jsx(me,{to:"/",className:"flex items-center transition-opacity hover:opacity-80",children:p.jsx("img",{src:dM,alt:"Fleurons",className:"h-7 w-auto translate-y-[2px]"})}),p.jsxs("div",{className:"flex items-center gap-6",children:[p.jsx(me,{to:"/episodes",className:"hidden sm:inline text-xs font-body font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"Ãpisodes"}),p.jsx(me,{to:"/meilleurs-podcasts-business",className:"hidden md:inline text-xs font-body font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground",children:"Meilleurs podcasts business"}),p.jsx("a",{href:"https://www.youtube.com/@fleuronspodcast",target:"_blank",rel:"noopener noreferrer",onClick:t=>{t.preventDefault(),window.open("https://www.youtube.com/@fleuronspodcast","_blank","noopener,noreferrer")},className:"cursor-pointer rounded-full bg-primary px-4 py-2 text-xs font-body font-semibold uppercase tracking-wider text-primary-foreground transition-all hover:bg-gold-glow",children:"S'abonner"})]})]})})}const kk="1877689552",qf=`https://podcasts.apple.com/fr/podcast/fleurons/id${kk}`,S0="https://open.spotify.com/show/6v7fG3tOWHOCzfVAIUUmUk",k0="https://www.deezer.com/search/Fleurons/podcast",Kf="https://www.youtube.com/@fleuronspodcast";function Ul(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g," ").trim()}function E0(t){const e=encodeURIComponent(`Fleurons ${t}`);return{apple:`${qf}`,spotify:`https://open.spotify.com/search/${e}/episodes`,deezer:`https://www.deezer.com/search/${e}/episode`,youtube:`${Kf}/search?query=${encodeURIComponent(t)}`}}const nh=new Map;async function hM(t){const e=Ul(t);if(nh.has(e))return nh.get(e);try{const n=await fetch(`https://itunes.apple.com/lookup?id=${kk}&country=fr&entity=podcastEpisode&limit=200`);if(!n.ok)return null;const s=((await n.json()).results??[]).filter(o=>o.wrapperType==="podcastEpisode"&&o.trackName&&o.trackViewUrl),i=s.find(o=>Ul(o.trackName)===e)??s.find(o=>Ul(o.trackName).includes(e))??s.find(o=>e.includes(Ul(o.trackName)));return i!=null&&i.trackViewUrl?(nh.set(e,i.trackViewUrl),i.trackViewUrl):null}catch{return null}}function Ek(t){const[e,n]=b.useState(()=>t?E0(t):{apple:qf,spotify:S0,deezer:k0,youtube:Kf});return b.useEffect(()=>{if(!t){n({apple:qf,spotify:S0,deezer:k0,youtube:Kf});return}const r=E0(t);n(r);let s=!0;return hM(t).then(i=>{s&&i&&n({...r,apple:i})}),()=>{s=!1}},[t]),e}const fM=[{name:"Apple Podcasts",url:"https://podcasts.apple.com/fr/podcast/fleurons/id1877689552",icon:p.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"currentColor",children:p.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 3.6c4.6 0 8.4 3.8 8.4 8.4 0 2.8-1.4 5.3-3.5 6.8-.2-.7-.5-1.5-.8-2.2 1.4-1.1 2.3-2.8 2.3-4.6 0-3.5-2.9-6.4-6.4-6.4S5.6 8.5 5.6 12c0 1.8.9 3.5 2.3 4.6-.3.7-.6 1.5-.8 2.2C5 17.3 3.6 14.8 3.6 12c0-4.6 3.8-8.4 8.4-8.4zm0 3.6c-2.6 0-4.8 2.2-4.8 4.8 0 1.5.7 2.8 1.8 3.7.2-.6.4-1.2.7-1.7-.5-.5-.9-1.2-.9-2 0-1.8 1.4-3.2 3.2-3.2s3.2 1.4 3.2 3.2c0 .8-.3 1.5-.9 2 .3.5.5 1.1.7 1.7 1.1-.9 1.8-2.2 1.8-3.7 0-2.6-2.2-4.8-4.8-4.8zm0 4c-.9 0-1.6.7-1.6 1.6 0 .6.3 1.1.8 1.4l-1.2 5.4c-.1.5.1 1 .6 1.2.2.1.4.2.6.2h1.6c.2 0 .4-.1.6-.2.5-.2.7-.7.6-1.2l-1.2-5.4c.5-.3.8-.8.8-1.4 0-.9-.7-1.6-1.6-1.6z"})})},{name:"Spotify",url:"https://open.spotify.com/show/6v7fG3tOWHOCzfVAIUUmUk",icon:p.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"currentColor",children:p.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})})},{name:"Deezer",url:"https://www.deezer.com/search/Fleurons/podcast",icon:p.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"currentColor",children:p.jsx("path",{d:"M18.81 4.16v3.03H24V4.16h-5.19zM6.27 8.38v3.03h5.19V8.38H6.27zm12.54 0v3.03H24V8.38h-5.19zM6.27 12.59v3.03h5.19v-3.03H6.27zm6.27 0v3.03h5.19v-3.03h-5.19zm6.27 0v3.03H24v-3.03h-5.19zM0 16.81v3.03h
935.19v-3.03H0zm6.27 0v3.03h5.19v-3.03H6.27zm6.27 0v3.03h5.19v-3.03h-5.19zm6.27 0v3.03H24v-3.03h-5.19z"})})},{name:"YouTube",url:"https://www.youtube.com/@fleuronspodcast",icon:p.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"currentColor",children:p.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}];function zs({compact:t=!1,episodeTitle:e}){const n=Ek(e),r=(s,i)=>e?s==="Apple Podcasts"?n.apple:s==="Spotify"?n.spotify:s==="Deezer"?n.deezer:s==="YouTube"?n.youtube:i:i;return p.jsx("div",{className:`flex flex-wrap ${t?"gap-2":"gap-3"}`,children:fM.map((s,i)=>p.jsxs(He.a,{href:r(s.name,s.url),target:"_blank",rel:"noopener noreferrer",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:i*.1},className:` 94 inline-flex items-center gap-2 rounded-full border border-primary/30 95 bg-secondary/50 text-foreground font-body 96 transition-all hover:bg-primary hover:text-primary-foreground hover:border-primary 97 ${t?"px-3 py-1.5 text-xs":"px-5 py-2.5 text-sm"} 98 `,children:[s.icon,p.jsx("span",{children:s.name})]},s.name))})}const pM=[{name:"Génération Do It Yourself",url:"https://www.gdiy.fr"},{name:"La Martingale",url:"https://www.lamartingale.io"}];function rs(){return p.jsx("footer",{className:"border-t border-border bg-card",children:p.jsxs("div",{className:"container mx-auto px-6 py-12",children:[p.jsxs("div",{className:"grid gap-10 md:grid-cols-3 md:gap-8",children:[p.jsxs("div",{className:"flex flex-col items-start gap-4 md:col-span-1",children:[p.jsx("h2",{className:"font-display text-lg text-foreground",children:"Ne manquez aucun épisode"}),p.jsx(zs,{compact:!0})]}),p.jsxs("div",{className:"flex flex-col items-start gap-3",children:[p.jsxs("h2",{className:"font-display text-lg text-foreground",children:["Les autres podcasts"," ",p.jsx("a",{href:"https://www.collision.studio",target:"_blank",rel:"noopener noreferrer",className:"text-primary transition-colors hover:underline",children:"Collision"})]}),p.jsxs("ul",{className:"flex flex-col gap-2",children:[pM.map(t=>p.jsx("li",{children:p.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:[t.name," â"]})},t.name)),p.jsx("li",{children:p.jsx(me,{to:"/meilleurs-podcasts-business",className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:"Les meilleurs podcasts business â"})}),p.jsx("li",{children:p.jsx(me,{to:"/episodes",className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:"Tous les épisodes de Fleurons â"})})]})]}),p.jsxs("div",{className:"flex flex-col items-start gap-3",children:[p.jsx("h2",{className:"font-display text-lg text-foreground",children:"Nous contacter"}),p.jsx("p",{className:"text-sm font-body text-muted-foreground",children:"Une question, une suggestion d'entreprise à raconter ?"}),p.jsx(me,{to:"/contact",className:"inline-flex items-center gap-2 rounded-full border border-primary/40 bg-secondary/40 px-4 py-2 text-sm font-body font-semibold text-foreground transition-all hover:bg-primary hover:text-primary-foreground hover:border-primary",children:"Envoyer un message"})]})]}),p.jsxs("div",{className:"mt-10 flex flex-col items-center gap-3 border-t border-border/60 pt-8 text-center",children:[p.jsx("p",{className:"text-[10px] font-body uppercase tracking-[0.3em] text-muted-foreground",children:"Une production"}),p.jsxs("a",{href:"https://www.collision.studio",target:"_blank",rel:"noopener noreferrer",className:"group flex flex-col items-center transition-opacity hover:opacity-80",children:[p.jsx("p",{className:"font-display text-2xl font-bold tracking-[0.2em] text-foreground group-hover:text-primary transition-colors",children:"COLLISION"}),p.jsx("p",{className:"text-[10px] font-body uppercase tracking-[0.4em] text-primary",children:"Productions"})]}),p.jsxs("div",{className:"mt-6 flex flex-col items-center gap-2",children:[p.jsx("p",{className:"text-sm font-body text-muted-foreground max-w-md",children:"L'identité visuelle de Fleurons vous plaît ? C'est à la star Jonathan Da Costa que nous la devons ! Contactez-le sur"}),p.jsx("a",{href:"https://www.jonathandacosta.com/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full border border-primary/40 bg-secondary/40 px-4 py-2 text-sm font-body font-semibold text-foreground transition-all hover:bg-primary hover:text-primary-foreground hover:border-primary",children:"jonathandacosta.com â"})]}),p.jsxs("p",{className:"mt-4 text-xs font-body text-muted-foreground",children:["© ",new Date().getFullYear()," Fleurons. Tous droits réservés."]}),p.jsxs("p",{className:"mt-2 text-[10px] font-body text-muted-foreground
98/50",children:[p.jsx(me,{to:"/coworking-bordeaux",className:"transition-colors hover:text-primary",children:"Coworking Bordeaux"}),p.jsx("span",{className:"mx-2",children:"·"}),p.jsx(me,{to:"/coworking-paris-17",className:"transition-colors hover:text-primary",children:"Coworking Paris 17"})]})]})]})})}const mM="https://feeds.audiomeans.fr/feed/cca73448-1aad-4dc1-8b0b-0d491b64c768.xml";function gM(t){return t.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function yM(t){return t?t.replace(/^<!\[CDATA\[/,"").replace(/\]\]>$/,"").trim():""}function bn(t){return t?yM(t.textContent||""):""}async function sg(){const e=await(await fetch(mM)).text(),s=new DOMParser().parseFromString(e,"text/xml").querySelector("channel"),i=bn((s==null?void 0:s.querySelector("title"))||null),o=bn((s==null?void 0:s.querySelector("description"))||null),a=s==null?void 0:s.querySelector("image[href]"),l=(a==null?void 0:a.getAttribute("href"))||bn((s==null?void 0:s.querySelector("image > url"))||null)||"",u=(s==null?void 0:s.querySelectorAll("item"))||[],c=Array.from(u).map(d=>{const f=bn(d.querySelector("title")),h=bn(d.querySelector("guid")),g=bn(d.querySelector("description")),m=bn(d.querySelector("encoded")),x=bn(d.querySelector("pubDate")),y=d.querySelector("enclosure"),v=(y==null?void 0:y.getAttribute("url"))||"",w=bn(d.querySelector("duration")),_=d.querySelector("image[href]"),S=(_==null?void 0:_.getAttribute("href"))||l,k=bn(d.querySelector("author"));return{id:h,title:f,description:g.replace(/<[^>]*>/g,"").substring(0,300),descriptionHtml:m||g,pubDate:x,duration:w,audioUrl:v,imageUrl:S,slug:gM(f),authors:k}});return{title:i,description:o,imageUrl:l,episodes:c}}function Tk(t){return new Date(t).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"})}function Ck(t){if(!t)return"";const e=t.split(":");if(e.length===3){const n=parseInt(e[0]),r=parseInt(e[1]);return n>0?`${n}h${r.toString().padStart(2,"0")}`:`${r} min`}return t}function Pk({episode:t,index:e=0,featured:n=!1}){return p.jsx(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:e*.15,duration:.5},children:p.jsxs(me,{to:`/episode/${t.slug}`,className:"group block overflow-hidden rounded-lg border border-border bg-card transition-all hover:border-primary/40 hover:shadow-lg hover:shadow-primary/5 ",children:[p.jsx("div",{className:"flex justify-center bg-card pt-5",children:p.jsxs("div",{className:"relative w-1/2 overflow-hidden rounded-md",children:[p.jsx("img",{src:t.imageUrl,alt:`Couverture de l'épisode ${t.title} du podcast Fleurons`,className:"aspect-square w-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}),t.duration&&p.jsx("span",{className:"absolute bottom-2 right-2 rounded bg-background/80 px-2 py-1 text-[10px] font-body text-foreground backdrop-blur-sm",children:Ck(t.duration)})]})}),p.jsxs("div",{className:"p-5",children:[p.jsx("p",{className:"mb-2 text-xs font-body uppercase tracking-wider text-muted-foreground",children:Tk(t.pubDate)}),p.jsx("h3",{className:"font-display text-xl font-semibold text-foreground group-hover:text-primary transition-colors",children:t.title}),p.jsx("p",{className:"mt-2 text-sm font-body text-muted-foreground line-clamp-2",children:t.description})]})]})})}function cr({title:t="Fleurons, le podcast des sagas d'entreprises françaises",description:e="Chaque mois, une saga d'entreprise française racontée par David Carzon, Clémence Lepic et Matthieu Stefani : Total, Danone, LVMH, L'Oréal.",image:n="https://static.audiomeans.fr/img/podcast/f8ccac64-acdb-47a2-b641-6ebeb5882f79.jpg",url:r,type:s="website",jsonLd:i,noindex:o=!1}){return b.useEffect(()=>{document.title=t;const a="https://www.fleurons.studio",l=window.location.pathname.replace(/\/+$/,"")||"/",u=r??a+l,c=(g,m)=>{let x=document.querySelector(`meta[property="${g}"]`)||document.querySelector(`meta[name="${g}"]`);x||(x=document.createElement("meta"),g.startsWith("og:")||g.startsWith("article:")?x.setAttribute("property",g):x.setAttribute("name",g),document.head.appendChild(x)),x.setAttribute("content",m)};c("description",e),c("og:title",t),c("og:description",e),c("og:image",n),c("og:type",s),c("og:url",u),c("twitter:card","summary_large_image"),c("twitter:title",t),c("twitter:description",e),c("twitter:image",n);let d=document.querySelector('link[rel="canonical"]');d||(d=document.createElement("link"),d.setAttribute("rel","canonical"),document.head.appendChild(d)),d.setAttribute("href",u);const f=document.querySelector('meta[name="robots"][data-seohead="true"]');if(f&&f.remove(),o){const g=document.createElement("meta");g.setAttribute("name","robots"),g.setAttribute("data-seohead","true"),g.setAttribute("content","noindex, nofollow"),document.head.appendChild(g)}const h=document.querySelector('script[data-jsonld="fleurons"]');if(h&&h.remove(),i){const g=document.createElement("script");g.type="application/ld+json",g.setAttribute("data-jsonld","fleurons"),g.textContent=JSON.stringify(i),document.head.appendChild(g)}return()=>{const g=document.querySelector('script[data-jsonld="fleurons"]');g&&g.remove();
98const m=document.querySelector('meta[name="robots"][data-seohead="true"]');m&&m.remove()}},[t,e,n,r,s,i,o]),null}function vM(){return p.jsxs("section",{className:"relative overflow-hidden border-y border-primary/20 bg-gradient-to-br from-card via-background to-card py-20",children:[p.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent"}),p.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-primary/60 to-transparent"}),p.jsx("div",{className:"container mx-auto px-6",children:p.jsxs(He.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mx-auto max-w-3xl text-center",children:[p.jsx("p",{className:"mb-4 inline-block rounded-full border border-primary/40 bg-primary/10 px-4 py-1.5 text-[11px] font-body font-semibold uppercase tracking-[0.25em] text-primary",children:"Un nouvel épisode chaque mois"}),p.jsxs("h2",{className:"font-display text-4xl font-bold leading-tight text-foreground md:text-5xl",children:["Abonnez-vous pour ne ",p.jsx("span",{className:"text-primary",children:"rater aucun épisode"}),"."]}),p.jsxs("p",{className:"mx-auto mt-6 max-w-xl font-body text-base leading-relaxed text-secondary-foreground",children:["Une nouvelle saga par mois. Total, Danone, LVMH, L'Oréal⦠des heures d'enquête, d'archives et d'anecdotes condensées dans une narration que vous ne trouverez nulle part ailleurs. Sans abonnement, vous passerez à côté du prochain épisode sans même le savoir.",p.jsx("br",{}),p.jsx("span",{className:"mt-3 block font-semibold text-foreground",children:"Un clic suffit. Choisissez votre app et c'est réglé."})]}),p.jsx("div",{className:"mt-10 flex justify-center",children:p.jsx(zs,{})}),p.jsx("p",{className:"mt-6 text-xs font-body uppercase tracking-wider text-muted-foreground",children:"Gratuit · 1 clic · Sur votre app préférée"})]})})]})}const wM=[{quote:"Je l'écoute en plusieurs fois, comme un roman, mais je me suis pris à rallonger mes trajets car je ne pouvais pas m'arrêter.",author:"Lucile, Paris"},{quote:"Après 20 ans chez Total, j'ai appris un nombre incroyable d'anecdotes. Riche, facile d'écoute et inspirant.",author:"Aurélien, ancien cadre Total"},{quote:"J'aime l'intelligence enrobée de bonne humeur dans le duo de Clémence et de David. Accro dès le 2ᵠépisode.",author:"Mélanie, Lyon"}];function xM(){return p.jsx("section",{className:"border-t border-border/50 bg-background py-20",children:p.jsxs("div",{className:"container mx-auto px-6",children:[p.jsxs(He.h2,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mb-12 text-center font-display text-3xl font-bold text-foreground",children:["Ils écoutent déjà ",p.jsx("span",{className:"text-primary",children:"Fleurons"})]}),p.jsx("div",{className:"grid gap-6 md:grid-cols-3",children:wM.map((t,e)=>p.jsxs(He.figure,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:e*.1},className:"relative flex flex-col justify-between rounded-lg border border-border/60 bg-card p-6",children:[p.jsx("span",{"aria-hidden":"true",className:"absolute -top-4 left-5 font-display text-5xl leading-none text-primary/70",children:"â"}),p.jsx("blockquote",{className:"font-body text-sm leading-relaxed text-foreground/90",children:t.quote}),p.jsx("figcaption",{className:"mt-5 font-body text-xs uppercase tracking-wider text-muted-foreground",children:t.author})]},e))})]})})}const bM="/assets/podcast-cover-CSe32Y1f.jpg",T0=new Set(["Le","La","Les","Un","Une","Des","Du","De","Et","Ou","Mais","Dans","Sur","Avec","Pour","Par","Sans","Sous","Chez","Il","Elle","Ils","Elles","On","Nous","Vous","Ce","Cette","Cet","Ces","Son","Sa","Ses","Leur","Leurs","Notre","Nos","Votre","Vos","Mon","Ma","Mes","Au","Aux","En","Que","Qui","Quand","Alors","Aujourd","Depuis","Après","Avant","Puis","Ainsi","Cependant","Toutefois","Enfin","Episode","Ãpisode","Podcast","Fleurons","Collision","Productions","Retrouvez","Abonnez","Ecoutez","Ãcoutez","Bonne","Merci","Crédits","Production","Montage","Musique","Hébergé","Voir","Plus","Toutes","Tous","Cliquez","Instagram","LinkedIn","YouTube","Spotify","Apple","Deezer","France","Français","Française","Françaises","Paris","Si","Car","Or","Donc","Ne","Pas","Plus","Très","Tout","Toute","Audiomeans","Extrait","EXTRAIT","Visitez","Contactez","Anim","Câest","C'est","Héberge","Hebergé","Interview","Rediffusion","Bonus","Chapitre","Suivez"]),_M=["David Carzon","Clémence Lepic","Matthieu Stefani"];function SM(t,e=12){const n=t.replace(/<[^>]*>/g," ").replace(/&[a-z]+;/gi," ").replace(/\s+/g," "),r=/\b([A-ZÃ-Ã][\wÃ-ÿ'â&.-]*(?:\s+(?:de|du|des|dâ|d')?\s*[A-ZÃ-Ã][\wÃ-ÿ'â&.-]*)*)\b/g,s=new Map;for(const i of n.matchAll(r)){const o=i[1].replace(/[.,;:]$/,"").trim();if(o.length<3||/[.;:]/.test(o))continue;const a=o.split(/\s+/)[0];T0.has(a)||o.split(/\s+/).length===1&&T0.has(o)||_M.some(l=>l.toLowerCase()===o.toLowerCase())||s.set(o,(s.get(o)??0)+1)}return Array.from(s.entries()).sort((i,o)=>o[1]-i[1]||i[0].localeCompare(o[0])).map(([i])=>i).slice(0,e)}function Gf(t){const e=t.split(/\s+/);return e.length===2&&e.every(n=>/^[A-ZÃ-Ã][a-zà -ÿ'â-]+$/.test(n))}function C0(t){return t.map(e=>({"@type":Gf(e)?"Person":"Organization",name:e}))}const hn="https://www.fleurons.studio";function kM(t){const n=(t.replace(/^\s*[\[(][^\])]*[\])]\s*/g,"").trim()||t.trim()).split(/[:\-ââ|,]/)[0].trim(),r
98=n.split(/\s+/);return(r.length>4?r.slice(0,4).join(" "):n).trim()}function EM(t){return t.replace(/Héberg[ée]?\s*par\s*Audiomeans[\s\S]*$/i," ").replace(/Visitez\s+audiomeans\.fr[^\s]*/gi," ").replace(/\[EXTRAIT\]/gi," ").replace(/Contactez-le[^.]*\./gi," ").replace(/\s+/g," ").trim()}function P0(t,e){if(t.length<=e)return t;const n=t.slice(0,e-1),r=n.lastIndexOf(" ");return`${(r>40?n.slice(0,r):n).replace(/[.,;:]$/,"")}â¦`}function TM(t,e=""){const n=kM(t.title),r=EM(`${t.title} ${e||t.description}`),s=SM(r).filter(m=>m.toLowerCase()!==n.toLowerCase()&&!n.toLowerCase().includes(m.toLowerCase())),i=s.filter(Gf).slice(0,4),o=s.filter(m=>!Gf(m)).slice(0,6),a=i.length?`Podcast ${n} : la saga ${n} et ${i[0]}`:`Podcast ${n} : la saga ${n} par Fleurons`,l=a.length>60?P0(`Podcast ${n} : la saga ${n}`,60):a,u=[...i,...o].slice(0,3),c=P0([`Podcast ${n} : la saga ${n} racontée par Fleurons.`,u.length?`Avec ${u.join(", ")}.`:"",t.description].join(" ").replace(/\s+/g," ").trim(),160),d=[`podcast ${n}`,n,`histoire ${n}`,`saga ${n}`,...i.map(m=>`${m} ${n}`),...o,"Fleurons","podcast business"],f=`${hn}/episode/${t.slug}`,h=t.duration?`PT${t.duration.replace(/:/g,"H").replace(/H(\d+)H/,"H$1M")}S`:void 0,g={"@context":"https://schema.org","@type":"PodcastEpisode","@id":f,mainEntityOfPage:f,inLanguage:"fr-FR",name:t.title,alternateName:`Podcast ${n}`,description:c,keywords:d.join(", "),about:[{"@type":"Organization",name:n},...C0(o)],mentions:C0([...i,...o]),datePublished:new Date(t.pubDate).toISOString(),duration:h,image:t.imageUrl,url:f,associatedMedia:t.audioUrl?{"@type":"AudioObject",contentUrl:t.audioUrl,encodingFormat:"audio/mpeg",duration:h}:void 0,partOfSeries:{"@type":"PodcastSeries",name:"Fleurons",url:hn,webFeed:"https://feeds.audiomeans.fr/feed/cca73448-1aad-4dc1-8b0b-0d491b64c768.xml"},publisher:{"@type":"Organization",name:"Collision Productions",url:"https://www.collision.studio"},author:[{"@type":"Person",name:"David Carzon"},{"@type":"Person",name:"Clémence Lepic"},{"@type":"Person",name:"Matthieu Stefani"}]};return{brand:n,people:i,orgs:o,keywords:d,seoTitle:l,seoDescription:c,url:f,jsonLd:g}}const CM="https://feeds.audiomeans.fr/feed/cca73448-1aad-4dc1-8b0b-0d491b64c768.xml",A0="https://static.audiomeans.fr/img/podcast/f8ccac64-acdb-47a2-b641-6ebeb5882f79.jpg",R0=[{"@type":"Person",name:"David Carzon"},{"@type":"Person",name:"Clémence Lepic"},{"@type":"Person",name:"Matthieu Stefani"}];function Ak(t=[]){return{"@context":"https://schema.org","@type":"PodcastSeries","@id":`${hn}/#podcast`,name:"Fleurons",alternateName:"Fleurons, le podcast des sagas d'entreprises françaises",description:"Les sagas des plus grandes entreprises françaises. Total, Danone, LVMH, L'Oréal, Hermès... racontées chaque mois par David Carzon, Clémence Lepic et Matthieu Stefani.",url:hn,mainEntityOfPage:hn,webFeed:CM,image:A0,thumbnailUrl:A0,inLanguage:"fr-FR",genre:["Business","Histoire","Société & Culture"],keywords:"podcast business, podcast entreprises françaises, saga entreprise, Fleurons, LVMH, Hermès, Total, Danone, L'Oréal",author:R0,actor:R0,producer:{"@type":"Organization",name:"Collision Productions",url:"https://www.collision.studio"},publisher:{"@type":"Organization",name:"Collision Productions",url:"https://www.collision.studio"},numberOfEpisodes:t.length||void 0,sameAs:["https://www.youtube.com/@fleuronspodcast","https://podcasts.apple.com/fr/podcast/id1877689552"],episode:t.slice(0,10).map(e=>({"@type":"PodcastEpisode",name:e.title,url:`${hn}/episode/${e.slug}`,datePublished:e.pubDate?new Date(e.pubDate).toISOString():void 0,image:e.imageUrl}))}}const PM=()=>{const[t,e]=b.useState([]),[n,r]=b.useState(!0);b.useEffect(()=>{sg().then(a=>{e(a.episodes),r(!1)}).catch(()=>r(!1))},[]);const s=Ak(t.filter(a=>a.duration&&a.duration!=="00:00:00")),o=t.filter(a=>a.duration&&a.duration!=="00:00:00").slice(0,3);return p.jsxs(p.Fragment,{children:[p.jsx(cr,{jsonLd:s}),p.jsx(er,{}),p.jsxs("main",{children:[p.jsx("section",{className:"relative min-h-screen flex items-center bg-hero-gradient pt-20",children:p.jsx("div",{className:"container mx-auto px-6",children:p.jsxs("div",{className:"grid gap-12 md:grid-cols-2 md:gap-12 lg:gap-16 items-center",children:[p.jsxs(He.div,{initial:{opacity:0,x:-30}
98,animate:{opacity:1,x:0},transition:{duration:.8},className:"flex flex-col gap-8",children:[p.jsxs("div",{children:[p.jsx(He.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},className:"mb-4 text-xs font-body uppercase tracking-[0.3em] text-primary",children:"Nouveau podcast"}),p.jsxs("h1",{className:"font-display text-5xl font-bold leading-tight text-foreground md:text-6xl lg:text-7xl",children:["Fleurons",p.jsx("span",{className:"mt-3 block font-display text-xl font-normal leading-snug text-secondary-foreground md:text-2xl",children:"les sagas des plus grandes entreprises françaises"})]}),p.jsx("p",{className:"mt-6 max-w-lg text-lg font-body leading-relaxed text-secondary-foreground",children:"Les sagas des plus grandes entreprises françaises. Total, Danone, LVMH, L'Oréal⦠les histoires que vous ne lirez jamais dans un livre de 300 pages."}),p.jsx("p",{className:"mt-3 text-sm font-body text-muted-foreground",children:"Co-animé par David Carzon, Clémence Lepic et Matthieu Stefani. Chaque mois, une nouvelle saga racontée chronologiquement, à travers les anecdotes les plus dingues, les successions, les rivalités et les luttes de pouvoir."})]}),p.jsxs("div",{children:[p.jsx("p",{className:"mb-3 text-xs font-body uppercase tracking-wider text-muted-foreground",children:"Abonnez-vous, ne ratez aucun épisode"}),p.jsx(zs,{})]})]}),p.jsx(He.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.8,delay:.2},className:"flex justify-center",children:p.jsxs("div",{className:"relative w-full max-w-xs",children:[p.jsx("img",{src:bM,alt:"Couverture du podcast Fleurons, les sagas des entreprises françaises",className:"w-full rounded-lg shadow-2xl shadow-primary/10"}),p.jsx("div",{className:"absolute inset-0 rounded-lg ring-1 ring-inset ring-white/10"})]})})]})})}),p.jsx(vM,{}),p.jsx("section",{className:"py-24",id:"episodes",children:p.jsxs("div",{className:"container mx-auto px-6",children:[p.jsxs(He.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mb-12 flex flex-wrap items-end justify-between gap-4",children:[p.jsx("h2",{className:"font-display text-3xl font-bold text-foreground gold-underline inline-block",children:"Derniers épisodes"}),p.jsxs(me,{to:"/episodes",className:"inline-flex items-center gap-2 text-sm font-body font-semibold text-primary hover:text-gold-glow transition-colors",children:["Tous les épisodes",p.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})]}),n?p.jsx("div",{className:"grid gap-8 md:grid-cols-2 lg:grid-cols-3",children:[1,2,3].map(a=>p.jsx("div",{className:"aspect-square animate-pulse rounded-lg bg-card"},a))}):o.length>0?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"grid gap-8 md:grid-cols-2 lg:grid-cols-3",children:o.map((a,l)=>p.jsx(Pk,{episode:a,index:l,featured:l===0},a.id))}),p.jsx("div",{className:"mt-12 text-center",children:p.jsxs(me,{to:"/episodes",className:"inline-flex items-center gap-2 rounded-full border border-primary/40 px-6 py-3 text-sm font-body font-semibold text-primary transition-all hover:bg-primary hover:text-primary-foreground",children:["Voir tous les épisodes",p.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]}):p.jsx("p",{className:"text-muted-foreground font-body",children:"Les épisodes arrivent bientôtâ¦"})]})}),p.jsx(xM,{}),p.jsx("section",{className:"border-t border-border bg-card py-20",children:p.jsx("div",{className:"container mx-auto px-6 text-center",children:p.jsxs(He.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mx-auto max-w-xl",children:[p.jsx("h2",{className:"font-display text-3xl font-bold text-foreground",children:"Ne passez pas à côté"}),p.jsx("p",{className:"mt-4 text-base font-body text-muted-foreground",children:"Vous ne reviendrez probablement pas ici. Abonnez-vous maintenant pour recevoir chaque nouvel épisode directement dans votre app préférée."}),p.jsx("div",{className:"mt-8 flex justify-center",children:p.jsx(zs,{})})]})})})]}),p.jsx(rs,{})]})};async function AM(t){return new Promise(e=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{const r=document.createElement("canvas"),s=50;
98r.width=s,r.height=s;const i=r.getContext("2d");if(!i)return e("40 60% 50%");i.drawImage(n,0,0,s,s);const o=i.getImageData(0,0,s,s).data;let a=0,l=0,u=0,c=0;for(let A=0;A<o.length;A+=16){const j=o[A],W=o[A+1],$=o[A+2];if(o[A+3]<128)continue;const I=(j+W+$)/3;if(I<30||I>225)continue;const X=Math.max(j,W,$),Y=Math.min(j,W,$),C=1+(X===0?0:(X-Y)/X)*2;a+=j*C,l+=W*C,u+=$*C,c+=C}if(c===0)return e("40 60% 50%");const d=a/c,f=l/c,h=u/c,g=d/255,m=f/255,x=h/255,y=Math.max(g,m,x),v=Math.min(g,m,x);let w=0,_=0;const S=(y+v)/2;if(y!==v){const A=y-v;_=S>.5?A/(2-y-v):A/(y+v),y===g?w=((m-x)/A+(m<x?6:0))/6:y===m?w=((x-g)/A+2)/6:w=((g-m)/A+4)/6}const k=Math.round(w*360),E=Math.round(Math.max(_*100,30)),T=Math.round(Math.min(Math.max(S*100,35),55));e(`${k} ${E}% ${T}%`)},n.onerror=()=>e("40 60% 50%"),n.src=t})}function RM(){const{slug:t}=KO(),[e,n]=b.useState(null),[r,s]=b.useState(!0),[i,o]=b.useState(null),a=Ek(e==null?void 0:e.title);b.useEffect(()=>{sg().then(m=>{const x=m.episodes.find(y=>y.slug===t);n(x||null),s(!1),x!=null&&x.imageUrl&&AM(x.imageUrl).then(o)}).catch(()=>s(!1))},[t]);const l=b.useMemo(()=>i?{"--ep-accent":i,"--ep-accent-fg":"0 0% 100%"}:{},[i]);if(r)return p.jsxs(p.Fragment,{children:[p.jsx(er,{}),p.jsx("main",{className:"min-h-screen pt-24",children:p.jsx("div",{className:"container mx-auto px-6",children:p.jsx("div",{className:"h-96 animate-pulse rounded-lg bg-card"})})})]});if(!e)return p.jsxs(p.Fragment,{children:[p.jsx(er,{}),p.jsx("main",{className:"flex min-h-screen items-center justify-center pt-20",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"font-display text-3xl text-foreground",children:"Ãpisode introuvable"}),p.jsx(me,{to:"/",className:"mt-4 inline-block text-primary font-body hover:underline",children:"â Retour à l'accueil"})]})}),p.jsx(rs,{})]});const u=e.descriptionHtml.replace(/<!--\[CDATA\[/g,"").replace(/\]\]-->/g,"").replace(/<!--|-->/g,""),{introText:c,restHtml:d}=(()=>{var T,A;if(typeof window>"u")return{introText:"",restHtml:u};const x=new DOMParser().parseFromString(`<div>${u}</div>`,"text/html").body.firstElementChild;if(!x)return{introText:"",restHtml:u};const y=(x.textContent||"").replace(/\s+/g," ").trim(),v=/[^.!?]+[.!?]+(?:\s|$)/g,_=(y.match(v)||[]).slice(0,3).join(" ").trim()||y.slice(0,240);let S=0;const k=_.length,E=Array.from(x.childNodes);for(const j of E){if(S>=k)break;const W=(j.textContent||"").replace(/\s+/g," ").trim();if(!W){(T=j.parentNode)==null||T.removeChild(j);continue}S+=W.length+1,(A=j.parentNode)==null||A.removeChild(j)}return{introText:_,restHtml:x.innerHTML.trim()}})(),{seoTitle:f,seoDescription:h,jsonLd:g}=TM(e,`${e.title} ${u}`);return p.jsxs(p.Fragment,{children:[p.jsx(cr,{title:f,description:h,image:e.imageUrl,url:`${hn}/episode/${e.slug}`,type:"article",jsonLd:g}),p.jsx(er,{}),p.jsxs("main",{className:"pt-20",style:l,children:[p.jsxs("section",{className:"relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 bg-cover bg-center opacity-15 blur-3xl scale-110",style:{backgroundImage:`url(${e.imageUrl})`}}),p.jsxs("div",{className:"relative container mx-auto px-6 py-16 lg:py-24",children:[p.jsxs(me,{to:"/",className:"mb-8 inline-flex items-center gap-2 text-sm font-body text-muted-foreground hover:text-primary transition-colors",children:[p.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Tous les épisodes"]}),p.jsxs("div",{className:"grid gap-10 lg:grid-cols-[1fr_330px] lg:gap-12 items-start",children:[p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"flex flex-col gap-6 order-1",children:[p.jsxs("div",{children:[p.jsxs("p",{className:"mb-3 text-xs font-body uppercase tracking-wider",style:{color:i?`hsl(${i})`:void 0},children:[Tk(e.pubDate),e.duration&&` · ${Ck(e.duration)}`]}),p.jsx("h1",{className:"font-display text-4xl font-bold text-foreground lg:text-5xl",children:e.title})]}),c&&p.jsx("p",{className:"text-lg font-body leading-relaxed text-secondary-foreground",children:c})]}),p.jsx(He.div,{initial:{opacity:0,scale:.95}
98,animate:{opacity:1,scale:1},transition:{duration:.6,delay:.15},className:"mx-auto w-full max-w-[330px] order-2 lg:mx-0",children:p.jsx("img",{src:e.imageUrl,alt:`Couverture de l'épisode ${e.title}, podcast Fleurons`,className:"w-full rounded-lg shadow-2xl shadow-primary/10"})})]}),p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"mt-10 flex flex-wrap gap-3",children:[p.jsxs("a",{href:a.apple,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full px-5 py-2.5 text-sm font-body font-semibold transition-all hover:brightness-110",style:{backgroundColor:i?`hsl(${i})`:void 0,color:i?"hsl(0 0% 100%)":void 0},children:[p.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor",children:p.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 3.6c4.6 0 8.4 3.8 8.4 8.4 0 2.8-1.4 5.3-3.5 6.8-.2-.7-.5-1.5-.8-2.2 1.4-1.1 2.3-2.8 2.3-4.6 0-3.5-2.9-6.4-6.4-6.4S5.6 8.5 5.6 12c0 1.8.9 3.5 2.3 4.6-.3.7-.6 1.5-.8 2.2C5 17.3 3.6 14.8 3.6 12c0-4.6 3.8-8.4 8.4-8.4zm0 3.6c-2.6 0-4.8 2.2-4.8 4.8 0 1.5.7 2.8 1.8 3.7.2-.6.4-1.2.7-1.7-.5-.5-.9-1.2-.9-2 0-1.8 1.4-3.2 3.2-3.2s3.2 1.4 3.2 3.2c0 .8-.3 1.5-.9 2 .3.5.5 1.1.7 1.7 1.1-.9 1.8-2.2 1.8-3.7 0-2.6-2.2-4.8-4.8-4.8zm0 4c-.9 0-1.6.7-1.6 1.6 0 .6.3 1.1.8 1.4l-1.2 5.4c-.1.5.1 1 .6 1.2.2.1.4.2.6.2h1.6c.2 0 .4-.1.6-.2.5-.2.7-.7.6-1.2l-1.2-5.4c.5-.3.8-.8.8-1.4 0-.9-.7-1.6-1.6-1.6z"})}),"Ãcouter sur Apple Podcasts"]}),p.jsxs("a",{href:a.spotify,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full border bg-secondary/50 px-5 py-2.5 text-sm font-body font-semibold text-foreground transition-all hover:text-white",style:{borderColor:i?`hsl(${i} / 0.4)`:void 0},onMouseEnter:m=>{i&&(m.currentTarget.style.backgroundColor=`hsl(${i})`,m.currentTarget.style.borderColor=`hsl(${i})`)},onMouseLeave:m=>{i&&(m.currentTarget.style.backgroundColor="",m.currentTarget.style.borderColor=`hsl(${i} / 0.4)`)},children:[p.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor",children:p.jsx("path",{d:"M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"})}),"Ãcouter sur Spotify"]}),p.jsxs("a",{href:a.youtube,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-full border border-border bg-secondary/50 px-5 py-2.5 text-sm font-body font-semibold text-foreground transition-all hover:bg-secondary",children:[p.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4",fill:"currentColor",children:p.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})}),"Regarder sur YouTube"]})]})]})]}),d&&p.jsx("section",{className:"border-t border-border py-16",children:p.jsx("div",{className:"container mx-auto px-6",children:p.jsx("div",{className:"mx-auto max-w-3xl",children:p.jsx("div",{className:`prose prose-invert prose-lg max-w-none font-body 99 prose-headings:font-display prose-headings:text-foreground 100 prose-p:text-secondary-foreground prose-p:leading-relaxed 101 prose-a:text-primary prose-a:no-underline hover:prose-a:underline 102 prose-strong:text-foreground prose-em:text-muted-foreground`,dangerouslySetInnerHTML:{__html:d}})})})}),p.jsx("section",{className:"border-t border-border bg-card py-16",children:p.jsxs("div",{className:"container mx-auto px-6 text-center",children:[p.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Vous avez aimé cet épisode ?"}),p.jsx("p",{className:"mt-3 text-sm font-body text-muted-foreground",children:"Abonnez-vous pour ne manquer aucune saga."}),p.jsx("div",{className:"mt-6 flex justify-center",children:p.jsx(zs,{episodeTitle:e.title})}),p.jsxs("p",{className:"mt-8 text-sm font-body text-muted-foreground",children:[p.jsx(me,{to:"/episodes",className:"text-primary transition-colors hover:underline",children:"Tous les épisodes de Fleurons"}),p.jsx("span",{className:"mx-2",children:"·"}
102),p.jsx(me,{to:"/meilleurs-podcasts-business",className:"text-primary transition-colors hover:underline",children:"Les meilleurs podcasts business en français"})]})]})})]}),p.jsx(rs,{})]})}function jM(){const[t,e]=b.useState([]),[n,r]=b.useState(!0);b.useEffect(()=>{sg().then(o=>{e(o.episodes),r(!1)}).catch(()=>r(!1))},[]);const s=t.filter(o=>o.duration&&o.duration!=="00:00:00"),i={"@context":"https://schema.org","@graph":[{"@type":"CollectionPage",name:"Tous les épisodes du podcast Fleurons",description:"La liste complète des épisodes du podcast Fleurons : sagas des grandes entreprises françaises racontées par David Carzon, Clémence Lepic et Matthieu Stefani.",url:`${hn}/episodes`,about:{"@id":`${hn}/#podcast`}},Ak(s),{"@type":"ItemList",name:"Ãpisodes du podcast Fleurons",numberOfItems:s.length,itemListElement:s.map((o,a)=>({"@type":"ListItem",position:a+1,name:o.title,url:`${hn}/episode/${o.slug}`}))}]};return p.jsxs(p.Fragment,{children:[p.jsx(cr,{title:"Tous les épisodes | Podcast Fleurons",description:"Retrouvez tous les épisodes du podcast Fleurons : Hermès, LVMH, Total, Danone, L'Oréal⦠les sagas des plus grandes entreprises françaises.",url:`${hn}/episodes`,jsonLd:i}),p.jsx(er,{}),p.jsxs("main",{className:"pt-28 pb-24",children:[p.jsxs("section",{className:"container mx-auto px-6",children:[p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"mb-12 max-w-2xl",children:[p.jsx("p",{className:"mb-3 text-xs font-body uppercase tracking-[0.3em] text-primary",children:"Catalogue"}),p.jsx("h1",{className:"font-display text-4xl font-bold text-foreground gold-underline inline-block lg:text-5xl",children:"Tous les épisodes"}),p.jsx("p",{className:"mt-6 text-base font-body text-muted-foreground",children:"Chaque mois, une nouvelle saga d'entreprise française. Plongez dans les archives du podcast Fleurons."}),p.jsxs("p",{className:"mt-4 text-sm font-body text-muted-foreground",children:["Envie d'élargir vos écoutes ? Découvrez notre sélection des"," ",p.jsx(me,{to:"/meilleurs-podcasts-business",className:"text-primary transition-colors hover:underline",children:"meilleurs podcasts business en français"}),"."]})]}),n?p.jsx("div",{className:"grid gap-8 md:grid-cols-2 lg:grid-cols-3",children:[1,2,3,4,5,6].map(o=>p.jsx("div",{className:"aspect-square animate-pulse rounded-lg bg-card"},o))}):s.length>0?p.jsx("div",{className:"grid gap-8 md:grid-cols-2 lg:grid-cols-3",children:s.map((o,a)=>p.jsx(Pk,{episode:o,index:a},o.id))}):p.jsx("p",{className:"font-body text-muted-foreground",children:"Les épisodes arrivent bientôtâ¦"})]}),p.jsx("section",{className:"mt-24 border-t border-border bg-card py-16",children:p.jsxs("div",{className:"container mx-auto px-6 text-center",children:[p.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Ne ratez aucun épisode"}),p.jsx("p",{className:"mt-3 text-sm font-body text-muted-foreground",children:"Abonnez-vous sur votre plateforme préférée."}),p.jsx("div",{className:"mt-6 flex justify-center",children:p.jsx(zs,{})})]})})]}),p.jsx(rs,{})]})}var de;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(de||(de={}));var j0;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(j0||(j0={}));const z=de.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Er=t=>{switch(typeof t){case"undefined":return z.undefined;case"string":return z.string;case"number":return Number.isNaN(t)?z.nan:z.number;case"boolean":return z.boolean;case"function":return z.function;case"bigint":return z.bigint;case"symbol":return z.symbol;case"object":return Array.isArray(t)?z.array:t===null?z.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?z.promise:typeof Map<"u"&&t instanceof Map?z.map:typeof Set<"u"&&t instanceof Set?z.set:typeof Date<"u"&&t instanceof Date?z.date:z.object;default:return z.unknown}}
vendor: 4,685 bytes, line 102
102,N=de.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class lr extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),r}static assert(e){if(!(e instanceof lr))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,de.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const i=s.path[0];n[i]=n[i]||[],n[i].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}lr.create=t=>new lr(t);const Yf=(t,e)=>{let n;switch(t.code){case N.invalid_type:t.received===z.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,de.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:n=`Unrecognized key(s) in object: ${de.joinValues(t.keys,", ")}`;break;case N.invalid_union:n="Invalid input";break;case N.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${de.joinValues(t.options)}`;break;case N.invalid_enum_value:n=`Invalid enum value. Expected ${de.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:n="Invalid function arguments";break;case N.invalid_return_type:n="Invalid function return type";break;case N.invalid_date:n="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:de.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case N.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case N.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case N.custom:n="Invalid input";break;case N.invalid_intersection_types:n="Intersection results could not be merged";break;case N.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:n="Number must be finite";break;default:n=e.defaultError,de.assertNever(t)}return{message:n}};let OM=Yf;function NM(){return OM}const LM=t=>
vendor: 29,041 bytes, line 102
102{const{data:e,path:n,errorMaps:r,issueData:s}=t,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:e,defaultError:a}).message;return{...s,path:i,message:a}};function F(t,e){const n=NM(),r=LM({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Yf?void 0:Yf].filter(s=>!!s)});t.common.issues.push(r)}class jt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const s of n){if(s.status==="aborted")return Q;s.status==="dirty"&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return jt.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return Q;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const Q=Object.freeze({status:"aborted"}),Vo=t=>({status:"dirty",value:t}),qt=t=>({status:"valid",value:t}),O0=t=>t.status==="aborted",N0=t=>t.status==="dirty",io=t=>t.status==="valid",oc=t=>typeof Promise<"u"&&t instanceof Promise;var q;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(q||(q={}));class ss{constructor(e,n,r,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const L0=(t,e)=>{if(io(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new lr(t.common.issues);return this._error=n,this._error}}};function se(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:s}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>{const{message:l}=t;return o.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:s}}class ue{get description(){return this._def.description}_getType(e){return Er(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Er(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new jt,ctx:{common:e.parent.common,data:e.data,parsedType:Er(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(oc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Er(e)},s=this._parseSync({data:e,path:r.path,parent:r});return L0(r,s)}"~validate"(e){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Er(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return io(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(s=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>io(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Er(e)},s=this._parse({data:e,path:r.path,parent:r}),i=await(oc(s)?s:Promise.resolve(s));return L0(r,i)}refine(e,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=e(s),a=()=>i.addIssue({code:N.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,s)=>e(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(e){return new ao({schema:this,typeName:Z.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Yr.create(this,this._def)}nullable(){return lo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return In.create(this)}promise(){return cc.create(this,this._def)}or(e){return lc.create([this,e],this._def)}and(e){return uc.create(this,e,this._def)}transform(e){return new ao({...se(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Qf({...se(this._def),innerType:this,defaultValue:n,typeName:Z.ZodDefault})}brand(){return new r$({typeName:Z.ZodBranded,type:this,...se(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Zf({...se(this._def),innerType:this,catchValue:n,typeName:Z.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ig.create(this,e)}readonly(){return Xf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const IM=/^c[^\s-]{8,}$/i,DM=/^[0-9a-z]+$/,MM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,$M=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FM=/^[a-z0-9_-]{21}$/i,UM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,BM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let rh;const WM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,HM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,KM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,GM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,YM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Rk="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",JM=new RegExp(`^${Rk}$`);function jk(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function QM(t){return new RegExp(`^${jk(t)}$`)}function ZM(t){let e=`${Rk}T${jk(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function XM(t,e){return!!((e==="v4"||!e)&&WM.test(t)||(e==="v6"||!e)&&qM.test(t))}function e$(t,e){if(!UM.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function t$(t,e){return!!((e==="v4"||!e)&&HM.test(t)||(e==="v6"||!e)&&KM.test(t))}class Fr extends ue{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==z.string){const i=this._getOrReturnCtx(e);return F(i,{code:N.invalid_type,expected:z.string,received:i.parsedType}),Q}const r=new jt;let s;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?F(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&F(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")BM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"email",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")rh||(rh=new RegExp(zM,"u")),rh.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"emoji",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")$M.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"uuid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")FM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"nanoid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")IM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"cuid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")DM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"cuid2",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")MM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"ulid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),F(s,{validation:"url",code:N.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"regex",code:N.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(e,s),F(s,{code:N.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(s=this._getOrReturnCtx(e,s),F(s,{code:N.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(s=this._getOrReturnCtx(e,s),F(s,{code:N.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ZM(i).test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{code:N.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?JM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{code:N.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?QM(i).test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{code:N.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?VM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"duration",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?XM(e.data,i.version)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"ip",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?e$(e.data,i.alg)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"jwt",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?t$(e.data,i.version)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"cidr",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?GM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"base64",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?YM.test(e.data)||(s=this._getOrReturnCtx(e,s),F(s,{validation:"base64url",code:N.invalid_string,message:i.message}),r.dirty()):de.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(s=>e.test(s),{validation:n,code:N.invalid_string,...q.errToObj(r)})}_addCheck(e){return new Fr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...q.errToObj(e)})}url(e){return this._addCheck({kind:"url",...q.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...q.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...q.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...q.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...q.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...q.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...q.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...q.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...q.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...q.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...q.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...q.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...q.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...q.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...q.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...q.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...q.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...q.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...q.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...q.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...q.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...q.errToObj(n)})}nonempty(e){return this.min(1,q.errToObj(e))}trim(){return new Fr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Fr.create=t=>new Fr({checks:[],typeName:Z.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...se(t)});function n$(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,s=n>r?n:r,i=Number.parseInt(t.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return i%o/10**s}class Ia extends ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==z.number){const i=this._getOrReturnCtx(e);return F(i,{code:N.invalid_type,expected:z.number,received:i.parsedType}),Q}let r;const s=new jt;for(const i of this._def.checks)i.kind==="int"?de.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),F(r,{code:N.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),F(r,{code:N.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),F(r,{code:N.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?n$(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),F(r,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),F(r,{code:N.not_finite,message:i.message}),s.dirty()):de.assertNever(i);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,q.toString(n))}gt(e,n){return this.setLimit("min",e,!1,q.toString(n))}lte(e,n){return this.setLimit("max",e,!0,q.toString(n))}lt(e,n){return this.setLimit("max",e,!1,q.toString(n))}setLimit(e,n,r,s){return new Ia({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:q.toString(s)}]})}_addCheck(e){return new Ia({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:q.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:q.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:q.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&de.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Ia.create=t=>new Ia({checks:[],typeName:Z.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...se(t)});class Da extends ue{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==z.bigint)return this._getInvalidInput(e);let r;const s=new jt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),F(r,{code:N.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),F(r,{code:N.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),F(r,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):de.assertNever(i);return{status:s.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:z.bigint,received:n.parsedType}),Q}gte(e,n){return this.setLimit("min",e,!0,q.toString(n))}gt(e,n){return this.setLimit("min",e,!1,q.toString(n))}lte(e,n){return this.setLimit("max",e,!0,q.toString(n))}lt(e,n){return this.setLimit("max",e,!1,q.toString(n))}setLimit(e,n,r,s){return new Da({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:q.toString(s)}]})}_addCheck(e){return new Da({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:q.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Da.create=t=>new Da({checks:[],typeName:Z.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...se(t)});class I0 extends ue{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==z.boolean){const r=this._getOrReturnCtx(e);return F(r,{code:N.invalid_type,expected:z.boolean,received:r.parsedType}),Q}return qt(e.data)}}I0.create=t=>new I0({typeName:Z.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...se(t)});class ac extends ue{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==z.date){const i=this._getOrReturnCtx(e);return F(i,{code:N.invalid_type,expected:z.date,received:i.parsedType}),Q}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return F(i,{code:N.invalid_date}),Q}const r=new jt;let s;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:N.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(s=this._getOrReturnCtx(e,s),F(s,{code:N.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):de.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ac({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:q.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:q.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}ac.create=t=>new ac({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Z.ZodDate,...se(t)});class D0 extends ue{_parse(e){if(this._getType(e)!==z.symbol){const r=this._getOrReturnCtx(e);return F(r,{code:N.invalid_type,expected:z.symbol,received:r.parsedType}),Q}return qt(e.data)}}D0.create=t=>new D0({typeName:Z.ZodSymbol,...se(t)});class M0 extends ue{_parse(e){if(this._getType(e)!==z.undefined){const r=this._getOrReturnCtx(e);return F(r,{code:N.invalid_type,expected:z.undefined,received:r.parsedType}),Q}return qt(e.data)}}M0.create=t=>new M0({typeName:Z.ZodUndefined,...se(t)});class $0 extends ue{_parse(e){if(this._getType(e)!==z.null){const r=this._getOrReturnCtx(e);return F(r,{code:N.invalid_type,expected:z.null,received:r.parsedType}),Q}return qt(e.data)}}$0.create=t=>new $0({typeName:Z.ZodNull,...se(t)});class F0 extends ue{constructor(){super(...arguments),this._any=!0}_parse(e){return qt(e.data)}}F0.create=t=>new F0({typeName:Z.ZodAny,...se(t)});class U0 extends ue{constructor(){super(...arguments),this._unknown=!0}_parse(e){return qt(e.data)}}U0.create=t=>new U0({typeName:Z.ZodUnknown,...se(t)});class is extends ue{_parse(e){const n=this._getOrReturnCtx(e);return F(n,{code:N.invalid_type,expected:z.never,received:n.parsedType}),Q}}is.create=t=>new is({typeName:Z.ZodNever,...se(t)});class V0 extends ue{_parse(e){if(this._getType(e)!==z.undefined){const r=this._getOrReturnCtx(e);return F(r,{code:N.invalid_type,expected:z.void,received:r.parsedType}),Q}return qt(e.data)}}V0.create=t=>new V0({typeName:Z.ZodVoid,...se(t)});class In extends ue{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),s=this._def;if(n.parsedType!==z.array)return F(n,{code:N.invalid_type,expected:z.array,received:n.parsedType}),Q;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(F(n,{code:o?N.too_big:N.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(F(n,{code:N.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(F(n,{code:N.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new ss(n,o,n.path,a)))).then(o=>jt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new ss(n,o,n.path,a)));return jt.mergeArray(r,i)}
vendor: 5,068 bytes, line 102
102get element(){return this._def.type}min(e,n){return new In({...this._def,minLength:{value:e,message:q.toString(n)}})}max(e,n){return new In({...this._def,maxLength:{value:e,message:q.toString(n)}})}length(e,n){return new In({...this._def,exactLength:{value:e,message:q.toString(n)}})}nonempty(e){return this.min(1,e)}}In.create=(t,e)=>new In({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...se(e)});function ai(t){if(t instanceof je){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Yr.create(ai(r))}return new je({...t._def,shape:()=>e})}else return t instanceof In?new In({...t._def,type:ai(t.element)}):t instanceof Yr?Yr.create(ai(t.unwrap())):t instanceof lo?lo.create(ai(t.unwrap())):t instanceof Ws?Ws.create(t.items.map(e=>ai(e))):t}class je extends ue{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=de.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==z.object){const u=this._getOrReturnCtx(e);return F(u,{code:N.invalid_type,expected:z.object,received:u.parsedType}),Q}const{status:r,ctx:s}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof is&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ss(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof is){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:s.data[c]}});else if(u==="strict")a.length>0&&(F(s,{code:N.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ss(s,d,s.path,c)),alwaysSet:c in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,f=await c.value;u.push({key:d,value:f,alwaysSet:c.alwaysSet})}return u}).then(u=>jt.mergeObjectSync(r,u)):jt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return q.errToObj,new je({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,o;const s=((o=(i=this._def).errorMap)==null?void 0:o.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:q.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new je({...this._def,unknownKeys:"strip"})}passthrough(){return new je({...this._def,unknownKeys:"passthrough"})}extend(e){return new je({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new je({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Z.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new je({...this._def,catchall:e})}pick(e){const n={};for(const r of de.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new je({...this._def,shape:()=>n})}omit(e){const n={};for(const r of de.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new je({...this._def,shape:()=>n})}deepPartial(){return ai(this)}partial(e){const n={};for(const r of de.objectKeys(this.shape)){const s=this.shape[r];e&&!e[r]?n[r]=s:n[r]=s.optional()}return new je({...this._def,shape:()=>n})}required(e){const n={};for(const r of de.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Yr;)i=i._def.innerType;n[r]=i}return new je({...this._def,shape:()=>n})}keyof(){return Ok(de.objectKeys(this.shape))}}je.create=(t,e)=>new je({shape:()=>t,unknownKeys:"strip",catchall:is.create(),typeName:Z.ZodObject,...se(e)});je.strictCreate=(t,e)=>new je({shape:()=>t,unknownKeys:"strict",catchall:is.create(),typeName:Z.ZodObject,...se(e)});je.lazycreate=(t,e)=>new je({shape:t,unknownKeys:"strip",catchall:is.create(),typeName:Z.ZodObject,...se(e)});class lc extends ue{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new lr(a.ctx.common.issues));return F(n,{code:N.invalid_union,unionErrors:o}),Q}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;
vendor: 4,993 bytes, line 102
102const a=o.map(l=>new lr(l));return F(n,{code:N.invalid_union,unionErrors:a}),Q}}get options(){return this._def.options}}lc.create=(t,e)=>new lc({options:t,typeName:Z.ZodUnion,...se(e)});function Jf(t,e){const n=Er(t),r=Er(e);if(t===e)return{valid:!0,data:t};if(n===z.object&&r===z.object){const s=de.objectKeys(e),i=de.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(const a of i){const l=Jf(t[a],e[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===z.array&&r===z.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],a=e[i],l=Jf(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===z.date&&r===z.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class uc extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=(i,o)=>{if(O0(i)||O0(o))return Q;const a=Jf(i.value,o.value);return a.valid?((N0(i)||N0(o))&&n.dirty(),{status:n.value,value:a.data}):(F(r,{code:N.invalid_intersection_types}),Q)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}uc.create=(t,e,n)=>new uc({left:t,right:e,typeName:Z.ZodIntersection,...se(n)});class Ws extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.array)return F(r,{code:N.invalid_type,expected:z.array,received:r.parsedType}),Q;if(r.data.length<this._def.items.length)return F(r,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Q;!this._def.rest&&r.data.length>this._def.items.length&&(F(r,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new ss(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>jt.mergeArray(n,o)):jt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Ws({...this._def,rest:e})}}Ws.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ws({items:t,typeName:Z.ZodTuple,rest:null,...se(e)})};class B0 extends ue{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.map)return F(r,{code:N.invalid_type,expected:z.map,received:r.parsedType}),Q;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new ss(r,a,r.path,[u,"key"])),value:i._parse(new ss(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return Q;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return Q;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}B0.create=(t,e,n)=>new B0({valueType:e,keyType:t,typeName:Z.ZodMap,...se(n)});class Ma extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==z.set)return F(r,{code:N.invalid_type,expected:z.set,received:r.parsedType}),Q;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(F(r,{code:N.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(F(r,{code:N.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return Q;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new ss(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(e,n){return new Ma({...this._def,minSize:{value:e,message:q.toString(n)}})}max(e,n){return new Ma({...this._def,maxSize:{value:e,message:q.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ma.create=(t,e)=>new Ma({valueType:t,minSize:null,maxSize:null,typeName:Z.ZodSet,...se(e)});class z0 extends ue{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}z0.create=(t,e)=>new z0({getter:t,typeName:Z.ZodLazy,...se(e)});class W0 extends ue{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return F(n,{received:n.data,code:N.invalid_literal,expected:this._def.value}),Q}
vendor: 4,126 bytes, line 102
102return{status:"valid",value:e.data}}get value(){return this._def.value}}W0.create=(t,e)=>new W0({value:t,typeName:Z.ZodLiteral,...se(e)});function Ok(t,e){return new oo({values:t,typeName:Z.ZodEnum,...se(e)})}class oo extends ue{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return F(n,{expected:de.joinValues(r),received:n.parsedType,code:N.invalid_type}),Q}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return F(n,{received:n.data,code:N.invalid_enum_value,options:r}),Q}return qt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return oo.create(e,{...this._def,...n})}exclude(e,n=this._def){return oo.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}oo.create=Ok;class H0 extends ue{_parse(e){const n=de.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==z.string&&r.parsedType!==z.number){const s=de.objectValues(n);return F(r,{expected:de.joinValues(s),received:r.parsedType,code:N.invalid_type}),Q}if(this._cache||(this._cache=new Set(de.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=de.objectValues(n);return F(r,{received:r.data,code:N.invalid_enum_value,options:s}),Q}return qt(e.data)}get enum(){return this._def.values}}H0.create=(t,e)=>new H0({values:t,typeName:Z.ZodNativeEnum,...se(e)});class cc extends ue{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==z.promise&&n.common.async===!1)return F(n,{code:N.invalid_type,expected:z.promise,received:n.parsedType}),Q;const r=n.parsedType===z.promise?n.data:Promise.resolve(n.data);return qt(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cc.create=(t,e)=>new cc({type:t,typeName:Z.ZodPromise,...se(e)});class ao extends ue{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:o=>{F(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return Q;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Q:l.status==="dirty"||n.value==="dirty"?Vo(l.value):l});{if(n.value==="aborted")return Q;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?Q:a.status==="dirty"||n.value==="dirty"?Vo(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Q:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Q:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!io(o))return Q;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>io(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):Q);de.assertNever(s)}}
102ao.create=(t,e,n)=>new ao({schema:t,typeName:Z.ZodEffects,effect:e,...se(n)});ao.createWithPreprocess=(t,e,n)=>new ao({schema:e,effect:{type:"preprocess",transform:t},typeName:Z.ZodEffects,...se(n)});class Yr extends ue{_parse(e){return this._getType(e)===z.undefined?qt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Yr.create=(t,e)=>new Yr({innerType:t,typeName:Z.ZodOptional,...se(e)});class lo extends ue{_parse(e){return this._getType(e)===z.null?qt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}lo.create=(t,e)=>new lo({innerType:t,typeName:Z.ZodNullable,...se(e)});class Qf extends ue{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===z.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Qf.create=(t,e)=>new Qf({innerType:t,typeName:Z.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...se(e)});class Zf extends ue{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return oc(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new lr(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new lr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Zf.create=(t,e)=>new Zf({innerType:t,typeName:Z.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...se(e)});class q0 extends ue{_parse(e){if(this._getType(e)!==z.nan){const r=this._getOrReturnCtx(e);return F(r,{code:N.invalid_type,expected:z.nan,received:r.parsedType}),Q}return{status:"valid",value:e.data}}}q0.create=t=>new q0({typeName:Z.ZodNaN,...se(t)});class r$ extends ue{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ig extends ue{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Q:i.status==="dirty"?(n.dirty(),Vo(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Q:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(e,n){return new ig({in:e,out:n,typeName:Z.ZodPipeline})}}class Xf extends ue{_parse(e){const n=this._def.innerType._parse(e),r=s=>(io(s)&&(s.value=Object.freeze(s.value)),s);return oc(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Xf.create=(t,e)=>new Xf({innerType:t,typeName:Z.ZodReadonly,...se(e)});je.lazycreate;var Z;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Z||(Z={}));const Vl=Fr.create;is.create;In.create;const s$=je.create;je.strictCreate;lc.create;uc.create;Ws.create;oo.create;cc.create;Yr.create;lo.create;const i$=s$({name:Vl().trim().nonempty({message:"Le nom est obligatoire"}).max(100,{message:"Le nom doit faire moins de 100 caractères"}),email:Vl().trim().email({message:"Adresse e-mail invalide"}).max(255,{message:"L'e-mail doit faire moins de 255 caractères"}),subject:Vl().trim().nonempty({message:"L'objet est obligatoire"}).max(150,{message:"L'objet doit faire moins de 150 caractères"}),message:Vl().trim().nonempty({message:"Le message est obligatoire"}).max(2e3,{message:"Le message doit faire moins de 2000 caractères"})}),Bl="[email protected]";function o$(){const[t,e]=b.useState({name:"",email:"",subject:"",message:""}),[n,r]=b.useState({}),s=o=>a=>{e(l=>({...l,[o]:a.target.value})),n[o]&&r(l=>({...l,[o]:void 0}))},i=o=>{o.preventDefault();const a=i$.safeParse(t);if(!a.success){const g={};
102a.error.issues.forEach(m=>{const x=m.path[0];g[x]||(g[x]=m.message)}),r(g);return}const{name:l,email:u,subject:c,message:d}=a.data,f=`${d} 103 104De : ${l} (${u})`,h=`mailto:${Bl}?subject=${encodeURIComponent(`[Fleurons] ${c}`)}&body=${encodeURIComponent(f)}`;window.location.href=h,r_({title:"Votre client mail s'ouvreâ¦",description:`Si rien ne se passe, écrivez-nous directement à ${Bl}`})};return p.jsxs(p.Fragment,{children:[p.jsx(cr,{title:"Contact | Fleurons",description:"Contactez l'équipe du podcast Fleurons : suggestions d'entreprises, partenariats, presse. Une saga à nous proposer ?",url:`${window.location.origin}/contact`}),p.jsx(er,{}),p.jsx("main",{className:"pt-28 pb-16",children:p.jsx("div",{className:"container mx-auto px-6",children:p.jsxs("div",{className:"mx-auto max-w-2xl",children:[p.jsxs(me,{to:"/",className:"mb-8 inline-flex items-center gap-2 text-sm font-body text-muted-foreground hover:text-primary transition-colors",children:[p.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),"Retour à l'accueil"]}),p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:[p.jsx("h1",{className:"font-display text-4xl font-bold text-foreground lg:text-5xl",children:"Nous écrire"}),p.jsx("p",{className:"mt-4 text-base font-body text-muted-foreground",children:"Une suggestion d'entreprise à raconter, une question, un partenariat ? Ãcrivez-nous, nous lisons tout."}),p.jsxs("form",{onSubmit:i,noValidate:!0,className:"mt-10 flex flex-col gap-5",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"name",className:"mb-2 block text-xs font-body uppercase tracking-wider text-muted-foreground",children:"Nom"}),p.jsx("input",{id:"name",type:"text",value:t.name,onChange:s("name"),maxLength:100,className:"w-full rounded-md border border-border bg-card px-4 py-2.5 text-sm font-body text-foreground transition-colors focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"}),n.name&&p.jsx("p",{className:"mt-1.5 text-xs text-destructive font-body",children:n.name})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"email",className:"mb-2 block text-xs font-body uppercase tracking-wider text-muted-foreground",children:"E-mail"}),p.jsx("input",{id:"email",type:"email",value:t.email,onChange:s("email"),maxLength:255,className:"w-full rounded-md border border-border bg-card px-4 py-2.5 text-sm font-body text-foreground transition-colors focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"}),n.email&&p.jsx("p",{className:"mt-1.5 text-xs text-destructive font-body",children:n.email})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"subject",className:"mb-2 block text-xs font-body uppercase tracking-wider text-muted-foreground",children:"Objet"}),p.jsx("input",{id:"subject",type:"text",value:t.subject,onChange:s("subject"),maxLength:150,className:"w-full rounded-md border border-border bg-card px-4 py-2.5 text-sm font-body text-foreground transition-colors focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"}),n.subject&&p.jsx("p",{className:"mt-1.5 text-xs text-destructive font-body",children:n.subject})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"message",className:"mb-2 block text-xs font-body uppercase tracking-wider text-muted-foreground",children:"Message"}),p.jsx("textarea",{id:"message",rows:6,value:t.message,onChange:s("message"),maxLength:2e3,className:"w-full resize-y rounded-md border border-border bg-card px-4 py-2.5 text-sm font-body text-foreground transition-colors focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"}),n.message&&p.jsx("p",{className:"mt-1.5 text-xs text-destructive font-body",children:n.message})]}),p.jsxs("div",{className:"flex flex-wrap items-center gap-4 pt-2",children:[p.jsx("button",{type:"submit",className:"inline-flex items-center gap-2 rounded-full bg-primary px-6 py-3 text-sm font-body font-semibold uppercase tracking-wider text-primary-foreground transition-all hover:bg-gold-glow",children:"Envoyer le message"}),p.jsxs("p",{className:"text-xs font-body text-muted-foreground",children:["ou directement à "," ",p.jsx("a",{href:`mailto:${Bl}`,className:"text-primary hover:underline",children:Bl})]})]})]})]})]})})}),p.jsx(rs,{})]})}const sh="https://www.fleurons.studio",ih=[{id:"references-collision",title:"Les références Collision",intro:"Les programmes produits par Collision Productions, le studio derrière Fleurons.",podcasts:[{name:"Fleurons",url:"/",internal:"/episodes",since:"Depuis fév. 2026",hosts:"Matthieu Stefani, Clémence Lepic, David Carzon",studio:"Collision",length:"2h à 3h",frequency:"Mensuel",spotify:"https://open.spotify.com/show/6v7fG3tOWHOCzfVAIUUmUk",apple:"https://podcasts.apple.com/fr/podcast/fleurons/id1877689552",text:"Fleurons est le rendez-vous mensuel consacré aux grandes entreprises françaises : celles qui portent une histoire industrielle, un ancrage territorial et un modèle qui a traversé les crises. Chaque saga est racontée chronologiquement, des origines aux luttes de pouvoir contemporaines, avec les anecdotes que l'on ne trouve pas dans les biographies officielles."},{name:"Génération Do It Yourself (GDIY)",url:"https://www.gdiy.fr",since:"Depuis fév. 2017",hosts:"Matthieu Stefani",studio:"Collision",length:"1h30 à 3h",frequency:"2x par semaine",spotify:"https://open.spotify.com/show/6jCObFeQTf0VARXdMv9iE4",apple:"https://podcasts.apple.com/fr/podcast/g%C3%A9n%C3%A9ration-do-it-yourself/id1209142994",text:"GDIY a posé les bases du podcast entrepreneurial en France : des entretiens longs, sans sujets interdits, avec des fondateurs et des dirigeants qui racontent leur parcours avec une franchise rare dans les médias traditionnels. Plusieurs centaines d'épisodes et une audience qui se compte en millions d'écoutes."},{name:"La Martingale",url:"https://www.lamartingale.io",since:"Depuis 2020",hosts:"Matthieu Stefani",studio:"Collision",length:"45 min à 1h",frequency:"Hebdo",spotify:"https://open.spotify.com/show/1nHnvtSbELXfsjXhVCPMYw",apple:"https://podcasts.apple.com/fr/podcast/la-martingale/id1499618980",text:"Un invité, une classe d'actifs : bourse, immobilier, private equity, art, crypto. La Martingale rend la finance personnelle intelligible sans jargon ni promesse de rendement miracle, avec des praticiens qui expliquent comment ils travaillent réellement."},{name:"Combien Ãa Gagne",url:"https://www.ccg.money/",since:"Depuis 2024",hosts:"Clémence Lepic",studio:"Collision",length:"30 à 45 min",frequency:"Hebdo",spotify:"https://open.spotify.com/show/0t9N1Dd05siF9jPupuw8
104yc",apple:"https://podcasts.apple.com/fr/podcast/combien-%C3%A7a-gagne/id1777097394",text:"Combien gagne réellement un chirurgien, un boulanger, un data scientist ? Clémence Lepic a trouvé le format qui déverrouille un sujet que la pudeur française rendait opaque. Court, factuel, sans détour."}]},{id:"incontournables",title:"Les incontournables français",intro:"Les programmes que nous écoutons, que nous citons et qui font progresser ceux qui les suivent.",podcasts:[{name:"Skills",url:"https://open.spotify.com/search/Skills%20Nadia%20Marouani/shows",since:"Depuis 2021",hosts:"Nadia Marouani",length:"30 min à 1h",frequency:"Hebdo",spotify:"https://open.spotify.com/search/Skills%20Nadia%20Marouani/shows",apple:"https://podcasts.apple.com/fr/search?term=Skills%20Nadia%20Marouani",text:"Nadia Marouani interroge des dirigeants, des créatifs et des indépendants sur les compétences concrètes qui font la différence dans une carrière. Le format reste ramassé et opérationnel : on en sort avec des méthodes applicables plutôt qu'avec des généralités sur la réussite."},{name:"La Story, Les Ãchos",url:"https://open.spotify.com/show/3G3sAPsDMB7wQ0kIqFJa0Z",since:"Depuis 2018",hosts:"La rédaction des Ãchos",length:"20 à 45 min",frequency:"Pluri-hebdo",spotify:"https://open.spotify.com/show/3G3sAPsDMB7wQ0kIqFJa0Z",apple:"https://podcasts.apple.com/fr/podcast/les-%C3%A9chos/id1393960658",text:"L'un des formats journalistiques les mieux construits du podcast français. Plusieurs fois par semaine, une actualité économique décortiquée avec des sources, du contexte et une vraie mise en perspective, loin du résumé de presse."},{name:"Vlan !",url:"https://open.spotify.com/show/215dOVPuOgRBXx2i8BlgdO",since:"Depuis 2016",hosts:"Grégory Pouy",length:"30 à 60 min",frequency:"Hebdo",spotify:"https://open.spotify.com/show/215dOVPuOgRBXx2i8BlgdO",apple:"https://podcasts.apple.com/fr/podcast/vlan/id1200303865",text:"Grégory Pouy explore les mutations du marketing, du numérique et de la société avec des invités souvent issus du monde anglophone ou des marges de la réflexion mainstream. Le ton est direct et les sujets évitent le consensus."},{name:"Thinkerview",url:"https://www.youtube.com/@Thinkerview",since:"Depuis 2016",hosts:"Sky",length:"2h à 4h",frequency:"Irrégulier",spotify:"https://open.spotify.com/show/4x9eDQ9kl8rnhFoFtOI0mP",youtube:"https://www.youtube.com/@Thinkerview",text:"Des entretiens marathon avec des figures politiques, économiques, militaires et intellectuelles, dans un format sans concession. La densité informationnelle y est hors norme et certains épisodes font office de documents de référence."},{name:"Le Panier",url:"https://open.spotify.com/show/1uEuLpBcpwtiI4vT19Nfyt",since:"Depuis 2019",hosts:"Laurent Kretz",length:"45 min à 1h",frequency:"Hebdo",spotify:"https://open.spotify.com/show/1uEuLpBcpwtiI4vT19Nfyt",apple:"https://podcasts.apple.com/fr/podcast/le-panier/id1476747851",text:"La référence du retail et de l'e-commerce français. Des marques qui racontent leurs chiffres, leurs canaux d'acquisition et leurs erreurs, avec un niveau de détail opérationnel rare dans le podcast business."}]}],a$=[{slug:"hermes",label:"Hermès, le seul joyau qui a résisté au loup en cachemire"},{slug:"total",label:"Total, du pétrole aux tempêtes"},{slug:"psg",label:"PSG, l'argent, la gloire et Canal"},{slug:"dassault",label:"Dassault, la politique des petits pas"},{slug:"vivendi",label:"Vivendi, l'empire des recompositions"}],K0=[{q:"Quel est le meilleur podcast business en français ?",a:"Tout dépend de votre objectif. Pour l'histoire des grandes entreprises françaises, Fleurons propose des sagas mensuelles de deux à trois heures. Pour des parcours d'entrepreneurs, Génération Do It Yourself reste la référence. Pour investir, La Martingale est le point d'entrée le plus pédagogique."},{q:"Quel podcast écouter pour comprendre l'histoire des entreprises françaises ?",a:"Fleurons raconte chaque mois la saga complète d'un fleuron français : Hermès, Total, Dassault, Vivendi, le PSG. Chaque épisode suit la chronologie de l'entreprise, ses successions et ses crises."},{q:"Où écouter ces podcasts business ?",a:"Sur Spotify, Apple Podcasts, Deezer et YouTube. Les épisodes de Fleurons sont disponibles gratuitement sur toutes ces plateformes."},{q:"à quelle fréquence sortent les épisodes de Fleurons ?",a:"Un nouvel épisode par mois, complété par des extraits entre deux sagas."}];function l$(){const t=`${sh}
104/meilleurs-podcasts-business`,e=ih.flatMap(r=>r.podcasts),n={"@context":"https://schema.org","@graph":[{"@type":"Article",headline:"Meilleurs podcasts business et entreprise en 2026",description:"Notre sélection des meilleurs podcasts business français en 2026 : sagas d'entreprises, entrepreneuriat, finance, retail et grands entretiens.",inLanguage:"fr",mainEntityOfPage:t,url:t,publisher:{"@type":"Organization",name:"Collision Productions",url:"https://www.collision.studio"}},{"@type":"ItemList",name:"Les meilleurs podcasts business en français en 2026",itemListOrder:"https://schema.org/ItemListUnordered",numberOfItems:e.length,itemListElement:e.map((r,s)=>({"@type":"ListItem",position:s+1,item:{"@type":"PodcastSeries",name:r.name,url:r.url.startsWith("/")?sh+r.url:r.url,description:r.text}}))},{"@type":"FAQPage",mainEntity:K0.map(r=>({"@type":"Question",name:r.q,acceptedAnswer:{"@type":"Answer",text:r.a}}))},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Accueil",item:sh+"/"},{"@type":"ListItem",position:2,name:"Meilleurs podcasts business",item:t}]}]};return p.jsxs(p.Fragment,{children:[p.jsx(cr,{title:"Meilleurs podcasts business & entreprise 2026",description:"Quels podcasts business écouter en 2026 ? Fleurons, GDIY, La Martingale, Skills, Thinkerview, Vlan : notre sélection des meilleures émissions business françaises.",url:t,type:"article",jsonLd:n}),p.jsx(er,{}),p.jsxs("main",{className:"pt-28 pb-24",children:[p.jsx("section",{className:"container mx-auto px-6",children:p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"mx-auto max-w-3xl",children:[p.jsxs("nav",{"aria-label":"Fil d'Ariane",className:"mb-6 text-xs font-body text-muted-foreground",children:[p.jsx(me,{to:"/",className:"transition-colors hover:text-primary",children:"Accueil"}),p.jsx("span",{className:"mx-2",children:"/"}),p.jsx("span",{className:"text-foreground",children:"Meilleurs podcasts business"})]}),p.jsx("p",{className:"mb-3 text-xs font-body uppercase tracking-[0.3em] text-primary",children:"Sélection 2026"}),p.jsx("h1",{className:"font-display text-4xl font-bold leading-tight text-foreground lg:text-5xl",children:"Meilleurs podcasts business & entreprise 2026"}),p.jsxs("div",{className:"mt-8 space-y-5 text-base font-body leading-relaxed text-secondary-foreground",children:[p.jsx("p",{children:"Le podcast business français a changé de nature. L'offre est devenue pléthorique, mais les programmes qui tiennent vraiment la distance restent rares. Ce qui distingue les meilleurs : une ligne éditoriale claire, des invités qui ont quelque chose à dire, et un format qui assume sa durée plutôt que de l'optimiser pour l'algorithme."}),p.jsx("p",{children:"Cette sélection répond à un critère simple : ces podcasts doivent faire progresser ceux qui les écoutent. Pas en inspiration vague, mais en compréhension réelle des mécanismes de l'économie, des trajectoires d'entrepreneurs et des transformations qui reconfigurent les secteurs. Formats longs et formats courts cohabitent, parce que les deux ont leur utilité."}),p.jsxs("p",{children:["Voici les podcasts business que nous recommandons en 2026, ceux que nous suivons et que nous écoutons vraiment. Une sélection proposée par l'équipe de"," ",p.jsx(me,{to:"/",className:"text-primary transition-colors hover:underline",children:"Fleurons"}),", produit par"," ",p.jsx("a",{href:"https://www.collision.studio",target:"_blank",rel:"noopener noreferrer",className:"text-primary transition-colors hover:underline",children:"Collision Productions"}),"."]})]}),p.jsxs("nav",{"aria-label":"Sommaire",className:"mt-10 rounded-lg border border-border bg-card p-6",children:[p.jsx("h2",{className:"font-display text-lg text-foreground",children:"Au sommaire"}),p.jsxs("ul",{className:"mt-4 flex flex-col gap-2",children:[ih.map(r=>p.jsx("li",{children:p.jsxs("a",{href:`#${r.id}`,className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:[r.title," â"]})},r.id)),p.jsx("li",{children:p.jsx("a",{href:"#par-ou-commencer",className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:"Par où c
104ommencer avec Fleurons â"})}),p.jsx("li",{children:p.jsx("a",{href:"#faq",className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:"Questions fréquentes â"})})]})]})]})}),ih.map(r=>p.jsx("section",{id:r.id,className:"container mx-auto mt-20 px-6 scroll-mt-28",children:p.jsxs("div",{className:"mx-auto max-w-3xl",children:[p.jsxs("div",{className:"mb-10 border-t border-border pt-10",children:[p.jsx("h2",{className:"font-display text-2xl font-bold text-foreground gold-underline inline-block lg:text-3xl",children:r.title}),p.jsx("p",{className:"mt-4 text-base font-body text-muted-foreground",children:r.intro})]}),p.jsx("div",{className:"flex flex-col gap-10",children:r.podcasts.map(s=>p.jsxs("article",{className:"border-b border-border/60 pb-10 last:border-0",children:[p.jsx("h3",{className:"font-display text-2xl text-foreground",children:s.url.startsWith("/")?p.jsx(me,{to:s.url,className:"transition-colors hover:text-primary",children:s.name}):p.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:"transition-colors hover:text-primary",children:s.name})}),p.jsxs("p",{className:"mt-2 text-xs font-body text-muted-foreground",children:[[s.since,s.hosts,s.studio,s.length,s.frequency].filter(Boolean).join(" · "),(s.spotify||s.apple||s.youtube)&&p.jsx("span",{className:"mx-2",children:"·"}),s.spotify&&p.jsx("a",{href:s.spotify,target:"_blank",rel:"noopener noreferrer",className:"text-primary transition-colors hover:underline",children:"Spotify"}),s.spotify&&s.apple&&p.jsx("span",{className:"mx-1",children:"/"}),s.apple&&p.jsx("a",{href:s.apple,target:"_blank",rel:"noopener noreferrer",className:"text-primary transition-colors hover:underline",children:"Apple"}),s.youtube&&p.jsxs(p.Fragment,{children:[(s.spotify||s.apple)&&p.jsx("span",{className:"mx-1",children:"/"}),p.jsx("a",{href:s.youtube,target:"_blank",rel:"noopener noreferrer",className:"text-primary transition-colors hover:underline",children:"YouTube"})]})]}),p.jsx("p",{className:"mt-4 text-base font-body leading-relaxed text-secondary-foreground",children:s.text}),s.internal&&p.jsx("div",{className:"mt-5 flex flex-wrap gap-3",children:p.jsx(me,{to:s.internal,className:"inline-flex items-center gap-2 rounded-full border border-primary/40 px-4 py-2 text-xs font-body font-semibold text-primary transition-all hover:bg-primary hover:text-primary-foreground",children:"Tous les épisodes de Fleurons"})})]},s.name))})]})},r.id)),p.jsx("section",{id:"par-ou-commencer",className:"container mx-auto mt-16 px-6 scroll-mt-28",children:p.jsxs("div",{className:"mx-auto max-w-3xl rounded-lg border border-border bg-card p-8",children:[p.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Par où commencer avec Fleurons"}),p.jsx("p",{className:"mt-3 text-sm font-body text-muted-foreground",children:"Cinq sagas pour se faire une idée du format. Chaque épisode raconte une entreprise française de sa naissance à aujourd'hui."}),p.jsx("ul",{className:"mt-6 flex flex-col gap-3",children:a$.map(r=>p.jsx("li",{children:p.jsxs(me,{to:`/episode/${r.slug}`,className:"text-sm font-body text-muted-foreground transition-colors hover:text-primary",children:[r.label," â"]})},r.slug))}),p.jsx("div",{className:"mt-8",children:p.jsx(zs,{})})]})}),p.jsx("section",{id:"faq",className:"container mx-auto mt-20 px-6 scroll-mt-28",children:p.jsxs("div",{className:"mx-auto max-w-3xl",children:[p.jsx("h2",{className:"font-display text-2xl font-bold text-foreground gold-underline inline-block lg:text-3xl",children:"Questions fréquentes"}),p.jsx("div",{className:"mt-8 flex flex-col gap-6",children:K0.map(r=>p.jsxs("div",{className:"rounded-lg border border-border p-6",children:[p.jsx("h3",{className:"font-display text-lg text-foreground",children:r.q}),p.jsx("p",{className:"mt-3 text-sm font-body leading-relaxed text-muted-foreground",children:r.a})]},r.q))})]})})]}),p.jsx(rs,{})]})}const Nk="https://www.fleurons.studio",ep=`${Nk}/coworking-bordeaux`,Lk="https://www.villamariabordeaux.fr/",u$={"@context":"https://schema.org","@graph":[{"@type":"Article","@id":ep,mainEntityOfPage:ep,inLanguage:"fr-FR",headline:"Coworking Bordeaux : bureaux à louer à la Villa Maria",description:"Bureaux privatifs et coworking à Bordeaux dans une villa de caractère : espaces à louer au mois, salles de réunion et studio podcast.",author:{"@type":"Organization",name:"Collision Productions",url:"https://www.collision.studio"},publisher:{"@type":"Organization",name:"Fleurons",url:Nk}}
104,{"@type":"LocalBusiness",name:"Villa Maria Bordeaux",description:"Espace de coworking et bureaux privatifs à louer à Bordeaux.",url:Lk,address:{"@type":"PostalAddress",addressLocality:"Bordeaux",addressCountry:"FR"}},{"@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Où louer un bureau en coworking à Bordeaux ?",acceptedAnswer:{"@type":"Answer",text:"La Villa Maria, à Bordeaux, propose des bureaux privatifs et des postes en coworking à louer au mois, avec salles de réunion et espaces de tournage."}},{"@type":"Question",name:"Le coworking bordelais convient-il aux créateurs de podcasts ?",acceptedAnswer:{"@type":"Answer",text:"Oui : la Villa Maria dispose d'espaces calmes adaptés à l'enregistrement audio et vidéo, un usage courant pour les équipes de production comme Collision."}}]}]},c$=[{title:"Bureaux privatifs",text:"Des bureaux fermés de 2 à 10 personnes, à louer au mois, dans une villa bordelaise rénovée plutôt qu'un open space anonyme."},{title:"Coworking à la carte",text:"Des postes flexibles pour les indépendants et les équipes de passage, avec fibre, café et salles de réunion incluses."},{title:"Tournages et enregistrements",text:"Des pièces calmes et lumineuses, utilisées pour des interviews, des podcasts et des captations vidéo."}];function d$(){return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(cr,{title:"Coworking Bordeaux : bureaux à louer à la Villa Maria",description:"Coworking et bureaux privatifs à louer à Bordeaux : la Villa Maria accueille indépendants, équipes et studios podcast au mois.",url:ep,type:"article",jsonLd:u$}),p.jsx(er,{}),p.jsx("main",{className:"container mx-auto px-6 pt-32 pb-20",children:p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"mx-auto max-w-3xl",children:[p.jsx("p",{className:"text-xs font-body uppercase tracking-[0.3em] text-primary",children:"Nos bureaux"}),p.jsx("h1",{className:"mt-4 font-display text-4xl leading-tight text-foreground md:text-5xl",children:"Coworking Bordeaux : des bureaux à louer à la Villa Maria"}),p.jsx("p",{className:"mt-6 font-body text-lg leading-relaxed text-muted-foreground",children:"Fleurons est produit par Collision Productions, qui travaille entre Paris et Bordeaux. à Bordeaux, nous recommandons la Villa Maria : un lieu de coworking installé dans une villa de caractère, où l'on loue aussi bien un poste flexible qu'un bureau privatif au mois."}),p.jsx("a",{href:Lk,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center gap-2 rounded-full bg-primary px-6 py-3 text-sm font-body font-semibold uppercase tracking-wider text-primary-foreground transition-all hover:bg-gold-glow",children:"Voir les bureaux à Bordeaux â"}),p.jsx("div",{className:"mt-12 grid gap-6 md:grid-cols-3",children:c$.map(t=>p.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[p.jsx("h2",{className:"font-display text-xl text-foreground",children:t.title}),p.jsx("p",{className:"mt-3 font-body text-sm leading-relaxed text-muted-foreground",children:t.text})]},t.title))}),p.jsx("h2",{className:"mt-16 font-display text-2xl text-foreground",children:"Pourquoi un studio podcast parle de coworking"}),p.jsxs("p",{className:"mt-4 font-body text-base leading-relaxed text-muted-foreground",children:["Enregistrer une saga de trois heures demande un lieu silencieux, une bonne connexion et une salle où réunir une équipe. Ce sont exactement les critères d'un bon espace de coworking. Si vous cherchez un bureau à Bordeaux, la Villa Maria coche ces cases ; à Paris, nous travaillons depuis"," ",p.jsx(me,{to:"/coworking-paris-17",className:"text-primary hover:underline",children:"Bureau 71 dans le 17e"}),"."]}),p.jsx("h2",{className:"mt-12 font-display text-2xl text-foreground",children:"Questions fréquentes"}),p.jsxs("dl",{className:"mt-6 space-y-6",children:[p.jsxs("div",{children:[p.jsx("dt",{className:"font-body font-semibold text-foreground",children:"Où louer un bureau en coworking à Bordeaux ?"}),p.jsx("dd",{className:"mt-2 font-body text-sm leading-relaxed text-muted-foreground",children:"à la Villa Maria : bureaux privatifs et postes en coworking à louer au mois, salles de réunion incluses."})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"font-body font-semibold text-foreground",children:"Peut-on y enregistrer un podcast ?"}),p.jsx("dd",{className:"mt-2 font-body text-sm leading-relaxed text-muted-foreground",children:"Oui, les pièces calmes et lumineuses conviennent aux interviews audio et vidéo."})]})]}),p.jsxs("p",{className:"mt-12 font-body text-sm text-muted-foreground",children:["Envie d'écouter plutôt que de visiter ?"," ",p.jsx(me,{to:"/episodes",className:"text-primary hover:underline",children:"Tous les épisodes de Fleurons"}),"."]})]})}),p.jsx(rs,{})]})}const Ik="https://www.fleurons.studio",tp=`${Ik}/coworking-paris-17`,Dk="https://www.bureau71.paris",h$={"@context":"https://schema.org","@graph":[{"@type":"Article","@id":tp,mainEntityOfPage:tp,inLanguage:"fr-FR",headline:"Coworking Paris 17 : bureaux à louer chez Bureau 71",description:"Bureaux privatifs et coworking dans le 17e arrondissement de Paris : postes flexibles, salles de réunion et espace d'enregistrement.",author:{"@type":"Organization",name:"Collision Productions",url:"https://www.collision.studio"},publisher:{"@type":"Organization",name:"Fleurons",url:Ik}},{"@type":"LocalBusiness",name:"Bureau 71",description:"Coworking et bureaux privatifs à louer à Paris 17e.",url:Dk,address:{"@type":"PostalAddress",addressLocality:"Paris",postalCode:"75017",addressCountry:"FR"}},{"@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Où trouver un coworking dans le 17e arrondissement de Paris ?",acceptedA
104nswer:{"@type":"Answer",text:"Bureau 71 propose des bureaux privatifs et des postes en coworking à louer dans le 17e arrondissement de Paris, avec salles de réunion."}},{"@type":"Question",name:"Peut-on louer un bureau au mois à Paris 17 ?",acceptedAnswer:{"@type":"Answer",text:"Oui, Bureau 71 loue des bureaux au mois, du poste unique à l'équipe complète."}}]}]},f$=[{title:"Bureaux privatifs",text:"Des bureaux fermés à louer au mois dans le 17e, pour une équipe de 2 à 12 personnes."},{title:"Postes en coworking",text:"Des places flexibles pour les indépendants, avec fibre, salles de réunion et espaces communs."},{title:"Bien connecté",text:"à quelques minutes des Batignolles, de Villiers et de la ligne 2, pratique pour recevoir des invités."}];function p$(){return p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(cr,{title:"Coworking Paris 17 : bureaux à louer chez Bureau 71",description:"Coworking et bureaux privatifs à louer dans le 17e arrondissement de Paris : Bureau 71 accueille indépendants, équipes et studios podcast.",url:tp,type:"article",jsonLd:h$}),p.jsx(er,{}),p.jsx("main",{className:"container mx-auto px-6 pt-32 pb-20",children:p.jsxs(He.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"mx-auto max-w-3xl",children:[p.jsx("p",{className:"text-xs font-body uppercase tracking-[0.3em] text-primary",children:"Nos bureaux"}),p.jsx("h1",{className:"mt-4 font-display text-4xl leading-tight text-foreground md:text-5xl",children:"Coworking Paris 17 : des bureaux à louer chez Bureau 71"}),p.jsx("p",{className:"mt-6 font-body text-lg leading-relaxed text-muted-foreground",children:"Fleurons est produit par Collision Productions. à Paris, nos enregistrements et nos réunions se passent dans le 17e arrondissement, chez Bureau 71 : un espace de coworking où l'on loue aussi bien un poste flexible qu'un bureau privatif."}),p.jsx("a",{href:Dk,target:"_blank",rel:"noopener noreferrer",className:"mt-8 inline-flex items-center gap-2 rounded-full bg-primary px-6 py-3 text-sm font-body font-semibold uppercase tracking-wider text-primary-foreground transition-all hover:bg-gold-glow",children:"Voir les bureaux à Paris 17 â"}),p.jsx("div",{className:"mt-12 grid gap-6 md:grid-cols-3",children:f$.map(t=>p.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6",children:[p.jsx("h2",{className:"font-display text-xl text-foreground",children:t.title}),p.jsx("p",{className:"mt-3 font-body text-sm leading-relaxed text-muted-foreground",children:t.text})]},t.title))}),p.jsx("h2",{className:"mt-16 font-display text-2xl text-foreground",children:"Un bureau pensé pour travailler la voix"}),p.jsxs("p",{className:"mt-4 font-body text-base leading-relaxed text-muted-foreground",children:["Un podcast a besoin de silence, de fibre et d'une salle pour accueillir un invité. Bureau 71 réunit ces conditions au coeur de Paris. Si vous cherchez la même chose côté Sud-Ouest, nous recommandons"," ",p.jsx(me,{to:"/coworking-bordeaux",className:"text-primary hover:underline",children:"la Villa Maria à Bordeaux"}),"."]}),p.jsx("h2",{className:"mt-12 font-display text-2xl text-foreground",children:"Questions fréquentes"}),p.jsxs("dl",{className:"mt-6 space-y-6",children:[p.jsxs("div",{children:[p.jsx("dt",{className:"font-body font-semibold text-foreground",children:"Où trouver un coworking dans le 17e à Paris ?"}),p.jsx("dd",{className:"mt-2 font-body text-sm leading-relaxed text-muted-foreground",children:"Chez Bureau 71 : bureaux privatifs et postes en coworking, avec salles de réunion."})]}),p.jsxs("div",{children:[p.jsx("dt",{className:"font-body font-semibold text-foreground",children:"Peut-on louer au mois ?"}),p.jsx("dd",{className:"mt-2 font-body text-sm leading-relaxed text-muted-foreground",children:"Oui, du poste unique au bureau fermé pour une équipe."})]})]}),p.jsxs("p",{className:"mt-12 font-body text-sm text-muted-foreground",children:["Envie d'écouter plutôt que de visiter ?"," ",p.jsx(me,{to:"/episodes",className:"text-primary hover:underline",children:"Tous les épisodes de Fleurons"}),"."]})]})}),p.jsx(rs,{})]})}const m$=()=>{const t=Gs();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),p.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},g$=Symbol.for("@supabase/supabase-js.traceContextExtractor");function y$(){return globalThis[g$]}function v$(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
104return new(n||(n=Promise))(function(i,o){function a(c){try{u(r.next(c))}catch(d){o(d)}}function l(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?i(c.value):s(c.value).then(a,l)}u((r=r.apply(t,e||[])).next())})}const w$=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class og extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class x$ extends og{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class G0 extends og{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Y0 extends og{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var np;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(np||(np={}));class b${constructor(e,{headers:n={},customFetch:r,region:s=np.Any}={}){this.url=e,this.headers=n,this.region=s,this.fetch=w$(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return v$(this,arguments,void 0,function*(n,r={}){var s,i;let o,a,l;try{const{headers:u,method:c,body:d,signal:f,timeout:h}=r;let g={},{region:m}=r;m||(m=this.region);const x=new URL(`${this.url}/${n}`);m&&m!=="any"&&(g["x-region"]=m,x.searchParams.set("forceFunctionRegion",m));let y;const v=!!u&&Object.keys(u).some(T=>T.toLowerCase()==="content-type");d&&!v?typeof Blob<"u"&&d instanceof Blob||d instanceof ArrayBuffer?(g["Content-Type"]="application/octet-stream",y=d):typeof d=="string"?(g["Content-Type"]="text/plain",y=d):typeof FormData<"u"&&d instanceof FormData?y=d:(g["Content-Type"]="application/json",y=JSON.stringify(d)):d&&typeof d!="string"&&!(typeof Blob<"u"&&d instanceof Blob)&&!(d instanceof ArrayBuffer)&&!(typeof FormData<"u"&&d instanceof FormData)?y=JSON.stringify(d):y=d;let w=f;h&&(a=new AbortController,o=setTimeout(()=>a.abort(),h),f?(w=a.signal,l=()=>a.abort(),f.addEventListener("abort",l)):w=a.signal);const _=yield this.fetch(x.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},g),this.headers),u),body:y,signal:w}).catch(T=>{throw new x$(T)}),S=_.headers.get("x-relay-error");if(S&&S==="true")throw new G0(_);if(!_.ok)throw new Y0(_);let k=((s=_.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim().toLowerCase(),E;return k==="application/json"?E=yield _.json():k==="application/octet-stream"||k==="application/pdf"?E=yield _.blob():k==="text/event-stream"?E=_:k==="multipart/form-data"?E=yield _.formData():E=yield _.text(),{data:E,error:null,response:_}}catch(u){return{data:null,error:u,response:u instanceof Y0||u instanceof G0?u.context:void 0}}finally{o&&clearTimeout(o),l&&((i=r.signal)===null||i===void 0||i.removeEventListener("abort",l))}})}}const Mk=3,J0=t=>Math.min(1e3*2**t,3e4),_$=[520,503],$k=["GET","HEAD","OPTIONS"];var oh=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
104de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function $a(t){"@babel/helpers - typeof";return $a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$a(t)}function S$(t,e){if($a(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if($a(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function k$(t){var e=S$(t,"string");return $a(e)=="symbol"?e:e+""}function E$(t,e,n){return(e=k$(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Q0(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Ci(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Q0(Object(n),!0).forEach(function(r){E$(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Q0(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Z0(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",s),n()},t);function s(){clearTimeout(r),n()}e==null||e.addEventListener("abort",s)})}function T$(t,e,n,r){return!(!r||n>=Mk||!$k.includes(t)||!_$.includes(e))}var C$=class{constructor(t){var e,n,r,s,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(s=t.urlLengthLimit)!==null&&s!==void 0?s:8e3,this.retryEnabled=(i=t.retry)!==null&&i!==void 0?i:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const o=this.headers.get("Accept");o==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!o||o==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let i=(async()=>{let o=0;for(;;){const u={};n.headers.forEach((d,f)=>{u[f]=d}),o>0&&(u["X-Retry-Count"]=String(o));let c;try{c=await r(n.url.toString(),{method:n.method,headers:u,body:JSON.stringify(n.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!$k.includes(n.method))throw d;if(n.retryEnabled&&o<Mk){const f=J0(o);o++,await Z0(f,n.signal);continue}throw d}if(T$(n.method,c.status,o,n.retryEnabled)){var a,l;const d=(a=(l=c.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&a!==void 0?a:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:J0(o);await c.text(),o++,await Z0(f,n.signal);continue}return await n.processResponse(c)}})();return this.shouldThrowOnError||(i=i.catch(o=>{var a;let l="",u="",c="";const d=o==null?void 0:o.cause;if(d){var f,h,g,m;const v=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",w=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(g=o==null?void 0:o.name)!==null&&g!==void 0?g:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 105 106Caused by: ${(m=d==null?void 0:d.name)!==null&&m!==void 0?m:"Error"}: ${v}`,w&&(l+=` (${w})`),d!=null&&d.stack&&(l+=` 107${d.stack}`)}else{var x;l=(x=o==null?void 0:o.stack)!==null&&x!==void 0?x:""}const y=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(c="",u="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(u+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",u="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(u+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(a=o==null?void 0:o.name)!==null&&a!==void 0?a:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:u,code:c},data:null,count:null,status:0,statusText:""}}
107)),i.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,s=null,i=t.status,o=t.statusText;if(t.ok){var a,l;if(e.method!=="HEAD"){var u;const h=await t.text();if(h!=="")if(e.headers.get("Accept")==="text/csv")r=h;else if(e.headers.get("Accept")&&(!((u=e.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text")))r=h;else try{r=JSON.parse(h)}catch{if(n={message:h},r=null,e.shouldThrowOnError)throw new oh({message:h,details:"",hint:"",code:""})}}const d=(a=e.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),f=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");if(d&&f&&f.length>1&&(s=parseInt(f[1])),e.isMaybeSingle&&Array.isArray(r))if(r.length>1){if(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,s=null,i=406,o="Not Acceptable",e.shouldThrowOnError){var c;throw new oh(Ci(Ci({},n),{},{hint:(c=n.hint)!==null&&c!==void 0?c:""}))}}else r.length===1?r=r[0]:r=null}else{const d=await t.text();try{n=JSON.parse(d),Array.isArray(n)&&t.status===404&&(r=[],n=null,i=200,o="OK")}catch{t.status===404&&d===""?(i=204,o="No Content"):n={message:d}}if(n&&e.shouldThrowOnError)throw new oh(n)}return{success:n===null,error:n,data:r,count:s,status:i,statusText:o}}returns(){return this}overrideTypes(){return this}},P$=class extends C${throwOnError(){return super.throwOnError()}select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-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.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="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}};const X0=new RegExp("[,()]");var li=class extends P${throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&X0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&X0.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
107n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},A$=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:s=8e3,retry:i}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=s,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),r&&l.append("Prefer",`count=${r}`),new li({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),n||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,u)=>l.concat(Object.keys(u)),[]);if(a.length>
1070){const l=[...new Set(a)].map(u=>`"${u}"`);i.searchParams.set("columns",l.join(","))}}return new li({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const u=t.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);a.searchParams.set("columns",c.join(","))}}return new li({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new li({method:r,url:s,headers:i,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new li({method:n,url:r,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},R$=class Fk{constructor(e,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3,retry:a}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(u,c)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),i),h=c==null?void 0:c.signal;if(h){if(h.aborted)return clearTimeout(f),l(u,c);const g=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",g,{once:!0}),l(u,Ci(Ci({},c),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",g)})}return l(u,Ci(Ci({},c),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new A$(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new Fk(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let u;const c=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(c)),d=r&&Object.values(n).some(c);d?(a="POST",u=n):r||s?(a=r?"HEAD":"GET",Object.entries(n).filter(([h,g])=>g!==void 0).map(([h,g])=>[h,Array.isArray(g)?`{${g.join(",")}}`:`${g}`]).forEach(([h,g])=>{l.searchParams.append(h,g)})):(a="POST",u=n);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new li({method:a,url:l,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class j${constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.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"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.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."};const s=globalThis.process;if(s){const i=s.versions;if(i&&i.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 108 109Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const O$="2.112.0",N$=`realtime-js/${O$}`,L$="1.0.0",Uk="2.0.0",I$=Uk,D$=1e4,M$=100,Pr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Vk={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},rp={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class $${constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var n,r;const s=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,n,r){var s,i;const o=new TextEncoder,a=o.encode(e.topic),l=o.encode((s=e.ref)!==null&&s!==void 0?s:""),u=o.encode((i=e.join_ref)!==null&&i!==void 0?i:""),c=o.encode(e.payload.event),d=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},f=o.encode(Object.keys(d).length===0?"":JSON.stringify(d));if(u.length>255)throw new Error(`joinRef length ${u.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`topic length ${a.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+u.length+l.length+a.length+c.length+f.length,g=new ArrayBuffer(this.HEADER_LENGTH+h),m=new DataView(g),x=new Uint8Array(g);let y=0;m.setUint8(y++,this.KINDS.userBroadcastPush),m.setUint8(y++,u.length),m.setUint8(y++,l.length),m.setUint8(y++,a.length),m.setUint8(y++,c.length),m.setUint8(y++,f.length),m.setUint8(y++,n),x.set(u,y),y+=u.length,x.set(l,y),y+=l.length,x.set(a,y),y+=a.length,x.set(c,y),y+=c.length,x.set(f,y),y+=f.length;var v=new Uint8Array(g.byteLength+r.byteLength);return v.set(new Uint8Array(g),0),v.set(new Uint8Array(r),g.byteLength),v.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[s,i,o,a,l]=r;
109return n({join_ref:s,ref:i,topic:o,event:a,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,s)}}_decodeUserBroadcast(e,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),a=n.getUint8(4);let l=this.HEADER_LENGTH+4;const u=r.decode(e.slice(l,l+s));l=l+s;const c=r.decode(e.slice(l,l+i));l=l+i;const d=r.decode(e.slice(l,l+o));l=l+o;const f=e.slice(l,e.byteLength),h=a===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,g={type:this.BROADCAST_EVENT,event:c,payload:h};return o>0&&(g.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var ge;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(ge||(ge={}));const ew=(t,e,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=F$(o,t,e,s),i),{}):{}},F$=(t,e,n,r)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=n[t];return i&&!r.includes(i)?Bk(i,o):sp(o)},Bk=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return z$(e,n)}switch(t){case ge.bool:return U$(e);case ge.float4:case ge.float8:case ge.int2:case ge.int4:case ge.int8:case ge.numeric:case ge.oid:return V$(e);case ge.json:case ge.jsonb:return B$(e);case ge.timestamp:return W$(e);case ge.abstime:case ge.date:case ge.daterange:case ge.int4range:case ge.int8range:case ge.money:case ge.reltime:case ge.text:case ge.time:case ge.timestamptz:case ge.timetz:case ge.tsrange:case ge.tstzrange:return sp(e);default:return sp(e)}},sp=t=>t,U$=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},V$=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},B$=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},z$=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let i;const o=t.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>Bk(e,a))}return t},W$=t=>typeof t=="string"?t.replace(" ","T"):t,zk=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var $i=t=>typeof t=="function"?t:function(){return t},H$=typeof self<"u"?self:null,ui=typeof window<"u"?window:null,kn=H$||ui||globalThis,q$="2.0.0",K$=1e4,G$=1e3,Y$=100,Pn={connecting:0,open:1,closing:2,closed:3},gt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Hn={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},ip={longpoll:"longpoll",websocket:"websocket"},J$={complete:4},op="base64url.bearer.phx.",zl=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 5,012 bytes, line 109
109matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},Wk=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},Q$=class{constructor(t,e,n){this.state=gt.closed,this.topic=t,this.params=$i(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new zl(this,Hn.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Wk(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=gt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=gt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=gt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=gt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new zl(this,Hn.leave,$i({}),this.timeout).send(),this.state=gt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Hn.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=gt.closed,this.bindings=[]}onClose(t){this.on(Hn.close,t)}onError(t){return this.on(Hn.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new zl(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=gt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Hn.close,"leave")},n=new zl(this,Hn.leave,$i({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=gt.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let s=this.onMessage(t,e,n,r);if(e&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===t&&this.filterBindings(o,e,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===gt.closed}isErrored(){return this.state===gt.errored}isJoined(){return this.state===gt.joined}isJoining(){return this.state===gt.joining}isLeaving(){return this.state===gt.leaving}},dc=class{static request(t,e,n,r,s,i,o){if(kn.XDomainRequest){let a=new kn.XD
vendor: 3,123 bytes, line 109
109omainRequest;return this.xdomainRequest(a,t,e,r,s,i,o)}else if(kn.XMLHttpRequest){let a=new kn.XMLHttpRequest;return this.xhrRequest(a,t,e,n,r,s,i,o)}else{if(kn.fetch&&kn.AbortController)return this.fetchRequest(t,e,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,s,i,o){let a={method:t,headers:n,body:r},l=null;return s&&(l=new AbortController,setTimeout(()=>l.abort(),s),a.signal=l.signal),kn.fetch(e,a).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),l}static xdomainRequest(t,e,n,r,s,i,o){return t.timeout=s,t.open(e,n),t.onload=()=>{let a=this.parseJSON(t.responseText);o&&o(a)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,s,i,o,a){t.open(e,n,!0),t.timeout=i;for(let[l,u]of Object.entries(r))t.setRequestHeader(l,u);return t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===J$.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},o&&(t.ontimeout=o),t.send(s),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let s=e?`${e}[${r}]`:r,i=t[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},Z$=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let s=0;s<r;s++)e+=String.fromCharCode(n[s]);return btoa(e)},ni=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(op)&&(this.authToken=atob(e[1].slice(op.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Pn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+ip.websocket),"$1/"+ip.longpoll)}endpointURL(){return dc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=Pn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Pn.open||this.readyState===Pn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:s}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Pn.open,this.onopen({}),this.poll();break;
vendor: 13,756 bytes, lines 109-110
109case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=Z$(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t,e=0){this.awaitingBatchAck=!0;const n=e+Y$,r=t.slice(e,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 110`),()=>this.onerror("timeout"),s=>{!s||s.status!==200?(this.awaitingBatchAck=!1,this.onerror(s&&s.status),this.closeAndRetry(1011,"internal server error",!1)):n<t.length?this.batchSend(t,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(t,e,n){for(let s of this.reqs)s.abort();this.readyState=Pn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=dc.request(t,this.endpointURL(),e,n,this.timeout,o,a=>{this.reqs.delete(i),this.isActive()&&s(a)}),this.reqs.add(i)}},X$=class Bo{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Bo.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Bo.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Bo.syncDiff(this.state,s,i,o),a())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Bo.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,s){let i=this.toNullProtoObj(this.clone(e));n=this.toNullProtoObj(n);let o=Object.create(null),a=Object.create(null);return this.map(i,(l,u)=>{n[l]||(a[l]=u)}),this.map(n,(l,u)=>{let c=i[l];if(c){let d=u.metas.map(m=>m.phx_ref),f=c.metas.map(m=>m.phx_ref),h=u.metas.filter(m=>f.indexOf(m.phx_ref)<0),g=c.metas.filter(m=>d.indexOf(m.phx_ref)<0);h.length>0&&(o[l]=u,o[l].metas=h),g.length>0&&(a[l]=this.clone(c),a[l].metas=g)}else o[l]=u}),this.syncDiff(i,{joins:o,leaves:a},r,s)}static syncDiff(e,n,r,s){e=this.toNullProtoObj(e);let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(a,l)=>{let u=e[a];if(e[a]=this.clone(l),u){let c=e[a].metas.map(f=>f.phx_ref),d=u.metas.filter(f=>c.indexOf(f.phx_ref)<0);e[a].metas.unshift(...d)}r(a,u,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;let c=l.metas.map(d=>d.phx_ref);u.metas=u.metas.filter(d=>c.indexOf(d.phx_ref)<0),s(a,u,l),u.metas.length===0&&delete e[a]}),e}static list(e,n){return n||(n=function(r,s){return s}),this.map(e,(r,s)=>n(r,s))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let n=Object.create(null);return Object.getOwnPropertyNames(e).forEach(r=>{n[r]=e[r]}),n}static clone(e){return JSON.parse(JSON.stringify(e))}},Wl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,s,i,o]=JSON.parse(t);return e({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:s,payload:i}=t,o=new TextEncoder,a=o.encode(e),l=o.encode(n),u=o.encode(s),c=o.encode(r);this.assertFieldSize(a.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(u.byteLength,"topic"),this.assertFieldSize(c.byteLength,"event");let d=this.META_LENGTH+a.byteLength+l.byteLength+u.byteLength+c.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),h=new Uint8Array(f),g=new DataView(f),m=0;g.setUint8(m++,this.KINDS.push),g.setUint8(m++,a.byteLength),g.setUint8(m++,l.byteLength),g.setUint8(m++,u.byteLength),g.setUint8(m++,c.byteLength),h.set(a,m),m+=a.byteLength,h.set(l,m),m+=l.byteLength,h.set(u,m),m+=u.byteLength,h.set(c,m),m+=c.byteLength;var x=new Uint8Array(f.byteLength+i.byteLength);return x.set(h,0),x.set(new Uint8Array(i),f.byteLength),x.buffer},assertFieldSize(t,e){if(t>255)throw new Error(`unable to convert ${e} to binary: must be less than or equal to 255 bytes, but is ${t} bytes`)},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(t.slice(o,o+r));o=o+r;let l=n.decode(t.slice(o,o+s));o=o+s;let u=n.decode(t.slice(o,o+i));o=o+i;let c=t.slice(o,t.byteLength);return{join_ref:a,ref:null,topic:l,event:u,payload:c}},decodeReply(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=e.getUint8(3),o=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(a,a+r));a=a+r;let u=n.decode(t.slice(a,a+s));a=a+s;let c=n.decode(t.slice(a,a+i));a=a+i;let d=n.decode(t.slice(a,a+o));a=a+o;let f=t.slice(a,t.byteLength),h={status:d,response:f};return{join_ref:l,ref:u,topic:c,event:Hn.reply,payload:h}},decodeBroadcast(t,e,n){let r=e.getUint8(1),s=e.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(t.slice(i,i+r));i=i+r;let a=n.decode(t.slice(i,i+s));i=i+s;let l=t.slice(i,t.byteLength);return{join_ref:null,ref:null,topic:o,event:a,payload:l}}},e4=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||K$,this.transport=e.transport||kn.WebSocket||ni,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=kn&&kn.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Wl.encode.bind(Wl),this.defaultDecoder=Wl.decode.bind(Wl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==ni?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;ui&&ui.addEventListener&&(ui.addEventListener("pagehide",s=>{this.conn&&(this.disconnect(),r=this.connectClock)}),ui.addEventListener("pageshow",s=>{r===this.connectClock&&(r=null,this.connect())}),ui.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=s=>e.rejoinAfterMs?e.rejoinAfterMs(s):[1e3,2e3,5e3][s-1]||1e4,this.reconnectAfterMs=s=>e.reconnectAfterMs?e.reconnectAfterMs(s):[10,50,100,150,200,250,500,1e3,2e3][s-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(s,i,o)=>{console.log(`${s}: ${i}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=$i(e.params||{}),this.endPoint=`${t}/${ip.websocket}`,this.vsn=e.vsn||q$,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Wk(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken&&$i(e.authToken)}getLongPollTransport(){return ni}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=dc.appendParams(dc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=$i(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==ni?this.connectWithFallback(ni,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(s=>{s.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case ni:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${op}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(t),a=l=>{this.log("transport",`falling back to ${o}...`,l),this.off([s,i]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return a("memorized");this.fallbackTimer=setTimeout(a,e),i=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),a(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(a,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),G$,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===Pn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}
vendor: 4,245 bytes, line 110
110triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Hn.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Pn.connecting:return"connecting";case Pn.open:return"open";case Pn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new Q$(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:s,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=e;if(i&&i===this.pendingHeartbeatRef){const a=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",a)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let a=0;a<this.channels.length;a++){const l=this.channels[a];l.isMember(n,r,s,o)&&l.trigger(r,s,i,o)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class ia{constructor(e,n){const r=n4(n);this.presence=new X$(e.getChannel(),r),this.presence.onJoin((s,i,o)=>{const a=ia.onJoinPayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onLeave((s,i,o)=>{const a=ia.onLeavePayload(s,i,o);e.getChannel().trigger("presence",a)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return ia.transformState(this.presence.state)}static transformState(e){return e=t4(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const s=e[r];return n[r]=vu(s),n},{})}static onJoinPayload(e,n,r){const s=tw(n),i=vu(r);return{event:"join",key:e,currentPresences:s,newPresences:i}}static onLeavePayload(e,n,r){const s=tw(n),i=vu(r);return{event:"leave",key:e,currentPresences:s,leftPresences:i}}}function vu(t){return t.metas.map(e=>{const n=Object.getOwnPropertyDescriptors(e),r=Object.defineProperties({},n);return r.presence_ref=r.phx_ref,delete r.phx_ref,delete r.phx_ref_prev,r})}function t4(t){return JSON.parse(JSON.stringify(t))}function n4(t){return(t==null?void 0:t.events)&&{events:t.events}}function tw(t){return t!=null&&t.metas?vu(t):[]}var nw;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(nw||(nw={}));class r4{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new ia(this.channel.channelAdapter,n)}}function s4(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
110if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class i4{constructor(e,n,r){const s=o4(r);this.channel=e.getSocket().channel(n,s),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let s;try{s=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>M$){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===Pr.joined}isJoined(){return this.state===Pr.joined}isJoining(){return this.state===Pr.joining}isClosed(){return this.state===Pr.closed}isLeaving(){return this.state===Pr.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function o4(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const a4=/[,()"\\]/,l4=t=>a4.test(t)||t!==t.trim(),u4=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,rw=t=>{const e=t===null?"null":String(t);return l4(e)?u4(e):e},c4=t=>t===null?"null":String(t),d4=(t,e)=>{if(t==="in"){const n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(s=>rw(s)).join(",")})`}return t==="is"?`is.${c4(e)}`:`${t}.${rw(e)}`};class h4{constructor(){this.filters=[]}add(e,n,r,s=!1){const i=s?"not.":"";return this.filters.push(`${e}=${i}${d4(n,r)}`),this}eq(e,n){return this.add(e,"eq",n)}neq(e,n){return this.add(e,"neq",n)}gt(e,n){return this.add(e,"gt",n)}gte(e,n){return this.add(e,"gte",n)}lt(e,n){return this.add(e,"lt",n)}lte(e,n){return this.add(e,"lte",n)}in(e,n){return this.add(e,"in",n)}like(e,n){return this.add(e,"like",n)}ilike(e,n){return this.add(e,"ilike",n)}match(e,n){return this.add(e,"match",n)}imatch(e,n){return this.add(e,"imatch",n)}is(e,n){return this.add(e,"is",n)}isDistinct(e,n){return this.add(e,"isdistinct",n)}not(e,n,r){return this.add(e,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var sw;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(sw||(sw={}));var Pi;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Pi||(Pi={}));var qn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"}
110)(qn||(qn={}));class oa{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var s,i;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new i4(this.socket.socketAdapter,e,this.params),this.presence=new r4(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=zk(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:a,private:l}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[Pi.PRESENCE]&&this.bindings[Pi.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{e==null||e(qn.CHANNEL_ERROR,s4(h))}),this._onClose(()=>e==null?void 0:e(qn.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){e==null||e(qn.SUBSCRIBED);return}this._updatePostgresBindings(h,e)}).receive("error",h=>{this.state=Pr.errored;const g=Object.values(h).join(", ")||"error";e==null||e(qn.CHANNEL_ERROR,new Error(g,{cause:h}))}).receive("timeout",()=>{e==null||e(qn.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let a=0;a<i;a++){const l=s[a],{filter:{event:u,schema:c,table:d,filter:f}}=l,h=e&&e[a];if(h&&h.event===u&&oa.isFilterValueEqual(h.schema,c)&&oa.isFilterValueEqual(h.table,d)&&oa.isFilterValueEqual(h.filter,f))o.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=Pr.errored,n==null||n(qn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Pr.errored&&n&&n(qn.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===Pi.PRESENCE||e===Pi.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var s;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const i=n instanceof ArrayBuffer||ArrayBuffer.isView(n),o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":i?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set("private","true");const l={method:"POST",headers:o,body:i?n:JSON.stringify(n)},u=await this._fetchWithTimeout(a.toString(),l,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(u.status===202)return{success:!0};if(u.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
110ime-js/migrations/httpsend-server-version.md"));let c=u.statusText;try{const d=await u.json();c=d.error||d.message||c}catch{}return Promise.reject(new Error(c))}async send(e,n={}){var r,s;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(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 instanceof Error&&u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(e,n,r){const s=e.toLocaleLowerCase(),i=n==null?void 0:n.filter;(i instanceof h4||typeof i=="object"&&i!==null&&typeof i.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:i.build()}));const o=this.channelAdapter.on(e,r),a={type:s,filter:n,callback:r,ref:o};return this.bindings[s]?this.bindings[s].push(a):this.bindings[s]=[a],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var s,i,o,a,l,u,c;const d=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const f=(s=this.bindings[d])===null||s===void 0?void 0:s.find(h=>h.ref===e.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,g=(i=f.filter)===null||i===void 0?void 0:i.event;return h&&((o=n.ids)===null||o===void 0?void 0:o.includes(h))&&(g==="*"||(g==null?void 0:g.toLocaleLowerCase())===((a=n.data)===null||a===void 0?void 0:a.type.toLocaleLowerCase()))}else{const h=(u=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return h==="*"||h===((c=n==null?void 0:n.event)===null||c===void 0?void 0:c.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(e,n){const{close:r,error:s,leave:i,join:o}=Vk;return n&&[r,s,i,o].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:a,type:l,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:a,eventType:l,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=ew(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=ew(e.columns,e.old_record)),n}}class f4{constructor(e,n){this.socket=new e4(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{e(),i("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}
110isConnecting(){return this.socket.connectionState()==rp.connecting}isDisconnecting(){return this.socket.connectionState()==rp.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const iw={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},p4=[1e3,2e3,5e3,1e4],m4=1e4;function g4(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function y4(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return g4()}const v4=` 111 addEventListener("message", (e) => { 112 if (e.data.event === "start") { 113 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 114 } 115 });`;class w4{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new $$,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...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;const s=this._initializeOptions(n);this.socketAdapter=new f4(e,s),this.httpEndpoint=zk(e),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}connectionState(){return this.socketAdapter.connectionState()||rp.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new oa(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(i),i}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
115this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:N$};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(Vk.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),e&&e(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([v4],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,s,i,o,a,l,u,c,d,f,h;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const g={};g.timeout=(s=e==null?void 0:e.timeout)!==null&&s!==void 0?s:D$,g.heartbeatIntervalMs=(i=e==null?void 0:e.heartbeatIntervalMs)!==null&&i!==void 0?i:iw.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(o=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&o!==void 0?o:2*((a=e==null?void 0:e.heartbeatIntervalMs)!==null&&a!==void 0?a:iw.HEARTBEAT_INTERVAL),g.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:j$.getWebSocketConstructor(),g.params=e==null?void 0:e.params,g.logger=e==null?void 0:e.logger,g.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),g.sessionStorage=(u=e==null?void 0:e.sessionStorage)!==null&&u!==void 0?u:y4(),g.reconnectAfterMs=(c=e==null?void 0:e.reconnectAfterMs)!==null&&c!==void 0?c:v=>p4[v-1]||m4;let m,x;const y=(d=e==null?void 0:e.vsn)!==null&&d!==void 0?d:I$;switch(y){case L$:m=(v,w)=>w(JSON.stringify(v)),x=(v,w)=>w(JSON.parse(v));break;case Uk:m=this.serializer.encode.bind(this.serializer),x=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${g.vsn}`)}if(g.vsn=y,g.encode=(f=e==null?void 0:e.encode)!==null&&f!==void 0?f:m,g.decode=(h=e==null?void 0:e.decode)!==null&&h!==void 0?h:x,g.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,g.params=Object.assign(Object.assign({},g.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,g.autoSendHeartbeat=!this.worker}return g}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
115var Fa=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function x4(t,e,n){const r=new URL(e,t);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function b4(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function _4(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const a=x4(t.baseUrl,r,s),l=await b4(t.auth),u=await e(a,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,g=h==null?void 0:h.error;throw new Fa((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function Hl(t){return t.join("�")}var S4=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:Hl(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Hl(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Hl(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Hl(t.namespace)}`}),!0}catch(e){if(e instanceof Fa&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof Fa&&n.status===409)return;throw n}}};function ri(t){return t.join("�")}var k4=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ri(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ri(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ri(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ri(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ri(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ri(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof Fa&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof Fa&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},E4=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=_4({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new S4(this.client,e),this.tableOps=new k4(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
115async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Ua(t){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ua(t)}function T4(t,e){if(Ua(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ua(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function C4(t){var e=T4(t,"string");return Ua(e)=="symbol"?e:e+""}function P4(t,e,n){return(e=C4(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ow(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ow(Object(n),!0).forEach(function(r){P4(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ow(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Jc=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Qc(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var ap=class extends Jc{constructor(t,e,n,r="storage",s){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n,this.code=s}toJSON(){return K(K({},super.toJSON()),{},{code:this.code})}},Hk=class extends Jc{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function hc(t,e,n){const r=K({},t),s=e.toLowerCase();for(const i of Object.keys(r))i.toLowerCase()===s&&delete r[i];return r[s]=n,r}function A4(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const R4=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),j4=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},lp=t=>{if(Array.isArray(t))return t.map(n=>lp(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=lp(r)}),e},O4=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),qk=t=>t.split("/").map(encodeURIComponent).join("/"),aw=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},N4=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const s=t;let i=parseInt(String(s.status),10);Number.isFinite(i)||(i=500),s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new ap(aw(o),i,a,r,o==null?void 0:o.code))}).catch(()=>{const o=i+"";e(new ap(s.statusText||`HTTP ${i} error`,i,o,r))})}else e(new Hk(aw(t),t,r))},L4=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return K(K({},s),n);if(j4(r)){var i;const o=(e==null?void 0:e.headers)||{};let a;for(const[l,u]of Object.entries(o))l.toLowerCase()==="content-type"&&(a=u);s.headers=hc(o,"Content-Type",(i=a)!==null&&i!==void 0?i:"application/json"),s.body=JSON.stringify(r)}else s.body=r;return e!=null&&e.duplex&&(s.duplex=e.duplex),K(K({},s),n)};async function Io(t,e,n,r,s,i,o){return new Promise((a,l)=>
115{t(n,L4(e,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const c=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!c||!c.includes("application/json"))return{}}return u.json()}).then(u=>a(u)).catch(u=>N4(u,l,r,o))})}function Kk(t="storage"){return{get:async(e,n,r,s)=>Io(e,"GET",n,r,s,void 0,t),post:async(e,n,r,s,i)=>Io(e,"POST",n,s,i,r,t),put:async(e,n,r,s,i)=>Io(e,"PUT",n,s,i,r,t),head:async(e,n,r,s)=>Io(e,"HEAD",n,K(K({},r),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,n,r,s,i)=>Io(e,"DELETE",n,s,i,r,t)}}const I4=Kk("storage"),{get:Va,post:on,put:up,head:D4,remove:Ba}=I4,Tt=Kk("vectors");var bo=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=A4(e),this.fetch=R4(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=hc(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(Qc(n))return{data:null,error:n};throw n}}};let Gk;Gk=Symbol.toStringTag;var M4=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Gk]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Qc(e))return{data:null,error:e};throw e}}};let Yk;Yk=Symbol.toStringTag;var $4=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Yk]="BlobDownloadBuilder",this.promise=null}asStream(){return new M4(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Qc(e))return{data:null,error:e};throw e}}};const ah={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},lw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var F4=class extends bo{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=K(K({},lw),r);let a=K(K({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;if(typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))a=hc(a,f,h);const u=s._removeEmptyFolders(e),c=s._getFinalPath(u),d=await(t=="PUT"?up:on)(s.fetch,`${s.url}/object/${c}`,i,K({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const u=K(K({},lw),r);let c=K(K({},s.headers),{"x-upsert":String(u.upsert)});const d=u.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),d&&l.append("metadata",s.encodeMetadata(d)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",u.cacheControl),d&&!l.has("metadata")&&l.a
115ppend("metadata",s.encodeMetadata(d))):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType,d&&(c["x-metadata"]=s.toBase64(s.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!u.duplex&&(u.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))c=hc(c,f,h);return{path:i,fullPath:(await up(s.fetch,a.toString(),l,K({headers:c},u!=null&&u.duplex?{duplex:u.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const s=K({},n.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await on(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),a=o.searchParams.get("token");if(!a)throw new Jc("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await on(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await on(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(t);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await on(r.fetch,`${r.url}/object/sign/${s}`,K({expiresIn:e},i?{transform:n.transform}:{}),{headers:r.headers});const a=new URLSearchParams;n!=null&&n.download&&a.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&a.set("cacheNonce",String(n.cacheNonce));const l=a.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const s=await on(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),i=new URLSearchParams;n!=null&&n.download&&i.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&i.set("cacheNonce",String(n.cacheNonce));const o=i.toString();return s.map(a=>K(K({},a),{},{signedUrl:a.signedURL?encodeURI(`${r.url}${a.signedURL}${o?`&${o}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",s=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(s,e.transform),(e==null?void 0:e.cacheNonce)!=null&&s.set("cacheNonce",String(e.cacheNonce));const i=s.toString(),o=this._getFinalPath(t),a=()=>Va(this.fetch,`${this.url}/${r}/${o}${i?`?${i}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new $4(a,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>lp(await Va(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await D4(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(Qc(s)){var r;const i=s instanceof ap?s.status:s instanceof Hk?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const s=r.toString(),i=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}`)+(s?`?${s}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Ba(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,n){var r=this;return r.handleOperation(async()=>{const s=qk(r._getFinalPath(t)),i=new URLSearchParams;e!=null&&e.transformations&&i.set("transformations","true");const o=i.toString();return await Ba(r.fetch,`${r.url}/cdn/${s}${o?`?${o}`:""}`,{},{headers:r.headers},n)})}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const s=e!=null&&e.sortBy?K(K({},ah.sortBy),e.sortBy):ah.sortBy,i=K(K(K({},ah),e),{},{sortBy:s,prefix:t||""});return await on(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=K({},t);return await on(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}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,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("qual
115ity",e.quality.toString()),t}};const U4="2.112.0",ul={"X-Client-Info":`storage-js/${U4}`};var V4=class extends bo{constructor(t,e={},n,r){const s=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=K(K({},ul),e);super(i,o,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Va(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Va(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await on(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await up(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await on(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ba(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,n){var r=this;return r.handleOperation(async()=>{const s=new URLSearchParams;e!=null&&e.transformations&&s.set("transformations","true");const i=s.toString();return await Ba(r.fetch,`${r.url}/cdn/${qk(t)}${i?`?${i}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},B4=class extends bo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=K(K({},ul),e);super(r,s,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await on(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),s=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await Va(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ba(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!O4(t))throw new Jc("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new E4({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},z4=class extends bo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=K(K({},ul),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await Tt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await Tt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},W4=class extends bo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=K(K({},ul),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
115if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},H4=class extends bo{constructor(t,e={},n){const r=t.replace(/\/$/,""),s=K(K({},ul),{},{"Content-Type":"application/json"},e);super(r,s,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Tt.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},q4=class extends H4{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new K4(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},K4=class extends z4{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new G4(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},G4=class extends W4{constructor(t,e,n,r,s){super(t,e,s),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,K(K({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},Y4=class extends V4{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new F4(this.url,this.headers,t,this.fetch)}get vectors(){return new q4(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new B4(this.url+"/iceberg",this.headers,this.fetch)}};function Zc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}const Jk="2.112.0",Kn=30*1e3,zo=3,lh=zo*Kn,J4=2*Kn,Q4="http://localhost:9999",Z4="supabase.auth.token",X4={"X-Client-Info":`gotrue-js/${Jk}`},cp="X-Supabase-Api-Version",Qk={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eF=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Es="sb_flow_id",tF=5,nF=10*60*1e3;
115class za extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function D(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class rF extends za{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function uw(t){return D(t)&&t.name==="AuthApiError"}class dn extends za{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Un extends za{constructor(e,n,r,s){super(e,r,s),this.name=n,this.status=r}}class ze extends Un{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ql(t){return D(t)&&t.name==="AuthSessionMissingError"}class si extends Un{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Kl extends Un{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Gl extends Un{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function sF(t){return D(t)&&t.name==="AuthImplicitGrantRedirectError"}class cw extends Un{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class iF extends Un{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class dp extends Un{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Yl(t){return D(t)&&t.name==="AuthRetryableFetchError"}class dw extends Un{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function oF(t){return D(t)&&t.name==="AuthRefreshDiscardedError"}class hw extends Un{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class fc extends Un{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const pc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),fw=` 116\r=`.split(""),aF=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<fw.length;e+=1)t[fw[e].charCodeAt(0)]=-2;for(let e=0;e<pc.length;e+=1)t[pc[e].charCodeAt(0)]=e;return t})();function pw(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(pc[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(pc[r]),e.queuedBits-=6}}function Zk(t,e,n){const r=aF[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function mw(t){const e=[],n=o=>{e.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{cF(o,r,n)};for(let o=0;o<t.length;o+=1)Zk(t.charCodeAt(o),s,i);return e.join("")}function lF(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function uF(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}lF(r,e)}}function cF(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function Fi(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)Zk(t.charCodeAt(s),n,r);return new Uint8Array(e)}function dF(t){const e=[];return uF(t,n=>e.push(n)),new Uint8Array(e)}function Ts(t){const e=[],n={queue:0,queuedBits:0},r=s=>{e.push(s)};return t.forEach(s=>pw(s,n,r)),pw(null,n,r),e.join("")}function hF(t){return Math.round(Date.now()/1e3)+t}function fF(){return Symbol("auth-callback")}const Ke=()=>typeof window<"u"&&typeof document<"u",ms={tested:!1,writable:!1},Xk=()=>
116{if(!Ke())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ms.tested)return ms.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),ms.tested=!0,ms.writable=!0}catch{ms.tested=!0,ms.writable=!1}return ms.writable};function gw(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{e[s]=r}),e}const eE=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),pF=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Jn=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},rt=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},wt=async(t,e)=>{await t.removeItem(e)};class Xc{constructor(){this.promise=new Xc.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}Xc.promiseConstructor=Promise;function Jl(t){const e=t.split(".");if(e.length!==3)throw new fc("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!eF.test(e[r]))throw new fc("JWT not in base64url format");return{header:JSON.parse(mw(e[0])),payload:JSON.parse(mw(e[1])),signature:Fi(e[2]),raw:{header:e[0],payload:e[1]}}}async function mF(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function gF(t,e){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){r(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function tE(t){return("0"+t.toString(16)).substr(-2)}function yF(){const e=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(e),Array.from(e,tE).join("")}async function vF(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function wF(t){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."),t;const n=await vF(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const xF=/^[a-zA-Z0-9_-]{8,64}$/;function wu(t){return typeof t=="string"&&xF.test(t)?t:null}function bF(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,tE).join("")}let t="";for(let e=0;e<32;e++)t+=Math.floor(Math.random()*16).toString(16);return t}const uo=(t,e)=>`${t}-flow-${e}-code-verifier`,Wa=t=>`${t}-flows-code-verifier`;async function ag(t,e){const n=await rt(t,Wa(e));return Array.isArray(n)?n.filter(r=>wu(r)!==null):[]}async function _F(t,e,n,r,s){await Jn(t,uo(e,n),r);const i=(await ag(t,e)).filter(o=>o!==n);for(i.push(n);i.length>tF;){const o=i.shift();await wt(t,uo(e,o)),s==null||s(o)}await Jn(t,Wa(e),i),await Jn(t,`${e}-code-verifier`,r)}async function SF(t,e,n){if(n){const s=await rt(t,uo(e,n));return{verifier:typeof s=="string"?s:null,flowId:n}}const r=await rt(t,`${e}-code-verifier`);return{verifier:typeof r=="string"?r:null,flowId:null}}async function Xt(t,e,n){const r=`${e}-code-verifier`;if(!n){await wt(t,r);return}const s=uo(e,n),i=await rt(t,s);await wt(t,s);const o=await ag(t,e),a=o.filter(l=>l!==n);a.length!==o.length&&(a.length>0?await Jn(t,Wa(e),a):await wt(t,Wa(e))),i!=null&&i===await rt(t,r)&&await wt(t,r)}async function kF(t,e){const n=await ag(t,e);for(const r of n)await wt(t,uo(e,r));await wt(t,Wa(e)),await wt(t,`${e}-code-verifier`)}function EF(t,e){const n=t.indexOf("#");let r=n===-1?t:t.slice(0,n);const s=n===-1?"":t.slice(n),i=r.indexOf("?");if(i!==-1){const a=r.slice(0,i),l=r.slice(i+1).split("&").filter(u=>u!==""&&u!==Es&&!u.startsWith(`${Es}=`));r=l.length>0?`${a}?${l.join("&")}`:a}const o=r.includes("?")?"&":"?";return`${r}${o}${Es}=${encodeURIComponent(e)}${s}`}async function TF(t,e,n=!1,r){const s=yF();let i=s;n&&(i+="/recovery");const o=bF();await _F(t,e,o,i,r);const a=await wF(s);return[a,s===a?"plain":"s256",o]}const CF=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function PF(t){const e=t.headers.get(cp);if(!e||!e.match(CF))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function AF(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function RF(t){switch(t){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 jF=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Bn(t){if(!jF.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function nn(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function uh(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;
116if(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:(e,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:(e,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 OF(t,e){return new Proxy(t,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!e.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,r,s)}})}function yw(t){return JSON.parse(JSON.stringify(t))}const ws=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},NF=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function vw(t){var e;if(!pF(t))throw new dp(ws(t),0);if(NF.includes(t.status))throw new dp(ws(t),t.status);let n;try{n=await t.json()}catch(i){throw new dn(ws(i),i)}let r;const s=PF(t);if(s&&s.getTime()>=Qk["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 hw(ws(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new ze}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 hw(ws(n),t.status,n.weak_password.reasons);throw new rF(ws(n),t.status||500,r)}const LF=(t,e,n,r)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function B(t,e,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[cp]||(i[cp]=Qk["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 a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await IF(t,e,n+a,{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(l):{data:Object.assign({},l),error:null}}async function IF(t,e,n,r,s,i){const o=LF(e,r,s,i);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw new dp(ws(l),0)}if(a.ok||await vw(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await vw(l)}}function It(t){var e;let n=null;$F(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=hF(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:n,user:r},error:null}}function ww(t){const e=It(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Ar(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function DF(t){return{data:t,error:null}}function MF(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=t,o=Zc(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function xw(t){return t}function $F(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const ch=["global","local","others"];class FF{constructor({url:e="",headers:n={},fetch:r,experimental:s}){this.url=e,this.headers=n,this.fetch=eE(r),this.experimental=s??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}
vendor: 4,751 bytes, line 116
116async signOut(e,n=ch[0]){if(ch.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${ch.join(", ")}`);try{return await B(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(D(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await B(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ar})}catch(r){if(D(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=Zc(e,["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 B(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:MF,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(D(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await B(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Ar})}catch(n){if(D(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await B(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:xw});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(D(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){Bn(e);try{return await B(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Ar})}catch(n){if(D(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Bn(e);try{return await B(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Ar})}catch(r){if(D(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Bn(e);try{return await B(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ar})}catch(r){if(D(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Bn(e.userId);try{const{data:n,error:r}=await B(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(D(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Bn(e.userId),Bn(e.id);try{return{data:await B(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(D(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await B(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:xw});if(c.error)throw c.error;const d=await c.json(),f=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),x=JSON.parse(g.split(";")[1].split("=")[1]);u[`${x}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(D(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(e){try{return await B(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await B(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await B(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await B(this.fetch,"DELET
116E",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(D(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await B(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await B(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(D(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await B(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await B(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await B(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(D(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await B(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(D(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){nn(this.experimental),Bn(e.userId);try{return await B(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(D(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){nn(this.experimental),Bn(e.userId),Bn(e.passkeyId);try{return await B(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(D(n))return{data:null,error:n};throw n}}}function bw(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}globalThis&&Xk()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class UF extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function VF(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function nE(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function BF(t){return parseInt(t,16)}function zF(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function WF(t){var e;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:f}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 117`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=nE(t.address),g=c?`${c}://${r}`:r,m=t.statement?`${t.statement} 118`:"",x=`${g} wants you to sign in with your Ethereum account: 119${h} 120 121${m}`;let y=`URI: ${d} 122Version: ${f} 123Chain ID: ${n}${o?` 124Nonce: ${o}`:""} 125Issued At: ${i.toISOString()}`;if(s&&(y+=` 126Expiration Time: ${s.toISOString()}`),a&&(y+=` 127Not Before: ${a.toISOString()}`),l&&(y+=` 128Request ID: ${l}`),u){let v=` 129Resources:`;
129for(const w of u){if(!w||typeof w!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${w}`);v+=` 130- ${w}`}y+=v}return`${x} 131${y}`}class Ie extends Error{constructor({message:e,code:n,cause:r,name:s}){var i;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class mc extends Ie{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function HF({error:t,options:e}){var n,r,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ie({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ie({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ie({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ie({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Ie({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ie({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ie({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ie({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(rE(o)){if(i.rp.id!==o)return new Ie({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ie({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ie({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Ie({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Ie({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function qF({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ie({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ie({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(rE(r)){if(n.rpId!==r)return new Ie({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ie({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ie({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
131ROR",cause:t})}return new Ie({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class KF{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const hp=new KF;function _w(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,s=Zc(t,["challenge","user","excludeCredentials"]),i=Fi(e).buffer,o=Object.assign(Object.assign({},n),{id:Fi(n.id).buffer}),a=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){a.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const u=r[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:Fi(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Sw(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=Zc(t,["challenge","allowCredentials"]),s=Fi(e).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const a=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:Fi(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function kw(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:Ts(new Uint8Array(t.response.attestationObject)),clientDataJSON:Ts(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Ew(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Ts(new Uint8Array(s.authenticatorData)),clientDataJSON:Ts(new Uint8Array(s.clientDataJSON)),signature:Ts(new Uint8Array(s.signature)),userHandle:s.userHandle?Ts(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function rE(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function gc(){var t,e;return!!(Ke()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function sE(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new mc("Browser returned unexpected credential type",e)}:{data:null,error:new mc("Empty credential response",e)}}catch(e){return{data:null,error:HF({error:e,options:t})}}}async function iE(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new mc("Browser returned unexpected credential type",e)}:{data:null,error:new mc("Empty credential response",e)}}catch(e){return{data:null,error:qF({error:e,options:t})}}}const GF={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},YF={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function yc(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(e(o)){const a=r[i];e(a)?r[i]=yc(a,o):r[i]=yc(o)}else r[i]=o}return r}function JF(t,e){return yc(GF,t,e||{})}function QF(t,e){return yc(YF,t,e||{})}class ZF{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!a)return{data:null,error:l};const u=s??hp.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:c}=a.webauthn.credential_options.publicKey;if(!c.name){const d=r;if(d)c.name=`${c.id}:${d}`;else{const h=(await this.client.getUser()).data.user,g=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";c.name=`${c.id}:${g}`}}c.displayName||(c.displayName=c.name)}switch(a.webauthn.type){case"create":{const c=JF(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await sE({publicKey:c,signal:u});return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const c=QF(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await iE(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:c,signal:u}));return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return D(a)?{data:null,error:a}:{data:null,error:new dn("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new za("rpId is required for WebAuthn authentication")};try{if(!gc())return{data:null,error:new dn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(o){return D(o)?{data:null,error:o}:{data:null,error:new dn("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new za("rpId is required for WebAuthn registration")};try{if(!gc())return{data:null,error:new dn("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:u}}catch(o){return D(o)?{data:null,error:o}:{data:null,error:new dn("Unexpected error in register",o)}}}}VF();const XF={url:Q4,storageKey:Z4,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:X4,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ii={};class Ha{get jwks(){var e,n;return(n=(e=ii[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=ii[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){ii[this.storageKey]=Object.assign(Object.assign({},ii[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({}
131,XF),e);if(this.storageKey=i.storageKey,this.instanceID=(n=Ha.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ha.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&Ke()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.experimental=(r=i.experimental)!==null&&r!==void 0?r:{},this.admin=new FF({url:i.url,headers:i.headers,fetch:i.fetch,experimental:this.experimental}),this.url=i.url,this.headers=i.headers,this.fetch=eE(i.fetch),this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock!=null&&(this.lock=i.lock),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),webauthn:new ZF(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:Xk()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=bw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=bw(this.memoryStorage)),Ke()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),(o.data.event==="TOKEN_REFRESHED"||o.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Jk}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const s of r)await this._notifyAllSubscribers(s.event,s.session,s.broadcast);return n}async _initialize(){var e;try{let n={},r="none";if(Ke()&&(n=gw(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Ke()&&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),sF(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="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 D(n)?this._returnResult({error:n}):this._returnResult({error:new dn("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,s;try{const i=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:It}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(i){if(D(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var n,r,s;let i=null;try{let o;if("email"in e){const{email:d,password:f,options:h}=e;let g=null,m=null;this.flowType==="pkce"&&([g,m,i]=await this._getCodeChallengeAndMethod()),o=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(h==null?void 0:h.emailRedirectTo,i),body:{email:d,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:g,code_challenge_method:m},xform:It})}else if("phone"in e){const{phone:d,password:f,options:h}=e;o=await B(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:It})}else throw new Kl("You must provide either an email or phone number and a password");const{data:a,error:l}=o;if(l||!a)return await Xt(this.storage,this.storageKey,i),this._returnResult({data:{user:null,session:null},error:l});const u=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",u)),this._returnResult({data:{user:c,session:u},error:null})}catch(o){if(await Xt(this.storage,this.storageKey,i),D(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(e){try{let n;if("email"in e){const{email:i,password:o,options:a}=e;n=await B(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ww})}else if("phone"in e){const{phone:i,password:o,options:a}=e;n=await B(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ww})}else throw new Kl("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new si;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(D(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e,n){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,n)):this._exchangeCodeForSession(e,n)}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,s,i,o,a,l,u,c,d,f;let h,g;if("message"in e)h=e.message,g=e.signature;else{const{chain:m,wallet:x,statement:y,options:v}=e;let w;if(Ke())if(typeof x=="object")w=x;else{const A=window;if("ethereum"in A&&typeof A.ethereum=="object"&&"request"in A.ethereum&&typeof A.ethereum.request=="function")w=A.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");w=x}const _=new URL((n=v==null?void 0:v.url)!==null&&n!==void 0?n:window.location.href),S=await w.request({method:"eth_requestAccounts"}).then(A=>A).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=nE(S[0]);let E=(r=v==null?void 0:v.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!E){const A=await w.request({method:"eth_chainId"});E=BF(A)}const T={domain:_.host,address:k,statement:y,uri:_.href,version:"1",chainId:E,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.resources};h=WF(T),g=await w.request({method:"personal_sign",params:[zF(h),k]})}try{const{data:m,error:x}=await B(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:g},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:It});if(x)throw x;if(!m||!m.session||!m.user){const y=new si;return this._returnResult({data:{user:null,session:null},error:y})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:x})}catch(m){if(D(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var n,r,s,i,o,a,l,u,c,d,f,h;let g,m;if("message"in e)g=e.message,m=e.signature;else{const{chain:x,wallet:y,statement:v,options:w}=e;let _;if(Ke())if(typeof y=="object")_=y;
131else{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"))_=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 y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=y}const S=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},w==null?void 0:w.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),v?{statement:v}: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)g=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),m=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${S.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}`]:[],...!((a=w==null?void 0:w.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${w.signInWithSolana.chainId}`]:[],...!((l=w==null?void 0:w.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${w.signInWithSolana.nonce}`]:[],...!((u=w==null?void 0:w.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${w.signInWithSolana.requestId}`]:[],...!((d=(c=w==null?void 0:w.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...w.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(` 132`);const k=await _.signMessage(new TextEncoder().encode(g),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:x,error:y}=await B(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Ts(m)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:It});if(y)throw y;if(!x||!x.session||!x.user){const v=new si;return this._returnResult({data:{user:null,session:null},error:v})}return x.session&&(await this._saveSession(x.session),await this._notifyAllSubscribers("SIGNED_IN",x.session)),this._returnResult({data:Object.assign({},x),error:y})}catch(x){if(D(x))return this._returnResult({data:{user:null,session:null},error:x});throw x}}async _exchangeCodeForSession(e,n){const r=(n==null?void 0:n.flowId)!=null,s=r?wu(n==null?void 0:n.flowId):Ke()?wu(gw(window.location.href)[Es]):null;r&&!s&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",n==null?void 0:n.flowId);const{verifier:i,flowId:o}=r&&!s?{verifier:null,flowId:null}:await SF(this.storage,this.storageKey,s),[a,l]=(i??"").split("/");try{if(!a&&this.flowType==="pkce")throw new iF;const{data:u,error:c}=await B(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:a},xform:It});if(await Xt(this.storage,this.storageKey,o),c)throw c;if(!u||!u.session||!u.user){const d=new si;return this._returnResult({data:{user:null,session:null,redirectType:null},error:d})}return u.session&&(await this._saveSession(u.session),await this._notifyAllSubscribers(l==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",u.session)),this._returnResult({data:Object.assign(Object.assign({},u),{redirectType:l??null}),error:c})}catch(u){if(await Xt(this.storage,this.storageKey,o),D(u))return this._returnResult({data:{user:null,session:null,redirectType:null},error:u});throw u}}async signInWithIdToken(e){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=e,a=await B(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:It}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new si;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(n){if(D(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,s,i,o;let a=null;try{if("email"in e){const{email:l,options:u}=e;let c=null,d=null;this.flowType==="pkce"&&([c,d,a]=await this._getCodeChallengeAndMethod());const{error:f}=await B(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=u==null?void 0:u.data)!==null&&n!==void 0?n:{},create_user:(r=u==null?void 0:u.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:this._maybeAppendFlowIdToRedirect(u==null?void 0:u.emailRedirectTo,a)});return this._returnResult({data:{user:null,session:null},error:f})}if("phone"in e){const{phone:l,options:u}=e,{data:c,error:d}=await B(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=u==null?void 0:u.data)!==null&&s!==void 0?s:{},create_user:(i=u==null?void 0:u.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:u==null?void 0:u.captchaToken},channel:(o=u==null?void 0:u.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d})}throw new Kl("You must provide either an email or phone number.")}catch(l){if(await Xt(this.storage,this.storageKey,a),D(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(e){var n,r;try{let s,i;"options"in e&&(s=(n=e.options)===null||n===void 0?void 0:n.redirectTo,i=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:a}=await B(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:It});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(D(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var n,r,s,i;let o=null;try{let a=null,l=null;this.flowType==="pkce"&&([a,l,o]=await this._getCodeChallengeAndMethod());const u=await B(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((n=e.options)===null||n===void 0?void 0:n.redirectTo,o)}),!((r=e==null?void 0:e.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:DF});return!((s=u.data)===null||s===void 0)&&s.url&&Ke()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(await Xt(this.storage,this.storageKey,o),D(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new ze;
132const{error:s}=await B(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(D(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let n=null;try{const r=`${this.url}/resend`;if("email"in e){const{email:s,type:i,options:o}=e;let a=null,l=null;this.flowType==="pkce"&&([a,l,n]=await this._getCodeChallengeAndMethod());const{error:u}=await B(this.fetch,"POST",r,{headers:this.headers,body:{email:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken},code_challenge:a,code_challenge_method:l},redirectTo:this._maybeAppendFlowIdToRedirect(o==null?void 0:o.emailRedirectTo,n)});return u&&await Xt(this.storage,this.storageKey,n),this._returnResult({data:{user:null,session:null},error:u})}else if("phone"in e){const{phone:s,type:i,options:o}=e,{data:a,error:l}=await B(this.fetch,"POST",r,{headers:this.headers,body:{phone:s,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:l})}throw new Kl("You must provide either an email or phone number and a type")}catch(r){if(await Xt(this.storage,this.storageKey,n),D(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);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}`,e,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(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await rt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<lh:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const o=await rt(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=uh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=OF(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const a=await rt(this.storage,this.storageKey);if(a&&a.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await B(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Ar}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;
132if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ze}:await B(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:Ar})})}catch(n){if(D(n))return ql(n)&&await this._removeSession(),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n)):await this._updateUser(e,n)}async _updateUser(e,n={}){let r=null;try{return await this._useSession(async s=>{const{data:i,error:o}=s;if(o)throw o;if(!i.session)throw new ze;const a=i.session;let l=null,u=null;this.flowType==="pkce"&&e.email!=null&&([l,u,r]=await this._getCodeChallengeAndMethod());const{data:c,error:d}=await B(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n==null?void 0:n.emailRedirectTo,r),body:Object.assign(Object.assign({},e),{code_challenge:l,code_challenge_method:u}),jwt:a.access_token,xform:Ar});if(d)throw d;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(s){if(await Xt(this.storage,this.storageKey,r),D(s))return this._returnResult({data:{user:null},error:s});throw s}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ze;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Jl(e.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(D(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new ze;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(D(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var r;try{if(!Ke())throw new Gl("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Gl(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new cw("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Gl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new cw("No code detected.");const{data:w,error:_}=await this._exchangeCodeForSession(e.code,{flowId:e[Es]});if(_)throw _;const S=new URL(window.location.href);return S.searchParams.delete("code"),S.searchParams.delete(Es),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:w.session,redirectType:(r=w.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:s,provider_refresh_token:i,access_token:o,refresh_token:a,expires_in:l,expires_at:u,token_type:c}=e;if(!o||!l||!a||!c)throw new Gl("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;u&&(h=parseInt(u));const g=h-d;
132g*1e3<=Kn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${f}s`);const m=h-f;d-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,h,d):d-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",m,h,d);const{data:x,error:y}=await this._getUser(o);if(y)throw y;const v={provider_token:s,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:h,refresh_token:a,token_type:c,user:x.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:e.type},error:null})}catch(s){if(D(s))return this._returnResult({data:{session:null,redirectType:null},error:s});throw s}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;const n=wu(e[Es]);return n&&await rt(this.storage,uo(this.storageKey,n))?!0:!!await rt(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const s=async()=>{await this._removeSession()},{data:i,error:o}=n;if(o&&!ql(o))return this._returnResult({error:o});const a=(r=i.session)===null||r===void 0?void 0:r.access_token;if(a){const{error:l}=await this.admin.signOut(a,e);if(l&&!(uw(l)&&(l.status===404||l.status===401||l.status===403)||ql(l)))return e!=="others"&&await s(),this._returnResult({error:l})}return e!=="others"&&await s(),this._returnResult({error:null})})}
132onAuthStateChange(e){const n=fF(),r={id:n,callback:e,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,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(e){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(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),ql(i)||Yl(i)||uw(i)&&(i.code==="refresh_token_not_found"||i.code==="refresh_token_already_used"||i.code==="session_expired")?console.warn(i):console.error(i)}})}async resetPasswordForEmail(e,n={}){let r=null,s=null,i=null;this.flowType==="pkce"&&([r,s,i]=await this._getCodeChallengeAndMethod(!0));try{return await B(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(n.redirectTo,i)})}catch(o){if(await Xt(this.storage,this.storageKey,i),D(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;let r=null;try{const{data:s,error:i}=await this._useSession(async o=>{var a,l,u,c,d;const{data:f,error:h}=o;if(h)throw h;const{url:g,flowId:m}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=e.options)===null||l===void 0?void 0:l.scopes,queryParams:(u=e.options)===null||u===void 0?void 0:u.queryParams,skipBrowserRedirect:!0});return r=m,await B(this.fetch,"GET",g,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return Ke()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(s==null?void 0:s.url),this._returnResult({data:{provider:e.provider,url:s==null?void 0:s.url,flowId:r},error:null})}catch(s){if(D(s))return this._returnResult({data:{provider:e.provider,url:null,flowId:r},error:s});throw s}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;if(s)throw s;const{options:o,provider:a,token:l,access_token:u,nonce:c}=e,d=await B(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:a,id_token:l,access_token:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:It}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new si}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Xt(this.storage,this.storageKey,null),D(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await B(this.fetch,"DELETE",`${this.url}/user/identities/${e.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(D(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await gF(async s=>(s>
1320&&await mF(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await B(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:It})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Yl(i)&&Date.now()+o-r<Kn})}catch(r){if(this._debug(n,"error",r),D(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const{url:r,flowId:s}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),Ke()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r,flowId:s},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await rt(this.storage,this.storageKey);if(s&&this.userStorage){let o=await rt(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Jn(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:uh()}else if(s&&!s.user&&!s.user){const o=await rt(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await wt(this.storage,this.storageKey+"-user"),await Jn(this.storage,this.storageKey,s)):s.user=uh()}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()<lh;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${lh}
132s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(oF(o)?this._debug(r,"refresh discarded by commit guard",o):this._debug(r,"refresh failed",o))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(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),Yl(s)?console.warn(s):console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new ze;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const s="#_callRefreshToken()";this._debug(s,"begin");try{this.refreshingDeferred=new Xc;const i=await rt(this.storage,this.storageKey),{data:o,error:a}=await this._refreshAccessToken(e);if(a)throw a;if(!o.session)throw new ze;const l=await rt(this.storage,this.storageKey);if(i!==null&&(l===null||l.refresh_token!==i.refresh_token)){this._debug(s,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const f={data:null,error:new dw};return this.refreshingDeferred.resolve(f),f}const c=this._sessionRemovalEpoch;if(await this._saveSession(o.session),this._sessionRemovalEpoch!==c){this._debug(s,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await wt(this.storage,this.storageKey),this.userStorage&&await wt(this.userStorage,this.storageKey+"-user");const f={data:null,error:new dw};return this.refreshingDeferred.resolve(f),f}await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={data:o.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(d),d}catch(i){if(this._debug(s,"error",i),D(i)){const o={data:null,error:i};if(!Yl(i)){const a=await rt(this.storage,this.storageKey);!!(a!=null&&a.expires_at&&a.expires_at*1e3>Date.now())?this._debug(s,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:o,expiresAt:Date.now()+J4},(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(e,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:e,session:n,broadcast:r});return}const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Jn(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=yw(s);await Jn(this.storage,this.storageKey,i)}else{const s=yw(n);await Jn(this.storage,this.storageKey,s)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await wt(this.storage,this.storageKey),await kF(this.storage,this.storageKey),await wt(this.storage,this.storageKey+"-user"),this.userStorage&&await wt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ke()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
132catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Kn);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=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-e)/Kn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Kn}ms, refresh threshold is ${zo} ticks`),s<=zo&&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(e){if(e instanceof UF)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{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-e)/Kn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Kn}ms, refresh threshold is ${zo} ticks`),s<=zo&&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")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ke()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,r){let s=r==null?void 0:r.redirectTo,i=null,o=null,a=null;this.flowType==="pkce"&&([i,o,a]=await this._getCodeChallengeAndMethod(),s=this._maybeAppendFlowIdToRedirect(s,a));const l=[`provider=${encodeURIComponent(n)}`];if(s&&l.push(`redirect_to=${encodeURIComponent(s)}
132`),r!=null&&r.scopes&&l.push(`scopes=${encodeURIComponent(r.scopes)}`),i!=null&&o!=null){const u=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});l.push(u.toString())}if(r!=null&&r.queryParams){const u=new URLSearchParams(r.queryParams);l.push(u.toString())}return r!=null&&r.skipBrowserRedirect&&l.push(`skip_http_redirect=${r.skipBrowserRedirect}`),{url:`${e}?${l.join("&")}`,flowId:a}}_maybeAppendFlowIdToRedirect(e,n){return!e||!n||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:EF(e,n)}async _getCodeChallengeAndMethod(e=!1){return TF(this.storage,this.storageKey,e,n=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",n))}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await B(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:u}=await B(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?kw(e.webauthn.credential_response):Ew(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:u}=await B(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});return u?this._returnResult({data:null,error:u}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:u}))})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(e){const n=async()=>{try{return await this._useSession(async r=>{var s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=await B(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(s=i==null?void 0:i.session)===null||s===void 0?void 0:s.access_token});if(a.error)return a;const{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:_w(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Sw(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,s,i;if(e)try{const{payload:h}=Jl(e);let g=null;h.aal&&(g=h.aal);let m=g;const{data:{user:x},error:y}=await this.getUser(e);if(y)return this._returnResult({data:null,error:y});((r=(n=x==null?void 0:x.factors)===null||n===void 0?void 0:n.filter(_=>_.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const w=h.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:w},error:null}}catch(h){if(D(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
132=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=Jl(o.access_token);let u=null;l.aal&&(u=l.aal);let c=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(c="aal2");const f=l.amr||[];return{data:{currentLevel:u,nextLevel:c,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await B(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new ze})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ze});const o=await B(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ke()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ze});const o=await B(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&Ke()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await B(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ze})})}catch(e){if(D(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await B(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ze})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(a=>a.kid===e);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(a=>a.kid===e),r&&this.jwks_cached_at+nF>s)return r;const{data:i,error:o}=await B(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(a=>a.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:h,error:g}
132=await this.getSession();if(g||!h.session)return this._returnResult({data:null,error:g});r=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=Jl(r);if(!(n!=null&&n.allowExpired))try{AF(i.exp)}catch(h){throw new fc(h instanceof Error?h.message:"JWT validation failed")}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:h}=await this.getUser(r);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const c=RF(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,o,dF(`${a}.${l}`)))throw new fc("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(e){var n,r,s;nn(this.experimental);try{if(!gc())return this._returnResult({data:null,error:new dn("Browser does not support WebAuthn",null)});const{data:i,error:o}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}});if(o||!i)return this._returnResult({data:null,error:o});const a=Sw(i.options),l=(s=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&s!==void 0?s:hp.createNewAbortSignal(),{data:u,error:c}=await iE({publicKey:a,signal:l});if(c||!u)return this._returnResult({data:null,error:c??new dn("WebAuthn ceremony failed",null)});const d=Ew(u);return this._verifyPasskeyAuthentication({challengeId:i.challenge_id,credential:d})}catch(i){if(D(i))return this._returnResult({data:null,error:i});throw i}}async registerPasskey(e){var n,r;nn(this.experimental);try{if(!gc())return this._returnResult({data:null,error:new dn("Browser does not support WebAuthn",null)});const{data:s,error:i}=await this._startPasskeyRegistration();if(i||!s)return this._returnResult({data:null,error:i});const o=_w(s.options),a=(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:hp.createNewAbortSignal(),{data:l,error:u}=await sE({publicKey:o,signal:a});if(u||!l)return this._returnResult({data:null,error:u??new dn("WebAuthn ceremony failed",null)});const c=kw(l);return this._verifyPasskeyRegistration({challengeId:s.challenge_id,credential:c})}catch(s){if(D(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyRegistration(){nn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new ze});const{data:s,error:i}=await B(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if(D(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){nn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new ze});const{data:i,error:o}=await B(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;nn(this.experimental);try{const{data:r,error:s}=await B(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:r,error:null})}catch(r){if(D(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(e){nn(this.experimental);try{const{data:n,error:r}=await B(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:It});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){nn(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new ze});const{data:s,error:i}=await B(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:s,error:null})})}catch(e){if(D(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){nn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new ze});const{data:i,error:o}=await B(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:e.friendlyName}});return o?this._returnResult({data:null,error:o}):this._returnResult({data:i,error:null})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){nn(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!r)return this._returnResult({data:null,error:new ze});const{error:i}
132=await B(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(n){if(D(n))return this._returnResult({data:null,error:n});throw n}}}Ha.nextInstanceID={};const e5=Ha,t5="2.112.0";let Wo="",vc;if(typeof Deno<"u"){var dh;Wo="deno",vc=(dh=Deno.version)===null||dh===void 0?void 0:dh.deno}else if(typeof document<"u")Wo="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Wo="react-native";else{var hh;Wo="node";const t=globalThis.process;vc=t==null||(hh=t.version)===null||hh===void 0?void 0:hh.replace(/^v/,"")}const oE=[`runtime=${Wo}`];vc&&oE.push(`runtime-version=${vc}`);const n5={"X-Client-Info":`supabase-js/${t5}; ${oE.join("; ")}`},r5={headers:n5},s5={schema:"public"},i5={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},o5={},a5={enabled:!1,respectSamplingDecision:!0};function l5(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[n,r,s,i]=e;if(n.length!==2||r.length!==32||s.length!==16||i.length!==2)return null;const o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(s)||!o.test(i)||r==="00000000000000000000000000000000"||s==="0000000000000000"?null:{version:n,traceId:r,parentId:s,traceFlags:i,isSampled:(parseInt(i,16)&1)===1}}function u5(t,e){if(!t||!e||e.length===0)return!1;let n;if(t instanceof URL)n=t;else try{n=new URL(t)}catch{return!1}for(const r of e)try{if(typeof r=="string"){if(c5(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function c5(t,e){if(e===t)return!0;if(e.startsWith("*.")){const n=e.slice(2);if(t.endsWith(n)&&(t===n||t.endsWith("."+n)))return!0}return!1}function d5(t){const e=[];try{const n=new URL(t);e.push(n.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function qa(t){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qa(t)}function h5(t,e){if(qa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(qa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function f5(t){var e=h5(t,"string");return qa(e)=="symbol"?e:e+""}function p5(t,e,n){return(e=f5(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tw(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tw(Object(n),!0).forEach(function(r){p5(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tw(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const m5=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),g5=()=>Headers,aE=t=>t.startsWith("sb_publishable_")||t.startsWith("sb_secret_"),y5="sb_temp_",Cw=new Set,v5=t=>{var e,n;if(!t.startsWith("sb_")||aE(t)||t.startsWith(y5))return;const r=(e=(n=t.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:"unknown";Cw.has(r)||(Cw.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},Pw=(t,e,n,r,s,i)=>{const o=m5(r),a=g5(),l=(s==null?void 0:s.enabled)===!0,u=(s==null?void 0:s.respectSamplingDecision)!==!1,c=l?d5(e):null,d=!(i!=null&&i.omitApiKeyAsBearer&&aE(t));return async(f,h)=>{const g=await n();let m=new a(h==null?void 0:h.headers);if(m.has("apikey")||m.set("apikey",t),!m.has("Authorization")){const x=g??(d?t:null);x&&m.set("Authorization",`Bearer ${x}`)}if(c){const x=w5(f,c,u);x&&(x.traceparent&&!m.has("traceparent")&&m.set("traceparent",x.traceparent),x.tracestate&&!m.has("tracestate")&&m.set("tracestate",x.tracestate),x.baggage&&!m.has("baggage")&&m.set("baggage",x.baggage))}return o(f,Re(Re({},h),{},{headers:m}))}};let Aw=!1;function w5(t,e,n){const r=y$();if(!r)return Aw||(Aw=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!u5(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const s=r();if(!s||!s.traceparent)return null;if(n){const i=l5(s.traceparent);if(i&&!i.isSampled)return null}return s}function Rw(t){return typeof t=="boolean"?{enabled:t}:t}function x5(t){return t.endsWith("/")?t:t+"/"}function b5(t,e){var n,r,s,i,o,a;const{db:l,auth:u,realtime:c,global:d}=t,{db:f,auth:h,realtime:g,global:m}=e,x=Rw(t.tracePropagation),y=Rw(e.tracePropagation),v={db:Re(Re({},f),l),auth:Re(Re({},h),u),realtime:Re(Re({},g),c),storage:{},global:Re(Re(Re({},m),d),{},{headers:Re(Re({},(n=m==null?void 0:m.headers)!==null&&n!==void 0?n:{}),(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(s=(i=x==null?void 0:x.enabled)!==null&&i!==void 0?i:y==null?void 0:y.enabled)!==null&&s!==void 0?s:!1,respectSamplingDecision:(o=(a=x==null?void 0:x.respectSamplingDecision)!==null&&a!==void 0?a:y==null?void 0:y.respectSamplingDecision)!==null&&o!==void 0?o:!0},accessToken:async()=>""};return t.accessToken?v.accessToken=t.accessToken:delete v.accessToken,v}function _5(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");
132if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(x5(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var S5=class extends e5{constructor(t){super(t)}},k5=class{constructor(t,e,n){var r,s;this.supabaseUrl=t,this.supabaseKey=e;const i=_5(t);if(!e)throw new Error("supabaseKey is required.");v5(e),this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:s5,realtime:o5,auth:Re(Re({},i5),{},{storageKey:o}),global:r5,tracePropagation:a5},l=b5(n??{},a);if(this.settings=l,this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(c,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=l.auth)!==null&&u!==void 0?u:{},this.headers,l.global.fetch)}this.fetch=Pw(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation),this.functionsFetch=Pw(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Re({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(c=>this.realtime.setAuth(c)).catch(c=>console.warn("Failed to set initial Realtime auth token:",c)),this.rest=new R$(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit,retry:l.db.retry}),this.storage=new Y4(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new b$(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:null}async _getAccessToken(){var t=this,e;return(e=await t._getSessionToken())!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,lockAcquireTimeout:d,skipAutoInitialize:f},h,g){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new S5({url:this.authUrl.href,headers:Re(Re({},m),h),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:u,experimental:c,fetch:g,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(x=>x.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new w4(this.realtimeUrl.href,Re(Re({},t),{},{params:Re(Re({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN"||t==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const E5=(t,e,n)=>new k5(t,e,n);function T5(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}T5()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
132ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");const C5="https://gdnuefukhtohcjmwclzq.supabase.co",jw="sb_publishable_Bgg3kb04X7PErKtTn7cyEA_BMQGwpRM";function P5(t){return t.startsWith("sb_publishable_")||t.startsWith("sb_secret_")}function A5(t){return(e,n)=>{const r=new Headers(typeof Request<"u"&&e instanceof Request?e.headers:void 0);return n!=null&&n.headers&&new Headers(n.headers).forEach((s,i)=>r.set(i,s)),P5(t)&&r.get("Authorization")===`Bearer ${t}`&&r.delete("Authorization"),r.set("apikey",t),fetch(e,{...n,headers:r})}}const Cs=E5(C5,jw,{global:{fetch:A5(jw)},auth:{storage:typeof window<"u"?localStorage:void 0,persistSession:!0,autoRefreshToken:!0}});var R5={name:"@lovable.dev/cloud-auth-js",version:"1.1.2",description:"Lovable Cloud Auth JS",main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist"],scripts:{build:"tsup src/index.ts --format cjs,esm --dts --outDir dist",dev:"tsup src/index.ts --format cjs,esm --dts --watch",test:"vitest run",typecheck:"tsgo --noEmit",prepublishOnly:"npm run clean && npm run build",clean:"rimraf dist"},keywords:["lovable","oauth","authentication"],license:"MIT",devDependencies:{"@types/node":"^22",jsdom:"^26",rimraf:"^5.0.0",tsup:"^7.2.0",typescript:"^5",vitest:"^4.1.0"}},j5="authorization_response",O5="/~oauth/initiate",N5=["https://oauth.lovable.app","https://lovable.dev"],L5="lovable://oauth-callback",I5="http://127.0.0.1/iframe-oauth/callback",D5=500,M5=12e4;function $5(t){let e;const n=new Promise(i=>{e=i}),r=i=>{if(!t.some(l=>i.origin===l))return;const a=i.data;!a||typeof a!="object"||a.type===j5&&e(a.response)},s=()=>{window.removeEventListener("message",r)};return window.addEventListener("message",r),{cleanup:s,messagePromise:n}}function F5(t){const e=window.screenX!==0||window.screenY!==0||!t,n=e?window.outerWidth*.5:window.screen.width*.5,r=e?window.outerHeight*.5:window.screen.height*.5,s=e?window.screenX+(window.outerWidth-n)/2:(window.screen.width-n)/2,i=e?window.screenY+(window.outerHeight-r)/2:(window.screen.height-r)/2;return{width:n,height:r,left:s,top:i}}function Ow(t,e){return t.state!==e?{error:new Error("State is invalid")}:t.error?t.error==="legacy_flow"?{error:new Error("This flow is not supported in Preview mode. Please open the app in a new tab to sign in.")}:{error:new Error(t.error_description??"Sign in failed")}:!t.access_token||!t.refresh_token?{error:new Error("No tokens received")}:{tokens:{access_token:t.access_token,refresh_token:t.refresh_token},error:null}}function U5(){const t=navigator.userAgent;return!!(/iPhone|iPad|iPod|Android/i.test(t)||/Macintosh/i.test(t)&&navigator.maxTouchPoints>1)}function V5(){return typeof crypto<"u"&&crypto.getRandomValues?[...crypto.getRandomValues(new Uint8Array(16))].map(t=>t.toString(16).padStart(2,"0")).join(""):Math.random().toString(36).substring(2)+Date.now().toString(36)}function B5(t={}){const e=t.oauthBrokerUrl??O5,n=t.supportedOAuthOrigins??N5;async function r(s,i={}){let o=!1;try{o=window.self!==window.top}catch{o=!0}const a=navigator.userAgent,l=/LovableApp\//.test(a),u=!l&&/lovable/i.test(a),c=V5();let d=i.redirect_uri??window.location.origin;l&&o?d=L5:u&&o&&(d=I5);const f=new URLSearchParams({...i.extraParams,provider:s,redirect_uri:d,state:c});if(!o)return window.location.href=`${e}?${f.toString()}`,{error:null,redirected:!0};!l&&!u&&f.set("response_mode","web_message");const h=`${e}?${f.toString()}`,g=u?[...n,window.location.origin]:n,{messagePromise:m,cleanup:x}=$5(g);let y;if(U5())y=window.open(h,"_blank");else{const{width:_,height:S,left:k,top:E}=F5(o);y=window.open(h,"oauth",`width=${_},height=${S},left=${k},top=${E}`)}if(!y&&(l||u)){let _;const S=new Promise((k,E)=>{_=setTimeout(()=>{E(new Error("OAuth timed out waiting for response"))},M5)});try{const k=await Promise.race([m,S]);return Ow(k,c)}catch(k){return{error:k instanceof Error?k:new Error(String(k))}}finally{_&&clearTimeout(_),x()}}if(!y)return x(),{error:new Error("Popup was blocked")};let v;const w=new Promise((_,S)=>{v=setInterval(()=>{y.closed&&(clearInterval(v),S(new Error("Sign in was cancelled")))},D5)});try{const _=await Promise.race([m,w]);return Ow(_,c)}catch(_){return{error:_ instanceof Error?_:new Error(String(_))}}finally{clearInterval(v),x(),y==null||y.close()}}return{signInWithOAuth:r}}typeof window<"u"&&(window.__lovable_cloud_auth_js_version=R5.version);function z5(t={}){return B5(t)}const W5=z5(),H5={auth:{signInWithOAuth:async(t,e)=>{const n=await W5.signInWithOAuth(t,{redirect_uri:e==null?void 0:e.redirect_uri,extraParams:{...e==null?void 0:e.extraParams}});if(n.redirected||n.error)return n;try{await Cs.auth.setSession(n.tokens)}catch(r){return{error:r instanceof Error?r:new Error(String(r))}}return n}}},q5=pm("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"}}),Ka=b.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const o=r?QC:"button";return p.jsx(o,{className:$n(q5({variant:e,size:n,className:t})),ref:i,...s})});Ka.displayName="Button";const fp=b.forwardRef(({className:t,type:e,...n},r)=>p.jsx("input",{type:e,className:$n("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",t),ref:r,...n}));fp.displayName="Input";var K5="Label",lE=b.forwardRef((t,e)=>p.jsx(mt.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));lE.displayName=K5;var uE=lE;const G5=pm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pp=b.forwardRef(({className:t,...e},n)=>p.jsx(uE,{ref:n,className:$n(G5(),t),...e}));pp.displayName=uE.displayName;function Y5(t){return!t||!t.startsWith("/")||t.startsWith("//")?"/":t}function J5(){const[t]=M1(),e=Am(),n=Y5(t.get("next")),[r,s]=b.useState("signin"),[i,o]=b.useState(""),[a,l]=b.useState(""),[u,c]=b.useState(!1);b.useEffect(()=>{const{data:h}=Cs.auth.onAuthStateChange((g,m)=>{m&&e(n,{replace:!0})});return Cs.auth.getSession().then(({data:g})=>{g.session&&e(n,{replace:!0})}),()=>h.subscription.unsubscribe()},[e,n]);const d=async h=>{if(h.preventDefault(),c(!0),r==="signup"){const{error:m}=await Cs.auth.signUp({email:i,password:a,options:{emailRedirectTo:window.location.origin+n}});if(c(!1),m)return Nl.error(m.message);Nl.success("Vérifiez votre boîte mail pour confirmer votre compte.");return}const{error:g}=await Cs.auth.signInWithPassword({email:i,password:a});if(c(!1),g)return Nl.error(g.message)},f=async()=>{c(!0);const h=await H5.auth.signInWithOAuth("google",{redirect_uri:window.location.origin+n});if(h.error){c(!1),Nl.error("Connexion Google impossible pour le moment.");return}h.redirected};return p.jsxs("main",{className:"min-h-screen flex items-center justify-center px-6 py-20",children:[p.jsx(cr,{title:"Connexion | Fleurons",description:"Connectez-vous pour relier Fleurons à vos outils et assistants.",noindex:!0}),p.jsxs("div",{className:"w-full max-w-md",children:[p.jsx("h1",{className:"font-display text-3xl mb-2",children:r==="signin"?"Connexion":"Créer un compte"}),p.jsx("p",{className:"text-muted-foreground text-sm mb-8",children:"Votre compte sert à autoriser les applications et assistants qui se connectent à Fleurons."}),p.jsxs("form",{onSubmit:d,className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(pp,{htmlFor:"email",children:"Email"}),p.jsx(fp,{id:"email",type:"email",required:!0,value:i,onChange:h=>o(h.target.value),autoComplete:"email"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(pp,{htmlFor:"password",children:"Mot de passe"}),p.jsx(fp,{id:"password",type:"password",required:!0,minLength:6,value:a,onChange:h=>l(h.target.value),autoComplete:r==="signin"?"current-password":"new-password"})]}),p.jsx(Ka,{type:"submit",className:"w-full",disabled:u,children:r==="signin"?"Se connecter":"Créer mon compte"})]}),p.jsxs("div",{className:"my-6 flex items-center gap-4",children:[p.jsx("div",{className:"h-px flex-1 bg-border"}),p.jsx("span",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"ou"}),p.jsx("div",{className:"h-px flex-1 bg-border"})]}),p.jsx(Ka,{variant:"outline",className:"w-full",onClick:f,disabled:u,children:"Continuer avec Google"}),p.jsx("button",{type:"button",className:"mt-6 text-sm text-muted-foreground hover:text-foreground transition-colors",onClick:()=>s(r==="signin"?"signup":"signin"),children:r==="signin"?"Pas encore de compte ? Créer un compte":"Déjà un compte ? Se connecter"}),p.jsx("div",{className:"mt-10",children:p.jsx(me,{to:"/",className:"text-sm text-muted-foreground hover:text-primary",children:"Retour au site"})})]})]})}const fh=()=>Cs.auth.oauth;function Q5(){var c,d,f;const[t]=M1(),e=t.get("authorization_id")??"",[n,r]=b.useState(null),[s,i]=b.useState(null),[o,a]=b.useState(!1);b.useEffect(()=>{let h=!0;return(async()=>
132{if(!e){i("Paramètre authorization_id manquant.");return}const{data:g}=await Cs.auth.getSession();if(!g.session){const v=window.location.pathname+window.location.search;window.location.href="/auth?next="+encodeURIComponent(v);return}const{data:m,error:x}=await fh().getAuthorizationDetails(e);if(!h)return;if(x){i(x.message);return}const y=(m==null?void 0:m.redirect_url)??(m==null?void 0:m.redirect_to);if(y&&!(m!=null&&m.client)){window.location.href=y;return}r(m)})(),()=>{h=!1}},[e]);const l=async h=>{a(!0);const{data:g,error:m}=h?await fh().approveAuthorization(e):await fh().denyAuthorization(e);if(m){a(!1),i(m.message);return}const x=(g==null?void 0:g.redirect_url)??(g==null?void 0:g.redirect_to);if(!x){a(!1),i("Aucune redirection renvoyée par le serveur d'autorisation.");return}window.location.href=x},u=((c=n==null?void 0:n.client)==null?void 0:c.name)??((d=n==null?void 0:n.client)==null?void 0:d.client_name)??"cette application";return p.jsxs("main",{className:"min-h-screen flex items-center justify-center px-6 py-20",children:[p.jsx(cr,{title:"Autorisation | Fleurons",description:"Autoriser une application à accéder à Fleurons.",noindex:!0}),p.jsx("div",{className:"w-full max-w-md",children:s?p.jsxs(p.Fragment,{children:[p.jsx("h1",{className:"font-display text-2xl mb-3",children:"Autorisation impossible"}),p.jsx("p",{className:"text-muted-foreground text-sm",children:s})]}):n?p.jsxs(p.Fragment,{children:[p.jsxs("h1",{className:"font-display text-3xl mb-3",children:["Connecter ",u," à Fleurons"]}),p.jsxs("p",{className:"text-muted-foreground text-sm mb-6",children:[u," pourra utiliser les outils de Fleurons en votre nom pendant que vous êtes connecté. Cela ne contourne pas les règles d'accès du site."]}),p.jsxs("ul",{className:"text-sm space-y-2 mb-8 border border-border rounded-lg p-4",children:[((f=n.client)==null?void 0:f.redirect_uri)&&p.jsxs("li",{className:"text-muted-foreground break-all",children:["Redirection : ",n.client.redirect_uri]}),p.jsxs("li",{className:"text-muted-foreground",children:["Autorisations demandées : ",n.scope||"profil et email"]})]}),p.jsxs("div",{className:"flex gap-3",children:[p.jsx(Ka,{disabled:o,onClick:()=>l(!0),children:"Autoriser"}),p.jsx(Ka,{variant:"outline",disabled:o,onClick:()=>l(!1),children:"Annuler la connexion"})]})]}):p.jsx("p",{className:"text-muted-foreground text-sm",children:"Chargement de la demande d'autorisationâ¦"})})]})}function Z5(){const{pathname:t}=Gs();return b.useEffect(()=>{window.scrollTo(0,0)},[t]),null}const X5=new gO,e3=()=>p.jsx(vO,{client:X5,children:p.jsxs(qj,{children:[p.jsx(AA,{}),p.jsx(aR,{}),p.jsxs(gN,{children:[p.jsx(Z5,{}),p.jsxs(lN,{children:[p.jsx(en,{path:"/",element:p.jsx(PM,{})}),p.jsx(en,{path:"/episodes",element:p.jsx(jM,{})}),p.jsx(en,{path:"/episode/:slug",element:p.jsx(RM,{})}),p.jsx(en,{path:"/contact",element:p.jsx(o$,{})}),p.jsx(en,{path:"/meilleurs-podcasts-business",element:p.jsx(l$,{})}),p.jsx(en,{path:"/coworking-bordeaux",element:p.jsx(d$,{})}),p.jsx(en,{path:"/coworking-paris-17",element:p.jsx(p$,{})}),p.jsx(en,{path:"/auth",element:p.jsx(J5,{})}),p.jsx(en,{path:"/.lovable/oauth/consent",element:p.jsx(Q5,{})}),p.jsx(en,{path:"*",element:p.jsx(m$,{})})]})]})]})});n_(document.getElementById("root")).render(p.jsx(e3,{}));
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.